mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-28 16:01:30 +00:00
network_dialog: disable fields that are not modifiable
This commit is contained in:
parent
91609dab9e
commit
c53c3f2195
1 changed files with 6 additions and 0 deletions
|
@ -1415,6 +1415,9 @@ class ElectrumWindow(QMainWindow):
|
||||||
servers_list_widget.connect(servers_list_widget, SIGNAL('itemClicked(QTreeWidgetItem*, int)'), change_server)
|
servers_list_widget.connect(servers_list_widget, SIGNAL('itemClicked(QTreeWidgetItem*, int)'), change_server)
|
||||||
grid.addWidget(servers_list_widget, 1, 1, 1, 3)
|
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 setting
|
||||||
proxy_mode = QComboBox()
|
proxy_mode = QComboBox()
|
||||||
proxy_host = QLineEdit()
|
proxy_host = QLineEdit()
|
||||||
|
@ -1434,6 +1437,9 @@ class ElectrumWindow(QMainWindow):
|
||||||
check_for_disable()
|
check_for_disable()
|
||||||
proxy_mode.connect(proxy_mode, SIGNAL('currentIndexChanged(int)'), 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_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