[gtk+/gtk-3-10] revealer: Respect gtk-enable-animations setting
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-10] revealer: Respect gtk-enable-animations setting
- Date: Tue, 26 Nov 2013 21:19:20 +0000 (UTC)
commit d2c9988beba16d1d01127416867f02e6b23540ca
Author: Christian Persch <chpe gnome org>
Date: Mon Nov 18 21:21:49 2013 +0100
revealer: Respect gtk-enable-animations setting
https://bugzilla.gnome.org/show_bug.cgi?id=712632
gtk/gtkrevealer.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkrevealer.c b/gtk/gtkrevealer.c
index 09718f3..3987158 100644
--- a/gtk/gtkrevealer.c
+++ b/gtk/gtkrevealer.c
@@ -41,6 +41,9 @@
* The style of transition can be controlled with
* gtk_revealer_set_transition_type().
*
+ * These animations respect the #GtkSettings::gtk-enable-animations
+ * setting.
+ *
* The GtkRevealer widget was added in GTK+ 3.10.
*/
@@ -268,6 +271,13 @@ static GtkRevealerTransitionType
effective_transition (GtkRevealer *revealer)
{
GtkRevealerPrivate *priv = gtk_revealer_get_instance_private (revealer);
+ gboolean animations_enabled;
+
+ g_object_get (gtk_widget_get_settings (GTK_WIDGET (revealer)),
+ "gtk-enable-animations", &animations_enabled,
+ NULL);
+ if (!animations_enabled)
+ return GTK_REVEALER_TRANSITION_TYPE_NONE;
if (gtk_widget_get_direction (GTK_WIDGET (revealer)) == GTK_TEXT_DIR_RTL)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]