stack: respect gtk-enable-animations setting

https://bugzilla.gnome.org/show_bug.cgi?id=712632
This commit is contained in:
Matthias Clasen 2013-11-18 23:19:27 -05:00
parent bf9ed44aa6
commit fb9ff44299

View File

@ -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)