}
g_simple_async_result_set_op_res_gpointer (closure->result,
- avatar_pixbuf_from_loader (loader), NULL);
+ avatar_pixbuf_from_loader (loader), g_object_unref);
out:
g_simple_async_result_complete (closure->result);
g_object_unref (result);
}
+/* Return a ref on the GdkPixbuf */
GdkPixbuf *
empathy_pixbuf_avatar_from_individual_scaled_finish (
FolksIndividual *individual,
{
GSimpleAsyncResult *simple = G_SIMPLE_ASYNC_RESULT (result);
gboolean result_valid;
+ GdkPixbuf *pixbuf;
g_return_val_if_fail (FOLKS_IS_INDIVIDUAL (individual), NULL);
g_return_val_if_fail (G_IS_SIMPLE_ASYNC_RESULT (simple), NULL);
empathy_pixbuf_avatar_from_individual_scaled_async);
g_return_val_if_fail (result_valid, NULL);
- return g_simple_async_result_get_op_res_gpointer (simple);
+ pixbuf = g_simple_async_result_get_op_res_gpointer (simple);
+ return pixbuf != NULL ? g_object_ref (pixbuf) : NULL;
}
GdkPixbuf *
gtk_status_icon_get_geometry (status_icon, NULL, &icon_location, NULL);
gdk_window = gtk_widget_get_window (GTK_WIDGET (window));
- dpy = gdk_x11_drawable_get_xdisplay (gdk_window);
+ dpy = GDK_WINDOW_XDISPLAY (gdk_window);
data[0] = icon_location.x;
data[1] = icon_location.y;