1
0

Merge pull request #85 from bkkcoins/qt-switch-gui

Add Qt button to switch to Lite mode.
This commit is contained in:
ThomasV
2013-01-07 02:49:03 -08:00
4 changed files with 29 additions and 11 deletions

View File

@@ -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."""