summaryrefslogtreecommitdiff
path: root/guiconfig.py
AgeCommit message (Collapse)Author
2019-08-03menuconfig/guiconfig: Print 'default:' with no 's' if there's just oneUlf Magnusson
Most common case, and makes the symbol info read better.
2019-07-02Catch EnvironmentError instead of OSError/IOErrorUlf Magnusson
menuconfig.py tended to crash on I/O errors on Python 2, due to forgetting to update some 'except OSError's. Catch EnvironmentError instead. EnvironmentError is a common base class of IOError and OSError on Python 2, and an alias for OSError on Python 3. Use it elsewhere too, as it might help catch obscure I/O errors on Python 2.
2019-06-24menuconfig/guiconfig: Use orig_defaults in symbol infoUlf Magnusson
Forgot that they show defaults separately. Use orig_defaults instead of 'defaults' to de-spam it a bit. The direct dependencies are shown above the defaults.
2019-06-09menuconfig/guiconfig: Clean up 'range' checking a bitUlf Magnusson
Just cosmetic.
2019-06-03Have load_config() and write_(min_)config() return messagesUlf Magnusson
Hardcoding load_config() and write_(min_)config() to write any message to stdout is awkward, because it means that the message can't be easily reused when stdout is the wrong place to write it to (e.g. in menuconfig/guiconfig). This gets extra bad now that there's also the "No change to ..." message. Modify load_config() and write_(min_)config() to return the message as a string instead, and have them always return a message, instead of just when 'filename' is None and verbose=True. This makes things flexible and straightforward. Use the new behavior in menuconfig.py and guiconfig.py. They now show "No change to ..." when saving a file doesn't modify it. Tools that want to write messages to stdout should now do print(kconf.load_config()) / print(kconf.write_config()). There's no clean way to preserve perfect backwards compatibility here, but keep accepting the 'verbose' argument and print a deprecation warning if a value is ever passed for it. That way, scripts will keep running, though possibly with less output on stdout. This changes the meaning of the load_config() return value as well, though I suspect it was only ever used by the menuconfig/guiconfig interfaces. The new behavior applies for kconfiglib.VERSION >= (12, 0, 0).
2019-05-25Strip direct deps. from property conditions in Symbol/Choice/MenuNode.__str__()Ulf Magnusson
Commit e81a77b ("Consistently put direct deps. last when propagating") makes the position of the direct deps. in property conditions predictable after dependency propagation, making it easy to strip them as needed. Use this to implement MenuNode.orig_{prompt,defaults,selects,implies,ranges}, which work like the non-orig_* versions but omit the direct deps. Use those in turn to omit the direct deps in Symbol/Choice.__str__(). The direct deps. (with propagated parent deps.) can still be seen after 'depends on ...', so there is no loss of information. This unclutters Kconfig definitions shown in menuconfig/guiconfig and in any generated documentation. The old output also had duplicated dependencies, though it doesn't matter for evaluation. Before: config A bool prompt "A" if DEP default y if FOO && DEP depends on DEP After: config A bool prompt "A" default y if FOO depends on DEP
2019-05-19Make .config.old easier to discoverUlf Magnusson
Mention that the old version of an overwritten configuration file is saved to <filename>.old in a few different places, to make it easier to discover.
2019-05-19String repetition consistency nitUlf Magnusson
2019-05-07guiconfig: Remove unused UNKNOWN importUlf Magnusson
2019-05-06guiconfig: Comment nitsUlf Magnusson
Move the global variable descriptions earlier, remove some redundant comments, and clarify that the Python 3-only comment in setup.py is talking about the terminal menuconfig.
2019-05-06guiconfig: Micro-optimize tree item creation some moreUlf Magnusson
Mostly to get things consistent with _update_jump_to_display().
2019-05-03guiconfig: Add a Tkinter-based menuconfigUlf Magnusson
This is a graphical configuration interface written in Tkinter. Like menuconfig.py, it supports showing all symbols (with invisible symbols in red) and jumping directly to symbols. Symbol values can also be changed directly from the jump-to dialog. When single-menu mode is enabled, a single menu is shown at a time, like in the terminal menuconfig. Only this mode distinguishes between symbols defined with 'config' and symbols defined with 'menuconfig'. Compatible with both Python 2 and Python 3. Has been tested on X11, Windows, and macOS. To avoid having to carry around a bunch of GIFs, the image data is embedded in guiconfig.py. To use separate GIF files instead, change _USE_EMBEDDED_IMAGES to False. The image files can be found in https://github.com/ulfalizer/Kconfiglib/tree/screenshots/guiconfig. A new `make guiconfig` target in the Makefile patch will run the GUI configuration interface on the Linux kernel.