add explanations to network dialog
This commit is contained in:
parent
d3c537d0db
commit
9b99693ca1
|
@ -156,15 +156,17 @@ class SettingsDialog(Factory.Popup):
|
||||||
d = ChoiceDialog(_('Coin selection'), choosers, chooser_name, cb)
|
d = ChoiceDialog(_('Coin selection'), choosers, chooser_name, cb)
|
||||||
d.open()
|
d.open()
|
||||||
|
|
||||||
def openalias_dialog(self, label, dt):
|
def network_dialog(self, item, dt):
|
||||||
from label_dialog import LabelDialog
|
server, port, protocol, proxy, auto_connect = self.app.network.get_parameters()
|
||||||
def callback(text):
|
def cb(popup):
|
||||||
label.text = text
|
server = popup.ids.host.text
|
||||||
d = LabelDialog(_('OpenAlias'), '', callback)
|
auto_connect = popup.ids.auto_connect.active
|
||||||
d.open()
|
self.app.network.set_parameters(server, port, protocol, proxy, auto_connect)
|
||||||
|
item.status = self.network_status()
|
||||||
def network_dialog(self, label, dt):
|
|
||||||
popup = Builder.load_file('gui/kivy/uix/ui_screens/network.kv')
|
popup = Builder.load_file('gui/kivy/uix/ui_screens/network.kv')
|
||||||
|
popup.ids.host.text = server
|
||||||
|
popup.ids.auto_connect.active = auto_connect
|
||||||
|
popup.on_dismiss = lambda: cb(popup)
|
||||||
popup.open()
|
popup.open()
|
||||||
|
|
||||||
def network_status(self):
|
def network_status(self):
|
||||||
|
|
|
@ -4,8 +4,6 @@ Popup:
|
||||||
n_nodes: len(app.network.get_interfaces())
|
n_nodes: len(app.network.get_interfaces())
|
||||||
blockchain_height: app.network.get_local_height()
|
blockchain_height: app.network.get_local_height()
|
||||||
is_connected: app.network.is_connected()
|
is_connected: app.network.is_connected()
|
||||||
on_open:
|
|
||||||
host.text, nd.port, nd.protocol, nd.proxy, auto_connect.active = app.network.get_parameters()
|
|
||||||
|
|
||||||
BoxLayout:
|
BoxLayout:
|
||||||
orientation: 'vertical'
|
orientation: 'vertical'
|
||||||
|
@ -20,7 +18,7 @@ Popup:
|
||||||
GridLayout:
|
GridLayout:
|
||||||
cols: 2
|
cols: 2
|
||||||
Label:
|
Label:
|
||||||
text: _('Address server')
|
text: _('Server')
|
||||||
Spinner:
|
Spinner:
|
||||||
id: host
|
id: host
|
||||||
height: '48dp'
|
height: '48dp'
|
||||||
|
@ -35,7 +33,12 @@ Popup:
|
||||||
Widget:
|
Widget:
|
||||||
size_hint: 1, 0.1
|
size_hint: 1, 0.1
|
||||||
TopLabel:
|
TopLabel:
|
||||||
text: _("Electrum retrieves your wallet information from a single server (Address server). In addition, it connects to a number of extra nodes, in order to fetch block headers. Block headers are used to verify the information sent by the address server, using Simple Payment Verification (SPV).")
|
text: _("Electrum retrieves your wallet information from a single node (address server). In addition, it connects to a number of extra nodes, in order to fetch block headers. Block headers are used to verify the information sent by the address server, using Simple Payment Verification (SPV).")
|
||||||
|
font_size: '6pt'
|
||||||
|
Widget:
|
||||||
|
size_hint: 1, 0.1
|
||||||
|
TopLabel:
|
||||||
|
text: _("If auto-connect is checked, the address server will be selected automatically.")
|
||||||
font_size: '6pt'
|
font_size: '6pt'
|
||||||
Widget:
|
Widget:
|
||||||
size_hint: 1, 0.1
|
size_hint: 1, 0.1
|
||||||
|
@ -48,5 +51,4 @@ Popup:
|
||||||
height: '48dp'
|
height: '48dp'
|
||||||
text: _('OK')
|
text: _('OK')
|
||||||
on_release:
|
on_release:
|
||||||
app.network.set_parameters(host.text, nd.port, nd.protocol, nd.proxy, auto_connect.active)
|
|
||||||
nd.dismiss()
|
nd.dismiss()
|
||||||
|
|
Loading…
Reference in New Issue