simplify prev commit
This commit is contained in:
@@ -743,7 +743,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
|
||||
elif self.network.is_connected():
|
||||
server_height = self.network.get_server_height()
|
||||
server_lag = self.network.get_local_height() - server_height
|
||||
num_chains = len(self.network.get_blockchains())
|
||||
fork_str = "_fork" if len(self.network.get_blockchains())>1 else ""
|
||||
# Server height can be 0 after switching to a new server
|
||||
# until we get a headers subscription request response.
|
||||
# Display the synchronizing message in that case.
|
||||
@@ -752,7 +752,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
|
||||
icon = QIcon(":icons/status_waiting.png")
|
||||
elif server_lag > 1:
|
||||
text = _("Server is lagging ({} blocks)").format(server_lag)
|
||||
icon = QIcon(":icons/status_lagging.png") if num_chains <= 1 else QIcon(":icons/status_lagging_fork.png")
|
||||
icon = QIcon(":icons/status_lagging%s.png"%fork_str)
|
||||
else:
|
||||
c, u, x = self.wallet.get_balance()
|
||||
text = _("Balance" ) + ": %s "%(self.format_amount_and_units(c))
|
||||
@@ -766,9 +766,9 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
|
||||
text += self.fx.get_fiat_status_text(c + u + x,
|
||||
self.base_unit(), self.get_decimal_point()) or ''
|
||||
if not self.network.proxy:
|
||||
icon = QIcon(":icons/status_connected.png") if num_chains <= 1 else QIcon(":icons/status_connected_fork.png")
|
||||
icon = QIcon(":icons/status_connected%s.png"%fork_str)
|
||||
else:
|
||||
icon = QIcon(":icons/status_connected_proxy.png") if num_chains <= 1 else QIcon(":icons/status_connected_proxy_fork.png")
|
||||
icon = QIcon(":icons/status_connected_proxy%s.png%fork_str")
|
||||
else:
|
||||
if self.network.proxy:
|
||||
text = "{} ({})".format(_("Not connected"), _("proxy enabled"))
|
||||
|
||||
Reference in New Issue
Block a user