diff options
-rw-r--r-- | gtk/gtkicontheme.c | 18 | ||||
-rw-r--r-- | gtk/gtkicontheme.h | 3 |
2 files changed, 21 insertions, 0 deletions
diff --git a/gtk/gtkicontheme.c b/gtk/gtkicontheme.c index 4de8a5c308..5f4b21b252 100644 --- a/gtk/gtkicontheme.c +++ b/gtk/gtkicontheme.c @@ -4106,6 +4106,24 @@ gtk_icon_info_load_icon (GtkIconInfo *icon_info, return icon_info->proxy_pixbuf; } +GdkPixbuf * +gtk_icon_info_load_icon_thread_safe (GtkIconInfo *icon_info, + GError **error) +{ + GtkIconInfo *dup; + GdkPixbuf *pixbuf; + + g_return_val_if_fail (icon_info != NULL, NULL); + g_return_val_if_fail (error == NULL || *error == NULL, NULL); + + dup = icon_info_dup (icon_info); + pixbuf = gtk_icon_info_load_icon (dup, error); + + g_object_unref (dup); + + return pixbuf; +} + /** * gtk_icon_info_load_surface: * @icon_info: a #GtkIconInfo from gtk_icon_theme_lookup_icon() diff --git a/gtk/gtkicontheme.h b/gtk/gtkicontheme.h index 7824a46765..4f6662c28f 100644 --- a/gtk/gtkicontheme.h +++ b/gtk/gtkicontheme.h @@ -300,6 +300,9 @@ gboolean gtk_icon_info_is_symbolic (GtkIconInfo *icon_info GDK_AVAILABLE_IN_ALL GdkPixbuf * gtk_icon_info_load_icon (GtkIconInfo *icon_info, GError **error); +GDK_AVAILABLE_IN_3_24 +GdkPixbuf * gtk_icon_info_load_icon_thread_safe (GtkIconInfo *icon_info, + GError **error); GDK_AVAILABLE_IN_3_10 cairo_surface_t * gtk_icon_info_load_surface (GtkIconInfo *icon_info, GdkWindow *for_window, |