summaryrefslogtreecommitdiff
path: root/menuconfig.py
diff options
context:
space:
mode:
authorUlf Magnusson <ulfalizer@gmail.com>2019-04-05 15:20:15 +0200
committerUlf Magnusson <ulfalizer@gmail.com>2019-04-05 15:21:23 +0200
commitf715e95acebc66a38e981023630690bd64f0be6e (patch)
tree84a483918931f45876fcf5581fc1cbe51b68765c /menuconfig.py
parent7e23244fe01de3302bad93d473d99ee44539881a (diff)
menuconfig: Fix typo in comment in _load_dialog()
Show-all mode is turned on if the node becomes invisible. The comment said the opposite if you didn't include the parenthesis. Piggyback some code nits.
Diffstat (limited to 'menuconfig.py')
-rwxr-xr-xmenuconfig.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/menuconfig.py b/menuconfig.py
index 8d06e44..9ed46cc 100755
--- a/menuconfig.py
+++ b/menuconfig.py
@@ -1749,16 +1749,15 @@ def _load_dialog():
filename = ""
while True:
filename = _input_dialog("File to load", filename, _load_save_info())
-
if filename is None:
return False
filename = os.path.expanduser(filename)
if _try_load(filename):
+ # Turn on show-all mode if the selected node is not visible after
+ # loading the new configuration
sel_node = _shown[_sel_node_i]
-
- # Turn on show-all mode if the current node is (no longer) visible
if not (sel_node.prompt and expr_value(sel_node.prompt[1])):
_show_all = True
@@ -1766,7 +1765,7 @@ def _load_dialog():
# The message dialog indirectly updates the menu display, so _msg()
# must be called after the new state has been initialized
- _msg("Success", "Loaded {}".format(filename))
+ _msg("Success", "Loaded " + filename)
return True
@@ -1806,7 +1805,6 @@ def _save_dialog(save_fn, default_filename, description):
while True:
filename = _input_dialog("Filename to save {} to".format(description),
filename, _load_save_info())
-
if filename is None:
return False