[gnome-shell-extensions] window-list: Use notify::n-workspaces to recreate workspace menu



commit f38d61b4c9a8847a8a2ca4dea99a7a064238ee02
Author: Florian Müllner <fmuellner gnome org>
Date:   Tue Apr 30 20:28:01 2013 +0200

    window-list: Use notify::n-workspaces to recreate workspace menu
    
    When the number of workspaces changes, we clear the existing menu
    and recreate it based on the screen::n-workspaces property, so it
    is slightly more correct to track changes to the property directly
    instead of using the workspace-added/workspace-removed signals.
    This change also fixes a corner case, where changes to the property
    before workspaces are initialized are missed and we end up with the
    wrong number of workspaces.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=699350

 extensions/window-list/extension.js |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/extensions/window-list/extension.js b/extensions/window-list/extension.js
index 425d1c8..d5ac261 100644
--- a/extensions/window-list/extension.js
+++ b/extensions/window-list/extension.js
@@ -390,8 +390,7 @@ const WorkspaceIndicator = new Lang.Class({
         this.workspacesItems = [];
 
         this._screenSignals = [];
-        this._screenSignals.push(global.screen.connect_after('workspace-added', 
Lang.bind(this,this._updateMenu)));
-        this._screenSignals.push(global.screen.connect_after('workspace-removed', 
Lang.bind(this,this._updateMenu)));
+        this._screenSignals.push(global.screen.connect('notify::n-workspaces', 
Lang.bind(this,this._updateMenu)));
         this._screenSignals.push(global.screen.connect_after('workspace-switched', 
Lang.bind(this,this._updateIndicator)));
 
         this.actor.connect('scroll-event', Lang.bind(this, this._onScrollEvent));


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