slightly more robust connection procedure
This commit is contained in:
@@ -1140,7 +1140,7 @@ class ElectrumWindow:
|
||||
interface = self.wallet.interface
|
||||
if self.funds_error:
|
||||
text = "Not enough funds"
|
||||
elif interface.is_connected:
|
||||
elif interface and interface.is_connected:
|
||||
self.network_button.set_tooltip_text("Connected to %s:%d.\n%d blocks"%(interface.host, interface.port, self.wallet.blocks))
|
||||
if self.wallet.blocks == -1:
|
||||
self.status_image.set_from_stock(gtk.STOCK_NO, gtk.ICON_SIZE_MENU)
|
||||
@@ -1159,7 +1159,7 @@ class ElectrumWindow:
|
||||
if u: text += "[%s unconfirmed]"%( format_satoshis(u,True,self.wallet.num_zeros).strip() )
|
||||
else:
|
||||
self.status_image.set_from_stock(gtk.STOCK_NO, gtk.ICON_SIZE_MENU)
|
||||
self.network_button.set_tooltip_text("Trying to contact %s.\n%d blocks"%(interface.host, self.wallet.blocks))
|
||||
self.network_button.set_tooltip_text("Trying to contact %s.\n%d blocks"%(self.wallet.server, self.wallet.blocks))
|
||||
text = "Not connected"
|
||||
|
||||
self.status_bar.pop(self.context_id)
|
||||
|
||||
Reference in New Issue
Block a user