mirror of
https://github.com/markqvist/NomadNet.git
synced 2025-02-22 16:09:58 -05:00
Fixed propagation node autoselection not working when None value was set in settings dict
This commit is contained in:
parent
c1cbc56459
commit
a8d337a94e
@ -456,9 +456,8 @@ class NomadNetworkApp:
|
|||||||
def autoselect_propagation_node(self):
|
def autoselect_propagation_node(self):
|
||||||
selected_node = None
|
selected_node = None
|
||||||
|
|
||||||
if "propagation_node" in self.peer_settings:
|
if "propagation_node" in self.peer_settings and self.peer_settings["propagation_node"] != None:
|
||||||
selected_node = self.peer_settings["propagation_node"]
|
selected_node = self.peer_settings["propagation_node"]
|
||||||
|
|
||||||
else:
|
else:
|
||||||
nodes = self.directory.known_nodes()
|
nodes = self.directory.known_nodes()
|
||||||
trusted_nodes = []
|
trusted_nodes = []
|
||||||
@ -706,7 +705,7 @@ class NomadNetworkApp:
|
|||||||
self.config["textui"]["intro_text"] = "Nomad Network"
|
self.config["textui"]["intro_text"] = "Nomad Network"
|
||||||
|
|
||||||
if not "editor" in self.config["textui"]:
|
if not "editor" in self.config["textui"]:
|
||||||
self.config["textui"]["editor"] = "editor"
|
self.config["textui"]["editor"] = "nano"
|
||||||
|
|
||||||
if not "glyphs" in self.config["textui"]:
|
if not "glyphs" in self.config["textui"]:
|
||||||
self.config["textui"]["glyphs"] = "unicode"
|
self.config["textui"]["glyphs"] = "unicode"
|
||||||
@ -958,10 +957,8 @@ glyphs = unicode
|
|||||||
# application. On by default.
|
# application. On by default.
|
||||||
mouse_enabled = True
|
mouse_enabled = True
|
||||||
|
|
||||||
# What editor to use for editing text. By
|
# What editor to use for editing text.
|
||||||
# default the operating systems "editor"
|
editor = nano
|
||||||
# alias will be used.
|
|
||||||
editor = editor
|
|
||||||
|
|
||||||
# If you don't want the Guide section to
|
# If you don't want the Guide section to
|
||||||
# show up in the menu, you can disable it.
|
# show up in the menu, you can disable it.
|
||||||
|
@ -704,7 +704,7 @@ class KnownNodes(urwid.WidgetWrap):
|
|||||||
else:
|
else:
|
||||||
self.no_content = True
|
self.no_content = True
|
||||||
widget_style = "inactive_text"
|
widget_style = "inactive_text"
|
||||||
self.pile = urwid.Pile([urwid.Text(("warning_text", g["info"]+"\n"), align="center"), SelectText(("warning_text", "Currently, no nodes are known\n\n"), align="center")])
|
self.pile = urwid.Pile([urwid.Text(("warning_text", g["info"]+"\n"), align="center"), SelectText(("warning_text", "Currently, no nodes are saved\n\nCtrl+L to view the announce stream\n\n"), align="center")])
|
||||||
self.display_widget = urwid.Filler(self.pile, valign="top", height="pack")
|
self.display_widget = urwid.Filler(self.pile, valign="top", height="pack")
|
||||||
|
|
||||||
urwid.WidgetWrap.__init__(self, urwid.AttrMap(urwid.LineBox(self.display_widget, title="Saved Nodes"), widget_style))
|
urwid.WidgetWrap.__init__(self, urwid.AttrMap(urwid.LineBox(self.display_widget, title="Saved Nodes"), widget_style))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user