tkivy: seed options dialog - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit 9a3344dc7fb4c2bc4d38e0e936b2a2c9d103b70b DIR parent 834d3322b3970c675e80d8a5358c73eac2b65e9b HTML Author: ThomasV <thomasv@electrum.org> Date: Tue, 11 Oct 2016 15:00:06 +0200 kivy: seed options dialog Diffstat: A gui/kivy/uix/dialogs/seed_options.… | 51 +++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+), 0 deletions(-) --- DIR diff --git a/gui/kivy/uix/dialogs/seed_options.py b/gui/kivy/uix/dialogs/seed_options.py t@@ -0,0 +1,51 @@ +from kivy.app import App +from kivy.factory import Factory +from kivy.properties import ObjectProperty +from kivy.lang import Builder + +Builder.load_string(''' +<SeedOptionsDialog@Popup> + id: popup + title: _('Seed Options') + size_hint: 0.8, 0.8 + pos_hint: {'top':0.9} + BoxLayout: + orientation: 'vertical' + Label: + id: description + text: _('You may extend your seed with custom words') + halign: 'left' + text_size: self.width, None + size: self.texture_size + BoxLayout: + orientation: 'horizontal' + size_hint: 1, 0.2 + Label: + text: _('Extend Seed') + CheckBox: + id:cb + Widget: + size_hint: 1, 0.1 + BoxLayout: + orientation: 'horizontal' + size_hint: 1, 0.2 + Button: + text: 'Cancel' + size_hint: 0.5, None + height: '48dp' + on_release: popup.dismiss() + Button: + text: 'OK' + size_hint: 0.5, None + height: '48dp' + on_release: + root.callback(cb.active) + popup.dismiss() +''') + + +class SeedOptionsDialog(Factory.Popup): + def __init__(self, status, callback): + Factory.Popup.__init__(self) + self.ids.cb.active = status + self.callback = callback