diff options
author | Matthias Clasen <mclasen@redhat.com> | 2007-04-25 18:01:44 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2007-04-25 18:01:44 +0000 |
commit | 0ac3069358e0d269a4d05cc9ff13ee427226de51 (patch) | |
tree | 1a36a28b197431b2a0f53212f718e2d499129621 /gtk/gtkicontheme.c | |
parent | aa3f2a792aceef378a5456e72f59dc023b039061 (diff) | |
download | gtk+-0ac3069358e0d269a4d05cc9ff13ee427226de51.tar.gz |
Set the filename to NULL for builtin icons, sinc
2007-04-25 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkicontheme.c (theme_lookup_icon): Set the filename to
NULL for builtin icons, sinc gtk_icon_info_get_builtin_pixbuf()
depends on it.
* tests/testicontheme.c: Report builtin icons.
svn path=/trunk/; revision=17638
Diffstat (limited to 'gtk/gtkicontheme.c')
-rw-r--r-- | gtk/gtkicontheme.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/gtk/gtkicontheme.c b/gtk/gtkicontheme.c index 2aaa445dc8..b7db3f4f8c 100644 --- a/gtk/gtkicontheme.c +++ b/gtk/gtkicontheme.c @@ -2079,13 +2079,23 @@ theme_lookup_icon (IconTheme *theme, suffix = best_suffix (suffix, allow_svg); g_assert (suffix != ICON_SUFFIX_NONE); - file = g_strconcat (icon_name, string_from_suffix (suffix), NULL); - icon_info->filename = g_build_filename (min_dir->dir, file, NULL); - g_free (file); + if (min_dir->dir) + { + file = g_strconcat (icon_name, string_from_suffix (suffix), NULL); + icon_info->filename = g_build_filename (min_dir->dir, file, NULL); + g_free (file); #ifdef G_OS_WIN32 - icon_info->cp_filename = g_locale_from_utf8 (icon_info->filename, + icon_info->cp_filename = g_locale_from_utf8 (icon_info->filename, -1, NULL, NULL, NULL); #endif + } + else + { + icon_info->filename = NULL; +#ifdef G_OS_WIN32 + icon_info->cp_filename = NULL; +#endif + } if (min_dir->icon_data != NULL) icon_info->data = g_hash_table_lookup (min_dir->icon_data, icon_name); |