diff options
author | Tomeu Vizoso <tomeu@sugarlabs.org> | 2009-01-11 11:18:27 (GMT) |
---|---|---|
committer | Tomeu Vizoso <tomeu@sugarlabs.org> | 2009-01-11 11:18:27 (GMT) |
commit | f583b08ca882d127f1df75d893cb5884649f21c7 (patch) | |
tree | 42b3a2f56d3a66bff896105a2e254291c74f70d9 /src/jarabe/journal/journaltoolbox.py | |
parent | dca9571f19408b92f83cfca99a1da843e5e04dc8 (diff) |
Add support for text queries on removable devices
Diffstat (limited to 'src/jarabe/journal/journaltoolbox.py')
-rw-r--r-- | src/jarabe/journal/journaltoolbox.py | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/src/jarabe/journal/journaltoolbox.py b/src/jarabe/journal/journaltoolbox.py index 0fcb357..7bf483e 100644 --- a/src/jarabe/journal/journaltoolbox.py +++ b/src/jarabe/journal/journaltoolbox.py @@ -177,25 +177,15 @@ class SearchToolbar(gtk.Toolbar): query['mime_type'] = mime_types else: query['activity'] = self._what_search_combo.props.value + if self._when_search_combo.props.value: date_from, date_to = self._get_date_range() query['mtime'] = {'start': date_from, 'end': date_to} + if self._search_entry.props.text: text = self._search_entry.props.text.strip() - - if not text.startswith('"'): - query_text = '' - words = text.split(' ') - for word in words: - if word: - if query_text: - query_text += ' ' - query_text += word + '*' - else: - query_text = text - - if query_text: - query['query'] = query_text + if text: + query['query'] = text return query |