[gnome-shell-extensions/wip/fmuellner/fix-113-master: 5/9] apps-menu: Adjust to gnome-shell changes



commit 62271285278757060428e43f7f88124bb04a9269
Author: Florian Müllner <fmuellner gnome org>
Date:   Wed Oct 10 15:46:12 2018 +0200

    apps-menu: Adjust to gnome-shell changes
    
    PanelMenu.Button is now a GObject subclass, so initialization must
    happen in _init() rather than constructor().
    
    https://gitlab.gnome.org/GNOME/gnome-shell-extensions/issues/113

 extensions/apps-menu/extension.js | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/extensions/apps-menu/extension.js b/extensions/apps-menu/extension.js
index 8e32e57..1683914 100644
--- a/extensions/apps-menu/extension.js
+++ b/extensions/apps-menu/extension.js
@@ -3,6 +3,7 @@
 const Atk = imports.gi.Atk;
 const DND = imports.ui.dnd;
 const GMenu = imports.gi.GMenu;
+const GObject = imports.gi.GObject;
 const Shell = imports.gi.Shell;
 const St = imports.gi.St;
 const Clutter = imports.gi.Clutter;
@@ -400,9 +401,10 @@ class DesktopTarget {
 };
 Signals.addSignalMethods(DesktopTarget.prototype);
 
+let ApplicationsButton = GObject.registerClass(
 class ApplicationsButton extends PanelMenu.Button {
-    constructor() {
-        super(1.0, null, false);
+    _init() {
+        super._init(1.0, null, false);
 
         this.setMenu(new ApplicationsMenu(this.actor, 1.0, St.Side.TOP, this));
         Main.panel.menuManager.addMenu(this.menu);
@@ -743,7 +745,7 @@ class ApplicationsButton extends PanelMenu.Button {
 
         return applist;
     }
-};
+});
 
 let appsMenuButton;
 let activitiesButton;


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