fix gtk gui, network dialog
This commit is contained in:
parent
c130ff6715
commit
f4abbd7981
|
@ -221,9 +221,10 @@ def run_network_dialog( network, parent ):
|
||||||
image = Gtk.Image()
|
image = Gtk.Image()
|
||||||
image.set_from_stock(Gtk.STOCK_NETWORK, Gtk.IconSize.DIALOG)
|
image.set_from_stock(Gtk.STOCK_NETWORK, Gtk.IconSize.DIALOG)
|
||||||
host, port, protocol, proxy_config, auto_connect = network.get_parameters()
|
host, port, protocol, proxy_config, auto_connect = network.get_parameters()
|
||||||
|
server = "%s:%s:%s"%(host, port, protocol)
|
||||||
if parent:
|
if parent:
|
||||||
if network.is_connected():
|
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:
|
else:
|
||||||
status = "Not connected"
|
status = "Not connected"
|
||||||
else:
|
else:
|
||||||
|
@ -340,13 +341,12 @@ def run_network_dialog( network, parent ):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
host, port, protocol = server.split(':')
|
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:
|
except Exception:
|
||||||
show_message("error:" + server)
|
show_message("error:" + server)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
network.set_parameters(host, port, protocol, proxy_config, auto_connect)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue