option to start hidden. fixes #720
This commit is contained in:
parent
a2e39bac8e
commit
bf969c14ff
1
electrum
1
electrum
|
@ -84,6 +84,7 @@ def arg_parser():
|
||||||
parser.add_option("--bip32", action="store_true", dest="bip32", default=False, help="bip32 (not final)")
|
parser.add_option("--bip32", action="store_true", dest="bip32", default=False, help="bip32 (not final)")
|
||||||
parser.add_option("--2of3", action="store_true", dest="2of3", default=False, help="create 2of3 wallet")
|
parser.add_option("--2of3", action="store_true", dest="2of3", default=False, help="create 2of3 wallet")
|
||||||
parser.add_option("--mpk", dest="mpk", default=False, help="restore from master public key")
|
parser.add_option("--mpk", dest="mpk", default=False, help="restore from master public key")
|
||||||
|
parser.add_option("-m", action="store_true", dest="hide_gui", default=False, help="hide GUI on startup")
|
||||||
return parser
|
return parser
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -128,8 +128,6 @@ class ElectrumGui:
|
||||||
self.config.set_key('lite_mode', False, True)
|
self.config.set_key('lite_mode', False, True)
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
self.lite_window = None
|
self.lite_window = None
|
||||||
self.main_window.show()
|
|
||||||
self.main_window.raise_()
|
|
||||||
return
|
return
|
||||||
|
|
||||||
actuator = lite_window.MiniActuator(self.main_window)
|
actuator = lite_window.MiniActuator(self.main_window)
|
||||||
|
@ -137,10 +135,6 @@ class ElectrumGui:
|
||||||
self.lite_window = lite_window.MiniWindow(actuator, self.go_full, self.config)
|
self.lite_window = lite_window.MiniWindow(actuator, self.go_full, self.config)
|
||||||
driver = lite_window.MiniDriver(self.main_window, self.lite_window)
|
driver = lite_window.MiniDriver(self.main_window, self.lite_window)
|
||||||
|
|
||||||
if self.config.get('lite_mode') is True:
|
|
||||||
self.go_lite()
|
|
||||||
else:
|
|
||||||
self.go_full()
|
|
||||||
|
|
||||||
|
|
||||||
def check_qt_version(self):
|
def check_qt_version(self):
|
||||||
|
@ -222,6 +216,16 @@ class ElectrumGui:
|
||||||
#lite window
|
#lite window
|
||||||
self.init_lite()
|
self.init_lite()
|
||||||
|
|
||||||
|
# initial configuration
|
||||||
|
if self.config.get('hide_gui') is True and self.tray.isVisible():
|
||||||
|
self.main_window.hide()
|
||||||
|
self.lite_window.hide()
|
||||||
|
else:
|
||||||
|
if self.config.get('lite_mode') is True:
|
||||||
|
self.go_lite()
|
||||||
|
else:
|
||||||
|
self.go_full()
|
||||||
|
|
||||||
# plugins that need to change the GUI do it here
|
# plugins that need to change the GUI do it here
|
||||||
run_hook('init')
|
run_hook('init')
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue