| Age | Commit message (Collapse) | Author |
|
Invisible symbols can show up outside show-all mode if an invisible
symbol has visible symbols in an implicit (indented) submenu. Printing
them in red like in show-all mode is the perfectly consistent thing to
do, but might look confusing/broken.
Only print invisible symbols in red in show-all mode.
Also change the bracket style for all invisible bool/tristate symbols to
- - N_SYM
-M- M_SYM
-*- Y_SYM
That makes it clear that they can't be changed, even when they show up
outside show-all mode, and makes logical sense if that style is taken to
always mean that the symbol value can't be changed.
You lose a quick reference for whether a symbol is a bool or tristate,
but it's not a huge deal.
|
|
Show-all mode does not need to be enabled when jumping to an invisible
symbol with visible children from an implicit submenu, because the
invisible symbol will be shown anyway in that case.
Explicitly check whether the jumped-to node would be shown instead, and
enable show-all mode otherwise.
|
|
Currently, the symbol BAR below (which ends up indented in an implicit
submenu) is shown only if DEP is non-n (or if show-all mode is
enabled):
config FOO
bool "foo" if DEP
default y
config BAR
bool "bar" if FOO
This is bad, because it hides visible symbols from the interface. The
assumption was that an implicit submenu (which is only created if the
parent has a prompt) would never have visible items when the root item
is invisible, but prompt-specific conditions and select/imply can break
that assumption.
Fix it by always showing implicit submenus with visible nodes, along
with the parent node. If the parent node is invisible, show it in red,
like in show-all mode (which happens automatically). That's probably
better than having mysteriously indented nodes when the parent is
invisible.
|
|
|
|
Just checking whether the default value expression is a single symbol
correctly handles the string/int/hex cases too, because that case will
always hit for those. D'oh.
|
|
Used in two spots.
|
|
The global should be called _stdscr, and then the names don't clash.
Leftover.
|
|
Add info to module docstring.
|
|
Add an alternative, less yellow, more 'make menuconfig'-like color
scheme, contributed by Mitja Horvat (pinkfluid). The new theme is
selected by setting the MENUCONFIG_THEME environment variable to
'aquatic'.
Make it so that custom themes can override just the styles they want to
change from the default theme.
Perhaps some non-hardcoded theming mechanism could be added later, but
keep it simple for now.
Piggyback some related changes:
- Make the selected item bold in the default theme, like the aquatic
theme does.
- Allow the style for the edit box in the jump-to dialog to be
configured separately from the style for edit boxes in pop-up
dialogs. That makes it possible to avoid some color clashes.
- Remove a redundant style setting for the jump-to edit box. The window
itself is already created with the correct style.
|
|
Promptless choices can appear "legitimately" if you define a named
choice in multiple locations to add on some symbols (which is broken in
the C tools though).
Prior to this fix, the promptless choice would get flattened, with the
choice symbols appearing in the same menu as the (invisible) choice.
This looks confusing.
Skip flattening promptless choices to fix it.
|
|
Some general cleanup:
- Handle the iteration with the new Kconfig.node_iter() helper.
This makes some function so short that they become pointless. Have
just main() + oldconfig(node) + small helper functions.
- Use _name_and_loc_str(sc) for choices too, so that all locations get
reported for named choices defined in multiple locations
- Rewrite the intro to be less wordy and remove the sample session
(leftover from when oldconfig.py was in examples/, and not that
exciting)
- Print "Updated configuration written to..." instead of
"Configuration saved to..."
- Various other nits
|
|
If a symbol depends on a choice symbol that immediately precedes it,
it's put into an implicit submenu and not considered a choice symbol.
Don't immediately return to the parent menu when selecting such a
symbol. It makes the children hard to spot.
This is used (or was... not sure if it still is) in a single Kconfig
file in the kernel. It's completely undocumented.
|
|
For named choices defined in multiple locations, show the symbols from
all locations, regardless of via which menu node the choice is entered.
Named choices with symbols in more than one location are broken in the C
tools, so there's no reference for the behavior here. This behavior
probably makes more sense than just showing the choice symbols at the
current location at least, which was the old behavior in Kconfiglib's
menuconfig.
Suggested by Mitja Horvat (pinkfluid).
|
|
Came out as "Included via " for items in the top-level Kconfig file,
which looks broken.
|
|
Add a MenuNode.include_path attribute that holds a tuple of
(filename, linenr) tuples, giving the locations of the 'source'
statements via which the node's Kconfig file was included, starting from
the top-level Kconfig file.
Use MenuNode.include_path to give the include path for symbols and other
items in the help display in the menuconfig interface. This is useful
for figuring out how Kconfig files are organized, and when reorganizing
things.
|
|
These are the same as Kconfig.defined_syms and Kconfig.choices, except
duplicates are removed. Kconfig order is still preserved.
This is almost always what you want when iterating through symbols and
choices, as it potentially saves work, avoids generating duplicates when
writing output, and still preserves Kconfig order for readability.
The old attributes will be kept for backwards compatibility (maybe
there's some rare cases where they could be useful too). They're created
internally anyway.
|
|
- *_fn() prefixes on functions are a bit silly. It makes more sense for
the expr_str() parameter, so keep it there.
- Use *_expr_str() instead of just *_str(), to make it clearer that
these deal with expressions.
|
|
- Use '(=value)' instead of '(="value")'
- Use '(=value)' instead of '(value: {})' for various headings, too
- Don't bother showing the value hint for the entire expressions when
it's just a single symbol. The value of the symbol itself is already
shown.
- Only put quotes around the value for string symbols at the top of the
symbol info display
- Deindent expressions split over multiple lines a bit
|
|
Previously, defaults for string/int/hex symbols showed up as e.g.
'17 (value: "n")' in the symbol information, which looks confusing.
Only display the hint for bool/tristate symbols to fix it.
For "non-literal" symbols, _expr_str() still takes care of showing the
value (e.g. 'FOO(="bar")').
|
|
This gets rid of the expr_str() overriding. In addition to being hacky,
it also carried over to warnings, which looked confusing.
Piggyback a code nit. _kconf and kconf no longer clash, so the globals()
hack is no longer needed.
|
|
|
|
The _update_menu() call at the end of _change_node() is redundant,
because _set_val() already calls _update_menu() if the value changes
|
|
Wrong indentation, unused imports.
|
|
All three act on the currently selected node, so the code that fetches
it can be moved into the helper function.
|
|
|
|
Largely paid work, and it's copied into Zephyr, so it was a request.
All other source files are still copyright me.
Nothing changes in practice. I went for shared copyright to make sure
the ISC license can never be changed.
|
|
Base 10 is the default.
|
|
This commit fixes an issue when user searches for a nonexistent object
(e.g. adsdsaasda) and presses enter.
Having all the key checks in one continuous if statement makes sure that
the very last 'else' statement does not get executed when enter is
pressed.
Note - backported from:
https://github.com/zephyrproject-rtos/zephyr/pull/8332
|
|
Ctrl-F (Ctrl-H clashes with backspace) brings up the information dialog
for the selected item in the jump-to dialog.
Since it's now possible to jump directly from the information dialog to
the jump-to dialog and vice versa, recursive invocation becomes
possible. Work around it with a flag to _info_dialog() that makes '/'
return if the information dialog was launched from within the jump-to
dialog. (Recursive invocations work code-wise, but act in a confusing
way.)
|
|
It's annoying to have to leave the information dialog just to do a
search related to something you saw in the information dialog.
Stay in the information dialog if the search is canceled.
|
|
Everything's ISC.
|
|
cached_search_strings was renamed to cached_search_nodes.
|
|
Removes repeated KCONFIG_CONFIG boilerplate.
Also make allyesconfig use KCONFIG_CONFIG when writing (oversight), and
document the sys.exit() behavior for standard_kconfig().
|
|
standard_kconfig() gets the top-level Kconfig file from the first
command-line argument, defaulting to "Kconfig". This removes some
boilerplate from tools.
|
|
An output file should still be generated if you're happy with the
default settings.
|
|
Had missed sys.exit(msg).
|
|
setuptools' 'entry_points' gives nice behavior on Windows. It requires
that the module has an entry point function. Create one and move the
command line argument handling to it.
|
|
It's easy to miss at the top, especially as it's centered. Have a
generic 'Symbol information', 'Choice information', etc., title instead.
|
|
The name is always shown for items without prompts (which are always
promptless symbols). Only show-name mode needs the symbol/choice check.
|
|
Pressing 'c' toggles show-name mode, where names of symbols are
displayed before their prompt.
|
|
Only show "real" (non-indented) menus, like in the menu path at the top.
|
|
This is consistent with how they're shown in the info dialog. Looks less
confusing for empty strings too.
|
|
Makes it double as a quick way to check if something is enabled.
Suggested by Randy Dunlap.
|
|
This gets rid of some slight input jerkiness while inputting e.g.
'.*debug' on my machine (though the '.*' is redundant there), due to
faster matching. The '.*' probably has bad interactions with
re.search(), which matches anywhere in the string.
A plain "debug" matches about 70% faster, though it's fast enough to
feel instant anyway.
|
|
|
|
|
|
Instead of doing a single search of the '<symbol name> "<prompt>"'
string. This avoids gotchas like '_DEBUG$' not matching FOO_DEBUG if
FOO_DEBUG has a prompt.
|
|
|
|
re.error.msg was added in Python 3.5. Show a generic error message when
it isn't available.
|
|
This makes it clearer when an edit box is scrolled, especially when
backspacing. The cursor will now only go to the far left/right of the
edit box at the start/end of the string.
Reuse _SCROLL_OFFSET to specify the scroll offset.
|