dbusServices/extensions: Include dir and path in metadata

As we did for extensions in the previous commit, pass the path and
dir properties alongside other metadata to extensions preferences.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2838>
This commit is contained in:
Florian Müllner 2023-07-16 15:15:07 +02:00
parent 1c98a95974
commit 6a34b2636d

View File

@ -25,12 +25,12 @@ export const ExtensionPrefsDialog = GObject.registerClass({
} }
async _loadPrefs() { async _loadPrefs() {
const {dir, metadata} = this._extension; const {dir, path, metadata} = this._extension;
const prefsJs = dir.get_child('prefs.js'); const prefsJs = dir.get_child('prefs.js');
const prefsModule = await import(prefsJs.get_uri()); const prefsModule = await import(prefsJs.get_uri());
const prefsObj = new prefsModule.default(metadata); const prefsObj = new prefsModule.default({...metadata, dir, path});
this._extension.stateObj = prefsObj; this._extension.stateObj = prefsObj;
prefsObj.fillPreferencesWindow(this); prefsObj.fillPreferencesWindow(this);