tkivy: move "lightning" (gossip) btn inside "channels" dialog - electrum - Electrum Bitcoin wallet
 (HTM) git clone https://git.parazyd.org/electrum
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) Submodules
       ---
 (DIR) commit f453bfe82ecdc5b216f51b18b7cb110c6ba137d2
 (DIR) parent 06b9d485351e48967390b3b7edac181f0579a994
 (HTM) Author: SomberNight <somber.night@protonmail.com>
       Date:   Wed, 16 Dec 2020 14:22:22 +0100
       
       kivy: move "lightning" (gossip) btn inside "channels" dialog
       
       and show toast msg when opening "channels" dialog if lightning
       is not available for wallet
       
       Diffstat:
         M electrum/gui/kivy/main.kv           |       3 ---
         M electrum/gui/kivy/main_window.py    |       3 +++
         M electrum/gui/kivy/uix/dialogs/ligh… |       7 ++++++-
       
       3 files changed, 9 insertions(+), 4 deletions(-)
       ---
 (DIR) diff --git a/electrum/gui/kivy/main.kv b/electrum/gui/kivy/main.kv
       t@@ -457,9 +457,6 @@ BoxLayout:
                            name: 'network'
                            text: _('Network')
                        ActionOvrButton:
       -                    name: 'lightning'
       -                    text: _('Lightning')
       -                ActionOvrButton:
                            name: 'addresses_dialog'
                            text: _('Addresses')
                        ActionOvrButton:
 (DIR) diff --git a/electrum/gui/kivy/main_window.py b/electrum/gui/kivy/main_window.py
       t@@ -736,6 +736,9 @@ class ElectrumWindow(App, Logger):
                        ref.data = xpub
                        master_public_keys_layout.add_widget(ref)
                    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"):
                    getattr(self, name)()
                else:
 (DIR) diff --git a/electrum/gui/kivy/uix/dialogs/lightning_channels.py b/electrum/gui/kivy/uix/dialogs/lightning_channels.py
       t@@ -90,11 +90,16 @@ Builder.load_string(r'''
                    size_hint: 1, None
                    height: '48dp'
                    Widget:
       -                size_hint: 0.7, None
       +                size_hint: 0.4, None
                        height: '48dp'
                    Button:
                        size_hint: 0.3, None
                        height: '48dp'
       +                text: _('Show Gossip')
       +                on_release: popup.app.popup_dialog('lightning')
       +            Button:
       +                size_hint: 0.3, None
       +                height: '48dp'
                        text: _('New...')
                        disabled: not root.has_lightning
                        on_release: popup.app.popup_dialog('lightning_open_channel_dialog')