diff --git a/js/extensions/sharedInternals.js b/js/extensions/sharedInternals.js index 76f488b7f..7fed3812a 100644 --- a/js/extensions/sharedInternals.js +++ b/js/extensions/sharedInternals.js @@ -4,7 +4,7 @@ import GObject from 'gi://GObject'; import {bindtextdomain} from 'gettext'; -const Config = imports.misc.config; +import * as Config from '../misc/config.js'; export class ExtensionBase { #gettextDomain; diff --git a/js/misc/config.js.in b/js/misc/config.js.in index e7884bdd5..eef4d4ca1 100644 --- a/js/misc/config.js.in +++ b/js/misc/config.js.in @@ -2,20 +2,20 @@ const pkg = imports.package; /* The name of this package (not localized) */ -var PACKAGE_NAME = '@PACKAGE_NAME@'; +export const PACKAGE_NAME = '@PACKAGE_NAME@'; /* The version of this package */ -var PACKAGE_VERSION = '@PACKAGE_VERSION@'; +export const PACKAGE_VERSION = '@PACKAGE_VERSION@'; /* 1 if networkmanager is available, 0 otherwise */ -var HAVE_NETWORKMANAGER = @HAVE_NETWORKMANAGER@; +export const HAVE_NETWORKMANAGER = @HAVE_NETWORKMANAGER@; /* gettext package */ -var GETTEXT_PACKAGE = '@GETTEXT_PACKAGE@'; +export const GETTEXT_PACKAGE = '@GETTEXT_PACKAGE@'; /* locale dir */ -var LOCALEDIR = '@datadir@/locale'; +export const LOCALEDIR = '@datadir@/locale'; /* other standard directories */ -var LIBEXECDIR = '@libexecdir@'; -var PKGDATADIR = '@datadir@/@PACKAGE_NAME@'; +export const LIBEXECDIR = '@libexecdir@'; +export const PKGDATADIR = '@datadir@/@PACKAGE_NAME@'; /* g-i package versions */ -var LIBMUTTER_API_VERSION = '@LIBMUTTER_API_VERSION@'; +export const LIBMUTTER_API_VERSION = '@LIBMUTTER_API_VERSION@'; -var HAVE_BLUETOOTH = pkg.checkSymbol('GnomeBluetooth', '3.0', +export const HAVE_BLUETOOTH = pkg.checkSymbol('GnomeBluetooth', '3.0', 'Client.default_adapter_state') diff --git a/js/misc/dbusUtils.js b/js/misc/dbusUtils.js index ae7e2c952..2813de2a7 100644 --- a/js/misc/dbusUtils.js +++ b/js/misc/dbusUtils.js @@ -1,7 +1,7 @@ import Gio from 'gi://Gio'; import GLib from 'gi://GLib'; -const Config = imports.misc.config; +import * as Config from './config.js'; let _ifaceResource = null; diff --git a/js/misc/dependencies.js b/js/misc/dependencies.js index 9f1cd9808..c61753e65 100644 --- a/js/misc/dependencies.js +++ b/js/misc/dependencies.js @@ -26,7 +26,7 @@ import 'gi://Rsvg?version=2.0'; import 'gi://Soup?version=3.0'; import 'gi://UPowerGlib?version=1.0'; -const Config = imports.misc.config; +import * as Config from './config.js'; // Meta-related dependencies use a shared version // from the compile-time config. diff --git a/js/portalHelper/main.js b/js/portalHelper/main.js index 68d90e489..7000089fa 100644 --- a/js/portalHelper/main.js +++ b/js/portalHelper/main.js @@ -10,7 +10,7 @@ import {programInvocationName, programArgs} from 'system'; const _ = Gettext.gettext; -const Config = imports.misc.config; +import * as Config from '../misc/config.js'; import {loadInterfaceXML} from '../misc/fileUtils.js'; const PortalHelperResult = { diff --git a/js/ui/extensionDownloader.js b/js/ui/extensionDownloader.js index 826e61a6f..eb1757978 100644 --- a/js/ui/extensionDownloader.js +++ b/js/ui/extensionDownloader.js @@ -6,7 +6,7 @@ import GLib from 'gi://GLib'; import GObject from 'gi://GObject'; import Soup from 'gi://Soup'; -const Config = imports.misc.config; +import * as Config from '../misc/config.js'; import * as Dialog from './dialog.js'; import * as ExtensionUtils from '../misc/extensionUtils.js'; import * as FileUtils from '../misc/fileUtils.js'; diff --git a/js/ui/extensionSystem.js b/js/ui/extensionSystem.js index 5ef995804..21b3b196f 100644 --- a/js/ui/extensionSystem.js +++ b/js/ui/extensionSystem.js @@ -7,14 +7,13 @@ import St from 'gi://St'; import Shell from 'gi://Shell'; import * as Signals from '../misc/signals.js'; +import * as Config from '../misc/config.js'; import * as ExtensionDownloader from './extensionDownloader.js'; import {ExtensionState, ExtensionType} from '../misc/extensionUtils.js'; import * as FileUtils from '../misc/fileUtils.js'; import * as Main from './main.js'; import * as MessageTray from './messageTray.js'; -const Config = imports.misc.config; - const ENABLED_EXTENSIONS_KEY = 'enabled-extensions'; const DISABLED_EXTENSIONS_KEY = 'disabled-extensions'; const DISABLE_USER_EXTENSIONS_KEY = 'disable-user-extensions'; diff --git a/js/ui/main.js b/js/ui/main.js index c47b7c547..a96d8df7c 100644 --- a/js/ui/main.js +++ b/js/ui/main.js @@ -10,6 +10,7 @@ import St from 'gi://St'; import * as AccessDialog from './accessDialog.js'; import * as AudioDeviceSelection from './audioDeviceSelection.js'; +import * as Config from '../misc/config.js'; import * as Components from './components.js'; import * as CtrlAltTab from './ctrlAltTab.js'; import * as EndSessionDialog from './endSessionDialog.js'; @@ -45,7 +46,6 @@ import * as KbdA11yDialog from './kbdA11yDialog.js'; import * as LocatePointer from './locatePointer.js'; import * as PointerA11yTimeout from './pointerA11yTimeout.js'; import * as ParentalControlsManager from '../misc/parentalControlsManager.js'; -const Config = imports.misc.config; import * as Util from '../misc/util.js'; const WELCOME_DIALOG_LAST_SHOWN_VERSION = 'welcome-dialog-last-shown-version'; diff --git a/js/ui/notificationDaemon.js b/js/ui/notificationDaemon.js index a11e087f7..183279ee9 100644 --- a/js/ui/notificationDaemon.js +++ b/js/ui/notificationDaemon.js @@ -7,7 +7,7 @@ import GObject from 'gi://GObject'; import Shell from 'gi://Shell'; import St from 'gi://St'; -const Config = imports.misc.config; +import * as Config from '../misc/config.js'; import * as Main from './main.js'; import * as MessageTray from './messageTray.js'; import * as Params from '../misc/params.js'; diff --git a/js/ui/panel.js b/js/ui/panel.js index cd8ebc1ec..6fb90ac2f 100644 --- a/js/ui/panel.js +++ b/js/ui/panel.js @@ -10,7 +10,7 @@ import St from 'gi://St'; import * as Animation from './animation.js'; import {AppMenu} from './appMenu.js'; -const Config = imports.misc.config; +import * as Config from '../misc/config.js'; import * as CtrlAltTab from './ctrlAltTab.js'; import * as DND from './dnd.js'; import * as Overview from './overview.js'; diff --git a/js/ui/scripting.js b/js/ui/scripting.js index d0fb10d5d..db245c0f4 100644 --- a/js/ui/scripting.js +++ b/js/ui/scripting.js @@ -5,7 +5,7 @@ import GLib from 'gi://GLib'; import Meta from 'gi://Meta'; import Shell from 'gi://Shell'; -const Config = imports.misc.config; +import * as Config from '../misc/config.js'; import * as Main from './main.js'; import * as Params from '../misc/params.js'; import * as Util from '../misc/util.js'; diff --git a/js/ui/sessionMode.js b/js/ui/sessionMode.js index a41963676..8e30a665c 100644 --- a/js/ui/sessionMode.js +++ b/js/ui/sessionMode.js @@ -9,7 +9,7 @@ import * as Params from '../misc/params.js'; import {LoginDialog} from '../gdm/loginDialog.js'; import {UnlockDialog} from '../ui/unlockDialog.js'; -const Config = imports.misc.config; +import * as Config from '../misc/config.js'; const DEFAULT_MODE = 'restrictive'; diff --git a/js/ui/shellDBus.js b/js/ui/shellDBus.js index 370f33497..12ca261c8 100644 --- a/js/ui/shellDBus.js +++ b/js/ui/shellDBus.js @@ -5,7 +5,7 @@ import GLib from 'gi://GLib'; import Meta from 'gi://Meta'; import Shell from 'gi://Shell'; -const Config = imports.misc.config; +import * as Config from '../misc/config.js'; import * as ExtensionDownloader from './extensionDownloader.js'; import * as ExtensionUtils from '../misc/extensionUtils.js'; import * as Main from './main.js'; diff --git a/js/ui/welcomeDialog.js b/js/ui/welcomeDialog.js index 3295e49fd..6c5507fa7 100644 --- a/js/ui/welcomeDialog.js +++ b/js/ui/welcomeDialog.js @@ -5,7 +5,7 @@ import GObject from 'gi://GObject'; import Shell from 'gi://Shell'; import St from 'gi://St'; -const Config = imports.misc.config; +import * as Config from '../misc/config.js'; import * as Main from './main.js'; import * as Dialog from './dialog.js'; import * as ModalDialog from './modalDialog.js';