save config after checking qt version
This commit is contained in:
parent
799654dd74
commit
cdf81f370b
|
@ -10,12 +10,6 @@ except ImportError:
|
||||||
sys.exit(0)
|
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
|
from decimal import Decimal as D
|
||||||
|
@ -62,8 +56,19 @@ class ElectrumGui(QObject):
|
||||||
|
|
||||||
self.wallet = wallet
|
self.wallet = wallet
|
||||||
self.config = config
|
self.config = config
|
||||||
|
self.check_qt_version()
|
||||||
self.app = QApplication(sys.argv)
|
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):
|
def main(self, url):
|
||||||
actuator = MiniActuator(self.wallet)
|
actuator = MiniActuator(self.wallet)
|
||||||
self.connect(self, SIGNAL("updateservers()"),
|
self.connect(self, SIGNAL("updateservers()"),
|
||||||
|
|
|
@ -481,5 +481,3 @@ class WalletSynchronizer(threading.Thread):
|
||||||
else:
|
else:
|
||||||
break
|
break
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -59,6 +59,7 @@ class SimpleConfig:
|
||||||
def set_key(self, key, value, save = False):
|
def set_key(self, key, value, save = False):
|
||||||
# find where a setting comes from and save it there
|
# find where a setting comes from and save it there
|
||||||
if self.options_config.get(key):
|
if self.options_config.get(key):
|
||||||
|
print "Warning: cannot change '%s' because it was passed as a command-line option"%key
|
||||||
return
|
return
|
||||||
|
|
||||||
elif self.user_config.get(key):
|
elif self.user_config.get(key):
|
||||||
|
|
Loading…
Reference in New Issue