forked from AuroraMiddleware/gtk
gtk-demo: Make sure to clear the timeout when we stop it
This commit is contained in:
parent
cfd7788c0b
commit
bd60c7b95d
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user