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



commit 9d038df7deeea0ea77d0546d77b6c979f5852f0c
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun May 1 00:39:03 2016 -0400

    popover: Use getter for gtk-enable-animations

 gtk/gtkpopover.c |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)
---
diff --git a/gtk/gtkpopover.c b/gtk/gtkpopover.c
index f6a40af..c5c002a 100644
--- a/gtk/gtkpopover.c
+++ b/gtk/gtkpopover.c
@@ -111,6 +111,7 @@
 #include "gtkroundedboxprivate.h"
 #include "gtkstylecontextprivate.h"
 #include "gtkprogresstrackerprivate.h"
+#include "gtksettingsprivate.h"
 
 #ifdef GDK_WINDOWING_WAYLAND
 #include "wayland/gdkwayland.h"
@@ -289,13 +290,9 @@ static gboolean
 transitions_enabled (GtkPopover *popover)
 {
   GtkPopoverPrivate *priv = popover->priv;
-  gboolean animations_enabled;
 
-  g_object_get (gtk_widget_get_settings (GTK_WIDGET (popover)),
-                "gtk-enable-animations", &animations_enabled,
-                NULL);
-
-  return animations_enabled && priv->transitions_enabled;
+  return gtk_settings_get_enable_animations (gtk_widget_get_settings (GTK_WIDGET (popover))) &&
+         priv->transitions_enabled;
 }
 
 static void


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