commit b6c6b694f7e26e73cf3d9a16277e76b2f8bc8d1e
parent f7859c041e68c545781cf3a5c6db5bf5e206d6a6
Author: ThomasV <thomasv@electrum.org>
Date: Tue, 19 Jan 2016 15:57:11 +0100
kivy: simplify wallets dialog
Diffstat:
2 files changed, 5 insertions(+), 31 deletions(-)
diff --git a/gui/kivy/main.kv b/gui/kivy/main.kv
@@ -13,7 +13,6 @@
text_size: self.width, None
height: self.texture_size[1]
-
<VGridLayout@GridLayout>:
rows: 1
size_hint: 1, None
diff --git a/gui/kivy/uix/dialogs/wallets.py b/gui/kivy/uix/dialogs/wallets.py
@@ -17,53 +17,29 @@ Builder.load_string('''
path: ''
BoxLayout:
orientation: 'vertical'
- BoxLayout:
- height: '48dp'
- size_hint_y: None
- orientation: 'horizontal'
- Label:
- text: _('Current Wallet') + ': '
- height: '48dp'
- size_hint_y: None
- Label:
- id: wallet_name
- height: '48dp'
- size_hint_y: None
- text: os.path.basename(app.wallet.storage.path)
- on_text:
- popup.path = os.path.join(wallet_selector.path, self.text)
- Widget
- size_hint_y: None
- Label:
- height: '48dp'
- size_hint_y: None
- text: _('Wallets')
FileChooserListView:
id: wallet_selector
dirselect: False
filter_dirs: True
filter: '*.*'
path: os.path.dirname(app.wallet.storage.path)
- on_selection:
- wallet_name.text = os.path.basename(self.selection[0]) if self.selection else ''
- size_hint_y: 0.4
+ size_hint_y: 0.6
Widget
size_hint_y: 0.1
-
GridLayout:
cols: 2
- size_hint_y: None
+ size_hint_y: 0.1
Button:
- size_hint: 0.5, None
+ size_hint: 0.1, None
height: '48dp'
text: _('Cancel')
on_release:
popup.dismiss()
Button:
id: open_button
- size_hint: 0.5, None
+ size_hint: 0.1, None
height: '48dp'
- text: _('Open') if popup.path else _('New Wallet')
+ text: _('Open') if wallet_selector.selection else _('New Wallet')
on_release:
popup.dismiss()
root.new_wallet(app, wallet_selector.path)
@@ -79,4 +55,3 @@ class WalletDialog(Factory.Popup):
else:
d = LabelDialog(_('Enter wallet name'), '', cb)
d.open()
-