aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--addressbook/ChangeLog8
-rw-r--r--addressbook/gui/component/select-names/e-select-names-completion.c10
2 files changed, 15 insertions, 3 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index 7c6f0b5b18..2f2832f49d 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,3 +1,11 @@
+2001-06-11 Dan Winship <danw@ximian.com>
+
+ * gui/component/select-names/e-select-names-completion.c
+ (search_override_check): Add a workaround for an EText bug.
+ (e_select_names_completion_begin): Fix up the match scoring in the
+ search_override case so the lines are offered in the correct
+ order.
+
2001-06-11 Christopher James Lahey <clahey@ximian.com>
* gui/merging/Makefile.am (glade_DATA): Added
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 54f833dd4f..b4fb73cc9e 100644
--- a/addressbook/gui/component/select-names/e-select-names-completion.c
+++ b/addressbook/gui/component/select-names/e-select-names-completion.c
@@ -976,7 +976,7 @@ e_select_names_completion_do_query (ESelectNamesCompletion *comp, const gchar *q
/*
*
- * Completion Search Override - a Framework for Christian-Resurrection-Holiday Edible-Chicken-Embryos
+ * Completion Search Override - a Framework for Christian-Resurrection-Holiday Edible-Chicken-Ova
*
*/
@@ -994,7 +994,11 @@ static SearchOverride override[] = {
static gboolean
search_override_check (SearchOverride *over, const gchar *text)
{
- if (over == NULL || text == NULL)
+ /* The g_utf8_validate is needed because as of 2001-06-11,
+ * EText doesn't translate from locale->UTF8 when you paste
+ * into it.
+ */
+ if (over == NULL || text == NULL || !g_utf8_validate (text, -1, NULL))
return FALSE;
return !g_utf8_strcasecmp (over->trigger, text);
@@ -1044,7 +1048,7 @@ e_select_names_completion_begin (ECompletion *comp, const gchar *text, gint pos,
ECompletionMatch *match = g_new (ECompletionMatch, 1);
e_completion_match_construct (match);
e_completion_match_set_text (match, text, override[j].text[k]);
- match->score = 1;
+ match->score = 1 / (k + 1);
e_completion_found_match (comp, match);
}