URI: 
       tQt main_window: handle event 'ln_gossip_sync_progress' if LN disabled - electrum - Electrum Bitcoin wallet
  HTML git clone https://git.parazyd.org/electrum
   DIR Log
   DIR Files
   DIR Refs
   DIR Submodules
       ---
   DIR commit 09b3c8052982dc1fdcada054db0665c097743e57
   DIR parent 4682c3a9fcda7f3121b32f4a2cb3aabf957b242a
  HTML Author: SomberNight <somber.night@protonmail.com>
       Date:   Sun,  1 Mar 2020 04:28:13 +0100
       
       Qt main_window: handle event 'ln_gossip_sync_progress' if LN disabled
       
       Traceback (most recent call last):
         File "...\electrum\electrum\gui\qt\main_window.py", line 434, in on_network_qt
           self.update_lightning_icon()
         File "...\electrum\electrum\gui\qt\main_window.py", line 2091, in update_lightning_icon
           self.lightning_button.setMaximumWidth(25 + 4 * char_width_in_lineedit())
       AttributeError: 'ElectrumWindow' object has no attribute 'lightning_button'
       
       Diffstat:
         M electrum/gui/qt/main_window.py      |       4 ++++
       
       1 file changed, 4 insertions(+), 0 deletions(-)
       ---
   DIR diff --git a/electrum/gui/qt/main_window.py b/electrum/gui/qt/main_window.py
       t@@ -390,6 +390,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger):
        
            def on_network_qt(self, event, args=None):
                # Handle a network message in the GUI thread
       +        # note: all windows get events from all wallets!
                if event == 'wallet_updated':
                    wallet = args[0]
                    if wallet == self.wallet:
       t@@ -2050,6 +2051,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger):
                sb.addPermanentWidget(StatusBarButton(read_QIcon("preferences.png"), _("Preferences"), self.settings_dialog ) )
                self.seed_button = StatusBarButton(read_QIcon("seed.png"), _("Seed"), self.show_seed_dialog )
                sb.addPermanentWidget(self.seed_button)
       +        self.lightning_button = None
                if self.wallet.has_lightning() and self.network:
                    self.lightning_button = StatusBarButton(read_QIcon("lightning.png"), _("Lightning Network"), self.gui_object.show_lightning_dialog)
                    sb.addPermanentWidget(self.lightning_button)
       t@@ -2088,6 +2090,8 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger):
                self.coincontrol_sb.setVisible(True)
        
            def update_lightning_icon(self):  # TODO rate-limit?
       +        if self.lightning_button is None:
       +            return
                self.lightning_button.setMaximumWidth(25 + 4 * char_width_in_lineedit())
                cur, total = self.network.lngossip.get_sync_progress_estimate()
                # self.logger.debug(f"updating lngossip sync progress estimate: cur={cur}, total={total}")