diff options
author | Chris Toshok <toshok@ximian.com> | 2002-09-12 12:16:51 +0800 |
---|---|---|
committer | Chris Toshok <toshok@src.gnome.org> | 2002-09-12 12:16:51 +0800 |
commit | bc0adf69c7a2e3fd9560971a5b8dc997f7a2a7d1 (patch) | |
tree | 38b6dd90db8baace227f451bf480120bfa570ad5 /addressbook/gui/component | |
parent | 2cfbab586c48dc5da6d90dec268e10b9dceecdca (diff) | |
download | gsoc2013-evolution-bc0adf69c7a2e3fd9560971a5b8dc997f7a2a7d1.tar.gz gsoc2013-evolution-bc0adf69c7a2e3fd9560971a5b8dc997f7a2a7d1.tar.zst gsoc2013-evolution-bc0adf69c7a2e3fd9560971a5b8dc997f7a2a7d1.zip |
institute an arbitrary minimum limit on the number of characters before we
2002-09-11 Chris Toshok <toshok@ximian.com>
* 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
Diffstat (limited to 'addressbook/gui/component')
-rw-r--r-- | addressbook/gui/component/select-names/e-select-names-completion.c | 6 |
1 files changed, 6 insertions, 0 deletions
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 <addressbook/backend/ebook/e-card-simple.h> #include <addressbook/backend/ebook/e-card-compare.h> +#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); |