mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-23 17:47:31 +00:00
Disabled the proxy input fields when None is selected
This commit is contained in:
parent
3ce5eef076
commit
c1fa13d0f6
1 changed files with 13 additions and 0 deletions
|
@ -1406,6 +1406,19 @@ class ElectrumWindow(QMainWindow):
|
||||||
proxy_port.setFixedWidth(50)
|
proxy_port.setFixedWidth(50)
|
||||||
proxy_mode.addItems(['NONE', 'SOCKS4', 'SOCKS5', 'HTTP'])
|
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_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_mode.setCurrentIndex(proxy_mode.findText(str(proxy_config.get("mode").upper())))
|
||||||
proxy_host.setText(proxy_config.get("host"))
|
proxy_host.setText(proxy_config.get("host"))
|
||||||
|
|
Loading…
Add table
Reference in a new issue