alternative-status-menu: port to new extension API

main() has been	replaced by init(), enable() and disable()
possibly not working, a better infrastructure for monkey patching
would be helpful
This commit is contained in:
Giovanni Campagna
2011-08-02 23:32:51 +02:00
parent 67dc01ea36
commit aa38aa1e9e
@@ -98,8 +98,17 @@ function createSubMenu() {
// Put your extension initialization code here
function main(metadata) {
imports.gettext.bindtextdomain('gnome-shell-extensions', metadata.localedir);
}
function enable() {
let statusMenu = Main.panel._userMenu;
statusMenu.menu.removeAll();
createSubMenu.call(statusMenu);
}
function disable() {
// not guarranteed to work, if more extensions operate in the same place
let statusMenu = Main.panel._userMenu;
statusMenu.menu.removeAll();
statusMenu._createSubMenu();
}