Bug 491674 - Dolphin Kleopatra actions display with "&&" rather than "&"
Summary: Dolphin Kleopatra actions display with "&&" rather than "&"
Status: RESOLVED FIXED
Alias: None
Product: kleopatra
Classification: Applications
Component: general (show other bugs)
Version: 3.2.0.240502
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Andre Heinecke
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-08-13 14:44 UTC by John Veness
Modified: 2024-10-16 21:14 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Dolphin Kleopatra actions (34.79 KB, image/png)
2024-08-13 14:44 UTC, John Veness
Details

Note You need to log in before you can comment on or make changes to this bug.
Description John Veness 2024-08-13 14:44:44 UTC
Created attachment 172586 [details]
Dolphin Kleopatra actions

SUMMARY
I'm unsure if this is a Kleopatra bug or a Dolphin one! In Dolphin, there are right-click actions which come from Kleopatra and which contain double ampersands ("&&") instead of single, which I assume was intended.

STEPS TO REPRODUCE
1. Ensure both Dolphin and Kleopatra are installed
2. Run Dolphin
3. Right-click on a folder
4. Go into the Actions submenu

OBSERVED RESULT
Entries "Archive && Encrypt Folder" and "Archive, Sign && Encrypt Folder".

EXPECTED RESULT
Entries "Archive & Encrypt Folder" and "Archive, Sign & Encrypt Folder".

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20240811
KDE Plasma Version: 6.1.4
KDE Frameworks Version: 6.5.0
Qt Version: 6.7.2
Kernel Version: 6.10.3-1-default (64-bit)
Graphics Platform: X11

ADDITIONAL INFORMATION
I assume the double-ampersands were intended to display as a single ampersand, because of the Qt QAction feature described at https://doc.qt.io/qt-6/qaction.html#text-prop , but something seems to be awry here!
Comment 1 Ingo Klöcker 2024-10-16 20:51:25 UTC
I'm seeing the same. Curiously, the Dolphin action for files reads "Sign & Encrypt File" with a single ampersand.
Comment 2 John Veness 2024-10-16 21:00:04 UTC
As far as I can tell, the displayed text comes from kleopatra_signencryptfolders.desktop which contains double &&, whereas kleopatra_signencryptfiles.desktop contains single &. I would submit an MR, but I'm just wondering if there's a reason it's like this.
Comment 3 Ingo Klöcker 2024-10-16 21:09:29 UTC
Git commit bb1d94c0b25cae19cfd224074d5dc170933a02fc by Ingo Klöcker, on behalf of Ingo Klöcker.
Committed on 16/10/2024 at 21:09.
Pushed by kloecker into branch 'master'.

Fix double-& in desktop action names for folder actions

The double-& were added in 2011 with comment "Avoid ampersand
being used for an accelerator". I guess this misinterpretation of a
single & has been fixed in the meantime. The "Sign & Encrypt File"
action also has just a single & and this doesn't confuse Dolphin
when it shows accelerators on pressing Alt. The deskop file
specification also doesn't say anything about & in the Name entry.

M  +2    -2    src/data/kleopatra_signencryptfolders.desktop

https://invent.kde.org/pim/kleopatra/-/commit/bb1d94c0b25cae19cfd224074d5dc170933a02fc
Comment 4 Ingo Klöcker 2024-10-16 21:11:02 UTC
Thanks for reporting this issue and for offering to submit an MR!
Comment 5 John Veness 2024-10-16 21:14:43 UTC
No worries, thanks for digging into this and fixing quickly! Out of interest, I notice some of the translations have also copied the && form. Is this something that could/should be fixed in the source?