GNOME Bugzilla – Bug 166374
Bad path when looking up hicolor icons
Last modified: 2005-02-08 16:51:44 UTC
Running the following trivial test case app <snip> #include <gtk/gtk.h> int main (int argc, char **argv) { gtk_init(&argc, &argv); gtk_icon_theme_load_icon(gtk_icon_theme_get_default(), "weird_name", 24, 0, NULL); return 0; } </snip> will look up the icon "weird_name.png" inter alia in the folders (checked with strace) $HOME/.icons/gnome/24x24/apps $prefix/share/icons/gnome/24x24/apps but also in $HOME/.icons/hicolor/22x22/apps $prefix/share/pixmaps/hicolor/22x22/apps $prefix/share/icons/hicolor/22x22/apps If new application icons are installed below $prefix/share/icons/hicolor (as the description for gtk_icon_theme_set_search_path() indicates), they will not be found for size 24x24. Creating a symlink 22x22 -> 24x24 will "fix" the problem. hicolor "stock" icons are taken from hicolor/24x24/stock. So obviously there is a bug in Gtk when calculating the hicolor apps path.
The icon theme does look for the icon in all existing directories and picks the image which best fits the requested size. "Exisiting" here means "mentioned in index.theme". For some reason, hicolor/index.theme lists 22x22/apps, but not 24x24/apps.