tkivy: fix settings if wallet is None - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit 32098b0e164932f8a8547430fbaff0bb7a265643 DIR parent bca0f31fcaa9c0337963858ab72efb59610ef929 HTML Author: ThomasV <thomasv@electrum.org> Date: Thu, 10 Mar 2016 16:43:15 +0100 kivy: fix settings if wallet is None Diffstat: M gui/kivy/uix/dialogs/settings.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) --- DIR diff --git a/gui/kivy/uix/dialogs/settings.py b/gui/kivy/uix/dialogs/settings.py t@@ -48,7 +48,7 @@ Builder.load_string(''' <SettingsDialog@Popup> id: settings title: _('Electrum Settings') - watching_only: False + disable_pin: False use_encryption: False BoxLayout: orientation: 'vertical' t@@ -66,8 +66,8 @@ Builder.load_string(''' action: partial(root.language_dialog, self) CardSeparator SettingsItem: - status: 'watching-only' if root.watching_only else ('ON' if root.use_encryption else 'OFF') - disabled: root.watching_only + status: '' if root.disable_pin else ('ON' if root.use_encryption else 'OFF') + disabled: root.disable_pin title: _('PIN code') + ': ' + self.status description: _("Change your PIN code.") action: partial(root.change_password, self) t@@ -130,8 +130,8 @@ class SettingsDialog(Factory.Popup): def update(self): self.wallet = self.app.wallet - self.watching_only = self.wallet.is_watching_only() - self.use_encryption = self.wallet.use_encryption + self.disable_pin = self.wallet.is_watching_only() if self.wallet else True + self.use_encryption = self.wallet.use_encryption if self.wallet else False def get_language_name(self): return languages.get(self.config.get('language', 'en_UK'), '')