diff options
author | Bastien Nocera <hadess@hadess.net> | 2009-10-14 17:46:11 +0100 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2009-10-14 17:47:02 +0100 |
commit | aa663e08f7fad8fe277eca2bab9dd7233422b6db (patch) | |
tree | 00352126f3245b47ac0ca52f4925d1a0f52c4435 /gtk/gtkspinner.c | |
parent | 2cd44fa5f3a599fbd63debd2f917640341185a12 (diff) | |
download | gtk+-aa663e08f7fad8fe277eca2bab9dd7233422b6db.tar.gz |
Fix "active" property not being notified
And setting it FALSE starting the spinning when it should
stop it.
Diffstat (limited to 'gtk/gtkspinner.c')
-rw-r--r-- | gtk/gtkspinner.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gtk/gtkspinner.c b/gtk/gtkspinner.c index ec3ebb31b6..63a6477265 100644 --- a/gtk/gtkspinner.c +++ b/gtk/gtkspinner.c @@ -151,7 +151,10 @@ gtk_spinner_set_property (GObject *object, switch (param_id) { case PROP_ACTIVE: - gtk_spinner_start (GTK_SPINNER (object)); + if (g_value_get_boolean (value)) + gtk_spinner_start (GTK_SPINNER (object)); + else + gtk_spinner_stop (GTK_SPINNER (object)); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec); @@ -496,6 +499,7 @@ gtk_spinner_start (GtkSpinner *spinner) return; } priv->timeout = gdk_threads_add_timeout (1000 / priv->num_steps, gtk_spinner_timeout, spinner); + g_object_notify (G_OBJECT (spinner), "active"); } /** @@ -519,6 +523,7 @@ gtk_spinner_stop (GtkSpinner *spinner) } g_source_remove (priv->timeout); priv->timeout = 0; + g_object_notify (G_OBJECT (spinner), "active"); } #define __GTK_SPINNER_C__ |