diff options
author | Matthias Clasen <mclasen@redhat.com> | 2013-11-18 23:19:27 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2013-11-18 23:19:27 -0500 |
commit | fb9ff442997f02ee2d6ad0eae0321a961e96f56f (patch) | |
tree | 1e1f1fa76dd56cfa414da4ab6c6c5d27ba10c8db /gtk/gtkstack.c | |
parent | bf9ed44aa69f3a4c238f05456d462877fea601f7 (diff) | |
download | gtk+-fb9ff442997f02ee2d6ad0eae0321a961e96f56f.tar.gz |
stack: respect gtk-enable-animations setting
https://bugzilla.gnome.org/show_bug.cgi?id=712632
Diffstat (limited to 'gtk/gtkstack.c')
-rw-r--r-- | gtk/gtkstack.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gtk/gtkstack.c b/gtk/gtkstack.c index 1f0da9e3d4..a284a66bbc 100644 --- a/gtk/gtkstack.c +++ b/gtk/gtkstack.c @@ -45,6 +45,9 @@ * These animations respect the #GtkSettings::gtk-enable-animations * setting. * + * These animations respect the #GtkSettings::gtk-enable-animations + * setting. + * * The GtkStack widget was added in GTK+ 3.10. */ @@ -827,6 +830,14 @@ static GtkStackTransitionType effective_transition_type (GtkStack *stack, GtkStackTransitionType transition_type) { + gboolean animations_enabled; + + g_object_get (gtk_widget_get_settings (GTK_WIDGET (stack)), + "gtk-enable-animations", &animations_enabled, + NULL); + if (!animations_enabled) + return GTK_STACK_TRANSITION_TYPE_NONE; + if (gtk_widget_get_direction (GTK_WIDGET (stack)) == GTK_TEXT_DIR_RTL) { if (transition_type == GTK_STACK_TRANSITION_TYPE_SLIDE_LEFT) |