After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 674806 - icontheme: search first in all themes if the requested icon is symbolic
icontheme: search first in all themes if the requested icon is symbolic
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: .General
unspecified
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2012-04-25 15:24 UTC by Cosimo Cecchi
Modified: 2012-04-26 17:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
icontheme: search first in all themes if the requested icon is symbolic (2.24 KB, patch)
2012-04-25 15:24 UTC, Cosimo Cecchi
none Details | Review
icontheme: search first in all themes if the requested icon is symbolic (2.08 KB, patch)
2012-04-25 15:35 UTC, Cosimo Cecchi
committed Details | Review

Description Cosimo Cecchi 2012-04-25 15:24:35 UTC
Make sure symbolic icons, if provided by any parent theme, are privileged over non-symbolic variants.
A more lengthy explanation of why I think this is needed is in the commit message and in a comment in the code.
Comment 1 Cosimo Cecchi 2012-04-25 15:24:37 UTC
Created attachment 212795 [details] [review]
icontheme: search first in all themes if the requested icon is symbolic

Symbolic icons use a "-symbolic" suffix to distinguish themselves from
highcolor variants. Note that the dash character here has a different
meaning than the specificity level defined in the icon-naming-spec [1],
as it identifies a property of the icon itself.

Since they might be provided by a parent theme (e.g. the HighContrast theme
relies on the gnome icon theme for them), when we are looking up one we
should first escape the generic icon inheritance mechanism defined in the
icon-naming-spec [1], and privilege a symbolic icon, if it exists in a
parent theme, before applying the inheritance evaluation.

This fixes symbolic icons not working properly when used in the
HighContrast theme with the GTK_ICON_LOOKUP_GENERIC_FALLBACK flag set.

[1]
http://standards.freedesktop.org/icon-naming-spec/latest/ar01s03.html
Comment 2 Cosimo Cecchi 2012-04-25 15:35:20 UTC
Created attachment 212799 [details] [review]
icontheme: search first in all themes if the requested icon is symbolic

--

Removed an unwanted whitespace change
Comment 3 Matthias Clasen 2012-04-26 03:27:57 UTC
Review of attachment 212799 [details] [review]:

I don't love that this makes the icon theme logic even more hairy, but I guess we have to do this.
Comment 4 Cosimo Cecchi 2012-04-26 17:52:24 UTC
Attachment 212799 [details] pushed as 271adac - icontheme: search first in all themes if the requested icon is symbolic

Thanks for the review, pushed to master