-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathextension.js
35 lines (28 loc) · 863 Bytes
/
extension.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/*
* KeyMan - A gnome shell extension to access the keyring in a convenient way
* (c) 2014 David Poetzsch-Heffter <[email protected]>
* This file is distributed under the same licence as the KeyMan package.
* See file LICENSE for details.
*/
const Main = imports.ui.main;
const Gettext = imports.gettext;
const Me = imports.misc.extensionUtils.getCurrentExtension();
const KeyMan = Me.imports.keyman.KeyMan;
const _ = Gettext.domain("keyman").gettext;
let keyman; // KeyManager instance
// Init function
function init(metadata) {
// Read locale files
let locales = Me.dir.get_path() + "/locale";
Gettext.bindtextdomain("keyman", locales);
}
function enable() {
keyman = new KeyMan();
keyman._enable();
Main.panel.addToStatusArea("keyman", keyman.theButton);
}
function disable() {
keyman._disable();
keyman.destroy();
keyman = null;
}