[gnome-shell/wip/swarm: 6/14] viewSelector: use afirmative booleans
- From: Carlos Soriano <csoriano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/swarm: 6/14] viewSelector: use afirmative booleans
- Date: Tue, 17 Jun 2014 19:33:31 +0000 (UTC)
commit e741f38294c8794ff2869486749c475c25c246a6
Author: Carlos Soriano <carlos soriano89 gmail com>
Date: Mon Jun 16 16:17:42 2014 +0200
viewSelector: use afirmative booleans
js/ui/viewSelector.js | 18 ++++++++++--------
1 files changed, 10 insertions(+), 8 deletions(-)
---
diff --git a/js/ui/viewSelector.js b/js/ui/viewSelector.js
index bc157dc..3ce8c3a 100644
--- a/js/ui/viewSelector.js
+++ b/js/ui/viewSelector.js
@@ -162,7 +162,7 @@ const ViewSelector = new Lang.Class({
this._workspacesDisplay.show();
this._activePage = null;
- this._showPage(this._workspacesPage);
+ this._showPage(this._workspacesPage, true);
if (!this._workspacesDisplay.activeWorkspaceHasMaximizedWindows())
Main.overview.fadeOutDesktop();
@@ -220,7 +220,7 @@ const ViewSelector = new Lang.Class({
});
},
- _showPage: function(page, noFade) {
+ _showPage: function(page, animateOut) {
if (page == this._activePage)
return;
@@ -228,7 +228,7 @@ const ViewSelector = new Lang.Class({
this._activePage = page;
this.emit('page-changed');
- if (oldPage && !noFade)
+ if (oldPage && animateOut)
Tweener.addTween(oldPage,
{ opacity: 0,
time: OverviewControls.SIDE_CONTROLS_ANIMATION_TIME,
@@ -252,7 +252,8 @@ const ViewSelector = new Lang.Class({
return;
this._showPage(this._showAppsButton.checked ?
- this._appsPage : this._workspacesPage);
+ this._appsPage : this._workspacesPage,
+ true);
},
_resetShowAppsButton: function() {
@@ -260,7 +261,7 @@ const ViewSelector = new Lang.Class({
this._showAppsButton.checked = false;
this._showAppsBlocked = false;
- this._showPage(this._workspacesPage, true);
+ this._showPage(this._workspacesPage, false);
},
_onStageKeyPress: function(actor, event) {
@@ -295,8 +296,9 @@ const ViewSelector = new Lang.Class({
},
_searchCancelled: function() {
- this._showPage(this._showAppsButton.checked ? this._appsPage
- : this._workspacesPage);
+ this._showPage(this._showAppsButton.checked ?
+ this._appsPage : this._workspacesPage,
+ true);
// Leave the entry focused when it doesn't have any text;
// when replacing a selected search term, Clutter emits
@@ -470,7 +472,7 @@ const ViewSelector = new Lang.Class({
let terms = getTermsForSearchString(this._entry.get_text());
this._searchResults.setTerms(terms);
- this._showPage(this._searchPage);
+ this._showPage(this._searchPage, true);
return GLib.SOURCE_REMOVE;
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]