tlaunch wizard if user opens an unfinished wallet - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit 3d2a410de0a4972a632069ecfad9b4108cb4027c DIR parent 3c6cfc8b70671d314e9cac41d5237abbf5ac7266 HTML Author: ThomasV <thomasv@gitorious> Date: Thu, 29 Jan 2015 14:04:04 +0100 launch wizard if user opens an unfinished wallet Diffstat: M gui/qt/main_window.py | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) --- DIR diff --git a/gui/qt/main_window.py b/gui/qt/main_window.py t@@ -267,9 +267,31 @@ class ElectrumWindow(QMainWindow): # close current wallet self.close_wallet() - # load new wallet - wallet = Wallet(storage) - wallet.start_threads(self.network) + + # read wizard action + try: + wallet = Wallet(storage) + except BaseException as e: + QMessageBox.warning(None, _('Warning'), str(e), _('OK')) + return + action = wallet.get_action() + + # run wizard + if action is not None: + import installwizard + wizard = installwizard.InstallWizard(self.config, self.network, storage) + try: + wallet = wizard.run(action) + except BaseException as e: + traceback.print_exc(file=sys.stdout) + QMessageBox.information(None, _('Error'), str(e), _('OK')) + return + if not wallet: + return + else: + wallet.start_threads(self.network) + + # load new wallet in gui self.load_wallet(wallet)