Bug 425300

Summary: Double-ampersand in menu item
Product: [Plasma] plasmashell Reporter: ratijas <me>
Component: Global Menu widgetAssignee: Kai Uwe Broulik <kde>
Status: RESOLVED WORKSFORME    
Severity: normal CC: mvourlakos, nate, plasma-bugs-null
Priority: NOR    
Version First Reported In: 5.19.4   
Target Milestone: 1.0   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description ratijas 2020-08-13 13:52:43 UTC
SUMMARY

Menu item "Forget All Files && Folders" is shown with double ampersands -- just as it is encoded in the source code.

https://invent.kde.org/graphics/gwenview/-/blob/b733220a9781b42c6191ff7a2d160cde862ae39d/app/mainwindow.cpp#L394

I am using DBus menu with GlobalMenu from plasma-sdk package. Relevant files include `/usr/share/plasma/packages/org.kde.plasma.cuttlefish/contents/ui/GlobalMenuBar.qml`.

STEPS TO REPRODUCE
1. Open some files in Gwenview.
2. Open "File" -> "Open Recent" sub-menu.

OBSERVED RESULT

"Forget All Files && Folders" at the end of the files list.

EXPECTED RESULT

"Forget All Files & Folders" with single ampersand, or even something simpler, like:

 - "Clear list" (in qpdfview)
 - "Clear Items" (in Sublime Text)

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: plasma-sdk 5.19.4-1
Comment 1 Nate Graham 2020-08-17 16:27:48 UTC
This is a bug in the Global Menu applet. A double ampersand in a string means "Actually show this ampersand rather than treating the following character as an accelerator." So it's up to every bit of UI that might be displaying this string to replace a double-ampersand with only one. Moving the bug report accordingly.

In the meantime, I can work around this by changing the text of the menu item in Gwenview, sure.
Comment 2 Nate Graham 2020-08-17 16:32:17 UTC
Git commit 44dfdb0e9aba9ff2db0cd65ab4c0b09ec1ba7231 by Nate Graham.
Committed on 17/08/2020 at 16:31.
Pushed by ngraham into branch 'master'.

Use consistent text for "forget recent files" action

"Clear List" is what's used throughout other KDE apps.

M  +1    -1    app/mainwindow.cpp

https://invent.kde.org/graphics/gwenview/commit/44dfdb0e9aba9ff2db0cd65ab4c0b09ec1ba7231
Comment 3 Nate Graham 2025-08-28 21:48:24 UTC
With today's git master, I can't see any double ampersands in any menu items for any apps I test. It may have been fixed with some of the recent changes to the widget. Is this still a problem for you, Ivan?
Comment 4 Bug Janitor Service 2025-09-12 03:48:09 UTC
๐Ÿ›๐Ÿงน โš ๏ธ This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information, then set the bug status to REPORTED. If there is no change for at least 30 days, it will be automatically closed as RESOLVED WORKSFORME.

For more information about our bug triaging procedures, please read https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging.

Thank you for helping us make KDE software even better for everyone!
Comment 5 Bug Janitor Service 2025-09-27 03:46:31 UTC
๐Ÿ›๐Ÿงน This bug has been in NEEDSINFO status with no change for at least 30 days. Closing as RESOLVED WORKSFORME.