[gnome-shell/wip/re-search-v2: 29/33] overview, viewSelector: show/hide workspaces and message tray on apps button
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/re-search-v2: 29/33] overview, viewSelector: show/hide workspaces and message tray on apps button
- Date: Mon, 3 Dec 2012 09:58:03 +0000 (UTC)
commit 816f44a44c97b562825d8593acb08d35d0871b81
Author: Tanner Doshier <doshitan gmail com>
Date: Wed Oct 10 22:17:41 2012 -0500
overview, viewSelector: show/hide workspaces and message tray on apps button
js/ui/overview.js | 19 +++++++++++++++----
js/ui/viewSelector.js | 6 ++++++
2 files changed, 21 insertions(+), 4 deletions(-)
---
diff --git a/js/ui/overview.js b/js/ui/overview.js
index 990dc01..5fba3fa 100644
--- a/js/ui/overview.js
+++ b/js/ui/overview.js
@@ -272,6 +272,10 @@ const Overview = new Lang.Class({
function(viewSelector, active) {
this._setSideControlsVisibility(!active);
}));
+ this._viewSelector.connect('apps-active-changed', Lang.bind(this,
+ function(viewSelector, active) {
+ this._setSideControlsVisibility(!active);
+ }));
this.connect('item-drag-begin', Lang.bind(this,
function() {
@@ -279,13 +283,15 @@ const Overview = new Lang.Class({
}));
this.connect('item-drag-cancelled', Lang.bind(this,
function() {
- if (this._viewSelector.getSearchActive()) {
+ if (this._viewSelector.getSearchActive() ||
+ this._viewSelector.getAppsActive()) {
this._setSideControlsVisibility(false);
}
}));
this.connect('item-drag-end', Lang.bind(this,
function() {
- if (this._viewSelector.getSearchActive()) {
+ if (this._viewSelector.getSearchActive() ||
+ this._viewSelector.getAppsActive()) {
this._setSideControlsVisibility(false);
}
}));
@@ -302,14 +308,19 @@ const Overview = new Lang.Class({
if (!this.visible || this.animationInProgress)
return;
+ let searchActive = this._viewSelector.getSearchActive();
+
if (visible) {
this._dash.show();
this._thumbnailsBox.show();
Main.messageTray.show();
} else {
- this._dash.hide();
+ if (searchActive) {
+ this._dash.hide();
+ Main.messageTray.hide();
+ }
+
this._thumbnailsBox.hide();
- Main.messageTray.hide();
}
},
diff --git a/js/ui/viewSelector.js b/js/ui/viewSelector.js
index 0f640de..238af97 100644
--- a/js/ui/viewSelector.js
+++ b/js/ui/viewSelector.js
@@ -222,6 +222,8 @@ const ViewSelector = new Lang.Class({
},
_onShowAppsButtonToggled: function() {
+ this.emit('apps-active-changed', this._showAppsButton.checked);
+
if (this._searchActive)
this.reset();
else
@@ -460,6 +462,10 @@ const ViewSelector = new Lang.Class({
return this._searchActive;
},
+ getAppsActive: function() {
+ return this._showAppsButton.checked;
+ },
+
addSearchProvider: function(provider) {
if (!this._shouldUseSearchProvider(provider))
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]