! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Logout dialog shouldn't call gtk_icon_theme_load_icon() with GTK_ICON_LOOKUP_...
Status:
RESOLVED: FIXED
Product:
Xfce4-session
Component:
General

Comments

Description Lionel Le Folgoc 2011-01-27 21:23:28 CET
Created attachment 3430 
Proposed patch

Hi,

The logout dialog calls gtk_icon_theme_load_icon() with the GtkIconLookupFlags set to GTK_ICON_LOOKUP_GENERIC_FALLBACK. According to the gtk+ doc, it has the following meaning: "Try to shorten icon name at '-' characters before looking at inherited themes.".

If I take the reboot button as an example: first, "system-reboot" is tried, and if not found, "xfsm-reboot" is used. However, when "system-reboot" doesn't exist, GTK_ICON_LOOKUP_GENERIC_FALLBACK will make gtk+ try "system" first, which exists, but isn't related at all to the reboot. ;-)

So in the logout dialog, GTK_ICON_LOOKUP_GENERIC_FALLBACK should be replaced by 0, otherwise the "xfsm-*" fallback icons are never used (because "system" exists in almost all icon themes).

I attached an (untested) patch to fix that.

You might also want to check the icon names used: AFAIK, "system-reboot" is not the correct icon name, it should be "system-restart"...

Thanks!
Comment 1 Jérôme Guelfucci editbugs 2011-01-31 19:27:05 CET
Thanks for the patch Lionel, just pushed it to git master.

Re "system-restart", allow me to disagree: http://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html states that "system-reboot" is a legit icon name. So I'll keep things that way.

Bug #7196

Reported by:
Lionel Le Folgoc
Reported on: 2011-01-27
Last modified on: 2011-01-31

People

Assignee:
Nick Schermer
CC List:
2 users

Version

Attachments

Proposed patch (2.26 KB, patch)
2011-01-27 21:23 CET , Lionel Le Folgoc
no flags

Additional information