[monkey-bubble: 304/753] to be consistent with everything else g* return the item from the _ref



commit 2953761876e0ffa0193065188dd4ea5e89fea493
Author: George Lebl <jirka 5z com>
Date:   Mon May 21 07:42:44 2001 +0000

    to be consistent with everything else g* return the item from the _ref
    
    Mon May 21 00:43:48 2001  George Lebl <jirka 5z com>
    
    	* gnome-ditem-entry.[ch]: to be consistent with everything else g*
    	  return the item from the _ref function when we do that.  Also
    	  update the docs for this of course.

 libgnome/ChangeLog     |    6 ++++++
 libgnome/gnome-ditem.c |   10 +++++++---
 libgnome/gnome-ditem.h |    2 +-
 3 files changed, 14 insertions(+), 4 deletions(-)
---
diff --git a/libgnome/ChangeLog b/libgnome/ChangeLog
index 7381588..ab676f1 100644
--- a/libgnome/ChangeLog
+++ b/libgnome/ChangeLog
@@ -1,3 +1,9 @@
+Mon May 21 00:43:48 2001  George Lebl <jirka 5z com>
+
+	* gnome-ditem-entry.[ch]: to be consistent with everything else g*
+	  return the item from the _ref function when we do that.  Also
+	  update the docs for this of course.
+
 Sun May 20 22:46:20 2001  George Lebl <jirka 5z com>
 
 	* gnome-config.c: fix get_translated_string wrt defaults, the old
diff --git a/libgnome/gnome-ditem.c b/libgnome/gnome-ditem.c
index 39f71b5..6d8593f 100644
--- a/libgnome/gnome-ditem.c
+++ b/libgnome/gnome-ditem.c
@@ -788,14 +788,18 @@ gnome_desktop_item_save (GnomeDesktopItem *item, const char *under)
  * gnome_desktop_item_ref:
  * @item: A desktop item
  *
- * Increases the reference count of the specified item.
+ * Description: Increases the reference count of the specified item.
+ *
+ * Returns: the newly referenced @item
  */
-void
+GnomeDesktopItem *
 gnome_desktop_item_ref (GnomeDesktopItem *item)
 {
-        g_return_if_fail(item);
+        g_return_val_if_fail (item != NULL, NULL);
 
         item->refcount++;
+
+	return item;
 }
 
 static gboolean
diff --git a/libgnome/gnome-ditem.h b/libgnome/gnome-ditem.h
index 852a37b..2f503f0 100644
--- a/libgnome/gnome-ditem.h
+++ b/libgnome/gnome-ditem.h
@@ -79,7 +79,7 @@ GnomeDesktopItem *     gnome_desktop_item_copy            (const GnomeDesktopIte
 /* if under is NULL save in original location */
 gboolean               gnome_desktop_item_save            (GnomeDesktopItem           *item,
                                                            const char                 *under);
-void                   gnome_desktop_item_ref             (GnomeDesktopItem           *item);
+GnomeDesktopItem *     gnome_desktop_item_ref             (GnomeDesktopItem           *item);
 void                   gnome_desktop_item_unref           (GnomeDesktopItem           *item);
 int                    gnome_desktop_item_launch          (const GnomeDesktopItem     *item,
                                                            int                         argc,



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