2023-06-30 20:11:37 -04:00
|
|
|
import GObject from 'gi://GObject';
|
|
|
|
|
2023-07-10 00:04:07 -04:00
|
|
|
import {ExtensionBase, GettextWrapper} from './sharedInternals.js';
|
2023-07-09 06:47:05 -04:00
|
|
|
import {extensionManager} from '../extensionsService.js';
|
|
|
|
|
2023-06-30 20:11:37 -04:00
|
|
|
export class ExtensionPreferences extends ExtensionBase {
|
2023-07-10 04:33:31 -04:00
|
|
|
static lookupByUUID(uuid) {
|
|
|
|
return extensionManager.lookup(uuid)?.stateObj ?? null;
|
|
|
|
}
|
|
|
|
|
2023-07-10 01:06:17 -04:00
|
|
|
static defineTranslationFunctions(url) {
|
|
|
|
const wrapper = new GettextWrapper(this, url);
|
|
|
|
return wrapper.defineTranslationFunctions();
|
|
|
|
}
|
|
|
|
|
2023-06-30 20:11:37 -04:00
|
|
|
/**
|
|
|
|
* Fill the preferences window with preferences.
|
|
|
|
*
|
|
|
|
* @param {Adw.PreferencesWindow} _window - the preferences window
|
|
|
|
*/
|
|
|
|
fillPreferencesWindow(_window) {
|
|
|
|
throw new GObject.NotImplementedError();
|
|
|
|
}
|
|
|
|
}
|
2023-07-16 19:13:06 -04:00
|
|
|
|
|
|
|
export const {
|
|
|
|
gettext, ngettext, pgettext,
|
|
|
|
} = ExtensionPreferences.defineTranslationFunctions();
|