[gnome-shell-extensions/extension-live-disable: 3/11] workspace-indicator: port to new extension API
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell-extensions/extension-live-disable: 3/11] workspace-indicator: port to new extension API
- Date: Tue, 2 Aug 2011 21:37:19 +0000 (UTC)
commit 2732f6d2c29cd911caf2cd387fcd58d5e693892a
Author: Giovanni Campagna <gcampagna src gnome org>
Date: Tue Aug 2 23:28:44 2011 +0200
workspace-indicator: port to new extension API
main() has been replaced by init(), enable() and disable()
extensions/workspace-indicator/extension.js | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
---
diff --git a/extensions/workspace-indicator/extension.js b/extensions/workspace-indicator/extension.js
index da847ed..109ea04 100644
--- a/extensions/workspace-indicator/extension.js
+++ b/extensions/workspace-indicator/extension.js
@@ -9,9 +9,6 @@ const Panel = imports.ui.panel;
const Main = imports.ui.main;
-const Gettext = imports.gettext.domain('gnome-shell-extensions');
-const _ = Gettext.gettext;
-
function WorkspaceIndicator() {
this._init.apply(this, arguments);
}
@@ -96,7 +93,14 @@ WorkspaceIndicator.prototype = {
},
}
-function main() {
- Panel.STANDARD_TRAY_ICON_ORDER.unshift('workspace-indicator');
- Panel.STANDARD_TRAY_ICON_SHELL_IMPLEMENTATION['workspace-indicator'] = WorkspaceIndicator;
+function init(meta) {
+ Panel.STANDARD_TRAY_ICON_ORDER.unshift('workspace-indicator');
+}
+
+function enable() {
+ Main.panel.addToStatusArea('workspace-indicator', new WorkspaceIndicator);
+}
+
+function disable() {
+ Main.panel.removeFromStatusArea('workspace-indicator');
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]