overview: set side controls visibility on view page change

For now use the same behavior as before - hide the workspace thumbnails
when showing the applications page.

https://bugzilla.gnome.org/show_bug.cgi?id=682050
This commit is contained in:
Cosimo Cecchi 2013-01-24 16:34:06 -05:00
parent 4016da6632
commit 5b39496008

View File

@ -257,10 +257,32 @@ const Overview = new Lang.Class({
y_fill: true });
this._overview.add_actor(this._messageTrayGhost);
this._viewSelector.connect('page-changed', Lang.bind(this,
function() {
this._setSideControlsVisibility();
}));
Main.layoutManager.connect('monitors-changed', Lang.bind(this, this._relayout));
this._relayout();
},
_setSideControlsVisibility: function() {
// Ignore the case when we're leaving the overview, since
// actors will be made visible again when entering the overview
// next time, and animating them while doing so is just
// unnecesary noise
if (!this.visible || this._hideInProgress)
return;
let activePage = this._viewSelector.getActivePage();
let thumbnailsVisible = (activePage == ViewSelector.ViewPage.WINDOWS);
if (thumbnailsVisible)
this._thumbnailsSlider.slideIn();
else
this._thumbnailsSlider.slideOut();
},
addSearchProvider: function(provider) {
this._viewSelector.addSearchProvider(provider);
},