gnome-shell-extensions/more-ws-previews-0008-workspace-indicator-Don-t-use-SCHEMA-KEY-constants.patch
Florian Müllner e6414d8afc
Re-apply downstream patches
Re-apply rebased and updated version of the RHEL 9 downstream
patches, with some exceptions:

Branding is still TBD, so has been left out for now.

The desktop-icons extension will be replaced by an upstreamed
version of desktop-icons-ng, which is still work-in-progress.

Both dash-to-dock and dash-to-panel will be moved to separate
packages, based on the existing Fedora package.

It was decided to drop the panel-favorites and updates-dialog
extensions.

Resolves: RHEL-34255
2024-05-15 02:56:19 +02:00

48 lines
1.9 KiB
Diff

From c343e1d65ddc538972640e7da86429cbd4cf2829 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
Date: Wed, 21 Feb 2024 15:58:39 +0100
Subject: [PATCH 08/28] workspace-indicator: Don't use SCHEMA/KEY constants
Each constant is only used once, so all they do is disconnect
the actual value from the code that uses it.
The copy in the window-list extension just uses the strings directly,
do the same here.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/307>
---
extensions/workspace-indicator/workspaceIndicator.js | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/extensions/workspace-indicator/workspaceIndicator.js b/extensions/workspace-indicator/workspaceIndicator.js
index cdcc67fe..fe54b95c 100644
--- a/extensions/workspace-indicator/workspaceIndicator.js
+++ b/extensions/workspace-indicator/workspaceIndicator.js
@@ -17,9 +17,6 @@ import * as Main from 'resource:///org/gnome/shell/ui/main.js';
import * as PanelMenu from 'resource:///org/gnome/shell/ui/panelMenu.js';
import * as PopupMenu from 'resource:///org/gnome/shell/ui/popupMenu.js';
-const WORKSPACE_SCHEMA = 'org.gnome.desktop.wm.preferences';
-const WORKSPACE_KEY = 'workspace-names';
-
const TOOLTIP_OFFSET = 6;
const TOOLTIP_ANIMATION_TIME = 150;
@@ -310,9 +307,10 @@ export class WorkspaceIndicator extends PanelMenu.Button {
this._updateThumbnails();
this._updateThumbnailVisibility();
- this._settings = new Gio.Settings({schema_id: WORKSPACE_SCHEMA});
- this._settings.connectObject(`changed::${WORKSPACE_KEY}`,
- this._updateMenuLabels.bind(this), this);
+ const desktopSettings =
+ new Gio.Settings({schema_id: 'org.gnome.desktop.wm.preferences'});
+ desktopSettings.connectObject('changed::workspace-names',
+ () => this._updateMenuLabels(), this);
}
_onDestroy() {
--
2.44.0