Browse Source

kivy: receive_screen.clear

283
ThomasV 9 years ago
parent
commit
2d17dbb10c
  1. 2
      gui/kivy/main_window.py
  2. 8
      gui/kivy/uix/screens.py

2
gui/kivy/main_window.py

@ -497,7 +497,7 @@ class ElectrumWindow(App):
# Once GUI has been initialized check if we want to announce something
# since the callback has been called before the GUI was initialized
if self.receive_screen:
self.receive_screen.screen.address = ''
self.receive_screen.clear()
self.update_tabs()
self.notify_transactions()
run_hook('load_wallet', wallet, self)

8
gui/kivy/uix/screens.py

@ -320,13 +320,17 @@ class ReceiveScreen(CScreen):
status = self.app.wallet.get_request_status(self.screen.address)
self.screen.status = _('Payment received') if status == PR_PAID else ''
def clear(self):
self.screen.address = ''
self.screen.amount = ''
self.screen.message = ''
def get_new_address(self):
addr = self.app.wallet.get_unused_address(None)
if addr is None:
return False
self.clear()
self.screen.address = addr
self.screen.amount = ''
self.screen.message = ''
return True
def on_address(self, addr):

Loading…
Cancel
Save