Opened 11 years ago

Closed 8 years ago

#944 closed defect (fixed)

menudata.py: strip out & key shortcut hint

Reported by: hamish Owned by: grass-dev@…
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 in reply to:  description Changed 11 years ago by glynn

Replying to hamish:

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.

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).

comment:2 Changed 11 years ago by hamish

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 Changed 8 years ago by martinl

Resolution: fixed
Status: newclosed
python core/menudata.py commands | grep '&' -c
0

seems to be solved. Closing, please re-open if needed.

Note: See TracTickets for help on using tickets.