[gnome-shell-extensions] window-list: Replace removed Clutter.BoxLayout method



commit aeaba3f379cf6193c963bd024171036f55d638b6
Author: Florian Müllner <fmuellner gnome org>
Date:   Thu May 28 02:32:57 2020 +0200

    window-list: Replace removed Clutter.BoxLayout method
    
    The method was deprecated for years and has finally been removed.
    Just set appropriate expand/align properties on the children and
    add them with the usual add_child() method.
    
    https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/122

 extensions/window-list/extension.js | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)
---
diff --git a/extensions/window-list/extension.js b/extensions/window-list/extension.js
index e04a040..523ffb2 100644
--- a/extensions/window-list/extension.js
+++ b/extensions/window-list/extension.js
@@ -221,6 +221,7 @@ const BaseButton = GObject.registerClass({
         super._init({
             style_class: 'window-button',
             can_focus: true,
+            x_expand: true,
             button_mask: St.ButtonMask.ONE | St.ButtonMask.THREE,
         });
 
@@ -936,10 +937,7 @@ class WindowList extends St.Widget {
         let button = new AppButton(app, this._perMonitor, this._monitor.index);
         this._settings.bind('display-all-workspaces',
             button, 'ignore-workspace', Gio.SettingsBindFlags.GET);
-        this._windowList.layout_manager.pack(button,
-            true, true, true,
-            Clutter.BoxAlignment.START,
-            Clutter.BoxAlignment.START);
+        this._windowList.add_child(button);
     }
 
     _removeApp(app) {
@@ -966,10 +964,7 @@ class WindowList extends St.Widget {
         let button = new WindowButton(win, this._perMonitor, this._monitor.index);
         this._settings.bind('display-all-workspaces',
             button, 'ignore-workspace', Gio.SettingsBindFlags.GET);
-        this._windowList.layout_manager.pack(button,
-            true, true, true,
-            Clutter.BoxAlignment.START,
-            Clutter.BoxAlignment.START);
+        this._windowList.add_child(button);
     }
 
     _onWindowRemoved(ws, win) {


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