electrum

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

commit c478122cb11cc83ba4ab97bb8293f90a8db49434
parent 4a0fceca90b324be0748a3910b573ed6ded55f11
Author: ThomasV <thomasv@electrum.org>
Date:   Wed, 14 Oct 2015 14:18:15 +0200

kivy: connect do_clear button, fixes

Diffstat:
Mgui/kivy/main_window.py | 13-------------
Mgui/kivy/uix/screens.py | 15++++++++++-----
Mgui/kivy/uix/ui_screens/send.kv | 3+--
3 files changed, 11 insertions(+), 20 deletions(-)

diff --git a/gui/kivy/main_window.py b/gui/kivy/main_window.py @@ -581,7 +581,6 @@ class ElectrumWindow(App): #Logger.info('orientation: {}'.format(self._orientation)) #Logger.info('ui_mode: {}'.format(self._ui_mode)) - def save_new_contact(self, address, label): address = unicode(address) label = unicode(label) @@ -657,18 +656,6 @@ class ElectrumWindow(App): # wait for screen to load Clock.schedule_once(set_address, .5) - def do_clear(self): - tabs = self.tabs - screen_send = tabs.ids.screen_send - content = screen_send.ids.content - cts = content.ids - cts.payto_e.text = cts.message_e.text = cts.amount_e.text = \ - cts.fee_e.text = '' - - self.set_frozen(content, False) - - self.update_status() - def set_frozen(self, entry, frozen): if frozen: entry.disabled = True diff --git a/gui/kivy/uix/screens.py b/gui/kivy/uix/screens.py @@ -203,6 +203,12 @@ class SendScreen(CScreen): self.ids.message_e.text = uri.get('message', '') self.ids.amount_e.text = uri.get('amount', '') + def do_clear(self): + cts = self.ids + cts.payto_e.text = cts.message_e.text = cts.amount_e.text = '' + #self.set_frozen(content, False) + #self.update_status() + def do_send(self): scrn = self.ids label = unicode(scrn.message_e.text) @@ -216,11 +222,10 @@ class SendScreen(CScreen): return amount = self.app.get_amount(scrn.amount_e.text) - fee = scrn.fee_e.amt - if not fee: - app.show_error(_('Invalid Fee')) - return - + #fee = scrn.fee_e.amt + #if not fee: + # app.show_error(_('Invalid Fee')) + # return fee = None message = 'sending {} {} to {}'.format(self.app.base_unit, scrn.amount_e.text, r) outputs = [('address', to_address, amount)] diff --git a/gui/kivy/uix/ui_screens/send.kv b/gui/kivy/uix/ui_screens/send.kv @@ -164,12 +164,11 @@ SendScreen: text: _('Clear') size_hint_y: None height: '38dp' - disabled: False + on_release: send_screen.do_clear() Button: text: _('Send') size_hint_y: None height: '38dp' - disabled: False on_release: send_screen.do_send() Widget