viewSelector: Hook up the dash's showApps button

We pass the dash’s showApps button to the viewSelector, and we connect it
to the showing and hiding of the appsView. This is necessary because there
are different mechanisms for switching the views, and it has to stay in
sync with the button’s state.

https://bugzilla.gnome.org/show_bug.cgi?id=682109
This commit is contained in:
Joost Verdoorn
2012-07-22 14:45:53 +02:00
committed by Florian Müllner
parent 27fbe4cd83
commit 816a29d582
3 changed files with 29 additions and 18 deletions

View File

@ -195,12 +195,13 @@ const Overview = new Lang.Class({
can_focus: true });
this._group.add_actor(this._searchEntry);
this._viewSelector = new ViewSelector.ViewSelector(this._searchEntry);
this._dash = new Dash.Dash();
this._viewSelector = new ViewSelector.ViewSelector(this._searchEntry,
this._dash.showAppsButton);
this._group.add_actor(this._viewSelector.actor);
this._group.add_actor(this._dash.actor);
// TODO - recalculate everything when desktop size changes
this._dash = new Dash.Dash();
this._group.add_actor(this._dash.actor);
this._dash.actor.add_constraint(this._viewSelector.constrainY);
this._dash.actor.add_constraint(this._viewSelector.constrainHeight);
this.dashIconSize = this._dash.iconSize;