[gnome-shell] Show "No matching results" if that's the case
- From: Colin Walters <walters src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-shell] Show "No matching results" if that's the case
- Date: Wed, 6 Jan 2010 21:18:23 +0000 (UTC)
commit 69c8aef6c275a989c9f28a695b8d7fc2a738c830
Author: Colin Walters <walters verbum org>
Date: Wed Jan 6 15:00:49 2010 -0500
Show "No matching results" if that's the case
This also fixes backtracking from no matching results.
https://bugzilla.gnome.org/show_bug.cgi?id=606209
js/ui/dash.js | 19 +++++++++++++------
1 files changed, 13 insertions(+), 6 deletions(-)
---
diff --git a/js/ui/dash.js b/js/ui/dash.js
index e50c853..0d941a7 100644
--- a/js/ui/dash.js
+++ b/js/ui/dash.js
@@ -433,9 +433,8 @@ SearchResults.prototype = {
this.actor = new St.BoxLayout({ name: 'dashSearchResults',
vertical: true });
- this._searchingNotice = new St.Label({ style_class: 'dash-search-starting',
- text: _("Searching...") });
- this.actor.add(this._searchingNotice);
+ this._statusText = new St.Label({ style_class: 'dash-search-statustext' });
+ this.actor.add(this._statusText);
this._selectedProvider = -1;
this._providers = this._searchSystem.getProviders();
this._providerMeta = [];
@@ -485,13 +484,14 @@ SearchResults.prototype = {
reset: function() {
this._searchSystem.reset();
- this._searchingNotice.hide();
+ this._statusText.hide();
this._clearDisplay();
},
startingSearch: function() {
this.reset();
- this._searchingNotice.show();
+ this._statusText.set_text(_("Searching..."));
+ this._statusText.show();
},
_metaForProvider: function(provider) {
@@ -501,9 +501,16 @@ SearchResults.prototype = {
updateSearch: function (searchString) {
let results = this._searchSystem.updateSearch(searchString);
- this._searchingNotice.hide();
this._clearDisplay();
+ if (results.length == 0) {
+ this._statusText.set_text(_("No matching results."));
+ this._statusText.show();
+ return true;
+ } else {
+ this._statusText.hide();
+ }
+
let terms = this._searchSystem.getTerms();
for (let i = 0; i < results.length; i++) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]