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.
This commit is contained in:
Siegfried-Angel Gevatter Pujals 2009-07-31 16:08:39 +02:00
parent f7fff83647
commit 0a1aac862f

View File

@ -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();