aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Toshok <toshok@ximian.com>2002-09-12 12:16:51 +0800
committerChris Toshok <toshok@src.gnome.org>2002-09-12 12:16:51 +0800
commitbc0adf69c7a2e3fd9560971a5b8dc997f7a2a7d1 (patch)
tree38b6dd90db8baace227f451bf480120bfa570ad5
parent2cfbab586c48dc5da6d90dec268e10b9dceecdca (diff)
downloadgsoc2013-evolution-bc0adf69c7a2e3fd9560971a5b8dc997f7a2a7d1.tar
gsoc2013-evolution-bc0adf69c7a2e3fd9560971a5b8dc997f7a2a7d1.tar.gz
gsoc2013-evolution-bc0adf69c7a2e3fd9560971a5b8dc997f7a2a7d1.tar.bz2
gsoc2013-evolution-bc0adf69c7a2e3fd9560971a5b8dc997f7a2a7d1.tar.lz
gsoc2013-evolution-bc0adf69c7a2e3fd9560971a5b8dc997f7a2a7d1.tar.xz
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
-rw-r--r--addressbook/ChangeLog7
-rw-r--r--addressbook/gui/component/select-names/e-select-names-completion.c6
2 files changed, 13 insertions, 0 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index d9b421a0f4..560bb19851 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,5 +1,12 @@
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.
+
+2002-09-11 Chris Toshok <toshok@ximian.com>
+
[ fixes the other half of #17336 ]
* gui/contact-editor/e-contact-quick-add.c (quick_add_set_name):
parse the name when we're asked to set it, so the full name
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);