Browse Source

kivy: support wallet is None

283
ThomasV 9 years ago
parent
commit
d9c567446c
  1. 1
      gui/kivy/main.kv
  2. 1
      gui/kivy/main_window.py
  3. 6
      gui/kivy/uix/screens.py

1
gui/kivy/main.kv

@ -371,6 +371,7 @@ BoxLayout:
text: app.status
font_size: '22dp'
minimum_width: '1dp'
disabled: app.wallet is None
on_release: app.popup_dialog('status')
ActionOverflow:

1
gui/kivy/main_window.py

@ -522,6 +522,7 @@ class ElectrumWindow(App):
def update_status(self, *dt):
if not self.wallet:
self.status = _("No Wallet")
return
if self.network is None or not self.network.is_running():
self.status = _("Offline")

6
gui/kivy/uix/screens.py

@ -326,6 +326,8 @@ class ReceiveScreen(CScreen):
self.screen.message = ''
def get_new_address(self):
if not self.app.wallet:
return False
addr = self.app.wallet.get_unused_address(None)
if addr is None:
return False
@ -476,12 +478,10 @@ class RequestsScreen(CScreen):
kvname = 'requests'
def update(self):
self.menu_actions = [('Show', self.do_show), ('Details', self.do_view), ('Delete', self.do_delete)]
requests_list = self.screen.ids.requests_container
requests_list.clear_widgets()
_list = self.app.wallet.get_sorted_requests(self.app.electrum_config)
_list = self.app.wallet.get_sorted_requests(self.app.electrum_config) if self.app.wallet else []
for req in _list:
address = req['address']
timestamp = req.get('time', 0)

Loading…
Cancel
Save