1
0

kivy: choice_dialog and load_wallet_by_name

This commit is contained in:
ThomasV
2015-12-16 08:57:47 +01:00
parent 9d3162b1a1
commit 30ace570d3
5 changed files with 118 additions and 29 deletions

View File

@@ -1,7 +1,6 @@
Popup:
id: settings
title: _('Settings')
BoxLayout:
orientation: 'vertical'
SettingsItem:
@@ -12,19 +11,17 @@ Popup:
self.title = _('PIN Code') + ' (%s)'%('ON' if app.wallet.use_encryption else 'OFF')
CardSeparator
SettingsItem:
title: _('Denomination') + ' (' + app.base_unit + ')'
bu: app.base_unit
title: _('Denomination') + ' (' + self.bu + ')'
description: _("Base unit for Bitcoin amounts.")
on_release:
app._rotate_bu()
self.title = _('Denomination') + ' (' + app.base_unit + ')'
app.unit_dialog(self)
CardSeparator
SettingsItem:
title: _('OpenAlias')
description: "Email-like address."
Widget:
size_hint: 1, 1
BoxLayout:
Widget:
size_hint: 0.5, None

View File

@@ -5,31 +5,41 @@ Popup:
id: popup
BoxLayout:
orientation: 'vertical'
GridLayout:
Label:
id: text_input
height: '32dp'
size_hint_y: None
text: os.path.basename(app.wallet.storage.path)
Widget
size_hint_y: None
cols: 2
Label:
height: '32dp'
size_hint_y: None
text: _('Wallet file') + ':'
TextInput:
id: text_input
height: '32dp'
size_hint_y: None
text: os.path.basename(app.wallet.storage.path)
FileChooserIconView:
FileChooserListView:
id: wallet_selector
path: os.path.dirname(app.wallet.storage.path)
on_selection: text_input.text = os.path.basename(self.selection[0]) if self.selection else ''
on_selection:
text_input.text = os.path.basename(self.selection[0]) if self.selection else ''
size_hint: 1, 1
BoxLayout:
Widget:
size_hint: 0.5, None
GridLayout:
cols: 3
size_hint_y: None
Button:
size_hint: 0.5, None
height: '48dp'
text: _('OK')
text: _('Create')
on_release:
popup.dismiss()
app.create_wallet_dialog()
Button:
size_hint: 0.5, None
height: '48dp'
text: _('Open')
on_release:
popup.dismiss()
app.open_wallet(text_input.text)
Button:
size_hint: 0.5, None
height: '48dp'
text: _('Cancel')
on_release:
popup.dismiss()