Use running++ and running-- instead of a boolean
authorXavier Claessens <xclaesse@gmail.com>
Sun, 8 Mar 2009 09:45:33 +0000 (09:45 +0000)
committerXavier Claessens <xclaesse@src.gnome.org>
Sun, 8 Mar 2009 09:45:33 +0000 (09:45 +0000)
From: Xavier Claessens <xclaesse@gmail.com>

svn path=/trunk/; revision=2628

libempathy-gtk/empathy-contact-list-view.c

index 5df6c8d2a18b5c4b6eeb4f0b952902171744d4ba..91050be401ac50bfb7977561757fb7a4061b6c85 100644 (file)
@@ -141,14 +141,14 @@ contact_list_view_query_tooltip_cb (EmpathyContactListView *view,
        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 @@ contact_list_view_query_tooltip_cb (EmpathyContactListView *view,
 
        g_object_unref (contact);
 OUT:
-       running = FALSE;
+       running--;
 
        return ret;
 }