electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 8118bd1d727b0b36045f53d2b5aa30295ffa1848
parent 4ec86d36a826099f823a95d18c13b2a7aa84c6ea
Author: ThomasV <thomasv@electrum.org>
Date:   Sun,  2 Feb 2020 22:40:23 +0100

use setEnabled() for Qt menu items: Network, Lightning, Watchtower

Diffstat:
Melectrum/gui/qt/main_window.py | 8+++-----
Melectrum/gui/qt/settings_dialog.py | 2+-
2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/electrum/gui/qt/main_window.py b/electrum/gui/qt/main_window.py @@ -634,11 +634,9 @@ 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) - if self.network: - tools_menu.addAction(_("&Network"), self.gui_object.show_network_dialog) - if self.wallet.has_lightning() and self.network: - tools_menu.addAction(_("&Lightning"), self.gui_object.show_lightning_dialog) - tools_menu.addAction(_("&Watchtower"), self.gui_object.show_watchtower_dialog) + tools_menu.addAction(_("&Network"), self.gui_object.show_network_dialog).setEnabled(bool(self.network)) + tools_menu.addAction(_("&Lightning Network"), self.gui_object.show_lightning_dialog).setEnabled(bool(self.wallet.has_lightning() and self.network)) + tools_menu.addAction(_("Local &Watchtower"), self.gui_object.show_watchtower_dialog).setEnabled(bool(self.network and self.network.local_watchtower)) tools_menu.addAction(_("&Plugins"), self.plugins_dialog) tools_menu.addSeparator() tools_menu.addAction(_("&Sign/verify message"), self.sign_verify_message) diff --git a/electrum/gui/qt/settings_dialog.py b/electrum/gui/qt/settings_dialog.py @@ -224,7 +224,7 @@ open. For this to work, your computer needs to be online regularly.""") self.payserver_port_e.setEnabled(self.config.get('run_payserver', False)) services_widgets.append((payserver_cb, self.payserver_port_e)) - help_local_wt = _("""To setup a local watchtower, you must run Electrum on a machine + help_local_wt = _("""To run a watchtower, you must run Electrum on a machine that is always connected to the internet. Configure a port if you want it to be public.""") local_wt_cb = QCheckBox(_("Run Watchtower")) local_wt_cb.setToolTip(help_local_wt)