From bc0adf69c7a2e3fd9560971a5b8dc997f7a2a7d1 Mon Sep 17 00:00:00 2001 From: Chris Toshok Date: Thu, 12 Sep 2002 04:16:51 +0000 Subject: institute an arbitrary minimum limit on the number of characters before we 2002-09-11 Chris Toshok * gui/component/select-names/e-select-names-completion.c (e_select_names_completion_start_query): institute an arbitrary minimum limit on the number of characters before we actually try to autocomplete. It's 3, btw. svn path=/trunk/; revision=18053 --- addressbook/ChangeLog | 7 +++++++ addressbook/gui/component/select-names/e-select-names-completion.c | 6 ++++++ 2 files changed, 13 insertions(+) (limited to 'addressbook') diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index d9b421a0f4..560bb19851 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,10 @@ +2002-09-11 Chris Toshok + + * gui/component/select-names/e-select-names-completion.c + (e_select_names_completion_start_query): institute an arbitrary + minimum limit on the number of characters before we actually try + to autocomplete. It's 3, btw. + 2002-09-11 Chris Toshok [ fixes the other half of #17336 ] 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 9a95bafbe8..2423607847 100644 --- a/addressbook/gui/component/select-names/e-select-names-completion.c +++ b/addressbook/gui/component/select-names/e-select-names-completion.c @@ -43,6 +43,8 @@ #include #include +#define MINIMUM_QUERY_LENGTH 3 + typedef struct { EBook *book; guint book_view_tag; @@ -998,6 +1000,10 @@ e_select_names_completion_start_query (ESelectNamesCompletion *comp, const gchar if (comp->priv->books_not_ready == 0) { gchar *sexp; + if (strlen (query_text) < MINIMUM_QUERY_LENGTH) + return; + + g_free (comp->priv->query_text); comp->priv->query_text = g_strdup (query_text); -- cgit v1.2.3