revert dynamic loading of screens and fix qrscanning
This commit is contained in:
@@ -12,7 +12,7 @@ class AnimatedPopup(Factory.Popup):
|
||||
''' An Animated Popup that animates in and out.
|
||||
'''
|
||||
|
||||
anim_duration = NumericProperty(.25)
|
||||
anim_duration = NumericProperty(.36)
|
||||
'''Duration of animation to be used
|
||||
'''
|
||||
|
||||
|
||||
@@ -154,7 +154,7 @@ Builder.load_string('''
|
||||
height: '110dp'
|
||||
hint_text:
|
||||
_('Enter your seedphrase')
|
||||
on_text: next.disabled = not bool(root._wizard.is_any(self))
|
||||
on_text: root._trigger_check_seed()
|
||||
Label:
|
||||
font_size: '12sp'
|
||||
text_size: self.width, None
|
||||
@@ -446,6 +446,11 @@ class RestoreSeedDialog(CreateAccountDialog):
|
||||
def __init__(self, **kwargs):
|
||||
self._wizard = kwargs['wizard']
|
||||
super(RestoreSeedDialog, self).__init__(**kwargs)
|
||||
self._trigger_check_seed = Clock.create_trigger(self.check_seed)
|
||||
|
||||
def check_seed(self, dt):
|
||||
self.ids.next.disabled = not bool(self._wizard.is_any(
|
||||
self.ids.text_input_seed))
|
||||
|
||||
def on_parent(self, instance, value):
|
||||
if value:
|
||||
|
||||
@@ -13,10 +13,10 @@ class NewContactDialog(Factory.AnimatedPopup):
|
||||
if not dlg:
|
||||
dlg = Factory.QrScannerDialog()
|
||||
Cache.append('electrum_widgets', 'QrScannerDialog', dlg)
|
||||
dlg.bind(on_release=self.on_release)
|
||||
dlg.bind(on_complete=self.on_complete)
|
||||
dlg.open()
|
||||
|
||||
def on_release(self, instance, uri):
|
||||
def on_complete(self, instance, uri):
|
||||
self.new_contact(uri=uri)
|
||||
|
||||
def new_contact(self, uri={}):
|
||||
|
||||
@@ -4,7 +4,9 @@ from kivy.lang import Builder
|
||||
|
||||
Factory.register('QRScanner', module='electrum_gui.kivy.qr_scanner')
|
||||
|
||||
class QrScannerDialog(Factory.EventsDialog):
|
||||
class QrScannerDialog(Factory.AnimaterPopup):
|
||||
|
||||
__events__('on_complete', )
|
||||
|
||||
def on_symbols(self, instance, value):
|
||||
instance.stop()
|
||||
@@ -14,7 +16,7 @@ class QrScannerDialog(Factory.EventsDialog):
|
||||
#label = uri.get('label', '')
|
||||
#amount = uri.get('amount', 0.0)
|
||||
#message = uir.get('message', '')
|
||||
self.dispatch('on_release', uri)
|
||||
self.dispatch('on_omplete', uri)
|
||||
|
||||
|
||||
Builder.load_string('''
|
||||
|
||||
Reference in New Issue
Block a user