kivy: use NumericProperty for blocks and nodes
This commit is contained in:
@@ -22,11 +22,11 @@ Builder.load_string('''
|
||||
TopLabel:
|
||||
height: '48dp'
|
||||
id: bc_height
|
||||
text: ''
|
||||
text: _("Verified headers: %d blocks.")% app.num_blocks
|
||||
TopLabel:
|
||||
height: '48dp'
|
||||
id: bc_status
|
||||
text: ''
|
||||
text: _("Connected to %d nodes.")% app.num_nodes if app.num_nodes else _("Not connected?")
|
||||
Widget:
|
||||
size_hint: 1, 0.1
|
||||
TopLabel:
|
||||
@@ -88,12 +88,6 @@ class CheckpointDialog(Factory.Popup):
|
||||
self.cp_height, self.cp_value = self.network.blockchain.get_checkpoint()
|
||||
self.callback = callback
|
||||
|
||||
n_nodes = len(network.get_interfaces())
|
||||
n_blocks = network.get_local_height()
|
||||
self.ids.bc_height.text = _("Verified headers: %d blocks.")%n_blocks
|
||||
self.ids.bc_status.text = _("Connected to %d nodes.")%n_nodes if n_nodes else _("Not connected?")
|
||||
|
||||
|
||||
def on_height_str(self):
|
||||
try:
|
||||
new_height = int(self.ids.height_input.text)
|
||||
|
||||
Reference in New Issue
Block a user