electrum

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

commit 680c9c888a4620527ef85eee6c0daac2f26c07dd
parent c71b8d7328a21e69116da2e392ce3e20b1ba7ae9
Author: ThomasV <thomasv@electrum.org>
Date:   Fri, 11 Dec 2015 15:48:56 +0100

kivy: add save_request button

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

diff --git a/gui/kivy/uix/screens.py b/gui/kivy/uix/screens.py @@ -293,9 +293,22 @@ class ReceiveScreen(CScreen): uri = self.get_URI() self.app._clipboard.put(uri, 'text/plain') + def do_save(self): + addr = str(self.screen.address) + amount = str(self.screen.amount) + message = unicode(self.screen.message) + if not message and not amount: + self.app.show_error(_('No message or amount')) + return False + amount = self.app.get_amount(amount) + 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_error(_('Request saved')) + def do_clear(self): self.screen.amount = '' self.screen.message = '' + self.update() diff --git a/gui/kivy/uix/ui_screens/receive.kv b/gui/kivy/uix/ui_screens/receive.kv @@ -93,5 +93,10 @@ ReceiveScreen: size_hint: 1, None height: '48dp' on_release: s.parent.do_clear() + Button: + text: _('Save') + size_hint: 1, None + height: '48dp' + on_release: s.parent.do_save() Widget: size_hint: 1, 0.3