After editing Telegram menu entry (via right click) (eg, to add options), duplicate entries later appear in the menu. Problem appears to be caused by the filename Telegram has chosen: `org.telegram.desktop.desktop` The double `.desktop` extention is collapsed when the file is saved to `~/.local/share/applications` as `org.telegram.desktop`. The mismatched file names are then considered separate entries, and Telegram appears twice in the menu. Telegram devs consider this a KDE bug and refuse to rename the desktop file. As far as I can tell, filenames with double `.desktop` extension is not forbidden by XDG Desktop Menu Specification.
Sounds like someone, somewhere, used QString::indexOf(".desktop") instead of lastIndexOf. 😄
I cannot reproduce this in git master or 6.3.2 with the telegram-desktop arch package. Is this with the flatpak?
Thanks for looking into it. This issue can be closed now as resolved/fixed. I opened the issue a year ago, and KMenuEdit looks much different from back then. So whatever was causing the problem was probably revised away along with other changes. I tested a moment ago with a file named `test.desktop.desktop`, and KMenuEdit 6.3.3 seems to handle it correctly. The problem had occurred with `extra/telegram-desktop`. I rarely edit menu items, and had added the problem file to the package manager ignore list.
I downloaded KMenuEdit 6.0.3 from https://archive.archlinux.org/repos/2024/04/02/extra/os/x86_64/kmenuedit-6.0.3-1-x86_64.pkg.tar.zst to test. It seems to behave correctly. Could the problem have been from something outside of KMenuEdit, like a different KDE or Qt6 component?
(In reply to xiota from comment #4) > Could the problem have been from something outside of KMenuEdit, like a different KDE or Qt6 component? It could have been in KConfig/KDesktopFile. I'll close for now, thanks for following-up.