From b6d54c7762636036e6b9173ef8c40befd5ddd1d8 Mon Sep 17 00:00:00 2001 From: Chris Toshok Date: Sun, 10 Mar 2002 01:47:02 +0000 Subject: since I've gone ahead and made the file backend (by way of 2002-03-09 Chris Toshok * gui/widgets/e-addressbook-view.c (jump_to_letter): since I've gone ahead and made the file backend (by way of pas-backend-card-sexp.c) use case insensitive searches for beginswith, there's no need to list upper and lower case here. * gui/component/addressbook.c (addressbook_search_option_items): reorder things to put "Any field contains" at the end, since it's the least efficient search. Also reorder the enum to the same ordering. Change "Name contains" to "Name begins with" and change "Email contains" to "Email is". (addressbook_search_activated): change FULL_NAME to beginswith, and change EMAIL to is to match the labels. * backend/pas/pas-backend-card-sexp.c (compare_name): new function, so we can compare both full and family names (so beginswith can operate on them both.) (endswith_helper): use e_utf8_strstrcase here, since all the backends backends use case insensitive searching. (func_endswith): same. svn path=/trunk/; revision=16004 --- addressbook/gui/component/addressbook.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'addressbook/gui/component') diff --git a/addressbook/gui/component/addressbook.c b/addressbook/gui/component/addressbook.c index 73cb71abff..72cf16cdeb 100644 --- a/addressbook/gui/component/addressbook.c +++ b/addressbook/gui/component/addressbook.c @@ -825,18 +825,18 @@ static ESearchBarItem addressbook_search_menu_items[] = { }; enum { - ESB_ANY, ESB_FULL_NAME, ESB_EMAIL, ESB_CATEGORY, + ESB_ANY, ESB_ADVANCED }; static ESearchBarItem addressbook_search_option_items[] = { - { N_("Any field contains"), ESB_ANY, NULL }, - { N_("Name contains"), ESB_FULL_NAME, NULL }, - { N_("Email contains"), ESB_EMAIL, NULL }, + { N_("Name begins with"), ESB_FULL_NAME, NULL }, + { N_("Email is"), ESB_EMAIL, NULL }, { N_("Category is"), ESB_CATEGORY, NULL }, /* We attach subitems below */ + { N_("Any field contains"), ESB_ANY, NULL }, { N_("Advanced..."), ESB_ADVANCED, NULL }, { NULL, -1, NULL } }; @@ -898,11 +898,11 @@ addressbook_search_activated (ESearchBar *esb, AddressbookView *view) s->str); break; case ESB_FULL_NAME: - search_query = g_strdup_printf ("(contains \"full_name\" %s)", + search_query = g_strdup_printf ("(beginswith \"full_name\" %s)", s->str); break; case ESB_EMAIL: - search_query = g_strdup_printf ("(contains \"email\" %s)", + search_query = g_strdup_printf ("(is \"email\" %s)", s->str); break; case ESB_CATEGORY: -- cgit v1.2.3