From f7a3b53c3fc200f675abe0475197011e9b805c8d Mon Sep 17 00:00:00 2001 From: ThomasV Date: Fri, 18 Dec 2015 11:29:56 +0100 Subject: [PATCH] kivy: add status dialog --- gui/kivy/main.kv | 1 + gui/kivy/main_window.py | 1 - gui/kivy/uix/ui_screens/status.kv | 25 +++++++++++++++++++++++++ 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 gui/kivy/uix/ui_screens/status.kv diff --git a/gui/kivy/main.kv b/gui/kivy/main.kv index e2861341a..0b5156ad5 100644 --- a/gui/kivy/main.kv +++ b/gui/kivy/main.kv @@ -393,6 +393,7 @@ BoxLayout: .format(app.status) font_size: '22dp' minimum_width: '1dp' + on_release: app.popup_dialog('status') ActionOverflow: id: ao diff --git a/gui/kivy/main_window.py b/gui/kivy/main_window.py index 4da9e8cb0..696083e7d 100644 --- a/gui/kivy/main_window.py +++ b/gui/kivy/main_window.py @@ -322,7 +322,6 @@ class ElectrumWindow(App): else: wallet.start_threads(self.network) self.load_wallet(wallet) - self.on_resume() def create_wallet_dialog(self, l): diff --git a/gui/kivy/uix/ui_screens/status.kv b/gui/kivy/uix/ui_screens/status.kv new file mode 100644 index 000000000..4d02f89bc --- /dev/null +++ b/gui/kivy/uix/ui_screens/status.kv @@ -0,0 +1,25 @@ +Popup: + title: "Balance" + confirmed: 0 + unconfirmed: 0 + unmatured: 0 + on_parent: + self.confirmed, self.unconfirmed, self.x = app.wallet.get_balance() + BoxLayout: + orientation: 'vertical' + spacing: '1dp' + GridLayout: + cols:2 + Label: + text: _("Confirmed:") + Label: + text: app.format_amount_and_units(root.confirmed) + Label: + text: _("Unconfirmed:") + Label: + text: app.format_amount_and_units(root.unconfirmed) + Label: + text: "Unmatured:" + Label: + text: app.format_amount_and_units(root.unmatured) + Widget