Skip to content

Install icons into hicolor directory - #2346

Open
City-busz wants to merge 1 commit into
Guake:masterfrom
City-busz:install-icons
Open

City-busz wants to merge 1 commit into
Guake:masterfrom
City-busz:install-icons

Conversation

@City-busz

Copy link
Copy Markdown

This is the standard location defined by freedesktop.org Icon Theme Specification.

Also, use that icon on the indicator to fix missing icon.

This is the standard location defined by freedesktop.org Icon Theme
Specification.

Also, use that icon on the indicator to fix missing icon.
@dmytrotsuran

Copy link
Copy Markdown

Confirming this fixes a real bug on Ubuntu GNOME (Wayland) with Guake 3.10.1 from the Ubuntu package, using the ubuntu-appindicators extension and libayatana-appindicator3-1 0.5.94. The tray shows a generic "…" placeholder instead of the Guake icon.

The indicator asks for a themed icon name that no icon theme provides:

$ gdbus call --session -d <guake bus name> -o /org/ayatana/NotificationItem/guake_indicator \
    -m org.freedesktop.DBus.Properties.Get org.kde.StatusNotifierItem IconName
(<'guake-tray'>,)
$ ... IconThemePath
(<''>,)

guake-tray.svg/.png are only installed in /usr/share/guake/pixmaps/, which isn't on the icon theme search path, so the lookup fails.

This looks like a regression from a3ae752 (#2200). That commit replaced set_icon(img), which passed a full path, with set_icon_full("guake-tray", ...), which passes only a name. Before that, the old import appindicator nearly always failed on Python 3, so Guake fell back to Gtk.StatusIcon.set_from_file() and the icon worked. The same problem was fixed in 2015 by #591 (see #433).

A local workaround confirms the diagnosis. Copying the icon into the user hicolor theme and restarting Guake brings the icon back:

cp /usr/share/guake/pixmaps/guake-tray.svg ~/.local/share/icons/hicolor/scalable/apps/
gtk-update-icon-cache -f -t ~/.local/share/icons/hicolor

I haven't tested this PR's branch, but it does the same thing: it installs a named icon into hicolor and points the indicator at it.

One optional idea: calling self.tray_icon.set_icon_theme_path(IMAGE_DIR) (or the equivalent pixmaps dir) as well would keep the icon working for distro packages that don't use the Makefile install target.

Probably related: #2326, #2245.

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