electrum

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

commit c1fa13d0f64d85cf030ca65dff0a8c9eb369a7b5
parent 3ce5eef076ce1f28d4f57e7e3dcb74c2582a15e5
Author: Maran <maran.hidskes@gmail.com>
Date:   Tue,  9 Oct 2012 22:07:39 +0200

Disabled the proxy input fields when None is selected

Diffstat:
Mlib/gui_qt.py | 13+++++++++++++
1 file changed, 13 insertions(+), 0 deletions(-)

diff --git a/lib/gui_qt.py b/lib/gui_qt.py @@ -1406,6 +1406,19 @@ class ElectrumWindow(QMainWindow): proxy_port.setFixedWidth(50) proxy_mode.addItems(['NONE', 'SOCKS4', 'SOCKS5', 'HTTP']) + def check_for_disable(index = False): + if proxy_mode.currentText() != 'NONE': + proxy_host.setEnabled(True) + proxy_port.setEnabled(True) + else: + proxy_host.setEnabled(False) + proxy_port.setEnabled(False) + + check_for_disable() + + proxy_mode.connect(proxy_mode, SIGNAL('currentIndexChanged(int)'), check_for_disable) + + 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"))