Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iconcache: Use desktop_id to lookup GDesktopAppInfo #776

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

vkareh
Copy link
Member

@vkareh vkareh commented Apr 5, 2024

This replaces #752 by using either _BAMF_DESKTOP_FILE or _GTK_APPLICATION_ID to reconstruct the path to the desktop spec file. The effect is that any application that reports either of these property to the window (like many GNOME applications do), and has a matching desktop file, will be picked up correctly and Marco will get the best possible icon for that window.

If a desktop ID cannot be found for the window, it moves on to the next matching method, so nothing changes for them.

@vkareh vkareh force-pushed the iconcache-use-gdesktopapp branch from bc1fa59 to 4150059 Compare April 8, 2024 16:29
@vkareh vkareh changed the title iconcache: Use _GTK_APPLICATION_ID to lookup GDesktopAppInfo iconcache: Use desktop_id to lookup GDesktopAppInfo Apr 8, 2024
@vkareh vkareh force-pushed the iconcache-use-gdesktopapp branch from 4150059 to 0b5bca1 Compare April 8, 2024 16:34
Copy link
Member

@lukefromdc lukefromdc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most of the code here I don't know a lot about, but this didn't break thumbnailing in atril or in EOM, in both cases clear, sharp thumbnails when available and clear, sharp icons in general

@lukefromdc lukefromdc requested a review from a team April 14, 2024 06:35
@vkareh vkareh force-pushed the iconcache-use-gdesktopapp branch from 0b5bca1 to 1ad7a41 Compare June 14, 2024 16:09
GTK+ has support for the application ID property. This will allow Marco
to reconstruct the path to the desktop spec file and so have access to
all internal attributes (e.g. name, icon, etc.)
Looking up GDesktopAppInfo from the GTK Application ID we can get a much
better match for the icon and load it at the appropriate scale. This
results in matching icons to straneous windows and better looking icons
overall.
In systems with bamfdaemon running, windows get this property for
finding the dekstop spec file of an application. This can be used to
find the defined icon for any application window that reports this
attribute and provider much better icon matching.
@lukefromdc
Copy link
Member

Rebased against master to pick up Travis fix, then force-pushed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants