summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2006-07-20 18:07:21 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2006-07-20 18:07:21 +0000
commit7014a3b5bb9a630661a66d440ca43a7ca7bba2d8 (patch)
tree0bb7cc5c0b198b38cab742b70b92af0b36cc1be8 /gtk
parent066bb1b8f64a3b76a6600738e257cc44f439b651 (diff)
downloadgtk+-7014a3b5bb9a630661a66d440ca43a7ca7bba2d8.tar.gz
Export this privately.
2006-07-20 Matthias Clasen <mclasen@redhat.com> * gtk/gtkicontheme.h: * gtk/gtkicontheme.c (_gtk_icon_theme_ensure_builtin_cache): Export this privately. * gtk/gtkiconfactory.c (render_fallback_image): And call it here to initialize the builtin cache before using it. (#348063, Diego Pettenò)
Diffstat (limited to 'gtk')
-rw-r--r--gtk/gtkiconfactory.c10
-rw-r--r--gtk/gtkicontheme.c2
-rw-r--r--gtk/gtkicontheme.h1
3 files changed, 9 insertions, 4 deletions
diff --git a/gtk/gtkiconfactory.c b/gtk/gtkiconfactory.c
index 55ea92bdea..4c04b93790 100644
--- a/gtk/gtkiconfactory.c
+++ b/gtk/gtkiconfactory.c
@@ -1566,9 +1566,13 @@ render_fallback_image (GtkStyle *style,
if (fallback_source.type == GTK_ICON_SOURCE_EMPTY)
{
- GdkPixbuf *pixbuf = _gtk_icon_cache_get_icon (_builtin_cache,
- GTK_STOCK_MISSING_IMAGE,
- "24");
+ GdkPixbuf *pixbuf;
+
+ _gtk_icon_theme_ensure_builtin_cache ();
+
+ pixbuf = _gtk_icon_cache_get_icon (_builtin_cache,
+ GTK_STOCK_MISSING_IMAGE,
+ "24");
gtk_icon_source_set_pixbuf (&fallback_source, pixbuf);
g_object_unref (pixbuf);
}
diff --git a/gtk/gtkicontheme.c b/gtk/gtkicontheme.c
index cffb892e90..ebfc282a46 100644
--- a/gtk/gtkicontheme.c
+++ b/gtk/gtkicontheme.c
@@ -1129,7 +1129,7 @@ load_themes (GtkIconTheme *icon_theme)
priv->last_stat_time = tv.tv_sec;
}
-static void
+void
_gtk_icon_theme_ensure_builtin_cache (void)
{
static gboolean initialized = FALSE;
diff --git a/gtk/gtkicontheme.h b/gtk/gtkicontheme.h
index 8190806d25..1c607ad580 100644
--- a/gtk/gtkicontheme.h
+++ b/gtk/gtkicontheme.h
@@ -169,6 +169,7 @@ G_CONST_RETURN gchar *gtk_icon_info_get_display_name (GtkIconInfo *icon_info)
/* Non-public methods */
void _gtk_icon_theme_check_reload (GdkDisplay *display);
+void _gtk_icon_theme_ensure_builtin_cache (void);
G_END_DECLS