[gnome-shell] Fix details pane repositioning



commit 0a1aac862f0f7943843e621a11c2f579bfaac647
Author: Siegfried-Angel Gevatter Pujals <rainct ubuntu com>
Date:   Fri Jul 31 16:08:39 2009 +0200

    Fix details pane repositioning
    
    Two calls to _repositionDetails() were done too early,
    before the visibility of the results pane had changed,
    so they had no effect. Thus when a search was done while
    a details pane was active, the pane with the results was
    hidden by the details pane.
    
    In addition to fixing this, move the two remaining calls to
    the line after changing the results pane's visibility
    to make it clearer why the calls are there.

 js/ui/overlay.js |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/js/ui/overlay.js b/js/ui/overlay.js
index 2741040..b2156af 100644
--- a/js/ui/overlay.js
+++ b/js/ui/overlay.js
@@ -583,9 +583,9 @@ Dash.prototype = {
         this._resultsAppsSection.display.show();
         this._resultsPane.append(this._resultsAppsSection.actor, Big.BoxPackFlags.EXPAND);
         this._resultsPane.show();
+        this._repositionDetails();
 
         this._moreAppsLink.setText("Less...");
-        this._repositionDetails();
         this.emit('panes-displayed');
     },
 
@@ -617,11 +617,10 @@ Dash.prototype = {
         this._resultsDocsSection.display.show();
         this._resultsPane.append(this._resultsDocsSection.actor, Big.BoxPackFlags.EXPAND);
         this._resultsPane.show();
+        this._repositionDetails();
 
         this._moreDocsLink.setText("Less...");
 
-        this._repositionDetails();
-
         this.emit('panes-displayed');
     },
 
@@ -642,7 +641,6 @@ Dash.prototype = {
     },
 
     _setSearchMode: function() {
-        this._repositionDetails();
 
         if (this._resultsShowing())
             return;
@@ -656,17 +654,18 @@ Dash.prototype = {
         this._resultsPane.append(this._resultsDocsSection.actor, Big.BoxPackFlags.EXPAND);
 
         this._resultsPane.show();
+        this._repositionDetails();
 
         this.emit('panes-displayed');
     },
 
     _unsetSearchMode: function() {
-        this._repositionDetails();
 
         if (this._moreDocsMode || this._moreAppsMode || !this._resultsShowing())
             return;
 
         this._resultsPane.hide();
+        this._repositionDetails();
 
         this._resultsPane.remove_actor(this._resultsAppsSection.actor);
         this._resultsAppsSection.display.hide();



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