electrum

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

commit cb6ebcf7d1ec71e70128ccc7c1e71fd5c25b048a
parent 1843d29d60547218a1184db0d424db0e2d1278d1
Author: ThomasV <thomasv@electrum.org>
Date:   Tue, 13 Oct 2015 15:58:34 +0200

kivy: fix create_restore dialog

Diffstat:
Mgui/kivy/uix/dialogs/create_restore.py | 56++++++++++++++++++++++++++++++++------------------------
Mgui/kivy/uix/screens.py | 2++
2 files changed, 34 insertions(+), 24 deletions(-)

diff --git a/gui/kivy/uix/dialogs/create_restore.py b/gui/kivy/uix/dialogs/create_restore.py @@ -35,6 +35,14 @@ Builder.load_string(''' size_hint_y: None height: '48sp' +<CreateAccountButton@Button>: + root: None + size_hint: 1, None + height: '48sp' + on_press: if self.root: self.root.dispatch('on_press', self) + on_release: if self.root: self.root.dispatch('on_release', self) + + <-CreateAccountDialog> text_color: .854, .925, .984, 1 @@ -130,11 +138,11 @@ Builder.load_string(''' spacing: '14dp' size_hint: 1, None height: self.minimum_height - CreateAccountButtonGreen: + CreateAccountButton: id: create text: _('Create a Wallet') root: root - CreateAccountButtonBlue: + CreateAccountButton: id: restore text: _('I already have a wallet') root: root @@ -174,11 +182,11 @@ Builder.load_string(''' spacing: '12dp' size_hint: 1, None height: self.minimum_height - CreateAccountButtonBlue: + CreateAccountButton: id: back text: _('Back') root: root - CreateAccountButtonGreen: + CreateAccountButton: id: next text: _('Next') root: root @@ -235,11 +243,11 @@ Builder.load_string(''' spacing: '12dp' size_hint: 1, None height: self.minimum_height - CreateAccountButtonBlue: + CreateAccountButton: id: back text: _('Back') root: root - CreateAccountButtonGreen: + CreateAccountButton: id: confirm text: _('Confirm') root: root @@ -296,12 +304,12 @@ Builder.load_string(''' spacing: '12dp' size_hint: 1, None height: self.minimum_height - CreateAccountButtonBlue: + CreateAccountButton: id: back text: _('Back') root: root disabled: True if root.mode[0] == 'r' else self.disabled - CreateAccountButtonGreen: + CreateAccountButton: id: next text: _('Confirm') if root.mode[0] == 'r' else _('Next') root: root @@ -350,13 +358,13 @@ class CreateRestoreDialog(CreateAccountDialog): self.ids.but_close.disabled = True self.ids.but_close.opacity = 0 self._back = _back = partial(app.dispatch, 'on_back') - app.navigation_higherarchy.append(_back) + #app.navigation_higherarchy.append(_back) def close(self): app = App.get_running_app() - if self._back in app.navigation_higherarchy: - app.navigation_higherarchy.pop() - self._back = None + #if self._back in app.navigation_higherarchy: + # app.navigation_higherarchy.pop() + # self._back = None super(CreateRestoreDialog, self).close() @@ -389,7 +397,7 @@ class ChangePasswordDialog(CreateAccountDialog): stepper.source = 'atlas://gui/kivy/theming/light/stepper_left' self._back = _back = partial(self.ids.back.dispatch, 'on_release') app = App.get_running_app() - app.navigation_higherarchy.append(_back) + #app.navigation_higherarchy.append(_back) def close(self): ids = self.ids @@ -402,9 +410,9 @@ class ChangePasswordDialog(CreateAccountDialog): ids.ti_confirm_password.text = "" ids.ti_confirm_password.focus = False app = App.get_running_app() - if self._back in app.navigation_higherarchy: - app.navigation_higherarchy.pop() - self._back = None + #if self._back in app.navigation_higherarchy: + # app.navigation_higherarchy.pop() + # self._back = None super(ChangePasswordDialog, self).close() @@ -431,13 +439,13 @@ class InitSeedDialog(CreateAccountDialog): stepper.opacity = 1 stepper.source = 'atlas://gui/kivy/theming/light/stepper_full' self._back = _back = partial(self.ids.back.dispatch, 'on_release') - app.navigation_higherarchy.append(_back) + #app.navigation_higherarchy.append(_back) def close(self): app = App.get_running_app() - if self._back in app.navigation_higherarchy: - app.navigation_higherarchy.pop() - self._back = None + #if self._back in app.navigation_higherarchy: + # app.navigation_higherarchy.pop() + # self._back = None super(InitSeedDialog, self).close() @@ -464,7 +472,7 @@ class RestoreSeedDialog(CreateAccountDialog): self._back = _back = partial(self.ids.back.dispatch, 'on_release') app = App.get_running_app() - app.navigation_higherarchy.append(_back) + #app.navigation_higherarchy.append(_back) def on_key_down(self, keyboard, keycode, key, modifiers): if keycode[0] in (13, 271): @@ -487,7 +495,7 @@ class RestoreSeedDialog(CreateAccountDialog): def close(self): self._remove_keyboard() app = App.get_running_app() - if self._back in app.navigation_higherarchy: - app.navigation_higherarchy.pop() - self._back = None + #if self._back in app.navigation_higherarchy: + # app.navigation_higherarchy.pop() + # self._back = None super(RestoreSeedDialog, self).close() diff --git a/gui/kivy/uix/screens.py b/gui/kivy/uix/screens.py @@ -134,6 +134,8 @@ class HistoryScreen(CScreen): yield (conf, icon, time_str, label, v_str, balance_str, tx_hash, quote_text) def update(self, see_all=False): + if self.app.wallet is None: + return history_card = self.screen.ids.recent_activity_card history = self.parse_history(reversed(