From 29d288066ba3f8ad75e1737eb82bfdc96b8d6983 Mon Sep 17 00:00:00 2001 From: Chris Toshok Date: Mon, 10 Feb 2003 06:21:12 +0000 Subject: gone. (match_initials): gone. (book_query_sexp): remove the primary 2003-02-09 Chris Toshok * gui/component/select-names/e-select-names-completion.c (sexp_initials): gone. (match_initials): gone. (book_query_sexp): remove the primary handling. (book_query_score): same. * backend/ebook/e-card.c (e_card_set_property): g_value_get_pointer => g_value_get_object for "category_list". * backend/ebook/e-book.c (struct _EBookPrivate): add a comment. * backend/pas/pas-backend-ldap.c (func_beginswith): performance at the cost of a tiny bit of correctness. If the ldap server doesn't support evolutionPerson don't query on fileAs, use sn (since that's effectively what gets used in the display when fileAs isn't supported.) svn path=/trunk/; revision=19863 --- .../select-names/e-select-names-completion.c | 64 ++++++---------------- 1 file changed, 17 insertions(+), 47 deletions(-) (limited to 'addressbook/gui/component/select-names/e-select-names-completion.c') diff --git a/addressbook/gui/component/select-names/e-select-names-completion.c b/addressbook/gui/component/select-names/e-select-names-completion.c index 29ef1febf7..c679b51233 100644 --- a/addressbook/gui/component/select-names/e-select-names-completion.c +++ b/addressbook/gui/component/select-names/e-select-names-completion.c @@ -67,7 +67,6 @@ struct _ESelectNamesCompletionPrivate { gchar *query_text; gboolean match_contact_lists; - gboolean primary_only; gint minimum_query_length; }; @@ -434,36 +433,17 @@ match_file_as (ESelectNamesCompletion *comp, EDestination *dest) return match; } -/* - * Initials Query - */ - -static gchar * -sexp_initials (ESelectNamesCompletion *comp) -{ - return NULL; -} - -static ECompletionMatch * -match_initials (ESelectNamesCompletion *comp, EDestination *dest) -{ - return NULL; -} - - typedef struct _BookQuery BookQuery; struct _BookQuery { - gboolean primary; BookQuerySExp builder; BookQueryMatchTester tester; }; static BookQuery book_queries[] = { - { TRUE, sexp_nickname, match_nickname}, - { TRUE, sexp_email, match_email }, - { TRUE, sexp_name, match_name }, - { TRUE, sexp_file_as, match_file_as }, - { FALSE, sexp_initials, match_initials } + { sexp_nickname, match_nickname}, + { sexp_email, match_email }, + { sexp_name, match_name }, + { sexp_file_as, match_file_as }, }; static gint book_query_count = sizeof (book_queries) / sizeof (BookQuery); @@ -473,7 +453,7 @@ static gint book_query_count = sizeof (book_queries) / sizeof (BookQuery); static gchar * book_query_sexp (ESelectNamesCompletion *comp) { - gint i, j, count = 0; + gint i, j; gchar **queryv, *query; g_return_val_if_fail (comp && E_IS_SELECT_NAMES_COMPLETION (comp), NULL); @@ -481,16 +461,8 @@ book_query_sexp (ESelectNamesCompletion *comp) if (! (comp->priv->query_text && *comp->priv->query_text)) return NULL; - if (comp->priv->primary_only) { - for (i=0; ipriv->primary_only) { - if (book_queries[i].tester && e_destination_get_card (dest)) { - this_match = book_queries[i].tester (comp, dest); - } + if (book_queries[i].tester && e_destination_get_card (dest)) { + this_match = book_queries[i].tester (comp, dest); + } - if (this_match) { - if (best_match == NULL || this_match->score > best_match->score) { - e_completion_match_unref (best_match); - best_match = this_match; - } else { - e_completion_match_unref (this_match); - } + if (this_match) { + if (best_match == NULL || this_match->score > best_match->score) { + e_completion_match_unref (best_match); + best_match = this_match; + } else { + e_completion_match_unref (this_match); } } } -- cgit v1.2.3