"New Document" submenu: Underscores are stripped from template names
Previously reported in bugzilla.
Steps to reproduce
- Place a file in the
XDG_TEMPLATES_DIR
folder (in the default English locale, that's a folder named "Templates" inside the user's home folder). - Rename that file to "example_file_with_underscores"
- In another folder, open the folder current folder menu or the background context menu.
- Open the "New document" submenu.
Current behavior
The submenu displays the template with the name: "examplefilewithunderscores".
But if you click on it, a new file is created with the correct name: "example_file_with_underscores"
Expected behavior
The submenu should display the actual name with underscores.
Additional information
This happens because of mnemonics, a toolkit feature for quick keyboard navigation.
Hint: There is a function in eel/eel-string.c
that can be used to fix this bug.