Browse Source

save config after checking qt version

283
ThomasV 12 years ago
parent
commit
cdf81f370b
  1. 17
      lib/gui_lite.py
  2. 2
      lib/interface.py
  3. 1
      lib/simple_config.py

17
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()"),

2
lib/interface.py

@ -481,5 +481,3 @@ class WalletSynchronizer(threading.Thread):
else:
break

1
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):

Loading…
Cancel
Save