[gnome-documents] search: Fix searching by uppercase letters
- From: Adel Gadllah <agadllah src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-documents] search: Fix searching by uppercase letters
- Date: Wed, 29 Feb 2012 19:51:51 +0000 (UTC)
commit 5ffa31440cb4d89da61a5385871a224c263e87ac
Author: Adel Gadllah <adel gadllah gmail com>
Date: Wed Feb 29 20:47:24 2012 +0100
search: Fix searching by uppercase letters
Currently search only works with lowercase letters, using uppercase ones always
results into no result. Fix that by converting the user supplied string to
lowercase before passing it down to the search APIs.
https://bugzilla.gnome.org/show_bug.cgi?id=671050
src/searchbar.js | 2 +-
src/shellSearchProvider.js | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/searchbar.js b/src/searchbar.js
index 16cb8bf..8f18b57 100644
--- a/src/searchbar.js
+++ b/src/searchbar.js
@@ -477,7 +477,7 @@ Searchbar.prototype = {
function() {
this._searchEntryTimeout = 0;
- let currentText = this._searchEntry.get_text();
+ let currentText = this._searchEntry.get_text().toLowerCase();
Global.searchController.setString(currentText);
}));
}));
diff --git a/src/shellSearchProvider.js b/src/shellSearchProvider.js
index aa81df1..59da519 100644
--- a/src/shellSearchProvider.js
+++ b/src/shellSearchProvider.js
@@ -272,7 +272,7 @@ ShellSearchProvider.prototype = {
},
_doSearch: function(terms) {
- Global.searchController.setString(terms.join(' '));
+ Global.searchController.setString(terms.join(' ').toLowerCase());
let query = Global.queryBuilder.buildGlobalQuery();
let cursor = Global.connection.query(query.sparql, null);
let ids = [];
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]