[PATCH 3/5] replace deprecated gdk_pixbuf_unref()

Jonathan Neuschäfer <[email protected]> Fri, 28 Sep 2012 21:24:50 +0200
Newsgroups gmane.comp.ipod.gtkpod
Message-ID <[email protected]>
gdk_pixbuf_unref is depreceted since Gdk 2.0.
---
 src/itdb_artwork.c  |    6 +++---
 src/itdb_thumb.c    |    4 ++--
 tests/test-covers.c |    2 +-
 tests/test-photos.c |    2 +-
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/itdb_artwork.c b/src/itdb_artwork.c
index 2328840..c595d70 100644
--- a/src/itdb_artwork.c
+++ b/src/itdb_artwork.c
@@ -849,7 +849,7 @@ gpointer itdb_thumb_ipod_item_to_pixbuf (Itdb_Device *device,
 				      NULL);
 
 	/* !! do not g_free(pixels) here: it will be freed when doing a
-	 * gdk_pixbuf_unref() on the GdkPixbuf !! */
+	 * g_object_unref() on the GdkPixbuf !! */
 
 	/* Remove padding from the pixmap and/or cut the pixmap to the
 	   right size. */
@@ -882,8 +882,8 @@ gpointer itdb_thumb_ipod_item_to_pixbuf (Itdb_Device *device,
 					       pad_x, pad_y,
 					       width, height);
 	pixbuf = gdk_pixbuf_copy (pixbuf_sub);
-	gdk_pixbuf_unref (pixbuf_full);
-	gdk_pixbuf_unref (pixbuf_sub);
+	g_object_unref (pixbuf_full);
+	g_object_unref (pixbuf_sub);
 
         return pixbuf;
 }
diff --git a/src/itdb_thumb.c b/src/itdb_thumb.c
index 8ed3b6f..8b3c8a1 100644
--- a/src/itdb_thumb.c
+++ b/src/itdb_thumb.c
@@ -374,7 +374,7 @@ const GList *itdb_thumb_ipod_get_thumbs (Itdb_Thumb_Ipod *thumbs)
  * GDK_PIXBUF() yourself.
  * </note>
  *
- * Returns: a #GdkPixbuf that must be unreffed with gdk_pixbuf_unref()
+ * Returns: a #GdkPixbuf that must be unreffed with g_object_unref()
  * after use, or NULL if the creation of the gdk-pixbuf failed or if
  * libgpod was compiled without gdk-pixbuf support.
  *
@@ -547,7 +547,7 @@ static GList *itdb_thumb_ipod_to_pixbufs (Itdb_Device *device,
  *
  * Returns: a #GList of #GdkPixbuf which are associated with @thumb, NULL
  * if the pixbuf was invalid or if libgpod is compiled without gdk-pixbuf
- * support. The #GdkPixbuf must be unreffed with gdk_pixbuf_unref() after use
+ * support. The #GdkPixbuf must be unreffed with g_object_unref() after use
  * and the #GList must be freed with g_list_free().
  *
  * Since: 0.7.0
diff --git a/tests/test-covers.c b/tests/test-covers.c
index 20b4d7b..4d3a68f 100644
--- a/tests/test-covers.c
+++ b/tests/test-covers.c
@@ -53,7 +53,7 @@ save_itdb_thumb (Itdb_Track *track, GdkPixbuf *pixbuf, guint id)
         }
         g_print ("  %s\n", filename);
         gdk_pixbuf_save (pixbuf, filename, "png", NULL, NULL);
-        gdk_pixbuf_unref (pixbuf);
+        g_object_unref (pixbuf);
         /*		g_print ("Saved %s\n", filename); */
         g_free (filename);
 }
diff --git a/tests/test-photos.c b/tests/test-photos.c
index 930e66b..b5bd89d 100644
--- a/tests/test-photos.c
+++ b/tests/test-photos.c
@@ -81,7 +81,7 @@ dump_thumbs (Itdb_PhotoDB *db, Itdb_Artwork *artwork,
 		path = g_build_filename (dir, filename, NULL);
 		g_free (filename);
 		gdk_pixbuf_save (pixbuf, path, "png", NULL, NULL);
-		gdk_pixbuf_unref (pixbuf);
+		g_object_unref (pixbuf);
 		g_free (path);
 	}
         g_list_free (thumbnails);
-- 
1.7.10.4


------------------------------------------------------------------------------
Got visibility?
Most devs has no idea what their production app looks like.
Find out how fast your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219671;13503038;y?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html