electrum

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

commit fdc08e700c032567eef0b4965c9e60e94583506a
parent f441ec722be08338e3e36293a4bcb7bef4264915
Author: ThomasV <thomasv@gitorious>
Date:   Mon,  5 Dec 2011 16:50:58 +0300

Merge branch 'master' of gitorious.org:electrum/electrum

Diffstat:
Mclient/gui.py | 12+++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/client/gui.py b/client/gui.py @@ -460,16 +460,19 @@ class BitcoinGUI: try: self.wallet.new_session() self.is_connected = True + self.info.set_text( self.wallet.message) except: self.is_connected = False traceback.print_exc(file=sys.stdout) time.sleep(self.period) continue - wallet.get_servers() - self.info.set_text( self.wallet.message) - + get_servers_time = 0 while True: + if time.time() - get_servers_time > 5*60: + wallet.get_servers() + get_servers_time = time.time() + self.period = 15 if self.wallet.use_http() else 5 try: u = self.wallet.update() @@ -953,11 +956,10 @@ class BitcoinGUI: def network_dialog( self, w ): wallet = self.wallet image = gtk.Image() + image.set_from_stock(gtk.STOCK_NETWORK, gtk.ICON_SIZE_DIALOG) if self.is_connected: - image.set_from_stock(gtk.STOCK_NETWORK, gtk.ICON_SIZE_DIALOG) status = "Connected to %s.\n%d blocks\nresponse time: %f"%(wallet.host, wallet.blocks, wallet.rtime) else: - image.set_from_stock(gtk.STOCK_NO, gtk.ICON_SIZE_DIALOG) status = "Not connected" dialog = gtk.MessageDialog( self.window, gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT,