Fix android startup

This commit is contained in:
Vivek Teega 2019-01-25 14:30:10 +05:30
parent 8f6a1880e9
commit ed1421da8e
4 changed files with 58 additions and 5 deletions

View File

@ -634,7 +634,6 @@ class AddressSynchronizer(PrintError):
with self.lock:
if tx_hash in self.verified_tx:
info = self.verified_tx[tx_hash]
print(info)
flodata = info[5]
return flodata
elif tx_hash in self.unverified_tx:

View File

@ -957,13 +957,13 @@ class ElectrumWindow(App):
d.open()
def flodata_dialog(self, screen):
from .uix.dialogs.label_dialog import LabelDialog
from .uix.dialogs.flodata_dialog import FLODataDialog
text = screen.flodata
def callback(text):
screen.flodata = text
d = LabelDialog(_('Enter FLO data'), text, callback)
d = FLODataDialog(_('Enter FLO data'), text, callback)
d.open()
def amount_dialog(self, screen, show_max):

View File

@ -0,0 +1,55 @@
from kivy.app import App
from kivy.factory import Factory
from kivy.properties import ObjectProperty
from kivy.lang import Builder
Builder.load_string('''
<FLODataDialog@Popup>
id: popup
title: ''
size_hint: 0.8, 0.5
pos_hint: {'top':0.9}
BoxLayout:
orientation: 'vertical'
Widget:
size_hint: 1, 0.4
TextInput:
id:input
padding: '5dp'
size_hint: 1, 1
height: '27dp'
pos_hint: {'center_y':.5}
text:''
multiline: True
background_normal: 'atlas://electrum/gui/kivy/theming/light/tab_btn'
background_active: 'atlas://electrum/gui/kivy/theming/light/tab_btn'
hint_text_color: self.foreground_color
foreground_color: 1, 1, 1, 1
font_size: '16dp'
focus: True
Widget:
size_hint: 1, 0.2
BoxLayout:
orientation: 'horizontal'
size_hint: 1, 0.5
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(input.text)
popup.dismiss()
''')
class FLODataDialog(Factory.Popup):
def __init__(self, title, text, callback):
Factory.Popup.__init__(self)
self.ids.input.text = text
self.callback = callback
self.title = title

View File

@ -287,9 +287,8 @@ if __name__ == '__main__':
args = parser.parse_args()
# config is an object passed to the various constructors (wallet, interface, gui)
#if True:
#if is_android:
if False:
if True:
config_options = {
'verbosity': '',
'cmd': 'gui',