KIO: try to assign an icon to action submenus

Chloe Kudryavtsev toast at toast.cafe
Fri Mar 13 20:19:42 GMT 2020


On 3/13/20 2:18 PM, David Faure wrote:
> On mardi 3 mars 2020 18:29:47 CET Chloe Kudryavtsev wrote:
>> Currently, action submenus (X-KDE-Submenu) have no icons.
>> This patch makes it inherit the icon of the first action.
> 
> I wonder if this is always wanted? The icon for the first action might not be 
> representative of what the other actions do.
> 
> Wouldn't it be better to be able to explicitly specify the icon for the 
> submenu?
> 

That would be better, but that can't easily be done without reorganizing
how the whole thing works.
insertServicesSubmenus() currently receives a QMap<QString,
ServiceList>, the target QMenu and a boolean.
Meanwhile, the icon for the desktop file as a whole would be available
in the KConfigGroup (from desktopFile).

Basically, making the "global" (i.e [Desktop Entry]) Icon setting be
what is used would require breaking API (changing the signature of
insertServicesSubmenus).
In the meanwhile, in practice, ServiceMenus do have (at the very least)
similar icons, because TryExec is effectively global (there is no
support for disabling individual actions, it's done purely on a
per-desktop-file basis).
Ideally, of course, everything would be explicit, but the amount of
changes quickly grows if one wants to do this right.

I would participate in an effort to extend KConfig, KIO and co. to
improve the overall handling of .desktop files, but the process in
general is kind of a bother, and I don't really like touching C++
nowadays either, so it's a hard sell to put that as a high priority for me.
-
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0xEB24BAD412DE2823.asc
Type: application/pgp-keys
Size: 884 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20200313/dfb38b29/attachment-0001.key>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: OpenPGP digital signature
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20200313/dfb38b29/attachment-0001.sig>


More information about the Kde-frameworks-devel mailing list