electrum

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

commit ea5478f2ab9bb21acd46befcfc7758141a863eaf
parent 96a3fdbbc4a3bf5f92577c499b2179d11aee8b78
Author: thomasv <thomasv@gitorious>
Date:   Thu,  8 Nov 2012 11:12:03 +0100

text gui: proxy

Diffstat:
Mlib/gui_text.py | 25+++++++++++++++++++------
1 file changed, 19 insertions(+), 6 deletions(-)

diff --git a/lib/gui_text.py b/lib/gui_text.py @@ -314,10 +314,20 @@ class ElectrumGui: def network_dialog(self): out = self.run_dialog('Network', [ {'label':'server', 'type':'str', 'value':self.wallet.interface.server}, - {'label':'proxy', 'type':'str', 'value':self.config.get('proxy')}, + {'label':'proxy', 'type':'str', 'value':self.config.get('proxy', '')}, ], buttons = 1) if out: - if out.get('server'): self.wallet.interface.set_server(out.get('server')) + if out.get('server'): + server = out.get('server') + if out.get('proxy'): + proxy = self.parse_proxy_options(out.get('proxy')) + else: + proxy = None + + self.wallet.config.set_key("proxy", proxy, True) + self.wallet.config.set_key("server", server, True) + self.wallet.interface.set_server(server, proxy) + def settings_dialog(self): @@ -361,15 +371,18 @@ class ElectrumGui: if item.get('type') == 'list': value = item.get('value','') elif item.get('type') == 'satoshis': - value = item.get('value') + value = item.get('value','') elif item.get('type') == 'str': value = item.get('value','') elif item.get('type') == 'password': value = '*'*len(item.get('value','')) - if not value: value = ' ' else: - value = None - if value: + value = '' + + if len(value)<20: + value += ' '*(20-len(value)) + + if item.has_key('value'): w.addstr( 2+interval*i, 2, label) w.addstr( 2+interval*i, 15, value, curses.A_REVERSE if self.popup_pos%num==i else curses.color_pair(1) ) else: