commit d9c567446c7b51e321ed96614c12cd51282a1329
parent d3a9af9e796d8ae42b80ca6172fc4075d77599c5
Author: ThomasV <thomasv@electrum.org>
Date: Thu, 10 Mar 2016 16:22:19 +0100
kivy: support wallet is None
Diffstat:
3 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/gui/kivy/main.kv b/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:
diff --git a/gui/kivy/main_window.py b/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")
diff --git a/gui/kivy/uix/screens.py b/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)