GNOME Bugzilla – Bug 693802
Add async GtkIconInfo loaders
Last modified: 2013-02-14 21:12:03 UTC
The shell needs async versions of the gtk_icon_info icon load operations as they currently use the sync one in a thread, which breaks with the new cache code.
Created attachment 236067 [details] [review] Make GtkIconInfo a GObject This is necessary in order to have async operations on it. All the old copy/free functions keeps working, and g_boxed_copy on a GObject also works, so this should be mostly compatible, but techncally its a minor ABI break since the GType changes fundamental type. Changes like this has happened before though, like with GVariant becomming its own fundamental type.
Created attachment 236068 [details] [review] Add gtk_icon_info_load_icon_async This lets you asynchronously load icons. We need this for gnome-shell to replace its current non-threadsafe use of GtkIconTheme.
Created attachment 236069 [details] [review] GtkIconTheme Don't leak pixbuf in symbolic icon cache We need to unref the pixbuf we just put in the cache, because symbolic_pixbuf_cache_new takes a ref.
Created attachment 236070 [details] [review] GtkIconTheme: Add async versions of symbolic icon loaders
Review of attachment 236067 [details] [review]: Its worth putting a note about it in a "Release Notes for 3.8" section in README.in - you have to scroll down a bit to find the release notes for older releases, just put it in front of that.
Review of attachment 236068 [details] [review]: Looks good to me. Please add the new api to the docs when you commit this
Review of attachment 236069 [details] [review]: ok
Review of attachment 236069 [details] [review]: Would be great to have a test which checks that we're not leaking
Review of attachment 236070 [details] [review]: ok ::: gtk/gtkicontheme.h @@ +229,3 @@ + GAsyncResult *res, + gboolean *was_symbolic, + GError **error); Need to add GDK_AVAILABLE_IN_3_8 decorations to the new api here
Review of attachment 236068 [details] [review]: ::: gtk/gtkicontheme.h @@ +210,3 @@ +GdkPixbuf * gtk_icon_info_load_icon_finish (GtkIconInfo *icon_info, + GAsyncResult *res, + GError **error); Need to add GDK_AVAILABLE_IN_3_8 here
Review of attachment 236070 [details] [review]: and please add the new api to the docs when you commit this
Attachment 236067 [details] pushed as e2d0846 - Make GtkIconInfo a GObject Attachment 236068 [details] pushed as 7690846 - Add gtk_icon_info_load_icon_async Attachment 236069 [details] pushed as 23d5c41 - GtkIconTheme Don't leak pixbuf in symbolic icon cache Attachment 236070 [details] pushed as f35ad7a - GtkIconTheme: Add async versions of symbolic icon loaders