mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-23 17:47:31 +00:00
kivy: add server chooser to network dialog
This commit is contained in:
parent
59948d725c
commit
6bd191966e
2 changed files with 21 additions and 11 deletions
|
@ -5,9 +5,6 @@ Popup:
|
||||||
on_open:
|
on_open:
|
||||||
host.text, nd.port, nd.protocol, nd.proxy, auto_connect.active = app.network.get_parameters()
|
host.text, nd.port, nd.protocol, nd.proxy, auto_connect.active = app.network.get_parameters()
|
||||||
|
|
||||||
on_dismiss:
|
|
||||||
app.network.set_parameters(host.text, nd.port, nd.protocol, nd.proxy, auto_connect.active)
|
|
||||||
|
|
||||||
BoxLayout:
|
BoxLayout:
|
||||||
|
|
||||||
orientation: 'vertical'
|
orientation: 'vertical'
|
||||||
|
@ -21,14 +18,26 @@ Popup:
|
||||||
size_hint_y: None
|
size_hint_y: None
|
||||||
Label:
|
Label:
|
||||||
text: _('Server')
|
text: _('Server')
|
||||||
Label:
|
Spinner:
|
||||||
id: host
|
id: host
|
||||||
|
text: ''
|
||||||
|
values: app.network.get_servers()
|
||||||
|
|
||||||
Button:
|
|
||||||
size_hint: 0.5, None
|
BoxLayout:
|
||||||
height: '48dp'
|
Button:
|
||||||
text: _('Close')
|
size_hint: 0.5, None
|
||||||
on_release: nd.dismiss()
|
height: '48dp'
|
||||||
|
text: _('Cancel')
|
||||||
|
on_release:
|
||||||
|
nd.dismiss()
|
||||||
|
Button:
|
||||||
|
size_hint: 0.5, None
|
||||||
|
height: '48dp'
|
||||||
|
text: _('OK')
|
||||||
|
on_release:
|
||||||
|
app.network.set_parameters(host.text, nd.port, nd.protocol, nd.proxy, auto_connect.active)
|
||||||
|
nd.dismiss()
|
||||||
|
|
||||||
Widget:
|
Widget:
|
||||||
size_hint: 1, 1
|
size_hint: 1, 1
|
||||||
|
|
|
@ -9,10 +9,11 @@ Popup:
|
||||||
GridLayout:
|
GridLayout:
|
||||||
cols: 2
|
cols: 2
|
||||||
size_hint: 1, None
|
size_hint: 1, None
|
||||||
|
height: '100dp'
|
||||||
Label:
|
Label:
|
||||||
text: _('Base unit')
|
text: _('Base unit')
|
||||||
height: '48dp'
|
|
||||||
size_hint: 1, None
|
size_hint: 1, None
|
||||||
|
height: '48dp'
|
||||||
Button:
|
Button:
|
||||||
text: app.base_unit
|
text: app.base_unit
|
||||||
size_hint: 1, None
|
size_hint: 1, None
|
||||||
|
@ -35,5 +36,5 @@ Popup:
|
||||||
on_release: settings.dismiss()
|
on_release: settings.dismiss()
|
||||||
|
|
||||||
Widget:
|
Widget:
|
||||||
size_hint: 1, 0.8
|
size_hint: 1, 1
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue