1
0

kivy: show all xpubs

This commit is contained in:
SomberNight
2018-06-08 20:33:09 +02:00
parent 7043d6907f
commit 0962766b72
4 changed files with 34 additions and 7 deletions

View File

@@ -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: ''

View File

@@ -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()

View File

@@ -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

View File

@@ -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 ''