electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit f33fbefce08468d22ecbb60802e7e38ff8db5f15
parent 23fe2062a15d9293a73419b2d9e08ec1c6552927
Author: qua-non <akshayaurora@gmail.com>
Date:   Sat, 22 Feb 2014 10:25:26 +0530

wizzard: ensure ensure `on_wizard_complete` is called

Diffstat:
Mgui/kivy/dialog.py | 6++++--
Mgui/kivy/installwizard.py | 4++--
Mgui/kivy/main_window.py | 4++--
3 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/gui/kivy/dialog.py b/gui/kivy/dialog.py @@ -495,17 +495,19 @@ class RestoreSeedDialog(CreateAccountDialog): tis._keyboard.bind(on_key_down=self.on_key_down) stepper = self.ids.stepper stepper.opacity = 1 - stepper.source = 'atlas://gui/kivy/theming/light/stepper_restore_seed' + stepper.source = ('atlas://gui/kivy/theming" + "/light/stepper_restore_seed') self._back = _back = partial(self.ids.back.dispatch, 'on_release') app.navigation_higherarchy.append(_back) def on_key_down(self, keyboard, keycode, key, modifiers): if keycode[1] == 'enter': self.on_enter() + return True #super def on_enter(self): - self._remove_keyboard() + #self._remove_keyboard() # press next self.ids.next.dispatch('on_release') diff --git a/gui/kivy/installwizard.py b/gui/kivy/installwizard.py @@ -295,7 +295,7 @@ class InstallWizard(Widget): wallet.start_threads(self.network) if not mode == 'restore': - return + return self.dispatch('on_wizard_complete', wallet) def get_text(text): def set_text(*l): app.info_bubble.ids.lbl.text=text @@ -311,7 +311,7 @@ class InstallWizard(Widget): app.show_info(_("Recovery successful")) else: app.show_info(_("No transactions found for this seed")) - self.dispatch('on_wizard_complete', wallet) + return self.dispatch('on_wizard_complete', wallet) self.waiting_dialog(lambda: wallet.restore(get_text), on_complete=on_complete) diff --git a/gui/kivy/main_window.py b/gui/kivy/main_window.py @@ -158,8 +158,8 @@ class ElectrumWindow(App): def on_wizard_complete(self, instance, wallet): if not wallet: Logger.debug('Electrum: No Wallet set/found. Exiting...') - self.stop() - sys.exit() + app.show_error('Electrum: No Wallet set/found. Exiting...', + exit=True) return # plugins that need to change the GUI do it here