gnome-shell r124 - trunk/js/ui



Author: danw
Date: Mon Dec 15 20:48:59 2008
New Revision: 124
URL: http://svn.gnome.org/viewvc/gnome-shell?rev=124&view=rev

Log:
Make the workspaces view a temporary "widget", rather than having it always
around


Modified:
   trunk/js/ui/overlay.js
   trunk/js/ui/workspaces.js

Modified: trunk/js/ui/overlay.js
==============================================================================
--- trunk/js/ui/overlay.js	(original)
+++ trunk/js/ui/overlay.js	Mon Dec 15 20:48:59 2008
@@ -121,9 +121,6 @@
 
     show: function() {
           this._appDisplay.show();
-    },
-
-    hide: function() {
     }
 };
 Signals.addSignalMethods(Sideshow.prototype);
@@ -155,11 +152,6 @@
         // TODO - recalculate everything when desktop size changes
         this._recalculateSize();
 
-        this._workspaces = new Workspaces.Workspaces(
-            this._workspaceGridX, this._workspaceGridY,
-            this._workspaceGridWidth, this._workspaceGridHeight);
-        this._group.add_actor(this._workspaces._group);
-
         this._sideshow = new Sideshow(this._group, this._workspaceGridX - 10);
         this._sideshow.connect('activated', function(sideshow) {
             // TODO - have some sort of animation/effect while
@@ -192,8 +184,12 @@
         this._recalculateSize();
 
         this._sideshow.show();
-        this._workspaces.show();
-        this._workspaces._group.raise_top();
+
+        this._workspaces = new Workspaces.Workspaces(
+            this._workspaceGridX, this._workspaceGridY,
+            this._workspaceGridWidth, this._workspaceGridHeight);
+        this._group.add_actor(this._workspaces.actor);
+        this._workspaces.actor.raise_top();
 
         // All the the actors in the window group are completely obscured,
         // hiding the group holding them while the overlay is displayed greatly
@@ -211,7 +207,6 @@
             return;
 
         this._workspaces.hide();
-        this._sideshow.hide();
 
         // Dummy tween, just waiting for the workspace animation
         Tweener.addTween(this,
@@ -220,15 +215,16 @@
                            onCompleteScope: this
                          });
     },
-    
+
     _hideDone: function() {
         let global = Shell.Global.get();
 
         this.visible = false;
         global.window_group.show();
-        this._group.lower_bottom();
         this._group.hide();
-        this._workspaces.hideDone();
+
+        this._workspaces.destroy();
+        this._workspaces = null;
     },
 
     _deactivate : function() {

Modified: trunk/js/ui/workspaces.js
==============================================================================
--- trunk/js/ui/workspaces.js	(original)
+++ trunk/js/ui/workspaces.js	Mon Dec 15 20:48:59 2008
@@ -35,19 +35,15 @@
 
 Workspaces.prototype = {
     _init : function(x, y, width, height) {
-
-        this._group = new Clutter.Group();
+        this.actor = new Clutter.Group();
 
         this._x = x;
         this._y = y;
         this._width = width;
         this._height = height;
         this._workspaces = [];
-    },
 
-    show : function() {
         let global = Shell.Global.get();
-
         let windows = global.get_windows();
         let activeWorkspace = global.screen.get_active_workspace_index();
 
@@ -57,7 +53,7 @@
         this._workspaces = [];
         for (let w = 0; w < global.screen.n_workspaces; w++) {
             this._workspaces[w] = new Clutter.Group();
-            this._group.add_actor(this._workspaces[w]);
+            this.actor.add_actor(this._workspaces[w]);
         }
         this._createDesktopActors(windows);
 
@@ -146,8 +142,8 @@
                              });
         }
     },
-    
-    hideDone : function() {
+
+    destroy : function() {
         for (let w = 0; w < this._workspaces.length; w++) {
             this._workspaces[w].destroy();
         }



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