Comment 4 for bug 711189

Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

@Mark: oh sorry, I didn't saw your answer first.
So, this doesn't change anything from the way gtk_icon_theme_lookup_by_gicon is loading the icon (it will still load the same set of icon).

That means:
a correct desktop file will use:
Icon=foo

-> this will try to load every foo.<ext> where ext is supported by gtk_icon_theme_lookup_by_gicon (foo)

some desktop file are using:
Icon=foo.png for instance, then gtk_icon_theme_lookup_by_gicon won't find a match (it doesn't support extension in the char * we give to it). We just remove the extension if we don't find a perfect match the first time in case they was an extension for gtk_icon_theme_lookup_by_gicon to pick the best available option.

So, we have
Icon=foo.png

-> gtk_icon_theme_lookup_by_gicon ("foo.png") -> doesn't work (as gtk_icon_theme_lookup_by_gicon doesn't support extension)
strip .png
gtk_icon_theme_lookup_by_gicon (icon)
let's