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 166374 - Bad path when looking up hicolor icons
Bad path when looking up hicolor icons
Status: RESOLVED NOTABUG
Product: gtk+
Classification: Platform
Component: Widget: Other
2.4.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2005-02-05 15:23 UTC by albrecht.dress
Modified: 2005-02-08 16:51 UTC
See Also:
GNOME target: ---
GNOME version: 2.7/2.8



Description albrecht.dress 2005-02-05 15:23:08 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.
Comment 1 Matthias Clasen 2005-02-08 16:51:44 UTC
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.