From aeaba3f379cf6193c963bd024171036f55d638b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Thu, 28 May 2020 02:32:57 +0200 Subject: [PATCH] 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 e04a0408..523ffb2f 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) {