tkivy: define app.wallet_name - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit 9cc76bc969e8029567828758725f52c2cad7a1f7 DIR parent 0ccc812f869571f52b68b5b2efb7eed1792216cd HTML Author: ThomasV <thomasv@electrum.org> Date: Wed, 15 Jun 2016 11:54:09 +0200 kivy: define app.wallet_name Diffstat: M gui/kivy/main.kv | 3 ++- M gui/kivy/main_window.py | 2 ++ M gui/kivy/uix/ui_screens/status.kv | 4 +--- 3 files changed, 5 insertions(+), 4 deletions(-) --- DIR diff --git a/gui/kivy/main.kv b/gui/kivy/main.kv t@@ -361,6 +361,7 @@ BoxLayout: app_icon_width: '100dp' with_previous: False size_hint_x: None + on_release: app.popup_dialog('status') ActionButton: id: action_status t@@ -370,7 +371,7 @@ BoxLayout: color: 0.7, 0.7, 0.7, 1 text: app.status font_size: '22dp' - minimum_width: '1dp' + #minimum_width: '1dp' on_release: app.popup_dialog('status') ActionOverflow: DIR diff --git a/gui/kivy/main_window.py b/gui/kivy/main_window.py t@@ -213,6 +213,8 @@ class ElectrumWindow(App): self._settings_dialog = None self._password_dialog = None + def wallet_name(self): + return os.path.basename(self.wallet.storage.path) if self.wallet else ' ' def on_pr(self, pr): if pr.verify(self.contacts): DIR diff --git a/gui/kivy/uix/ui_screens/status.kv b/gui/kivy/uix/ui_screens/status.kv t@@ -1,5 +1,3 @@ -#:import os os - Popup: title: "Electrum" confirmed: 0 t@@ -26,7 +24,7 @@ Popup: spacing: '10dp' BoxLabel: text: _('Wallet Name') - value: os.path.basename(app.wallet.storage.path) + value: app.wallet_name() BoxLabel: text: _("Wallet type:") value: app.wallet.wallet_type