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



commit 0538d8938ce36e98c5655047130203ae1abd7d1d
Author: Florian Müllner <fmuellner gnome org>
Date:   Wed Oct 10 20:53:05 2018 +0200

    workspace-indicator: 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/workspace-indicator/extension.js | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/extensions/workspace-indicator/extension.js b/extensions/workspace-indicator/extension.js
index 162345a..a3ca9c4 100644
--- a/extensions/workspace-indicator/extension.js
+++ b/extensions/workspace-indicator/extension.js
@@ -1,6 +1,7 @@
 // -*- mode: js2; indent-tabs-mode: nil; js2-basic-offset: 4 -*-
 
 const Gio = imports.gi.Gio;
+const GObject = imports.gi.GObject;
 const Meta = imports.gi.Meta;
 const Clutter = imports.gi.Clutter;
 const St = imports.gi.St;
@@ -21,9 +22,10 @@ const Convenience = Me.imports.convenience;
 const WORKSPACE_SCHEMA = 'org.gnome.desktop.wm.preferences';
 const WORKSPACE_KEY = 'workspace-names';
 
+let WorkspaceIndicator = GObject.registerClass(
 class WorkspaceIndicator extends PanelMenu.Button {
-    constructor() {
-        super(0.0, _("Workspace Indicator"));
+    _init() {
+        super._init(0.0, _("Workspace Indicator"));
 
         let workspaceManager = global.workspace_manager;
 
@@ -133,7 +135,7 @@ class WorkspaceIndicator extends PanelMenu.Button {
         let newIndex = global.workspace_manager.get_active_workspace().index() + diff;
         this._activate(newIndex);
     }
-};
+});
 
 function init(meta) {
     Convenience.initTranslations();


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