[gnome-shell-extensions/wip/rstrode/heads-up-display: 30/62] window-list: Minor cleanup
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell-extensions/wip/rstrode/heads-up-display: 30/62] window-list: Minor cleanup
- Date: Thu, 26 Aug 2021 19:31:31 +0000 (UTC)
commit bc153077628a93e89cc1b04ca42eae4d804e1435
Author: Florian Müllner <fmuellner gnome org>
Date: Wed Jun 5 04:59:19 2019 +0200
window-list: Minor cleanup
Mutter has a dedicated method for getting the index of the active
workspace, use that instead of getting first the active workspace
and then its index.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/merge_requests/70
extensions/window-list/workspaceIndicator.js | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/extensions/window-list/workspaceIndicator.js b/extensions/window-list/workspaceIndicator.js
index 9d05133..0d3ba48 100644
--- a/extensions/window-list/workspaceIndicator.js
+++ b/extensions/window-list/workspaceIndicator.js
@@ -25,7 +25,7 @@ var WorkspaceIndicator = GObject.registerClass({
let workspaceManager = global.workspace_manager;
- this._currentWorkspace = workspaceManager.get_active_workspace().index();
+ this._currentWorkspace = workspaceManager.get_active_workspace_index();
this._statusLabel = new St.Label({
text: this._getStatusText(),
x_align: Clutter.ActorAlign.CENTER,
@@ -64,7 +64,7 @@ var WorkspaceIndicator = GObject.registerClass({
_updateIndicator() {
this._workspacesItems[this._currentWorkspace].setOrnament(PopupMenu.Ornament.NONE);
- this._currentWorkspace = global.workspace_manager.get_active_workspace().index();
+ this._currentWorkspace = global.workspace_manager.get_active_workspace_index();
this._workspacesItems[this._currentWorkspace].setOrnament(PopupMenu.Ornament.DOT);
this._statusLabel.set_text(this._getStatusText());
@@ -72,7 +72,7 @@ var WorkspaceIndicator = GObject.registerClass({
_getStatusText() {
let workspaceManager = global.workspace_manager;
- let current = workspaceManager.get_active_workspace().index();
+ let current = workspaceManager.get_active_workspace_index();
let total = workspaceManager.n_workspaces;
return '%d / %d'.format(current + 1, total);
@@ -91,7 +91,7 @@ var WorkspaceIndicator = GObject.registerClass({
this.menu.removeAll();
this._workspacesItems = [];
- this._currentWorkspace = workspaceManager.get_active_workspace().index();
+ this._currentWorkspace = workspaceManager.get_active_workspace_index();
for (let i = 0; i < workspaceManager.n_workspaces; i++) {
let name = Meta.prefs_get_workspace_name(i);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]