summaryrefslogtreecommitdiff
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
parent066bb1b8f64a3b76a6600738e257cc44f439b651 (diff)
downloadgdk-pixbuf-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ò)
-rw-r--r--ChangeLog10
-rw-r--r--ChangeLog.pre-2-1010
-rw-r--r--gtk/gtkiconfactory.c10
-rw-r--r--gtk/gtkicontheme.c2
-rw-r--r--gtk/gtkicontheme.h1
5 files changed, 29 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 7c1e57b9b..83cd8a130 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+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ò)
+
2006-07-19 Federico Mena Quintero <federico@novell.com>
* tests/autotestfilechooser.c (test_black_box): Argh, initialize
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index 7c1e57b9b..83cd8a130 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,3 +1,13 @@
+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ò)
+
2006-07-19 Federico Mena Quintero <federico@novell.com>
* tests/autotestfilechooser.c (test_black_box): Argh, initialize
diff --git a/gtk/gtkiconfactory.c b/gtk/gtkiconfactory.c
index 55ea92bde..4c04b9379 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 cffb892e9..ebfc282a4 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 8190806d2..1c607ad58 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