[sapwood] drop the old reference couting API



commit 22fd3ff14fc985780a994c96fd70a94f8aa2741f
Author: Sven Herzberg <herzi gnome-de org>
Date:   Sat Jul 31 11:28:26 2010 +0200

    drop the old reference couting API
    
    * engine/sapwood-rc-style.c: update
    * engine/theme-image.c,
    * engine/theme-image.h: drop the old API

 engine/sapwood-rc-style.c |   15 +++++++--------
 engine/theme-image.c      |   16 ----------------
 engine/theme-image.h      |    2 --
 3 files changed, 7 insertions(+), 26 deletions(-)
---
diff --git a/engine/sapwood-rc-style.c b/engine/sapwood-rc-style.c
index d34e682..51edbaa 100644
--- a/engine/sapwood-rc-style.c
+++ b/engine/sapwood-rc-style.c
@@ -142,7 +142,7 @@ sapwood_rc_style_finalize (GObject *object)
 {
   SapwoodRcStyle *rc_style = SAPWOOD_RC_STYLE (object);
 
-  g_list_foreach (rc_style->img_list, (GFunc) theme_image_unref, NULL);
+  g_list_foreach (rc_style->img_list, (GFunc) g_object_unref, NULL);
   g_list_free (rc_style->img_list);
 
   G_OBJECT_CLASS (sapwood_rc_style_parent_class)->finalize (object);
@@ -686,7 +686,7 @@ theme_parse_image (GtkSettings     *settings,
       if (token != G_TOKEN_NONE)
 	{
 	  /* error - cleanup for exit */
-	  theme_image_unref (data);
+          g_object_unref (data);
 	  *data_return = NULL;
 	  return token;
 	}
@@ -704,7 +704,7 @@ theme_parse_image (GtkSettings     *settings,
   if (token != G_TOKEN_RIGHT_CURLY)
     {
       /* error - cleanup for exit */
-      theme_image_unref (data);
+      g_object_unref (data);
       *data_return = NULL;
       return G_TOKEN_RIGHT_CURLY;
     }
@@ -798,7 +798,7 @@ sapwood_rc_style_merge (GtkRcStyle *dest,
       SapwoodRcStyle *pixbuf_dest = SAPWOOD_RC_STYLE (dest);
       SapwoodRcStyle *pixbuf_src = SAPWOOD_RC_STYLE (src);
       GList *tmp_list1, *tmp_list2;
-      
+
       if (pixbuf_src->has_shadow)
         {
           pixbuf_dest->has_shadow = TRUE;
@@ -810,9 +810,8 @@ sapwood_rc_style_merge (GtkRcStyle *dest,
 	  /* Copy src image list and append to dest image list */
 
 	  tmp_list2 = g_list_last (pixbuf_dest->img_list);
-	  tmp_list1 = pixbuf_src->img_list;
 
-	  while (tmp_list1)
+          for (tmp_list1 = pixbuf_src->img_list; tmp_list1; tmp_list1 = tmp_list1->next)
 	    {
 	      if (tmp_list2)
 		{
@@ -826,8 +825,7 @@ sapwood_rc_style_merge (GtkRcStyle *dest,
 		  tmp_list2 = pixbuf_dest->img_list;
 		}
 
-	      theme_image_ref (tmp_list1->data);
-	      tmp_list1 = tmp_list1->next;
+              g_object_ref (tmp_list1->data);
 	    }
 	}
     }
@@ -843,3 +841,4 @@ sapwood_rc_style_create_style (GtkRcStyle *rc_style)
   return GTK_STYLE (g_object_new (SAPWOOD_TYPE_STYLE, NULL));
 }
 
+/* vim:set et sw=2 cino=t0,f0,(0,{s,>2s,n-1s,^-1s,e2s: */
diff --git a/engine/theme-image.c b/engine/theme-image.c
index 500f429..7e12fd6 100644
--- a/engine/theme-image.c
+++ b/engine/theme-image.c
@@ -135,20 +135,4 @@ theme_image_new (void)
                        NULL);
 }
 
-void
-theme_image_ref (ThemeImage *data)
-{
-  g_warning ("use g_object_ref(ThemeImage)");
-
-  g_object_ref (data);
-}
-
-void
-theme_image_unref (ThemeImage *data)
-{
-  g_warning ("the g_object_unref(ThemeImage)");
-
-  g_object_unref (data);
-}
-
 /* vim:set et sw=2 cino=t0,f0,(0,{s,>2s,n-1s,^-1s,e2s: */
diff --git a/engine/theme-image.h b/engine/theme-image.h
index dadfe5f..daee8ad 100644
--- a/engine/theme-image.h
+++ b/engine/theme-image.h
@@ -44,8 +44,6 @@ ThemeImage* match_theme_image    (GtkStyle      * style,
                                   ThemeMatchData* match_data) G_GNUC_INTERNAL;
 
 ThemeImage* theme_image_new      (void) G_GNUC_INTERNAL;
-void        theme_image_ref      (ThemeImage    * self) G_GNUC_INTERNAL;
-void        theme_image_unref    (ThemeImage    * self) G_GNUC_INTERNAL;
 
 
 typedef enum {



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