js: Port to modules

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1499>
This commit is contained in:
Evan Welsh
2023-07-10 02:53:00 -07:00
committed by Florian Müllner
parent d9198317ae
commit a751e213f6
162 changed files with 2183 additions and 2336 deletions

View File

@ -1,15 +1,15 @@
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
/* exported OsdMonitorLabeler */
const Clutter = imports.gi.Clutter;
const Gio = imports.gi.Gio;
const GObject = imports.gi.GObject;
const Meta = imports.gi.Meta;
const St = imports.gi.St;
import Clutter from 'gi://Clutter';
import Gio from 'gi://Gio';
import GObject from 'gi://GObject';
import Meta from 'gi://Meta';
import St from 'gi://St';
const Main = imports.ui.main;
var OsdMonitorLabel = GObject.registerClass(
import * as Main from './main.js';
const OsdMonitorLabel = GObject.registerClass(
class OsdMonitorLabel extends St.Widget {
_init(monitor, label) {
super._init({ x_expand: true, y_expand: true });
@ -49,7 +49,7 @@ class OsdMonitorLabel extends St.Widget {
}
});
var OsdMonitorLabeler = class {
export class OsdMonitorLabeler {
constructor() {
this._monitorManager = global.backend.get_monitor_manager();
this._client = null;
@ -118,4 +118,4 @@ var OsdMonitorLabeler = class {
this._reset();
}
};
}