summaryrefslogtreecommitdiff
path: root/gtk/gtkexpander.c
diff options
context:
space:
mode:
authorMichael Natterer <mitch@imendio.com>2006-01-12 09:54:54 +0000
committerMichael Natterer <mitch@src.gnome.org>2006-01-12 09:54:54 +0000
commit19454762856bfc9564f307c66e92fb754f655551 (patch)
tree06b1a294b4aaf88085e9baa6e196693f2835eff5 /gtk/gtkexpander.c
parent5c62a90e38590eb739c2f8c176af6cd8284518b9 (diff)
downloadgtk+-19454762856bfc9564f307c66e92fb754f655551.tar.gz
skip the animation if the gtk-enable-animations setting is FALSE (bug
2006-01-12 Michael Natterer <mitch@imendio.com> * gtk/gtkexpander.c (gtk_expander_set_expanded): skip the animation if the gtk-enable-animations setting is FALSE (bug #142582).
Diffstat (limited to 'gtk/gtkexpander.c')
-rw-r--r--gtk/gtkexpander.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/gtk/gtkexpander.c b/gtk/gtkexpander.c
index 7335b0b1a9..bf537ca7c7 100644
--- a/gtk/gtkexpander.c
+++ b/gtk/gtkexpander.c
@@ -1307,13 +1307,18 @@ gtk_expander_set_expanded (GtkExpander *expander,
if (priv->expanded != expanded)
{
+ GtkSettings *settings = gtk_widget_get_settings (GTK_WIDGET (expander));
+ gboolean enable_animations;
+
priv->expanded = expanded;
- if (GTK_WIDGET_REALIZED (expander))
+ g_object_get (settings, "gtk-enable-animations", &enable_animations, NULL);
+
+ if (enable_animations && GTK_WIDGET_REALIZED (expander))
{
gtk_expander_start_animation (expander);
}
- else
+ else
{
priv->expander_style = expanded ? GTK_EXPANDER_EXPANDED :
GTK_EXPANDER_COLLAPSED;