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
This commit is contained in:
Jasper St. Pierre 2013-02-25 12:52:25 -05:00
parent afb3b9f029
commit 96e02c4c2e

View File

@ -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);