Disassociation of Keystroke from Menu Underline
Submitted by Daniel Yacob
gtk_label_set_uline_text_internal interprets "_" to underline the following character and map the character to a keystroke following Alt. For example "_File" will display in a menu with "F" underlined and mapped to the key sequence Alt+[Ff].
This patch adds support such that if a 2nd "_" is found it is applied to the key strokes and is not displayed.
The benefit is that a non-Roman character can be underlined in a menu while a keystroke mapping remains Roman for the most typical keyboards. This gives GUIs a more natural look and no Roman character need be added. The popular solution for this issue now is to add the key stroke as per "xyz (_F)" following the non-Roman text "xyz". The consequence here is an extra 4 characters of width foreach menu root item.
Hence this patch would allow definitions like "_xyz_f" where the "x" character (non-Roman) is underlined in display and Alt+[Ff] is the keyboard shortcut.
A lingering issue is that for input methods that ARE case sensitive (such as Ethiopic) this patch is only a partial solution. Some solution is needed here to make the key accelerator mappings case aware.