[gtk+] gtk-demo: Make sure to clear the timeout when we stop it
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] gtk-demo: Make sure to clear the timeout when we stop it
- Date: Tue, 22 Apr 2014 23:19:34 +0000 (UTC)
commit bd60c7b95d65138d369aef20fdc87af33131df58
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Sat Apr 12 10:35:19 2014 -0700
gtk-demo: Make sure to clear the timeout when we stop it
demos/gtk-demo/revealer.c | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/demos/gtk-demo/revealer.c b/demos/gtk-demo/revealer.c
index cb0752a..703223a 100644
--- a/demos/gtk-demo/revealer.c
+++ b/demos/gtk-demo/revealer.c
@@ -18,6 +18,8 @@ change_direction (GtkRevealer *revealer)
gtk_revealer_set_reveal_child (revealer, !revealed);
}
+static guint timeout = 0;
+
static gboolean
reveal_one (gpointer data)
{
@@ -33,11 +35,15 @@ reveal_one (gpointer data)
G_CALLBACK (change_direction), NULL);
count++;
- return count < 9;
+ if (count >= 9)
+ {
+ timeout = 0;
+ return FALSE;
+ }
+ else
+ return TRUE;
}
-static guint timeout = 0;
-
static void
response_cb (GtkWidget *dialog,
gint response_id,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]