diff options
Diffstat (limited to 'addressbook/gui')
-rw-r--r-- | addressbook/gui/component/addressbook.c | 12 | ||||
-rw-r--r-- | addressbook/gui/widgets/e-addressbook-view.c | 16 |
2 files changed, 10 insertions, 18 deletions
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: diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c index 1679c95392..6a78cf13eb 100644 --- a/addressbook/gui/widgets/e-addressbook-view.c +++ b/addressbook/gui/widgets/e-addressbook-view.c @@ -649,25 +649,17 @@ jump_to_letter(EAddressbookView *view, gunichar letter) g_assert (letter_v != NULL && letter_v[0] != NULL); gstr = g_string_new ("(not (or "); for (p = letter_v + 1; *p != NULL; p++) { - char s[7]; - g_string_sprintfa (gstr, "(beginswith \"file_as\" \"%s\")", *p); - s[g_unichar_to_utf8 (g_unichar_toupper (g_utf8_get_char (*p)), s)] = '\0'; - g_string_sprintfa (gstr, "(beginswith \"file_as\" \"%s\")", s); } g_string_append (gstr, "))"); query = gstr->str; g_strfreev (letter_v); g_string_free (gstr, FALSE); } else { - char s1[6 + 1], s2[6 + 1]; - - s1 [g_unichar_to_utf8 (letter, s1)] = '\0'; - s2 [g_unichar_to_utf8 (g_unichar_toupper (letter), s2)] = '\0'; - query = g_strdup_printf ("(or " - "(beginswith \"file_as\" \"%s\")" - "(beginswith \"file_as\" \"%s\")" - ")", s1, s2); + char s[6 + 1]; + + s [g_unichar_to_utf8 (letter, s)] = '\0'; + query = g_strdup_printf ("(beginswith \"file_as\" \"%s\")", s); } gtk_object_set (GTK_OBJECT (view), "query", query, |