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,13 +1,12 @@
|
||||
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
||||
/* exported WindowAttentionHandler */
|
||||
|
||||
const GObject = imports.gi.GObject;
|
||||
const Shell = imports.gi.Shell;
|
||||
import GObject from 'gi://GObject';
|
||||
import Shell from 'gi://Shell';
|
||||
|
||||
const Main = imports.ui.main;
|
||||
const MessageTray = imports.ui.messageTray;
|
||||
import * as Main from './main.js';
|
||||
import * as MessageTray from './messageTray.js';
|
||||
|
||||
var WindowAttentionHandler = class {
|
||||
export class WindowAttentionHandler {
|
||||
constructor() {
|
||||
this._tracker = Shell.WindowTracker.get_default();
|
||||
global.display.connectObject(
|
||||
@ -53,9 +52,9 @@ var WindowAttentionHandler = class {
|
||||
notification.update(title, banner);
|
||||
}, source);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
var WindowAttentionSource = GObject.registerClass(
|
||||
const WindowAttentionSource = GObject.registerClass(
|
||||
class WindowAttentionSource extends MessageTray.Source {
|
||||
_init(app, window) {
|
||||
this._window = window;
|
||||
|
Reference in New Issue
Block a user