[gnome-commander] Replaced obsoleted gdk_pixbuf_ref(), gdk_pixmap_ref(), gdk_bitmap_ref() with g_object_ref()



commit 746457abb9e72507ee7126eab2f47619bc386cef
Author: Piotr Eljasiak <epiotr src gnome org>
Date:   Sun Aug 8 13:40:13 2010 +0200

    Replaced obsoleted gdk_pixbuf_ref(), gdk_pixmap_ref(), gdk_bitmap_ref() with g_object_ref()

 plugins/cvs/interface.cc                 |    2 +-
 plugins/fileroller/file-roller-plugin.cc |    2 +-
 src/gnome-cmd-app.cc                     |    2 +-
 src/gnome-cmd-pixmap.cc                  |    6 +++---
 src/gnome-cmd-pixmap.h                   |    6 +++---
 src/imageloader.cc                       |   10 +++++-----
 6 files changed, 14 insertions(+), 14 deletions(-)
---
diff --git a/plugins/cvs/interface.cc b/plugins/cvs/interface.cc
index f8aca55..216fa93 100644
--- a/plugins/cvs/interface.cc
+++ b/plugins/cvs/interface.cc
@@ -318,7 +318,7 @@ static GtkWidget *create_tab_label (GtkWidget *parent,
 
     pb = gdk_pixbuf_new_from_xpm_data ((const gchar**)close_xpm);
     img = gtk_image_new_from_pixbuf (pb);
-    gdk_pixbuf_unref (pb);
+    g_object_unref (pb);
     gtk_widget_show (img);
     btn = gtk_button_new ();
     gtk_button_set_relief (GTK_BUTTON (btn), GTK_RELIEF_NONE);
diff --git a/plugins/fileroller/file-roller-plugin.cc b/plugins/fileroller/file-roller-plugin.cc
index dcfbb1f..7ebd5b1 100644
--- a/plugins/fileroller/file-roller-plugin.cc
+++ b/plugins/fileroller/file-roller-plugin.cc
@@ -213,7 +213,7 @@ static void on_add_to_archive (GtkMenuItem *item, FileRollerPlugin *plugin)
 
         pixbuf = gdk_pixbuf_new_from_xpm_data ((const char**)file_roller_xpm);
         gtk_image_set_from_pixbuf (GTK_IMAGE (GTK_MESSAGE_DIALOG (dialog)->image), pixbuf);
-        gdk_pixbuf_unref (pixbuf);
+        g_object_unref (pixbuf);
 
         ret = gtk_dialog_run (GTK_DIALOG (dialog));
 
diff --git a/src/gnome-cmd-app.cc b/src/gnome-cmd-app.cc
index fafc244..b28e79c 100644
--- a/src/gnome-cmd-app.cc
+++ b/src/gnome-cmd-app.cc
@@ -178,7 +178,7 @@ void gnome_cmd_app_set_icon_path (GnomeCmdApp *app, const gchar *icon_path)
         if (pixbuf)
             app->priv->pixmap = gnome_cmd_pixmap_new_from_pixbuf (pixbuf);
 
-        gdk_pixbuf_unref (tmp);
+        g_object_unref (tmp);
     }
 }
 
diff --git a/src/gnome-cmd-pixmap.cc b/src/gnome-cmd-pixmap.cc
index a13b42f..f633daa 100644
--- a/src/gnome-cmd-pixmap.cc
+++ b/src/gnome-cmd-pixmap.cc
@@ -57,14 +57,14 @@ GnomeCmdPixmap *gnome_cmd_pixmap_new_from_pixbuf (GdkPixbuf *pixbuf)
 
     GnomeCmdPixmap *pixmap = g_new (GnomeCmdPixmap, 1);
     pixmap->pixbuf = pixbuf;
-//    gdk_pixbuf_ref (pixmap->pixbuf);
+//    g_object_ref (pixmap->pixbuf);
 
     pixmap->width = gdk_pixbuf_get_width (pixmap->pixbuf);
     pixmap->height = gdk_pixbuf_get_height (pixmap->pixbuf);
 
     gdk_pixbuf_render_pixmap_and_mask (pixmap->pixbuf, &pixmap->pixmap, &pixmap->mask, 128);
-    gdk_pixmap_ref (pixmap->pixmap);
-    gdk_bitmap_ref (pixmap->mask);
+    g_object_ref (pixmap->pixmap);
+    g_object_ref (pixmap->mask);
 
     return pixmap;
 }
diff --git a/src/gnome-cmd-pixmap.h b/src/gnome-cmd-pixmap.h
index b42414e..521f5c3 100644
--- a/src/gnome-cmd-pixmap.h
+++ b/src/gnome-cmd-pixmap.h
@@ -44,9 +44,9 @@ inline void gnome_cmd_pixmap_free (GnomeCmdPixmap *pixmap)
     g_return_if_fail (pixmap->pixmap != NULL);
     g_return_if_fail (pixmap->mask != NULL);
 
-    gdk_pixbuf_unref (pixmap->pixbuf);
-    gdk_pixmap_unref (pixmap->pixmap);
-    gdk_bitmap_unref (pixmap->mask);
+    g_object_unref (pixmap->pixbuf);
+    g_object_unref (pixmap->pixmap);
+    g_object_unref (pixmap->mask);
 
     g_free (pixmap);
 }
diff --git a/src/imageloader.cc b/src/imageloader.cc
index 1246cc9..878d393 100644
--- a/src/imageloader.cc
+++ b/src/imageloader.cc
@@ -291,7 +291,7 @@ static gboolean load_icon (const gchar *icon_path, GdkPixmap **pm, GdkBitmap **b
         w = (gint)(scale*(gfloat)gdk_pixbuf_get_width (pixbuf));
 
         GdkPixbuf *tmp = gdk_pixbuf_scale_simple (pixbuf, w, h, gnome_cmd_data.icon_scale_quality);
-        gdk_pixbuf_unref (pixbuf);
+        g_object_unref (pixbuf);
         pixbuf = tmp;
     }
 
@@ -309,8 +309,8 @@ static gboolean load_icon (const gchar *icon_path, GdkPixmap **pm, GdkBitmap **b
 
     gdk_pixbuf_render_pixmap_and_mask (pixbuf, pm, bm, 128);
     gdk_pixbuf_render_pixmap_and_mask (lnk_pixbuf, lpm, lbm, 128);
-    gdk_pixbuf_unref (pixbuf);
-    gdk_pixbuf_unref (lnk_pixbuf);
+    g_object_unref (pixbuf);
+    g_object_unref (lnk_pixbuf);
 
     return TRUE;
 }
@@ -450,8 +450,8 @@ static gboolean remove_entry (const gchar *key, CacheEntry *entry, gpointer user
 
     if (!entry->dead_end)
     {
-        gdk_pixmap_unref (entry->pixmap);
-        gdk_bitmap_unref (entry->mask);
+        g_object_unref (entry->pixmap);
+        g_object_unref (entry->mask);
     }
 
     g_free (entry);



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