Browse Source

follow-up previous commit

hard-fail-on-bad-server-string
ThomasV 5 years ago
parent
commit
fc85dcead6
  1. 3
      electrum/gui/qt/__init__.py
  2. 6
      electrum/gui/qt/main_window.py

3
electrum/gui/qt/__init__.py

@ -215,9 +215,6 @@ class ElectrumGui(Logger):
self.watchtower_dialog.bring_to_top()
def show_network_dialog(self):
if not self.daemon.network:
parent.show_warning(_('You are using Electrum in offline mode; restart Electrum if you want to get connected'), title=_('Offline'))
return
if self.network_dialog:
self.network_dialog.on_update()
self.network_dialog.show()

6
electrum/gui/qt/main_window.py

@ -639,7 +639,8 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger):
# Settings / Preferences are all reserved keywords in macOS using this as work around
tools_menu.addAction(_("Electrum preferences") if sys.platform == 'darwin' else _("Preferences"), self.settings_dialog)
tools_menu.addAction(_("&Network"), self.gui_object.show_network_dialog)
if self.network:
tools_menu.addAction(_("&Network"), self.gui_object.show_network_dialog)
if self.wallet.has_lightning():
tools_menu.addAction(_("&Lightning"), self.gui_object.show_lightning_dialog)
tools_menu.addAction(_("&Watchtower"), self.gui_object.show_watchtower_dialog)
@ -1999,7 +2000,8 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger):
if self.wallet.has_lightning():
self.lightning_button = StatusBarButton(read_QIcon("lightning.png"), _("Lightning Network"), self.gui_object.show_lightning_dialog)
sb.addPermanentWidget(self.lightning_button)
self.status_button = StatusBarButton(read_QIcon("status_disconnected.png"), _("Network"), self.gui_object.show_network_dialog)
if self.network:
self.status_button = StatusBarButton(read_QIcon("status_disconnected.png"), _("Network"), self.gui_object.show_network_dialog)
sb.addPermanentWidget(self.status_button)
run_hook('create_status_bar', sb)
self.setStatusBar(sb)

Loading…
Cancel
Save