]> Pileus Git - ~andy/gtk/blobdiff - modules/other/gail/gailimagecell.c
gail: use const instead G_CONST_RETURN
[~andy/gtk] / modules / other / gail / gailimagecell.c
index f59842b584b21baa31f7646fdf4e55d32964150e..078b4b7cacc20b22d3bc353107dc4359b309c3d2 100644 (file)
@@ -17,7 +17,7 @@
  * Boston, MA 02111-1307, USA.
  */
 
-#include <config.h>
+#include "config.h"
 
 #include <gtk/gtk.h>
 #include "gailimagecell.h"
@@ -29,7 +29,7 @@ static void      gail_image_cell_finalize            (GObject            *object
 
 /* AtkImage */
 static void      atk_image_interface_init              (AtkImageIface  *iface);
-static G_CONST_RETURN gchar *
+static const gchar *
                  gail_image_cell_get_image_description (AtkImage       *image);
 static gboolean  gail_image_cell_set_image_description (AtkImage       *image,
                                                         const gchar    *description);
@@ -84,8 +84,7 @@ gail_image_cell_new (void)
   cell = GAIL_RENDERER_CELL(object);
 
   cell->renderer = gtk_cell_renderer_pixbuf_new ();
-  g_object_ref (cell->renderer);
-  gtk_object_sink (GTK_OBJECT (cell->renderer));
+  g_object_ref_sink (cell->renderer);
   return atk_object;
 }
 
@@ -121,7 +120,7 @@ atk_image_interface_init (AtkImageIface  *iface)
   iface->get_image_size = gail_image_cell_get_image_size;
 }
 
-static G_CONST_RETURN gchar *
+static const gchar *
 gail_image_cell_get_image_description (AtkImage     *image)
 {
   GailImageCell *image_cell;
@@ -164,7 +163,7 @@ gail_image_cell_get_image_size (AtkImage *image,
   GdkPixbuf *pixbuf;
 
   cell_renderer  = GAIL_RENDERER_CELL (cell)->renderer;
-  pixbuf = GTK_CELL_RENDERER_PIXBUF (cell_renderer)->pixbuf;
+  g_object_get (GTK_CELL_RENDERER_PIXBUF (cell_renderer), "pixbuf", &pixbuf, NULL);
 
   *width = gdk_pixbuf_get_width (pixbuf);
   *height = gdk_pixbuf_get_height (pixbuf);