From: Xavier Claessens Date: Sun, 8 Mar 2009 09:45:33 +0000 (+0000) Subject: Use running++ and running-- instead of a boolean X-Git-Url: https://git.0d.be/?p=empathy.git;a=commitdiff_plain;h=8da7942d316a692fbb07d3d436210c1a42453465 Use running++ and running-- instead of a boolean From: Xavier Claessens svn path=/trunk/; revision=2628 --- diff --git a/libempathy-gtk/empathy-contact-list-view.c b/libempathy-gtk/empathy-contact-list-view.c index 5df6c8d2..91050be4 100644 --- a/libempathy-gtk/empathy-contact-list-view.c +++ b/libempathy-gtk/empathy-contact-list-view.c @@ -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; }