diff --git a/lib/gui_lite.py b/lib/gui_lite.py index 6552751e..8d40cdb4 100644 --- a/lib/gui_lite.py +++ b/lib/gui_lite.py @@ -10,12 +10,6 @@ except ImportError: sys.exit(0) -qtVersion = qVersion() -if not(int(qtVersion[0]) >= 4 and int(qtVersion[2]) >= 7): - app = QApplication(sys.argv) - QMessageBox.warning(None,"Could not start Lite GUI.", "Electrum was unable to load the 'Lite GUI' because it needs Qt version >= 4.7.\nPlease use the 'Qt' GUI") - sys.exit(0) - from decimal import Decimal as D @@ -62,8 +56,19 @@ class ElectrumGui(QObject): self.wallet = wallet self.config = config + self.check_qt_version() self.app = QApplication(sys.argv) + + def check_qt_version(self): + qtVersion = qVersion() + if not(int(qtVersion[0]) >= 4 and int(qtVersion[2]) >= 7): + app = QApplication(sys.argv) + QMessageBox.warning(None,"Could not start Lite GUI.", "Electrum was unable to load the 'Lite GUI' because it needs Qt version >= 4.7.\nChanging your config to use the 'Qt' GUI") + self.config.set_key('gui','qt',True) + sys.exit(0) + + def main(self, url): actuator = MiniActuator(self.wallet) self.connect(self, SIGNAL("updateservers()"), diff --git a/lib/interface.py b/lib/interface.py index 655f2ca2..24c5e04a 100644 --- a/lib/interface.py +++ b/lib/interface.py @@ -481,5 +481,3 @@ class WalletSynchronizer(threading.Thread): else: break - - diff --git a/lib/simple_config.py b/lib/simple_config.py index 90686af4..41087626 100644 --- a/lib/simple_config.py +++ b/lib/simple_config.py @@ -59,6 +59,7 @@ class SimpleConfig: def set_key(self, key, value, save = False): # find where a setting comes from and save it there if self.options_config.get(key): + print "Warning: cannot change '%s' because it was passed as a command-line option"%key return elif self.user_config.get(key):