Add symlinks for flatpak
Needs RevisionPublic

Authored by GeeXT on Feb 2 2019, 4:04 PM.


Group Reviewers

This patch creates symlinks (for every application I've
found on Flathub and for which Breeze icon theme has an icon) to let
flatpak-provided .desktop files point to breeze-provided icons.

Flatpak-exported .desktop files use different icon names
(e. g. org.kde.okular instead of just okular) and because of that
flatpak-provided .desktop files show in menus and panels with their
default icons instead of breeze-provided icons even when Breeze icon
theme is used.

Test Plan

This can be tested by applying the patch and installing the icon
theme into ~/.local/share/icons. Reboot/relogin may be necessary.
Then to see the changes you can install org.gimp.GIMP from flathub.
Without the patch GIMP uses its default icon in application
menus/panels/docks/etc. With the patch it will use the
breeze-provided icon.

Diff Detail

R266 Breeze Icons
flatpak-symlinks (branched from master)
No Linters Available
No Unit Test Coverage
Build Status
Buildable 7783
Build 7801: arc lint + arc unit
GeeXT created this revision.Feb 2 2019, 4:04 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptFeb 2 2019, 4:04 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
GeeXT requested review of this revision.Feb 2 2019, 4:04 PM
nibags added a subscriber: nibags.Mar 6 2019, 10:01 PM

Also missing the symlink for JDownloader (org.jdownloader.JDownloader.svg):

I don't know if it's also necessary to add symlinks for AppImage apps:
For example: hotspot.svg -> appimagekit-hotspot.svg

ngraham requested changes to this revision.Mar 7 2019, 4:14 AM
ngraham added a reviewer: VDG.
ngraham added a subscriber: ngraham.

I like the functionality, though I'm not thrilled about having to change these symlinks around as apps change their appstream IDs, and constabtly add new ones as different packagers replace the existing AppStream IDs with their own (ugh). Then again that's already the world we live in and I guess we've signed ourselves up for this mess by supporting icons for 3rd-party apps anyway.

This currently causes the scalable test to fail, so at a minimum that needs to be fixed before this patch can land:

FAIL!  : ScalableTest::test_scalable(icons:Applications) The following icons are not available in a scalable directory:
   Loc: [/home/dev/kde/src/breeze-icons/autotests/scalabletest.cpp(262)]
FAIL!  : ScalableTest::test_scalable(icons-dark:Applications) The following icons are not available in a scalable directory:

Remove the 16px com.github.bajoja.indicator-kdeconnect icon symlink, I guess.

Looks like @nibags found another one that could be added, too

This revision now requires changes to proceed.Mar 7 2019, 4:14 AM
nibags added a comment.Mar 8 2019, 8:03 AM

In D19324 the icons for code and code-oss were added, which also need symbolic links for Flatpak (com.visualstudio.code & com.visualstudio.code.oss)