[gnome-shell] overview: Make viewSelector private
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] overview: Make viewSelector private
- Date: Mon, 29 Aug 2011 16:24:21 +0000 (UTC)
commit 80a9d2e7c9f1ebc3bed6ae6356ff1675a7c9ef62
Author: Ray Strode <rstrode redhat com>
Date: Sun Aug 28 09:29:51 2011 -0400
overview: Make viewSelector private
It's only used internally by the overview itself,
and by some performance testing code, so don't
expose it as a public object.
https://bugzilla.gnome.org/show_bug.cgi?id=657082
js/perf/core.js | 4 ++--
js/ui/overview.js | 24 ++++++++++++------------
2 files changed, 14 insertions(+), 14 deletions(-)
---
diff --git a/js/perf/core.js b/js/perf/core.js
index 7d141a2..4fb4fab 100644
--- a/js/perf/core.js
+++ b/js/perf/core.js
@@ -113,10 +113,10 @@ function run() {
for (let i = 0; i < 2; i++) {
Scripting.scriptEvent('applicationsShowStart');
- Main.overview.viewSelector.switchTab('applications');
+ Main.overview._viewSelector.switchTab('applications');
yield Scripting.waitLeisure();
Scripting.scriptEvent('applicationsShowDone');
- Main.overview.viewSelector.switchTab('windows');
+ Main.overview._viewSelector.switchTab('windows');
yield Scripting.waitLeisure();
}
}
diff --git a/js/ui/overview.js b/js/ui/overview.js
index 8f33efa..4f3d102 100644
--- a/js/ui/overview.js
+++ b/js/ui/overview.js
@@ -177,26 +177,26 @@ Overview.prototype = {
init: function() {
this.shellInfo = new ShellInfo();
- this.viewSelector = new ViewSelector.ViewSelector();
- this._group.add_actor(this.viewSelector.actor);
+ this._viewSelector = new ViewSelector.ViewSelector();
+ this._group.add_actor(this._viewSelector.actor);
this._workspacesDisplay = new WorkspacesView.WorkspacesDisplay();
- this.viewSelector.addViewTab('windows', _("Windows"), this._workspacesDisplay.actor, 'text-x-generic');
+ this._viewSelector.addViewTab('windows', _("Windows"), this._workspacesDisplay.actor, 'text-x-generic');
let appView = new AppDisplay.AllAppDisplay();
- this.viewSelector.addViewTab('applications', _("Applications"), appView.actor, 'system-run');
+ this._viewSelector.addViewTab('applications', _("Applications"), appView.actor, 'system-run');
// Default search providers
- this.viewSelector.addSearchProvider(new AppDisplay.AppSearchProvider());
- this.viewSelector.addSearchProvider(new AppDisplay.SettingsSearchProvider());
- this.viewSelector.addSearchProvider(new PlaceDisplay.PlaceSearchProvider());
- this.viewSelector.addSearchProvider(new DocDisplay.DocSearchProvider());
+ this._viewSelector.addSearchProvider(new AppDisplay.AppSearchProvider());
+ this._viewSelector.addSearchProvider(new AppDisplay.SettingsSearchProvider());
+ this._viewSelector.addSearchProvider(new PlaceDisplay.PlaceSearchProvider());
+ this._viewSelector.addSearchProvider(new DocDisplay.DocSearchProvider());
// 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.dash.actor.add_constraint(this._viewSelector.constrainY);
+ this.dash.actor.add_constraint(this._viewSelector.constrainHeight);
// Translators: this is the name of the dock/favorites area on
// the left of the overview
@@ -474,8 +474,8 @@ Overview.prototype = {
}
this.dash.actor.set_x(dashX);
- this.viewSelector.actor.set_position(viewX, viewY);
- this.viewSelector.actor.set_size(viewWidth, viewHeight);
+ this._viewSelector.actor.set_position(viewX, viewY);
+ this._viewSelector.actor.set_size(viewWidth, viewHeight);
},
//// Public methods ////
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]