1
0

instantiate wizard only if needed

This commit is contained in:
ThomasV
2016-01-13 11:27:17 +01:00
parent 0219687d41
commit 632905dfbe
3 changed files with 58 additions and 50 deletions

View File

@@ -143,6 +143,9 @@ class ElectrumGui:
run_hook('on_new_window', w)
return w
def get_wizard(self):
return InstallWizard(self.config, self.app, self.plugins)
def start_new_window(self, path, uri):
'''Raises the window for the wallet if it is open. Otherwise
opens the wallet and creates a new window for it.'''
@@ -151,8 +154,7 @@ class ElectrumGui:
w.bring_to_top()
break
else:
wizard = InstallWizard(self.config, self.app, self.plugins)
wallet = self.daemon.load_wallet(path, wizard)
wallet = self.daemon.load_wallet(path, self.get_wizard)
if not wallet:
return
w = self.create_window_for_wallet(wallet)