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
This commit is contained in:
Tanner Doshier 2012-08-10 13:38:33 -05:00 committed by Jasper St. Pierre
parent bc8965fe63
commit 4b0ba8b7b8
2 changed files with 13 additions and 0 deletions

View File

@ -238,6 +238,17 @@ const Overview = new Lang.Class({
opacity: 0 }); opacity: 0 });
this._overview.add_actor(this._messageTrayGhost); 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)); Main.layoutManager.connect('monitors-changed', Lang.bind(this, this._relayout));
this._relayout(); this._relayout();
}, },

View File

@ -258,6 +258,7 @@ const ViewSelector = new Lang.Class({
}, },
_searchCancelled: function() { _searchCancelled: function() {
this.emit('search-cancelled');
this._showPage(this._showAppsButton.checked ? this._appsPage this._showPage(this._showAppsButton.checked ? this._appsPage
: this._workspacesPage); : this._workspacesPage);
@ -326,6 +327,7 @@ const ViewSelector = new Lang.Class({
this._searchResults.startingSearch(); this._searchResults.startingSearch();
} }
if (this.active) { if (this.active) {
this.emit('search-begin');
this._entry.set_secondary_icon(this._activeIcon); this._entry.set_secondary_icon(this._activeIcon);
if (this._iconClickedId == 0) { if (this._iconClickedId == 0) {