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:
@@ -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();
|
||||
}
|
||||
Reference in New Issue
Block a user