[gtk+] switch: Use getter for gtk-enable-animations



commit 8457dff08af03830d657bb8239439c155b0f94fa
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun May 1 00:40:08 2016 -0400

    switch: Use getter for gtk-enable-animations

 gtk/gtkswitch.c |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)
---
diff --git a/gtk/gtkswitch.c b/gtk/gtkswitch.c
index 1cab4ec..ce99a5b 100644
--- a/gtk/gtkswitch.c
+++ b/gtk/gtkswitch.c
@@ -68,6 +68,7 @@
 #include "gtkcssshadowsvalueprivate.h"
 #include "gtkcssnumbervalueprivate.h"
 #include "gtkprogresstrackerprivate.h"
+#include "gtksettingsprivate.h"
 
 #include "fallback-c89.c"
 
@@ -177,13 +178,8 @@ static void
 gtk_switch_begin_toggle_animation (GtkSwitch *sw)
 {
   GtkSwitchPrivate *priv = sw->priv;
-  gboolean animate;
 
-  g_object_get (gtk_widget_get_settings (GTK_WIDGET (sw)),
-                "gtk-enable-animations", &animate,
-                NULL);
-
-  if (animate)
+  if (gtk_settings_get_enable_animations (gtk_widget_get_settings (GTK_WIDGET (sw))))
     {
       gtk_progress_tracker_start (&priv->tracker, 1000 * ANIMATION_DURATION, 0, 1.0);
       if (priv->tick_id == 0)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]