Browse Source
Merge pull request #4419 from SomberNight/kivy_show_all_xpubs
kivy: show all xpubs
3.2.x
ThomasV
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with
34 additions and
7 deletions
-
gui/kivy/main.kv
-
gui/kivy/main_window.py
-
gui/kivy/uix/dialogs/__init__.py
-
gui/kivy/uix/ui_screens/status.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: '' |
|
|
|
|
|
@ -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() |
|
|
|
|
|
@ -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 |
|
|
|
|
|
@ -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 '' |
|
|
|