[gtk+] GtkSwitch: End animation in set_active
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] GtkSwitch: End animation in set_active
- Date: Mon, 4 Aug 2014 12:37:04 +0000 (UTC)
commit 007ba3bc14b690f32f269770ec6a52c7c6a561a5
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Aug 4 14:21:59 2014 +0200
GtkSwitch: End animation in set_active
End any running toggle animation before setting the set,
otherwise things get confused.
gtk/gtkswitch.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkswitch.c b/gtk/gtkswitch.c
index 915dc38..534dc58 100644
--- a/gtk/gtkswitch.c
+++ b/gtk/gtkswitch.c
@@ -160,7 +160,6 @@ gtk_switch_on_frame_clock_update (GdkFrameClock *clock,
}
else
{
- gtk_switch_end_toggle_animation (sw);
gtk_switch_set_active (sw, !priv->is_active);
priv->handle_x = priv->dest_offset;
}
@@ -1075,6 +1074,8 @@ gtk_switch_set_active (GtkSwitch *sw,
g_return_if_fail (GTK_IS_SWITCH (sw));
+ gtk_switch_end_toggle_animation (sw);
+
is_active = !!is_active;
priv = sw->priv;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]