st: Move slow-down-factor into settings
Now that we have a Settings singleton, we have a better place for the slow-down-factor than an awkward extern variable. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/656
This commit is contained in:

committed by
Georges Basile Stavracas Neto

parent
5295866eff
commit
12b8fb15b1
@ -107,6 +107,12 @@ function init() {
|
||||
}
|
||||
});
|
||||
|
||||
St.set_slow_down_factor = function(factor) {
|
||||
let { stack } = new Error();
|
||||
log(`St.set_slow_down_factor() is deprecated, use St.Settings.slow_down_factor\n${stack}`);
|
||||
St.Settings.get().slow_down_factor = factor;
|
||||
};
|
||||
|
||||
let origToString = Object.prototype.toString;
|
||||
Object.prototype.toString = function() {
|
||||
let base = origToString.call(this);
|
||||
@ -129,7 +135,7 @@ function init() {
|
||||
if (slowdownEnv) {
|
||||
let factor = parseFloat(slowdownEnv);
|
||||
if (!isNaN(factor) && factor > 0.0)
|
||||
St.set_slow_down_factor(factor);
|
||||
St.Settings.get().slow_down_factor = factor;
|
||||
}
|
||||
|
||||
// OK, now things are initialized enough that we can import shell JS
|
||||
|
Reference in New Issue
Block a user