X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=lib%2Fgui_lite.py;h=dbf92910844ecb72e90148a8998e395c2d4c3c0f;hb=2d031013a524e1743a7bdc911be7fb34f7b6bc2e;hp=42cbfa5da2995fc7e4e081ebfcee5444e13e5612;hpb=3e8099b6197568976b663b4feeebfd3fb205f1d2;p=electrum-nvc.git diff --git a/lib/gui_lite.py b/lib/gui_lite.py index 42cbfa5..dbf9291 100644 --- a/lib/gui_lite.py +++ b/lib/gui_lite.py @@ -131,14 +131,17 @@ def csv_transaction(wallet): class ElectrumGui(QObject): - def __init__(self, wallet, config): + def __init__(self, wallet, config, expert=None): super(QObject, self).__init__() self.wallet = wallet self.config = config self.check_qt_version() - self.app = QApplication(sys.argv) - + self.expert = expert + if self.expert != None: + self.app = self.expert.app + else: + self.app = QApplication(sys.argv) def check_qt_version(self): qtVersion = qVersion() @@ -165,14 +168,15 @@ class ElectrumGui(QObject): if url: self.set_url(url) - - timer = Timer() - timer.start() - self.expert = gui_qt.ElectrumWindow(self.wallet, self.config) - self.expert.app = self.app - self.expert.connect_slots(timer) - self.expert.update_wallet() - self.app.exec_() + + if self.expert == None: + timer = Timer() + timer.start() + self.expert = gui_qt.ElectrumWindow(self.wallet, self.config) + self.expert.app = self.app + self.expert.connect_slots(timer) + self.expert.update_wallet() + self.app.exec_() def expand(self): """Hide the lite mode window and show pro-mode."""