From 89276cc1845ae7f02cf5d523cd31d3d93b4bb6b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Wed, 25 Sep 2024 03:36:08 +0200 Subject: [PATCH 01/13] window-list: Small stylesheet cleanup The light stylesheet duplicates some declarations, and the last occurrence matches what we already inherit from the dark stylesheet. Part-of: (cherry picked from commit 860c56f83ed314c4994ab0c089466a552850b57b) --- extensions/window-list/stylesheet-light.css | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/extensions/window-list/stylesheet-light.css b/extensions/window-list/stylesheet-light.css index 375fd1bf..f9c51f8e 100644 --- a/extensions/window-list/stylesheet-light.css +++ b/extensions/window-list/stylesheet-light.css @@ -21,21 +21,11 @@ text-shadow: none; } - .bottom-panel .window-button > StWidget { - -st-natural-width: 18.7em; - max-width: 18.75em; - } - .window-button > StWidget { color: #000; background-color: transparent; } -.window-button > StWidget { - -st-natural-width: 18.75em; - max-width: 18.75em; -} - .window-button:hover > StWidget { background-color: st-darken(#eee,5%); } From 4da312040be270d4d27926a7a9059caaab1e8243 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Wed, 25 Sep 2024 02:14:47 +0200 Subject: [PATCH 02/13] window-list: Don't recreate icons on theme changes All icons use `StIcon`, which already updates itself correctly on icon theme changes. Part-of: (cherry picked from commit d43abe0869c19e6902debd7c3f12b337cb7290b3) --- extensions/window-list/extension.js | 9 --------- 1 file changed, 9 deletions(-) diff --git a/extensions/window-list/extension.js b/extensions/window-list/extension.js index 3edbf8bf..9441fad1 100644 --- a/extensions/window-list/extension.js +++ b/extensions/window-list/extension.js @@ -125,10 +125,6 @@ class WindowTitle extends St.BoxLayout { this.label_actor.clutter_text.single_line_mode = true; this.add_child(this.label_actor); - this._textureCache = St.TextureCache.get_default(); - this._textureCache.connectObject('icon-theme-changed', - () => this._updateIcon(), this); - this._metaWindow.connectObject( 'notify::wm-class', () => this._updateIcon(), GObject.ConnectFlags.AFTER, @@ -591,11 +587,6 @@ class AppButton extends BaseButton { this._appContextMenu.actor.hide(); Main.uiGroup.add_child(this._appContextMenu.actor); - this._textureCache = St.TextureCache.get_default(); - this._textureCache.connectObject('icon-theme-changed', () => { - this._icon.child = app.create_icon_texture(ICON_TEXTURE_SIZE); - }, this); - this.app.connectObject('windows-changed', () => this._windowsChanged(), this); this._windowsChanged(); From 6d3fbceec91e719ad5086458ea2f7a0f3eeaec6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Sat, 28 Sep 2024 04:54:18 +0200 Subject: [PATCH 03/13] classic: Add missing top bar indicators The only intended difference from the regular session is that the date menu moves to the right. However in the meantime, gnome-shell added a couple more (usually hidden) indicators, but we never updated the session mode definition. Part-of: (cherry picked from commit 81aade66592fbb14a05bfefd8b71cc6f9a9f9261) --- data/classic.json.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/classic.json.in b/data/classic.json.in index ef003e36..cbafdba2 100644 --- a/data/classic.json.in +++ b/data/classic.json.in @@ -5,6 +5,6 @@ "enabledExtensions": [@CLASSIC_EXTENSIONS@], "panel": { "left": ["activities"], "center": [], - "right": ["a11y", "keyboard", "dateMenu", "quickSettings"] + "right": ["screenRecording", "screenSharing", "dwellClick", "a11y", "keyboard", "dateMenu", "quickSettings"] } } From fb2d87c1da8394e91f3ae240006fe1ee60e26c63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Mon, 7 Oct 2024 17:22:04 +0200 Subject: [PATCH 04/13] window-list: Fix minimized styling Commit 039c66e7b7c wrapped the button in a container to animate transitions, but didn't adjust the `.minimized` styling to still apply to the button (where it is expected) rather than the wrapper. Fix this just like commit c72b8b21 did for the `.focused` styling. Part-of: (cherry picked from commit 28fd210f2828ff16afe7fa202de4183f3d998b93) --- extensions/window-list/extension.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/window-list/extension.js b/extensions/window-list/extension.js index 9441fad1..7d76f57b 100644 --- a/extensions/window-list/extension.js +++ b/extensions/window-list/extension.js @@ -449,9 +449,9 @@ class WindowButton extends BaseButton { super._updateStyle(); if (this.metaWindow.minimized) - this.add_style_class_name('minimized'); + this._button.add_style_class_name('minimized'); else - this.remove_style_class_name('minimized'); + this._button.remove_style_class_name('minimized'); } _windowEnteredOrLeftMonitor(metaDisplay, monitorIndex, metaWindow) { From 3ef718d34c42a4f33eacbaa86549f7ac017bfe17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Mon, 7 Oct 2024 17:10:43 +0200 Subject: [PATCH 05/13] window-list: Fix active state Commit c72b8b21 fixed the styling of the active window's button, but missed that the `active` property uses the style information as well. Adjust it to use the correct actor when checking for the style class. Closes https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/issues/529 Part-of: (cherry picked from commit a5a92026ac0c58c6382c5d531bd069743bef4160) --- extensions/window-list/extension.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/window-list/extension.js b/extensions/window-list/extension.js index 7d76f57b..1a233d78 100644 --- a/extensions/window-list/extension.js +++ b/extensions/window-list/extension.js @@ -223,7 +223,7 @@ class BaseButton extends DashItemContainer { } get active() { - return this.has_style_class_name('focused'); + return this._button.has_style_class_name('focused'); } // eslint-disable-next-line camelcase From b3ff771a1de7572dfed3cfabf93e553d8ad253e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Tue, 1 Oct 2024 14:52:02 +0200 Subject: [PATCH 06/13] window-list: Add missing action Commit 24ba03fe9 added a new setting, but forgot to create the corresponding action. Part-of: (cherry picked from commit 062a3d21ab1f03082163daf799b137d519e48dbb) --- extensions/window-list/prefs.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/extensions/window-list/prefs.js b/extensions/window-list/prefs.js index 194d1f9d..5da645df 100644 --- a/extensions/window-list/prefs.js +++ b/extensions/window-list/prefs.js @@ -30,6 +30,8 @@ class WindowListPrefsWidget extends Adw.PreferencesPage { this._settings.create_action('show-on-all-monitors')); this._actionGroup.add_action( this._settings.create_action('display-all-workspaces')); + this._actionGroup.add_action( + this._settings.create_action('embed-previews')); const groupingGroup = new Adw.PreferencesGroup({ title: _('Window Grouping'), From f0bff952be2e1e26e00516c44057e3b6e35e68f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Tue, 1 Oct 2024 14:46:15 +0200 Subject: [PATCH 07/13] window-list: Remove superfluous bindings The setting is already bound to the switch via the corresponding action, no need to also set up a binding. In fact, the second binding is actively harmful, as it keeps the connection alive until dispose, so the setting is reset on garbage collection. Closes https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/issues/511 Part-of: (cherry picked from commit 0162644041f28b3065f2e878f600b3b1965c14d3) --- extensions/window-list/prefs.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/extensions/window-list/prefs.js b/extensions/window-list/prefs.js index 5da645df..cf56be5b 100644 --- a/extensions/window-list/prefs.js +++ b/extensions/window-list/prefs.js @@ -75,8 +75,6 @@ class WindowListPrefsWidget extends Adw.PreferencesPage { action_name: 'window-list.display-all-workspaces', valign: Gtk.Align.CENTER, }); - this._settings.bind('display-all-workspaces', - toggle, 'active', Gio.SettingsBindFlags.DEFAULT); row = new Adw.ActionRow({ title: _('Show windows from all workspaces'), activatable_widget: toggle, @@ -88,8 +86,6 @@ class WindowListPrefsWidget extends Adw.PreferencesPage { action_name: 'window-list.embed-previews', valign: Gtk.Align.CENTER, }); - this._settings.bind('embed-previews', - toggle, 'active', Gio.SettingsBindFlags.DEFAULT); row = new Adw.ActionRow({ title: _('Show workspace previews'), activatable_widget: toggle, From 87a849c5af64b2b6ed110f40c627aaa7265e266e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Tue, 1 Oct 2024 14:55:44 +0200 Subject: [PATCH 08/13] window-list: Switch to Adw.SwitchRow libadwaita fixed the actionable implementation of Adw.SwitchRow, so can use the convenience widget instead of composing our own. Part-of: (cherry picked from commit 548d7659e103cd7ebe882dff8a94ddd1fb30431d) --- extensions/window-list/prefs.js | 27 ++++++--------------------- 1 file changed, 6 insertions(+), 21 deletions(-) diff --git a/extensions/window-list/prefs.js b/extensions/window-list/prefs.js index cf56be5b..0633d590 100644 --- a/extensions/window-list/prefs.js +++ b/extensions/window-list/prefs.js @@ -60,37 +60,22 @@ class WindowListPrefsWidget extends Adw.PreferencesPage { const miscGroup = new Adw.PreferencesGroup(); this.add(miscGroup); - let toggle = new Gtk.Switch({ - action_name: 'window-list.show-on-all-monitors', - valign: Gtk.Align.CENTER, - }); - let row = new Adw.ActionRow({ + let row = new Adw.SwitchRow({ title: _('Show on all monitors'), - activatable_widget: toggle, + action_name: 'window-list.show-on-all-monitors', }); - row.add_suffix(toggle); miscGroup.add(row); - toggle = new Gtk.Switch({ - action_name: 'window-list.display-all-workspaces', - valign: Gtk.Align.CENTER, - }); - row = new Adw.ActionRow({ + row = new Adw.SwitchRow({ title: _('Show windows from all workspaces'), - activatable_widget: toggle, + action_name: 'window-list.display-all-workspaces', }); - row.add_suffix(toggle); miscGroup.add(row); - toggle = new Gtk.Switch({ - action_name: 'window-list.embed-previews', - valign: Gtk.Align.CENTER, - }); - row = new Adw.ActionRow({ + row = new Adw.SwitchRow({ title: _('Show workspace previews'), - activatable_widget: toggle, + action_name: 'window-list.embed-previews', }); - row.add_suffix(toggle); miscGroup.add(row); } } From 67cdd0bea2e5d529e33ac0dc7ace086dafb072b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Tue, 15 Oct 2024 17:48:52 +0200 Subject: [PATCH 09/13] window-list: Remove outdated style A long time ago, the window list used to embed the bottom message tray, which caused notifications to inherit the window-list's font style. Since that's no longer the case, we have no business in messing with notification styling, so stop doing that. Part-of: (cherry picked from commit f1671bc20624ad988bbb2f01ec2bae7b2868f3f3) --- extensions/window-list/stylesheet-dark.css | 4 ---- 1 file changed, 4 deletions(-) diff --git a/extensions/window-list/stylesheet-dark.css b/extensions/window-list/stylesheet-dark.css index b9087971..f02fca60 100644 --- a/extensions/window-list/stylesheet-dark.css +++ b/extensions/window-list/stylesheet-dark.css @@ -81,7 +81,3 @@ width: 24px; height: 24px; } - -.notification { - font-weight: normal; -} From b13984a752df56ece51f1a701280fba26a376f3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Wed, 16 Oct 2024 12:04:40 +0200 Subject: [PATCH 10/13] export-zips: Use --destdir instead of custom prefix meson skips some steps like schema compilation when DESTDIR is set, so this is slightly more efficient. Part-of: (cherry picked from commit 8f75ccae345bf79b00838c8d5be1f7c538058445) --- export-zips.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/export-zips.sh b/export-zips.sh index 2d7383c3..af0cb9a6 100755 --- a/export-zips.sh +++ b/export-zips.sh @@ -8,16 +8,16 @@ srcdir=`dirname $0` srcdir=`(cd $srcdir && pwd)` builddir=`mktemp -p $srcdir -d _build.XXXXXX` || exit 1 -installdir=`mktemp -p $srcdir -d _install.XXXXXX` || exit 1 +destdir=`mktemp -p $srcdir -d _dest.XXXXXX` || exit 1 -meson setup --prefix=$installdir -Dextension_set=all $srcdir $builddir -meson install -C $builddir +meson setup --prefix=/usr -Dextension_set=all $srcdir $builddir +meson install --destdir $destdir -C $builddir rm -rf $srcdir/zip-files mkdir $srcdir/zip-files -extensiondir=$installdir/share/gnome-shell/extensions -schemadir=$installdir/share/glib-2.0/schemas +extensiondir=$destdir/usr/share/gnome-shell/extensions +schemadir=$destdir/usr/share/glib-2.0/schemas for f in $extensiondir/*; do name=`basename ${f%%@*}` @@ -50,4 +50,4 @@ for f in $extensiondir/*; do done rm -rf $builddir -rm -rf $installdir +rm -rf $destdir From 099b2eeb49a2dff3fd6c8cbdd83df2c9c142f3d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Thu, 17 Oct 2024 22:52:17 +0200 Subject: [PATCH 11/13] cleanup: Use null for nick/blurb in ParamSpecs As they are only used by gstreamer for gst-inspect & other tools. Projects like mutter and gtk have already completely dropped them, so follow their lead. Part-of: (cherry picked from commit 46a4fa09761067f0b5027c7268726326b7c97d8c) --- extensions/auto-move-windows/prefs.js | 6 +++--- extensions/window-list/extension.js | 2 +- extensions/workspace-indicator/workspaceIndicator.js | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/extensions/auto-move-windows/prefs.js b/extensions/auto-move-windows/prefs.js index 10c14717..683bbdcc 100644 --- a/extensions/auto-move-windows/prefs.js +++ b/extensions/auto-move-windows/prefs.js @@ -45,11 +45,11 @@ class NewItemModel extends GObject.Object { class Rule extends GObject.Object { static [GObject.properties] = { 'app-info': GObject.ParamSpec.object( - 'app-info', 'app-info', 'app-info', + 'app-info', null, null, GObject.ParamFlags.READWRITE, Gio.DesktopAppInfo), 'workspace': GObject.ParamSpec.uint( - 'workspace', 'workspace', 'workspace', + 'workspace', null, null, GObject.ParamFlags.READWRITE, 1, WORKSPACE_MAX, 1), }; @@ -196,7 +196,7 @@ class AutoMoveSettingsWidget extends Adw.PreferencesGroup { class WorkspaceSelector extends Gtk.Widget { static [GObject.properties] = { 'number': GObject.ParamSpec.uint( - 'number', 'number', 'number', + 'number', null, null, GObject.ParamFlags.READWRITE, 1, WORKSPACE_MAX, 1), }; diff --git a/extensions/window-list/extension.js b/extensions/window-list/extension.js index 1a233d78..cd0a6d98 100644 --- a/extensions/window-list/extension.js +++ b/extensions/window-list/extension.js @@ -172,7 +172,7 @@ class BaseButton extends DashItemContainer { GTypeFlags: GObject.TypeFlags.ABSTRACT, Properties: { 'ignore-workspace': GObject.ParamSpec.boolean( - 'ignore-workspace', 'ignore-workspace', 'ignore-workspace', + 'ignore-workspace', null, null, GObject.ParamFlags.READWRITE, false), }, diff --git a/extensions/workspace-indicator/workspaceIndicator.js b/extensions/workspace-indicator/workspaceIndicator.js index 20d4caa2..18a8d4e9 100644 --- a/extensions/workspace-indicator/workspaceIndicator.js +++ b/extensions/workspace-indicator/workspaceIndicator.js @@ -113,11 +113,11 @@ class WorkspaceLayout extends Clutter.LayoutManager { class WorkspaceThumbnail extends St.Button { static [GObject.properties] = { 'active': GObject.ParamSpec.boolean( - 'active', '', '', + 'active', null, null, GObject.ParamFlags.READWRITE, false), 'show-label': GObject.ParamSpec.boolean( - 'show-label', '', '', + 'show-label', null, null, GObject.ParamFlags.READWRITE, false), }; @@ -311,7 +311,7 @@ class WorkspaceThumbnail extends St.Button { class WorkspacePreviews extends Clutter.Actor { static [GObject.properties] = { 'show-labels': GObject.ParamSpec.boolean( - 'show-labels', '', '', + 'show-labels', null, null, GObject.ParamFlags.READWRITE | GObject.ParamFlags.CONSTRUCT_ONLY, false), }; From 0bc77ef7c97f97cd7955a43496bdcd295e6f72dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Fri, 18 Oct 2024 17:29:27 +0200 Subject: [PATCH 12/13] build: Rename meson_options.txt to meson.options The name is a bit cleaner, and has been the preferred option(!) since meson 1.1. Mutter recently updated the name, so follow suite. The meson version bump shouldn't be an issue, given that several hard dependencies like mutter and glib already require higher versions. Part-of: (cherry picked from commit 10884351206dde4192685c4a5b35db91b712a648) --- meson.build | 2 +- meson_options.txt => meson.options | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename meson_options.txt => meson.options (100%) diff --git a/meson.build b/meson.build index 46adf6cf..efd69755 100644 --- a/meson.build +++ b/meson.build @@ -4,7 +4,7 @@ project('gnome-shell-extensions', version: '47.0', - meson_version: '>= 0.58.0', + meson_version: '>= 1.1.0', license: 'GPL2+' ) diff --git a/meson_options.txt b/meson.options similarity index 100% rename from meson_options.txt rename to meson.options From 9991f90804e1b09fb5d5346e2d067bc2b28e6ad4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Thu, 17 Oct 2024 22:49:17 +0200 Subject: [PATCH 13/13] Bump version to 47.1 Update NEWS. --- NEWS | 10 ++++++++++ meson.build | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 41c1f253..01235cf9 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,13 @@ +47.1 +==== +* classic: Add missing top-bar indicators [Florian; !339] +* window-list: Fix window state styling [Florian; !342] +* window-list: Fix "ignore-workspace" setting getting reset [Florian; !341] +* Misc. bug fixes and cleanups [Florian; !337, !338, !345, !347, !349] + +Contributors: + Florian Müllner + 47.0 ==== diff --git a/meson.build b/meson.build index efd69755..8609d9dd 100644 --- a/meson.build +++ b/meson.build @@ -3,7 +3,7 @@ # SPDX-License-Identifier: GPL-2.0-or-later project('gnome-shell-extensions', - version: '47.0', + version: '47.1', meson_version: '>= 1.1.0', license: 'GPL2+' )