Re: [gedit-list] [PATCH] use g_object_ref_sink



John Luke wrote:
Hello,

Here is a patch to use g_object_ref_sink instead of ref +
gtk_object_sink that I saw listed at
http://live.gnome.org/Gedit/RoadMap?highlight=%28gedit%29
------------------------------------------------------------------------

? refsink.patch
Index: gedit/gedit-message-area.c
===================================================================
RCS file: /cvs/gnome/gedit/gedit/gedit-message-area.c,v
retrieving revision 1.3
diff -u -r1.3 gedit-message-area.c
--- gedit/gedit-message-area.c	18 Feb 2006 15:29:21 -0000	1.3
+++ gedit/gedit-message-area.c	8 Aug 2006 18:48:16 -0000
@@ -172,8 +172,7 @@
 		return;
 	
 	tooltips = gtk_tooltips_new ();
-	g_object_ref (G_OBJECT (tooltips));
-	gtk_object_sink (GTK_OBJECT (tooltips));
+	g_object_ref_sink (GTK_OBJECT (tooltips));
 	
the GTK_OBJECT cast should be removed.
I made that modification and committed, thanks a lot for the patch: cleanups are always a good thing.

For future reference note that we usually prefer bugzilla for patches, so that they do not get lost.


Ciao
   Paolo



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