kivy: move "lightning" (gossip) btn inside "channels" dialog
and show toast msg when opening "channels" dialog if lightning is not available for wallet
This commit is contained in:
@@ -456,9 +456,6 @@ BoxLayout:
|
|||||||
ActionOvrButton:
|
ActionOvrButton:
|
||||||
name: 'network'
|
name: 'network'
|
||||||
text: _('Network')
|
text: _('Network')
|
||||||
ActionOvrButton:
|
|
||||||
name: 'lightning'
|
|
||||||
text: _('Lightning')
|
|
||||||
ActionOvrButton:
|
ActionOvrButton:
|
||||||
name: 'addresses_dialog'
|
name: 'addresses_dialog'
|
||||||
text: _('Addresses')
|
text: _('Addresses')
|
||||||
|
|||||||
@@ -736,6 +736,9 @@ class ElectrumWindow(App, Logger):
|
|||||||
ref.data = xpub
|
ref.data = xpub
|
||||||
master_public_keys_layout.add_widget(ref)
|
master_public_keys_layout.add_widget(ref)
|
||||||
popup.open()
|
popup.open()
|
||||||
|
elif name == 'lightning_channels_dialog' and not self.wallet.can_have_lightning():
|
||||||
|
self.show_error(_("Not available for this wallet.") + "\n\n" +
|
||||||
|
_("Lightning is currently restricted to HD wallets with p2wpkh addresses."))
|
||||||
elif name.endswith("_dialog"):
|
elif name.endswith("_dialog"):
|
||||||
getattr(self, name)()
|
getattr(self, name)()
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -90,8 +90,13 @@ Builder.load_string(r'''
|
|||||||
size_hint: 1, None
|
size_hint: 1, None
|
||||||
height: '48dp'
|
height: '48dp'
|
||||||
Widget:
|
Widget:
|
||||||
size_hint: 0.7, None
|
size_hint: 0.4, None
|
||||||
height: '48dp'
|
height: '48dp'
|
||||||
|
Button:
|
||||||
|
size_hint: 0.3, None
|
||||||
|
height: '48dp'
|
||||||
|
text: _('Show Gossip')
|
||||||
|
on_release: popup.app.popup_dialog('lightning')
|
||||||
Button:
|
Button:
|
||||||
size_hint: 0.3, None
|
size_hint: 0.3, None
|
||||||
height: '48dp'
|
height: '48dp'
|
||||||
|
|||||||
Reference in New Issue
Block a user