electrum

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

commit 96a685a765a673402da4aaddb9bfaf9148f52f4f
parent 73b023e9675461e5bd429d18990514e038f49525
Author: ThomasV <thomasv@electrum.org>
Date:   Wed, 12 Jul 2017 17:23:21 +0200

kivy: gui improvements

Diffstat:
Mgui/kivy/main_window.py | 8+++++---
Mgui/kivy/uix/ui_screens/network.kv | 33+++++++++++++++++----------------
2 files changed, 22 insertions(+), 19 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('') + blockchain_name = StringProperty('') auto_connect = BooleanProperty(False) def on_auto_connect(self, instance, x): @@ -593,18 +594,19 @@ class ElectrumWindow(App): if len(self.network.blockchains)>1: msg = self.network.get_blockchain_name(self.network.blockchain()) else: - msg = _('Genesis block') + msg = _('Genesis') return msg def blockchain_info(self): if len(self.network.blockchains)>1: checkpoint = self.network.get_checkpoint() - msg = _('Chain split detected at block %d')%checkpoint + msg = _('Fork detected at block %d')%checkpoint else: - msg = _('No chain split detected') + msg = _('The blockchain appears to be one') return msg def on_network(self, event, *args): + self.blockchain_name = self.blockchain_status() if self.network.interface: self.server_host = self.network.interface.host if event == 'updated': diff --git a/gui/kivy/uix/ui_screens/network.kv b/gui/kivy/uix/ui_screens/network.kv @@ -14,40 +14,41 @@ Popup: value: _("%d connections.")% app.num_nodes if app.num_nodes else _("Not connected") title: _("Status") + ': ' + self.value description: _("Connections with Electrum servers") - action: lambda x: x + action: lambda x: None CardSeparator SettingsItem: title: _("Server") + ': ' + app.server_host - description: _("Server used to request your history.") + description: _("Server used to query your history.") action: lambda x: app.popup_dialog('server') CardSeparator SettingsItem: + proxy: app.proxy_config.get('mode') + host: app.proxy_config.get('host') + port: app.proxy_config.get('port') + title: _("Proxy") + ': ' + ((self.host +':' + self.port) if self.proxy else _('None')) + description: _('Proxy configuration') + action: lambda x: app.popup_dialog('proxy') + + CardSeparator + SettingsItem: title: _("Auto-connect") + ': ' + ('ON' if app.auto_connect else 'OFF') - description: _("Find a server automatically") + description: _("Select your server automatically") action: app.toggle_auto_connect CardSeparator SettingsItem: value: "%d blocks" % app.num_blocks title: _("Blockchain") + ': ' + self.value - description: _("Verified block headers.") + description: _('Verified block headers') action: lambda x: x CardSeparator SettingsItem: - title: _("Checkpoint") + ': ' + app.blockchain_status() - description: app.blockchain_info() + title: app.blockchain_info() + fork_description: (_('You are following branch') if app.auto_connect else _("Your server is on branch")) + ' ' + app.blockchain_name + description: _('Everything is fine') if self.disabled else self.fork_description action: app.choose_blockchain_dialog - - CardSeparator - SettingsItem: - proxy: app.proxy_config.get('mode') - host: app.proxy_config.get('host') - port: app.proxy_config.get('port') - title: _("Proxy") + ': ' + ((self.host +':' + self.port) if self.proxy else _('None')) - description: _('Proxy configuration') - action: lambda x: app.popup_dialog('proxy') - + disabled: len(app.network.blockchains) == 1