bigboard r7391 - trunk/bigboard/stocks/people
- From: otaylor svn gnome org
- To: svn-commits-list gnome org
- Subject: bigboard r7391 - trunk/bigboard/stocks/people
- Date: Thu, 19 Jun 2008 04:02:02 +0000 (UTC)
Author: otaylor
Date: Thu Jun 19 04:02:02 2008
New Revision: 7391
URL: http://svn.gnome.org/viewvc/bigboard?rev=7391&view=rev
Log:
Make searching in the people stock much liberal for case and substrings
Modified:
trunk/bigboard/stocks/people/PeopleStock.py
Modified: trunk/bigboard/stocks/people/PeopleStock.py
==============================================================================
--- trunk/bigboard/stocks/people/PeopleStock.py (original)
+++ trunk/bigboard/stocks/people/PeopleStock.py Thu Jun 19 04:02:02 2008
@@ -238,13 +238,15 @@
return "People"
def perform_search(self, query, consumer):
+ query = query.lower()
+
results = []
for p in self.__tracker.people:
#_logger.debug("person: " + str(p))
matched = False
- if query in p.display_name:
+ if query in p.display_name.lower():
matched = True
for email in p.emails:
@@ -252,12 +254,15 @@
matched = True
break
- if not matched:
- if query in p.aims:
+ for aim in p.aims:
+ if query in aim.lower():
matched = True
+ break
- if query in p.xmpps:
+ for xmpp in p.xmpps:
+ if query in xmpp.lower():
matched = True
+ break
if matched:
results.append(PeopleSearchResult(self, p))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]