js: Port to modules
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1499>
This commit is contained in:

committed by
Florian Müllner

parent
d9198317ae
commit
a751e213f6
@ -1,14 +1,13 @@
|
||||
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
||||
/* exported LocatePointer */
|
||||
|
||||
const Gio = imports.gi.Gio;
|
||||
const Ripples = imports.ui.ripples;
|
||||
const Main = imports.ui.main;
|
||||
import Gio from 'gi://Gio';
|
||||
import * as Ripples from './ripples.js';
|
||||
import * as Main from './main.js';
|
||||
|
||||
const LOCATE_POINTER_KEY = "locate-pointer";
|
||||
const LOCATE_POINTER_SCHEMA = "org.gnome.desktop.interface";
|
||||
const LOCATE_POINTER_KEY = 'locate-pointer';
|
||||
const LOCATE_POINTER_SCHEMA = 'org.gnome.desktop.interface';
|
||||
|
||||
var LocatePointer = class {
|
||||
export class LocatePointer {
|
||||
constructor() {
|
||||
this._settings = new Gio.Settings({ schema_id: LOCATE_POINTER_SCHEMA });
|
||||
this._settings.connect(`changed::${LOCATE_POINTER_KEY}`, () => this._syncEnabled());
|
||||
@ -36,4 +35,4 @@ var LocatePointer = class {
|
||||
let [x, y] = global.get_pointer();
|
||||
this._ripples.playAnimation(x, y);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user