dbusServices: Port to ESM
We want to replace gjs' custom (and now legacy) imports system with standard EcmaScript modules: JS developers are already familiar with them, they have better tooling support and using standard features over non-standard ones is generally the right thing to do. Our D-Bus services are separate from the main process, and thus can be ported separately (except for the few imports that are shared with the main process' code base). Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2786>
This commit is contained in:
@ -1,18 +1,18 @@
|
||||
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
||||
/* exported ExtensionsService */
|
||||
import Gio from 'gi://Gio';
|
||||
import GLib from 'gi://GLib';
|
||||
import Shew from 'gi://Shew';
|
||||
|
||||
const { Gio, GLib, Shew } = imports.gi;
|
||||
import {ExtensionPrefsDialog} from './extensionPrefsDialog.js';
|
||||
import {ServiceImplementation} from './dbusService.js';
|
||||
|
||||
const ExtensionUtils = imports.misc.extensionUtils;
|
||||
|
||||
const { loadInterfaceXML } = imports.misc.dbusUtils;
|
||||
const { ExtensionPrefsDialog } = imports.extensionPrefsDialog;
|
||||
const { ServiceImplementation } = imports.dbusService;
|
||||
const {loadInterfaceXML} = imports.misc.dbusUtils;
|
||||
|
||||
const ExtensionsIface = loadInterfaceXML('org.gnome.Shell.Extensions');
|
||||
const ExtensionsProxy = Gio.DBusProxy.makeProxyWrapper(ExtensionsIface);
|
||||
|
||||
var ExtensionsService = class extends ServiceImplementation {
|
||||
export const ExtensionsService = class extends ServiceImplementation {
|
||||
constructor() {
|
||||
super(ExtensionsIface, '/org/gnome/Shell/Extensions');
|
||||
|
||||
|
Reference in New Issue
Block a user