commit 06809917ca0bfde1ed500e76ae536f702ba9a538
parent 1144afefb55cf5e0ebfd2c50fbab967378aa2bfe
Author: ThomasV <thomasv@electrum.org>
Date: Sat, 16 Jan 2016 09:30:11 +0100
kivy wizard: simplifications and renaming
Diffstat:
2 files changed, 5 insertions(+), 25 deletions(-)
diff --git a/gui/kivy/uix/dialogs/create_restore.py b/gui/kivy/uix/dialogs/create_restore.py
@@ -58,18 +58,6 @@ Builder.load_string('''
crcontent: crcontent
# add electrum icon
- FloatLayout:
- size_hint: None, None
- size: 0, 0
- IconButton:
- id: but_close
- size_hint: None, None
- size: '27dp', '27dp'
- top: Window.height - dp(10)
- right: Window.width - dp(10)
- source: 'atlas://gui/kivy/theming/light/closebutton'
- on_release: root.dispatch('on_press', self)
- on_release: root.dispatch('on_release', self)
BoxLayout:
orientation: 'vertical' if self.width < self.height else 'horizontal'
padding:
@@ -190,7 +178,7 @@ Builder.load_string('''
root: root
-<InitSeedDialog>
+<ShowSeedDialog>
spacing: '12dp'
GridLayout:
id: grid
@@ -293,8 +281,6 @@ class CreateRestoreDialog(CreateAccountDialog):
def on_parent(self, instance, value):
if value:
app = App.get_running_app()
- self.ids.but_close.disabled = True
- self.ids.but_close.opacity = 0
self._back = _back = partial(app.dispatch, 'on_back')
#app.navigation_higherarchy.append(_back)
@@ -307,13 +293,7 @@ class CreateRestoreDialog(CreateAccountDialog):
-class InitSeedDialog(CreateAccountDialog):
-
- mode = StringProperty('create')
- ''' Defines the mode for which to optimize the UX. defaults to 'create'.
-
- Can be one of: 'create', 'restore', 'create_2of2', 'create_2fa'...
- '''
+class ShowSeedDialog(CreateAccountDialog):
seed_msg = StringProperty('')
'''Text to be displayed in the TextInput'''
@@ -337,7 +317,7 @@ class InitSeedDialog(CreateAccountDialog):
#if self._back in app.navigation_higherarchy:
# app.navigation_higherarchy.pop()
# self._back = None
- super(InitSeedDialog, self).close()
+ super(ShowSeedDialog, self).close()
class RestoreSeedDialog(CreateAccountDialog):
diff --git a/gui/kivy/uix/dialogs/installwizard.py b/gui/kivy/uix/dialogs/installwizard.py
@@ -130,7 +130,7 @@ class InstallWizard(Widget):
self.waiting_dialog(task, msg)
def create(self):
- from create_restore import InitSeedDialog
+ from create_restore import ShowSeedDialog
seed = self.wallet.make_seed()
msg = _("[color=#414141]"+\
"[b]PLEASE WRITE DOWN YOUR SEED PASS[/b][/color]"+\
@@ -146,7 +146,7 @@ class InstallWizard(Widget):
self.run('enter_pin', seed)
else:
self.run('new')
- InitSeedDialog(message=msg, seed_msg=seed, on_release=on_ok, mode='create').open()
+ ShowSeedDialog(message=msg, seed_msg=seed, on_release=on_ok).open()
def enter_pin(self, seed):
from password_dialog import PasswordDialog