2023-07-10 05:06:17 +00:00
|
|
|
import {ExtensionBase, GettextWrapper, setExtensionManager} from './sharedInternals.js';
|
2023-07-01 00:11:37 +00:00
|
|
|
|
2023-07-01 00:11:37 +00:00
|
|
|
export {gettext, ngettext, pgettext} from './sharedInternals.js';
|
2023-07-01 00:11:37 +00:00
|
|
|
|
2023-07-10 03:12:30 +00:00
|
|
|
const {extensionManager} = imports.ui.main;
|
2023-07-09 10:47:05 +00:00
|
|
|
setExtensionManager(extensionManager);
|
2023-07-10 03:12:30 +00:00
|
|
|
|
2023-07-01 00:11:37 +00:00
|
|
|
export class Extension extends ExtensionBase {
|
2023-07-10 05:06:17 +00:00
|
|
|
static defineTranslationFunctions(url) {
|
|
|
|
const wrapper = new GettextWrapper(this, url);
|
|
|
|
return wrapper.defineTranslationFunctions();
|
|
|
|
}
|
|
|
|
|
2023-07-01 00:11:37 +00:00
|
|
|
enable() {
|
|
|
|
}
|
2023-07-01 00:11:37 +00:00
|
|
|
|
2023-07-01 00:11:37 +00:00
|
|
|
disable() {
|
|
|
|
}
|
2023-07-01 00:11:37 +00:00
|
|
|
|
2023-07-01 00:11:37 +00:00
|
|
|
/**
|
|
|
|
* Open the extension's preferences window
|
|
|
|
*/
|
|
|
|
openPreferences() {
|
|
|
|
extensionManager.openExtensionPrefs(this.uuid, '', {});
|
|
|
|
}
|
2023-07-01 00:11:37 +00:00
|
|
|
}
|