electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit bdf9baca127e3c1f9957f226bbf3408b6f7b478c
parent fc7c9acd4d140b298a0aab1dc43cb6d2800ff038
Author: thomasv <thomasv@gitorious>
Date:   Wed,  2 May 2012 17:44:41 +0200

update gtk interface: show default servers

Diffstat:
Mgui.py | 17+++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/gui.py b/gui.py @@ -309,8 +309,16 @@ def run_network_dialog( wallet, parent ): status = "Please choose a server." server = random.choice( DEFAULT_SERVERS ) + if not wallet.interface.servers: + servers_list = [] + for x in DEFAULT_SERVERS: + h,port,protocol = x.split(':') + servers_list.append( (h,[(protocol,port)] ) ) + else: + servers_list = wallet.interface.servers + plist = {} - for item in wallet.interface.servers: + for item in servers_list: host, pp = item z = {} for item2 in pp: @@ -382,7 +390,12 @@ def run_network_dialog( wallet, parent ): treeview = gtk.TreeView(model=server_list) treeview.show() - tvcolumn = gtk.TreeViewColumn('Active servers') + if wallet.interface.servers: + label = 'Active Servers' + else: + label = 'Default Servers' + + tvcolumn = gtk.TreeViewColumn(label) treeview.append_column(tvcolumn) cell = gtk.CellRendererText() tvcolumn.pack_start(cell, False)