[gnome-shell] tweener: Look at the XSetting for disabling animations



commit 96e02c4c2ec407d6ac9b42c57e1d4087a2083725
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Mon Feb 25 12:52:25 2013 -0500

    tweener: Look at the XSetting for disabling animations
    
    gnome-settings-daemon will be changed to override the XSetting in
    the case where we're on a remote display rather than overwriting a
    user setting, so we need to look at the XSetting here.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=694320

 js/ui/tweener.js |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/js/ui/tweener.js b/js/ui/tweener.js
index 65de2d8..65ea125 100644
--- a/js/ui/tweener.js
+++ b/js/ui/tweener.js
@@ -1,8 +1,8 @@
 // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
 
 const Clutter = imports.gi.Clutter;
-const Gio = imports.gi.Gio;
 const GLib = imports.gi.GLib;
+const Gtk = imports.gi.Gtk;
 const Lang = imports.lang;
 const Mainloop = imports.mainloop;
 const Shell = imports.gi.Shell;
@@ -45,12 +45,9 @@ const Tweener = imports.tweener.tweener;
 // calls any of these is almost certainly wrong anyway, because they
 // affect the entire application.)
 
-let animationSettings = null;
-
 // Called from Main.start
 function init() {
     Tweener.setFrameTicker(new ClutterFrameTicker());
-    animationSettings = new Gio.Settings({ schema: 'org.gnome.desktop.interface' });
 }
 
 
@@ -77,7 +74,7 @@ function _wrapTweening(target, tweeningParameters) {
         }
     }
 
-    if (!animationSettings.get_boolean('enable-animations'))
+    if (!Gtk.Settings.get_default().gtk_enable_animations)
         tweeningParameters['time'] = 0.000001;
 
     _addHandler(target, tweeningParameters, 'onStart', _tweenStarted);


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