electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 0682166314464506d07e58ce95da96ba8940a900
parent 56a399e1da2117992ec4dc4d794bf860740ea243
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:
Mgui/kivy/main.kv | 4++--
Mgui/kivy/main_window.py | 11+++++++++++
Mgui/kivy/uix/dialogs/__init__.py | 7+++++++
Mgui/kivy/uix/ui_screens/status.kv | 19++++++++++++++-----
4 files changed, 34 insertions(+), 7 deletions(-)

diff --git a/gui/kivy/main.kv b/gui/kivy/main.kv @@ -44,7 +44,7 @@ # Custom Global Widgets -<TopLabel@Label> +<TopLabel> size_hint_y: None text_size: self.width, None height: self.texture_size[1] @@ -126,7 +126,7 @@ size: self.size pos: self.pos -<RefLabel@TopLabel> +<RefLabel> font_size: '6pt' name: '' data: '' diff --git a/gui/kivy/main_window.py b/gui/kivy/main_window.py @@ -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' @@ -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() diff --git a/gui/kivy/uix/dialogs/__init__.py b/gui/kivy/uix/dialogs/__init__.py @@ -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 diff --git a/gui/kivy/uix/ui_screens/status.kv b/gui/kivy/uix/ui_screens/status.kv @@ -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 ''