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



commit ce8fbbfeb86a661b62440a40ab9ebcf0ede7c2df
Author: Florian Müllner <fmuellner gnome org>
Date:   Wed Oct 10 16:20:40 2018 +0200

    places-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/places-menu/extension.js | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/extensions/places-menu/extension.js b/extensions/places-menu/extension.js
index 429e81d..b196334 100644
--- a/extensions/places-menu/extension.js
+++ b/extensions/places-menu/extension.js
@@ -3,6 +3,7 @@
 const Clutter = imports.gi.Clutter;
 const Gio = imports.gi.Gio;
 const GLib = imports.gi.GLib;
+const GObject = imports.gi.GObject;
 const Shell = imports.gi.Shell;
 const St = imports.gi.St;
 
@@ -74,9 +75,10 @@ const SECTIONS = [
     'network'
 ]
 
+let PlacesMenu = GObject.registerClass(
 class PlacesMenu extends PanelMenu.Button {
-    constructor() {
-        super(0.0, _("Places"));
+    _init() {
+        super._init(0.0, _("Places"));
 
         let hbox = new St.BoxLayout({ style_class: 'panel-status-menu-box' });
         let label = new St.Label({ text: _("Places"),
@@ -122,7 +124,7 @@ class PlacesMenu extends PanelMenu.Button {
 
         this._sections[id].actor.visible = places.length > 0;
     }
-};
+});
 
 function init() {
     Convenience.initTranslations();


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