electrum

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

commit 151ac099a98ce445d132cdb52429f3c11e4d6db0
parent 3704b9c398cd49f133c17001209ed07adbbdb397
Author: ThomasV <thomasv@electrum.org>
Date:   Mon,  8 Feb 2016 12:44:45 +0100

kivy: simplify UI, remove 'Save' button

Diffstat:
Mgui/kivy/uix/screens.py | 18+++++++++++++++---
Mgui/kivy/uix/ui_screens/receive.kv | 14++------------
2 files changed, 17 insertions(+), 15 deletions(-)

diff --git a/gui/kivy/uix/screens.py b/gui/kivy/uix/screens.py @@ -320,18 +320,28 @@ class ReceiveScreen(CScreen): amount = str(self.screen.amount) message = str(self.screen.message) #.ids.message_input.text) if not message and not amount: - self.app.show_error(_('No message or amount')) - return + return False if amount: amount = self.app.get_amount(amount) else: amount = 0 req = self.app.wallet.make_payment_request(addr, amount, message, None) self.app.wallet.add_payment_request(req, self.app.electrum_config) - self.app.show_info(_('Request saved')) self.app.update_tab('requests') + return True + + def on_amount(self): + self.do_save() + self.update_qr() + + def on_message(self): + self.do_save() + self.update_qr() def do_new(self): + if self.do_save(): + self.app.show_info(_('Request saved')) + self.app.receive_address = None self.screen.amount = '' self.screen.message = '' @@ -369,11 +379,13 @@ class ContactsScreen(CScreen): pr_text = { PR_UNPAID:_('Pending'), + PR_UNKNOWN:_('Unknown'), PR_PAID:_('Paid'), PR_EXPIRED:_('Expired') } pr_icon = { PR_UNPAID: 'atlas://gui/kivy/theming/light/important', + PR_UNKNOWN: 'atlas://gui/kivy/theming/light/important', PR_PAID: 'atlas://gui/kivy/theming/light/confirmed', PR_EXPIRED: 'atlas://gui/kivy/theming/light/close' } diff --git a/gui/kivy/uix/ui_screens/receive.kv b/gui/kivy/uix/ui_screens/receive.kv @@ -17,9 +17,9 @@ ReceiveScreen: on_address: self.parent.update_qr() on_amount: - self.parent.update_qr() + self.parent.on_amount() on_message: - self.parent.update_qr() + self.parent.on_message() BoxLayout padding: '12dp', '12dp', '12dp', '12dp' @@ -104,16 +104,6 @@ ReceiveScreen: height: '48dp' on_release: s.parent.do_share() Button: - text: _('Save') - size_hint: 1, None - height: '48dp' - on_release: s.parent.do_save() - BoxLayout: - size_hint: 1, None - height: '48dp' - Widget: - size_hint: 1, 1 - Button: text: _('New') size_hint: 1, None height: '48dp'