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



commit 6f757041f7115b4839b559561e34af26d2534b05
Author: Florian Müllner <fmuellner gnome org>
Date:   Wed Oct 10 20:48:56 2018 +0200

    drive-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/drive-menu/extension.js | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/extensions/drive-menu/extension.js b/extensions/drive-menu/extension.js
index d413542..4002cb1 100644
--- a/extensions/drive-menu/extension.js
+++ b/extensions/drive-menu/extension.js
@@ -1,6 +1,7 @@
 // Drive menu extension
 const Clutter = imports.gi.Clutter;
 const Gio = imports.gi.Gio;
+const GObject = imports.gi.GObject;
 const St = imports.gi.St;
 const Shell = imports.gi.Shell;
 
@@ -113,9 +114,10 @@ class MountMenuItem extends PopupMenu.PopupBaseMenuItem {
     }
 };
 
+let DriveMenu = GObject.registerClass(
 class DriveMenu extends PanelMenu.Button {
-    constructor() {
-        super(0.0, _("Removable devices"));
+    _init() {
+        super._init(0.0, _("Removable devices"));
 
         let hbox = new St.BoxLayout({ style_class: 'panel-status-menu-box' });
         let icon = new St.Icon({ icon_name: 'media-eject-symbolic',
@@ -184,7 +186,7 @@ class DriveMenu extends PanelMenu.Button {
 
         super.destroy();
     }
-};
+});
 
 function init() {
     Convenience.initTranslations();


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