From c53c3f21955fd83e45d1f08c64341b0cea9f6c5a Mon Sep 17 00:00:00 2001 From: thomasv Date: Fri, 12 Oct 2012 11:10:58 +0200 Subject: [PATCH] network_dialog: disable fields that are not modifiable --- lib/gui_qt.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/gui_qt.py b/lib/gui_qt.py index f0f560971..f271e8c84 100644 --- a/lib/gui_qt.py +++ b/lib/gui_qt.py @@ -1415,6 +1415,9 @@ class ElectrumWindow(QMainWindow): servers_list_widget.connect(servers_list_widget, SIGNAL('itemClicked(QTreeWidgetItem*, int)'), change_server) grid.addWidget(servers_list_widget, 1, 1, 1, 3) + if not wallet.config.is_modifiable('server'): + for w in [server_host, server_port, server_protocol, servers_list_widget]: w.setEnabled(False) + # proxy setting proxy_mode = QComboBox() proxy_host = QLineEdit() @@ -1434,6 +1437,9 @@ class ElectrumWindow(QMainWindow): check_for_disable() proxy_mode.connect(proxy_mode, SIGNAL('currentIndexChanged(int)'), check_for_disable) + if not wallet.config.is_modifiable('proxy'): + for w in [proxy_host, proxy_port, proxy_mode]: w.setEnabled(False) + proxy_config = interface.proxy if interface.proxy else { "mode":"none", "host":"localhost", "port":"8080"} proxy_mode.setCurrentIndex(proxy_mode.findText(str(proxy_config.get("mode").upper()))) proxy_host.setText(proxy_config.get("host"))