commit cdf81f370b8ccab9c1b55726233b881c4908692a
parent 799654dd7410af5611c3284dbfb1fe6a9cf84d8e
Author: ThomasV <thomasv@gitorious>
Date: Sat, 13 Oct 2012 07:38:22 +0200
save config after checking qt version
Diffstat:
3 files changed, 12 insertions(+), 8 deletions(-)
diff --git 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
@@ -481,5 +481,3 @@ class WalletSynchronizer(threading.Thread):
else:
break
-
-
diff --git 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):