overview: Make the dash public

In order to enable components other than Overview to read the
dash's iconSize, make the dash a public property of the overview.

https://bugzilla.gnome.org/show_bug.cgi?id=639428
This commit is contained in:
Florian Müllner 2011-02-10 16:02:09 +01:00
parent 1d77914316
commit 2f3e47b586

View File

@ -168,10 +168,10 @@ Overview.prototype = {
this.viewSelector.addSearchProvider(new DocDisplay.DocSearchProvider()); this.viewSelector.addSearchProvider(new DocDisplay.DocSearchProvider());
// TODO - recalculate everything when desktop size changes // TODO - recalculate everything when desktop size changes
this._dash = new Dash.Dash(); this.dash = new Dash.Dash();
this._group.add_actor(this._dash.actor); this._group.add_actor(this.dash.actor);
this._dash.actor.add_constraint(this.viewSelector.constrainY); this.dash.actor.add_constraint(this.viewSelector.constrainY);
this._dash.actor.add_constraint(this.viewSelector.constrainHeight); this.dash.actor.add_constraint(this.viewSelector.constrainHeight);
this._coverPane.hide(); this._coverPane.hide();
@ -439,12 +439,12 @@ Overview.prototype = {
// Set the dash's x position - y is handled by a constraint // Set the dash's x position - y is handled by a constraint
let dashX; let dashX;
if (rtl) { if (rtl) {
this._dash.actor.set_anchor_point_from_gravity(Clutter.Gravity.NORTH_EAST); this.dash.actor.set_anchor_point_from_gravity(Clutter.Gravity.NORTH_EAST);
dashX = primary.width; dashX = primary.width;
} else { } else {
dashX = 0; dashX = 0;
} }
this._dash.actor.set_x(dashX); this.dash.actor.set_x(dashX);
this.viewSelector.actor.set_position(viewX, viewY); this.viewSelector.actor.set_position(viewX, viewY);
this.viewSelector.actor.set_size(viewWidth, viewHeight); this.viewSelector.actor.set_size(viewWidth, viewHeight);
@ -530,7 +530,7 @@ Overview.prototype = {
this.viewSelector.show(); this.viewSelector.show();
this._workspacesDisplay.show(); this._workspacesDisplay.show();
this._dash.show(); this.dash.show();
this.workspaces = this._workspacesDisplay.workspacesView; this.workspaces = this._workspacesDisplay.workspacesView;
global.overlay_group.add_actor(this.workspaces.actor); global.overlay_group.add_actor(this.workspaces.actor);
@ -656,20 +656,20 @@ Overview.prototype = {
if (this._shown) { if (this._shown) {
if (!this._modal) { if (!this._modal) {
if (Main.pushModal(this._dash.actor)) if (Main.pushModal(this.dash.actor))
this._modal = true; this._modal = true;
else else
this.hide(); this.hide();
} }
} else if (this._shownTemporarily) { } else if (this._shownTemporarily) {
if (this._modal) { if (this._modal) {
Main.popModal(this._dash.actor); Main.popModal(this.dash.actor);
this._modal = false; this._modal = false;
} }
global.stage_input_mode = Shell.StageInputMode.FULLSCREEN; global.stage_input_mode = Shell.StageInputMode.FULLSCREEN;
} else { } else {
if (this._modal) { if (this._modal) {
Main.popModal(this._dash.actor); Main.popModal(this.dash.actor);
this._modal = false; this._modal = false;
} }
else if (global.stage_input_mode == Shell.StageInputMode.FULLSCREEN) else if (global.stage_input_mode == Shell.StageInputMode.FULLSCREEN)
@ -744,7 +744,7 @@ Overview.prototype = {
this._workspacesDisplay.hide(); this._workspacesDisplay.hide();
this.viewSelector.hide(); this.viewSelector.hide();
this._dash.hide(); this.dash.hide();
this._desktopFade.hide(); this._desktopFade.hide();
this._background.hide(); this._background.hide();