From fbeb3cf1e9466ce2e6b5879f1f154873adf3f4a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Wed, 10 Oct 2018 16:20:40 +0200 Subject: [PATCH] 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 429e81dc..b196334d 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();