empathy r2628 - trunk/libempathy-gtk



Author: xclaesse
Date: Sun Mar  8 09:45:33 2009
New Revision: 2628
URL: http://svn.gnome.org/viewvc/empathy?rev=2628&view=rev

Log:
Use running++ and running-- instead of a boolean

From: Xavier Claessens <xclaesse gmail com>

Modified:
   trunk/libempathy-gtk/empathy-contact-list-view.c

Modified: trunk/libempathy-gtk/empathy-contact-list-view.c
==============================================================================
--- trunk/libempathy-gtk/empathy-contact-list-view.c	(original)
+++ trunk/libempathy-gtk/empathy-contact-list-view.c	Sun Mar  8 09:45:33 2009
@@ -141,14 +141,14 @@
 	GtkTreeModel               *model;
 	GtkTreeIter                 iter;
 	GtkTreePath                *path;
-	static gboolean             running = FALSE;
+	static gint                 running = 0;
 	gboolean                    ret = FALSE;
 
 	/* Avoid an infinite loop. See GNOME bug #574377 */
-	if (running) {
+	if (running > 0) {
 		return FALSE;
 	}
-	running = TRUE;
+	running++;
 
 	/* FIXME: We need GTK version >= 2.12.10. See GNOME bug #504087 */
 	if (gtk_check_version (2, 12, 10)) {
@@ -188,7 +188,7 @@
 
 	g_object_unref (contact);
 OUT:
-	running = FALSE;
+	running--;
 
 	return ret;
 }



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