Browse Source

kivy: minor GUI improvements

master
ThomasV 5 years ago
parent
commit
ac5565ed0a
  1. 14
      electrum/gui/kivy/uix/dialogs/checkbox_dialog.py
  2. 4
      electrum/gui/kivy/uix/dialogs/choice_dialog.py
  3. 4
      electrum/gui/kivy/uix/dialogs/settings.py
  4. 4
      electrum/gui/messages.py

14
electrum/gui/kivy/uix/dialogs/checkbox_dialog.py

@ -3,18 +3,24 @@ from kivy.factory import Factory
from kivy.properties import ObjectProperty from kivy.properties import ObjectProperty
from kivy.lang import Builder from kivy.lang import Builder
Builder.load_string(''' Builder.load_string('''
<CheckBoxDialog@Popup> <CheckBoxDialog@Popup>
id: popup id: popup
title: '' title: ''
description: ''
size_hint: 0.8, 0.8 size_hint: 0.8, 0.8
pos_hint: {'top':0.9} pos_hint: {'top':0.9}
BoxLayout: BoxLayout:
orientation: 'vertical' orientation: 'vertical'
padding: '10dp'
spacing: '10dp'
Label: Label:
id: description size_hint: 1, None
text: '' text: root.description
halign: 'left' halign: 'justify'
text_size: self.width, None text_size: self.width, None
size: self.texture_size size: self.texture_size
BoxLayout: BoxLayout:
@ -47,6 +53,6 @@ class CheckBoxDialog(Factory.Popup):
def __init__(self, title, text, status, callback): def __init__(self, title, text, status, callback):
Factory.Popup.__init__(self) Factory.Popup.__init__(self)
self.ids.cb.active = status self.ids.cb.active = status
self.ids.description.text = text self.description = text
self.callback = callback self.callback = callback
self.title = title self.title = title

4
electrum/gui/kivy/uix/dialogs/choice_dialog.py

@ -15,10 +15,12 @@ Builder.load_string('''
pos_hint: {'top':0.9} pos_hint: {'top':0.9}
BoxLayout: BoxLayout:
orientation: 'vertical' orientation: 'vertical'
padding: '10dp'
spacing: '10dp'
Label: Label:
size_hint: 1, None size_hint: 1, None
text: root.description text: root.description
halign: 'left' halign: 'justify'
text_size: self.width, None text_size: self.width, None
size: self.texture_size size: self.texture_size
ScrollView: ScrollView:

4
electrum/gui/kivy/uix/dialogs/settings.py

@ -83,10 +83,10 @@ Builder.load_string('''
CardSeparator CardSeparator
SettingsItem: SettingsItem:
status: _('Yes') if app.use_recoverable_channels else _('No') status: _('Yes') if app.use_recoverable_channels else _('No')
title: _('Use recoverable channels') + ': ' + self.status title: _('Create recoverable channels') + ': ' + self.status
description: _("Add channel recovery data to funding transaction.") description: _("Add channel recovery data to funding transaction.")
message: _(messages.MSG_RECOVERABLE_CHANNELS) message: _(messages.MSG_RECOVERABLE_CHANNELS)
action: partial(root.boolean_dialog, 'use_recoverable_channels', _('Use recoverable_channels'), self.message) action: partial(root.boolean_dialog, 'use_recoverable_channels', _('Create recoverable channels'), self.message)
CardSeparator CardSeparator
SettingsItem: SettingsItem:
status: _('Trampoline') if not app.use_gossip else _('Gossip') status: _('Trampoline') if not app.use_gossip else _('Gossip')

4
electrum/gui/messages.py

@ -8,7 +8,9 @@ Note that static backups only allow you to request a force-close with the remote
If this is enabled, other nodes cannot open a channel to you. Channel recovery data is encrypted, so that only your wallet can decrypt it. However, blockchain analysis will be able to tell that the transaction was probably created by Electrum. If this is enabled, other nodes cannot open a channel to you. Channel recovery data is encrypted, so that only your wallet can decrypt it. However, blockchain analysis will be able to tell that the transaction was probably created by Electrum.
""" """
MSG_REQUEST_FORCE_CLOSE = """If you choose to request force-close, your node will pretend that it has lost its data and ask the remote node to broadcast their latest state. Doing so from time to time helps make sure that nodes are honest, because your node can punish them if they broadcast a revoked state.""" MSG_REQUEST_FORCE_CLOSE = """You may choose to initiate a cooperative close, or request the remote peer to force close the channel.
If you request a force-close, your node will pretend that it has lost its data and ask the remote node to broadcast their latest state. Doing so from time to time helps make sure that nodes are honest, because your node can punish them if they broadcast a revoked state."""
MSG_CREATED_NON_RECOVERABLE_CHANNEL = """ MSG_CREATED_NON_RECOVERABLE_CHANNEL = """
The channel you created is not recoverable from seed. The channel you created is not recoverable from seed.

Loading…
Cancel
Save