cleanup: Stop using Mainloop module

It is deprecated in favor of the regular GLib functions.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/718
This commit is contained in:
Florian Müllner
2019-08-19 20:50:33 +02:00
parent 4525ad346d
commit 2fc4987c73
30 changed files with 151 additions and 165 deletions

View File

@ -3,7 +3,6 @@
const UI = imports.testcommon.ui;
const { Clutter, GLib, St } = imports.gi;
const Mainloop = imports.mainloop;
const DELAY = 2000;
@ -59,14 +58,14 @@ function test() {
resize_animated(label1);
resize_animated(label2);
Mainloop.timeout_add(DELAY, () => {
GLib.timeout_add(GLib.PRIORITY_DEFAULT, DELAY, () => {
log(label1 + label1.get_size());
resize_animated(label1);
resize_animated(label2);
return true;
});
Mainloop.timeout_add(2 * DELAY, () => {
GLib.timeout_add(GLib.PRIORITY_DEFAULT, 2 * DELAY, () => {
iter += 1;
iter %= shadowStyles.length;
label1.set_style(get_css_style(shadowStyles[iter]));