[dia] Don't use deprecated function gdk_pixbuf_unref().



commit 185c6a35e8e82d8825fb5ac47b6654f6d42b6705
Author: Adam Buchbinder <adam buchbinder gmail com>
Date:   Mon May 4 12:09:52 2009 -0400

    Don't use deprecated function gdk_pixbuf_unref().
    
    Replaced gdk_pixbuf_unref() with g_object_unref():
    http://library.gnome.org/devel/gdk-pixbuf/stable/gdk-pixbuf-refcounting.html#gdk-pixbuf-unref
    
    Signed-off-by: Adam Buchbinder <adam buchbinder gmail com>
    Signed-off-by: Hans Breuer <hans breuer org>
---
 app/interface.c |    2 +-
 app/sheets.c    |    2 +-
 lib/dia_image.c |    6 +++---
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/app/interface.c b/app/interface.c
index 002ba88..40510be 100644
--- a/app/interface.c
+++ b/app/interface.c
@@ -1267,7 +1267,7 @@ fill_sheet_wbox(Sheet *sheet)
 	    pixbuf = cropped;
 	  }
           gdk_pixbuf_render_pixmap_and_mask_for_colormap(pixbuf, gtk_widget_get_colormap(sheet_wbox), &pixmap, &mask, 1.0);
-          gdk_pixbuf_unref(pixbuf);
+          g_object_unref(pixbuf);
       } else {
           pixmap = gdk_pixmap_colormap_create_from_xpm_d(NULL,
 			gtk_widget_get_colormap(sheet_wbox), &mask, 
diff --git a/app/sheets.c b/app/sheets.c
index c3ac025..fe9e26c 100644
--- a/app/sheets.c
+++ b/app/sheets.c
@@ -356,7 +356,7 @@ create_object_pixmap(SheetObject *so, GtkWidget *parent,
 	  pixbuf = cropped;
 	}
         gdk_pixbuf_render_pixmap_and_mask(pixbuf, pixmap, mask, 1.0);
-        gdk_pixbuf_unref(pixbuf);
+        g_object_unref(pixbuf);
       } else {
         message_warning ("%s", error->message);
         g_error_free (error);
diff --git a/lib/dia_image.c b/lib/dia_image.c
index c17ae92..1e653c5 100644
--- a/lib/dia_image.c
+++ b/lib/dia_image.c
@@ -100,7 +100,7 @@ dia_image_finalize(GObject* object)
 {
   DiaImage *image = DIA_IMAGE(object);
   if (image->image)
-    gdk_pixbuf_unref (image->image);
+    g_object_unref (image->image);
   image->image = NULL;
   g_free (image->filename);
   image->filename = NULL;
@@ -218,7 +218,7 @@ dia_image_draw(DiaImage *image, GdkWindow *window, GdkGC *gc,
     if (image->scaled == NULL ||
 	image->scaled_width != width || image->scaled_height != height) {
       if (image->scaled)
-	gdk_pixbuf_unref(image->scaled);
+	g_object_unref(image->scaled);
       image->scaled = gdk_pixbuf_scale_simple(image->image, width, height, 
 					      GDK_INTERP_TILES);
       image->scaled_width = width;
@@ -239,7 +239,7 @@ dia_image_draw(DiaImage *image, GdkWindow *window, GdkGC *gc,
 		  GDK_RGB_DITHER_NORMAL, 0, 0);
 
 #ifndef SCALING_CACHE
-  gdk_pixbuf_unref(scaled);
+  g_object_unref(scaled);
 #endif
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]