tnetwork_dialog: disable fields that are not modifiable - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit c53c3f21955fd83e45d1f08c64341b0cea9f6c5a DIR parent 91609dab9e94e1c7df252004a7bfdcf05c0edf7f HTML Author: thomasv <thomasv@gitorious> Date: Fri, 12 Oct 2012 11:10:58 +0200 network_dialog: disable fields that are not modifiable Diffstat: M lib/gui_qt.py | 6 ++++++ 1 file changed, 6 insertions(+), 0 deletions(-) --- DIR diff --git a/lib/gui_qt.py b/lib/gui_qt.py t@@ -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() t@@ -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"))