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

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

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

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

@ -83,10 +83,10 @@ Builder.load_string('''
CardSeparator
SettingsItem:
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.")
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
SettingsItem:
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.
"""
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 = """
The channel you created is not recoverable from seed.

Loading…
Cancel
Save