electrum

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

commit 12b62fb27dd6c642fc42b8bb78a4e698a5ea88e7
parent b424a83a5732d7b284e8ecf5ba0b748c5e3619d6
Author: ThomasV <thomasv@electrum.org>
Date:   Wed, 19 Jul 2017 09:46:48 +0200

kivy: use app.num_chain

Diffstat:
Mgui/kivy/main_window.py | 2++
Mgui/kivy/uix/ui_screens/network.kv | 6+++---
2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/gui/kivy/main_window.py b/gui/kivy/main_window.py @@ -80,6 +80,7 @@ class ElectrumWindow(App): num_nodes = NumericProperty(0) server_host = StringProperty('') server_port = StringProperty('') + num_chains = NumericProperty(0) blockchain_name = StringProperty('') blockchain_checkpoint = NumericProperty(0) @@ -594,6 +595,7 @@ class ElectrumWindow(App): def on_network(self, event, *args): chain = self.network.blockchain() + self.num_chains = len(self.network.get_blockchains()) self.blockchain_checkpoint = chain.get_checkpoint() self.blockchain_name = chain.get_name() if self.network.interface: diff --git a/gui/kivy/uix/ui_screens/network.kv b/gui/kivy/uix/ui_screens/network.kv @@ -46,8 +46,8 @@ Popup: CardSeparator SettingsItem: - title: _('Fork detected at block %d')%app.blockchain_checkpoint if app.blockchain_checkpoint else _('No fork detected') + title: _('Fork detected at block %d')%app.blockchain_checkpoint if app.num_chains>1 else _('No fork detected') fork_description: (_('You are following branch') if app.auto_connect else _("Your server is on branch")) + ' ' + app.blockchain_name - description: self.fork_description if app.blockchain_checkpoint else '' + description: self.fork_description if app.num_chains>1 else _('Connected nodes are on the same chain') action: app.choose_blockchain_dialog - disabled: app.blockchain_checkpoint == 0 + disabled: app.num_chains == 1