electrum

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

commit 92b392a56b719830577579d719526cfdee5a9e66
parent e2d996f199180803499298bc04cce6bb3f8ab438
Author: ThomasV <thomasv@electrum.org>
Date:   Mon, 10 Jul 2017 20:54:24 +0200

minor fixes

Diffstat:
Mgui/qt/__init__.py | 2+-
Mgui/qt/main_window.py | 4++--
Mgui/qt/network_dialog.py | 3++-
3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/gui/qt/__init__.py b/gui/qt/__init__.py @@ -139,7 +139,7 @@ class ElectrumGui: # Use a signal as can be called from daemon thread self.app.emit(SIGNAL('new_window'), path, uri) - def show_network_dialog(self): + def show_network_dialog(self, parent): from network_dialog import NetworkDialog 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')) diff --git a/gui/qt/main_window.py b/gui/qt/main_window.py @@ -478,7 +478,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError): # Settings / Preferences are all reserved keywords in OSX 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) + tools_menu.addAction(_("&Network"), lambda: self.gui_object.show_network_dialog(self)) tools_menu.addAction(_("&Plugins"), self.plugins_dialog) tools_menu.addSeparator() tools_menu.addAction(_("&Sign/verify message"), self.sign_verify_message) @@ -1728,7 +1728,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError): sb.addPermanentWidget(StatusBarButton(QIcon(":icons/preferences.png"), _("Preferences"), self.settings_dialog ) ) self.seed_button = StatusBarButton(QIcon(":icons/seed.png"), _("Seed"), self.show_seed_dialog ) sb.addPermanentWidget(self.seed_button) - self.status_button = StatusBarButton(QIcon(":icons/status_disconnected.png"), _("Network"), self.gui_object.show_network_dialog) + self.status_button = StatusBarButton(QIcon(":icons/status_disconnected.png"), _("Network"), lambda: self.gui_object.show_network_dialog(self)) sb.addPermanentWidget(self.status_button) run_hook('create_status_bar', sb) self.setStatusBar(sb) diff --git a/gui/qt/network_dialog.py b/gui/qt/network_dialog.py @@ -342,7 +342,8 @@ class NetworkChoiceLayout(object): self.ssl_cb.setChecked(protocol=='s') self.autoconnect_cb.setChecked(auto_connect) - self.server_label.setText(self.network.interface.host) + host = self.network.interface.host if self.network.interface else _('None') + self.server_label.setText(host) self.set_protocol(protocol) self.servers = self.network.get_servers()