tMerge pull request #4419 from SomberNight/kivy_show_all_xpubs - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit 0682166314464506d07e58ce95da96ba8940a900 DIR parent 56a399e1da2117992ec4dc4d794bf860740ea243 HTML Author: ThomasV <thomasv@electrum.org> Date: Mon, 11 Jun 2018 12:11:35 +0200 Merge pull request #4419 from SomberNight/kivy_show_all_xpubs kivy: show all xpubs Diffstat: M gui/kivy/main.kv | 4 ++-- M gui/kivy/main_window.py | 11 +++++++++++ M gui/kivy/uix/dialogs/__init__.py | 7 +++++++ M gui/kivy/uix/ui_screens/status.kv | 19 ++++++++++++++----- 4 files changed, 34 insertions(+), 7 deletions(-) --- DIR diff --git a/gui/kivy/main.kv b/gui/kivy/main.kv t@@ -44,7 +44,7 @@ # Custom Global Widgets -<TopLabel@Label> +<TopLabel> size_hint_y: None text_size: self.width, None height: self.texture_size[1] t@@ -126,7 +126,7 @@ size: self.size pos: self.pos -<RefLabel@TopLabel> +<RefLabel> font_size: '6pt' name: '' data: '' DIR diff --git a/gui/kivy/main_window.py b/gui/kivy/main_window.py t@@ -38,6 +38,7 @@ from kivy.lang import Builder from .uix.dialogs.installwizard import InstallWizard from .uix.dialogs import InfoBubble from .uix.dialogs import OutputList, OutputItem +from .uix.dialogs import TopLabel, RefLabel #from kivy.core.window import Window #Window.softinput_mode = 'below_target' t@@ -563,6 +564,16 @@ class ElectrumWindow(App): from .uix.dialogs.wallets import WalletDialog d = WalletDialog() d.open() + elif name == 'status': + popup = Builder.load_file('gui/kivy/uix/ui_screens/'+name+'.kv') + master_public_keys_layout = popup.ids.master_public_keys + for xpub in self.wallet.get_master_public_keys()[1:]: + master_public_keys_layout.add_widget(TopLabel(text=_('Master Public Key'))) + ref = RefLabel() + ref.name = _('Master Public Key') + ref.data = xpub + master_public_keys_layout.add_widget(ref) + popup.open() else: popup = Builder.load_file('gui/kivy/uix/ui_screens/'+name+'.kv') popup.open() DIR diff --git a/gui/kivy/uix/dialogs/__init__.py b/gui/kivy/uix/dialogs/__init__.py t@@ -213,3 +213,10 @@ class OutputList(Factory.GridLayout): b.value = self.app.format_amount_and_units(amount) self.add_widget(b) + +class TopLabel(Factory.Label): + pass + + +class RefLabel(TopLabel): + pass DIR diff --git a/gui/kivy/uix/ui_screens/status.kv b/gui/kivy/uix/ui_screens/status.kv t@@ -46,11 +46,20 @@ Popup: value: app.format_amount_and_units(root.unmatured) opacity: 1 if root.unmatured else 0 - TopLabel: - text: _('Master Public Key') - RefLabel: - data: app.wallet.get_master_public_key() or 'None' - name: _('Master Public Key') + GridLayout: + cols: 1 + height: self.minimum_height + size_hint_y: None + padding: '10dp' + spacing: '10dp' + id: master_public_keys + TopLabel: + text: _('Master Public Key') + RefLabel: + data: app.wallet.get_master_public_key() or 'None' + name: _('Master Public Key') + + TopLabel: id: seed_label text: _('This wallet is watching-only') if root.watching_only else ''