[gnome-shell-extensions/extension-live-disable: 2/11] xrandr-indicator: port to new extension API



commit 5115abcf54ced84fb617b904eb42286ee78df038
Author: Giovanni Campagna <gcampagna src gnome org>
Date:   Tue Aug 2 23:27:19 2011 +0200

    xrandr-indicator: port to new extension API
    
    main() has been replaced by init(), enable() and disable()

 extensions/xrandr-indicator/extension.js |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/extensions/xrandr-indicator/extension.js b/extensions/xrandr-indicator/extension.js
index 999b005..d8b2bf8 100644
--- a/extensions/xrandr-indicator/extension.js
+++ b/extensions/xrandr-indicator/extension.js
@@ -136,8 +136,14 @@ Indicator.prototype = {
 }
 
 
-function main(metadata) {
+function init(metadata) {
     imports.gettext.bindtextdomain('gnome-shell-extensions', metadata.localedir);
+}
 
-    Panel.STANDARD_TRAY_ICON_SHELL_IMPLEMENTATION['display'] = Indicator;
+function enable() {
+    Main.panel.addToStatusArea('display', new Indicator());
 }
+
+function disable() {
+    Main.panel.removeFromStatusArea('display');
+}
\ No newline at end of file



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]