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:
@ -1,7 +1,6 @@
|
||||
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
||||
/* exported NMApplet */
|
||||
const { Clutter, Gio, GLib, GObject, NM, St } = imports.gi;
|
||||
const Mainloop = imports.mainloop;
|
||||
const Signals = imports.signals;
|
||||
|
||||
const Animation = imports.ui.animation;
|
||||
@ -719,7 +718,7 @@ class NMWirelessDialog extends ModalDialog.ModalDialog {
|
||||
this._updateSensitivity();
|
||||
this._syncView();
|
||||
|
||||
this._scanTimeoutId = Mainloop.timeout_add_seconds(15, this._onScanTimeout.bind(this));
|
||||
this._scanTimeoutId = GLib.timeout_add_seconds(GLib.PRIORITY_DEFAULT, 15, this._onScanTimeout.bind(this));
|
||||
GLib.Source.set_name_by_id(this._scanTimeoutId, '[gnome-shell] this._onScanTimeout');
|
||||
this._onScanTimeout();
|
||||
|
||||
@ -757,7 +756,7 @@ class NMWirelessDialog extends ModalDialog.ModalDialog {
|
||||
}
|
||||
|
||||
if (this._scanTimeoutId) {
|
||||
Mainloop.source_remove(this._scanTimeoutId);
|
||||
GLib.source_remove(this._scanTimeoutId);
|
||||
this._scanTimeoutId = 0;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user