commit 385b515439c6e36863a3e3941e2b84363fccc8c5
parent 287c7fc6431bf22be982de61e6bfe19ca6fb1902
Author: thomasv <thomasv@gitorious>
Date: Tue, 2 Oct 2012 12:40:08 +0200
fix proxy config: read from simpleconfig object
Diffstat:
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/lib/gui_qt.py b/lib/gui_qt.py
@@ -1403,9 +1403,12 @@ class ElectrumWindow(QMainWindow):
proxy_port = QLineEdit()
proxy_port.setFixedWidth(50)
proxy_mode.addItems(['NONE', 'SOCKS4', 'SOCKS5', 'HTTP'])
- proxy_mode.setCurrentIndex(proxy_mode.findText(str(interface.proxy["mode"]).upper()))
- proxy_host.setText(interface.proxy["host"])
- proxy_port.setText(interface.proxy["port"])
+
+ cfg = SimpleConfig()
+ proxy_config = cfg.config['proxy']
+ proxy_mode.setCurrentIndex(proxy_mode.findText(str(proxy_config["mode"]).upper()))
+ proxy_host.setText(proxy_config["host"])
+ proxy_port.setText(proxy_config["port"])
hbox.addWidget(QLabel(_('Proxy') + ':'))
hbox.addWidget(proxy_mode)
hbox.addWidget(proxy_host)
@@ -1446,7 +1449,6 @@ class ElectrumWindow(QMainWindow):
server = unicode( host_line.text() )
try:
- cfg = SimpleConfig()
cfg.set_key("proxy", { u'mode':unicode(proxy_mode.currentText()).lower(), u'host':unicode(proxy_host.text()), u'port':unicode(proxy_port.text()) }, True)
wallet.set_server(server, cfg.config["proxy"])
except Exception as err: