[gnome-shell/wip/re-search: 42/48] viewSelector, overview: Add search signals and connect them to hide/show
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/re-search: 42/48] viewSelector, overview: Add search signals and connect them to hide/show
- Date: Thu, 11 Oct 2012 22:33:18 +0000 (UTC)
commit 54bf76f87e9e72021b069094c582cf0bbb78734a
Author: Tanner Doshier <doshitan gmail com>
Date: Fri Aug 10 13:38:33 2012 -0500
viewSelector, overview: Add search signals and connect them to hide/show
Hide the elements when the search entry is non-empty. Show them if the search
is cancelled.
https://bugzilla.gnome.org/show_bug.cgi?id=682050
js/ui/overview.js | 11 +++++++++++
js/ui/viewSelector.js | 2 ++
2 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/overview.js b/js/ui/overview.js
index d6a5bc5..1823da0 100644
--- a/js/ui/overview.js
+++ b/js/ui/overview.js
@@ -234,6 +234,17 @@ const Overview = new Lang.Class({
opacity: 0 });
this._overview.add_actor(this._messageTrayGhost);
+ this._viewSelector.connect('search-begin', Lang.bind(this,
+ function() {
+ this._dash.hide();
+ this._thumbnailsBox.hide();
+ }));
+ this._viewSelector.connect('search-cancelled', Lang.bind(this,
+ function() {
+ this._dash.show();
+ this._thumbnailsBox.show();
+ }));
+
Main.layoutManager.connect('monitors-changed', Lang.bind(this, this._relayout));
this._relayout();
},
diff --git a/js/ui/viewSelector.js b/js/ui/viewSelector.js
index a08fefa..079ff18 100644
--- a/js/ui/viewSelector.js
+++ b/js/ui/viewSelector.js
@@ -246,6 +246,7 @@ const ViewSelector = new Lang.Class({
},
_searchCancelled: function() {
+ this.emit('search-cancelled');
this._showPage(this._showAppsButton.checked ? this._appsPage
: this._workspacesPage);
@@ -314,6 +315,7 @@ const ViewSelector = new Lang.Class({
this._searchResults.startingSearch();
}
if (this.active) {
+ this.emit('search-begin');
this._entry.set_secondary_icon(this._activeIcon);
if (this._iconClickedId == 0) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]