fix gtk gui, network dialog

This commit is contained in:
ThomasV 2014-08-27 13:48:10 +02:00
parent c130ff6715
commit f4abbd7981
1 changed files with 4 additions and 4 deletions

View File

@ -221,9 +221,10 @@ def run_network_dialog( network, parent ):
image = Gtk.Image()
image.set_from_stock(Gtk.STOCK_NETWORK, Gtk.IconSize.DIALOG)
host, port, protocol, proxy_config, auto_connect = network.get_parameters()
server = "%s:%s:%s"%(host, port, protocol)
if parent:
if network.is_connected():
status = "Connected to %s:%d\n%d blocks"%(host, port, network.blockchain.height())
status = "Connected to %s\n%d blocks"%(host, network.get_local_height())
else:
status = "Not connected"
else:
@ -340,13 +341,12 @@ def run_network_dialog( network, parent ):
try:
host, port, protocol = server.split(':')
proxy = network.config.get('proxy')
auto_connect = network.config.get('auto_cycle')
network.set_parameters(host, port, protocol, proxy, auto_connect)
except Exception:
show_message("error:" + server)
return False
network.set_parameters(host, port, protocol, proxy_config, auto_connect)