Opened 15 years ago
Closed 12 years ago
#944 closed defect (fixed)
menudata.py: strip out & key shortcut hint
Reported by: | hamish | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 7.0.0 |
Component: | wxGUI | Version: | svn-trunk |
Keywords: | menudata.py, synopsis | Cc: | |
CPU: | All | Platform: | All |
Description
Hi,
in source:grass/trunk/wxpython/gui_modules/menudata.py PrintCommandsItems does not strip out "&" from the menu titles, so those keyboard shortcut hints get propagated into the output.
see:
MDPY="$GISBASE/etc/wxpython/gui_modules/menudata.py" python "$MDPY" commands | less
Hamish
Change History (3)
comment:1 by , 15 years ago
comment:2 by , 15 years ago
Is there some reason why they should be stripped out?
yes, the menudata.py "commands" option is used to generate a list of all modules and their menu position in a flat ascii file for later parsing by the module_synopsis script. the resulting PDF and html synopses, and furutre module man page menu location text if full of meaningless "&"s if they aren't stripped out.
menudata.py's __PrintCommandsItems
seems the most obvious place to do it (as close to the source of the problem as possible), unless there are any i18n needs etc. wheich require them to stay.
Hamish
comment:3 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
python core/menudata.py commands | grep '&' -c 0
seems to be solved. Closing, please re-open if needed.
Replying to hamish:
Is there some reason why they should be stripped out?
AFAIK, the "commands" option only exists as a convenience for developers. The only option which is actually used is "strings", which is used to generate menustrings.py (for translation).