aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2001-06-12 07:16:21 +0800
committerDan Winship <danw@src.gnome.org>2001-06-12 07:16:21 +0800
commit85a98452d427710f11788613101aae330dbb4bca (patch)
treee7115995c6f5511f4803c109405b7a17daf88a18 /addressbook
parente3258e5bd7a11c733976c14e559653bc601e617b (diff)
downloadgsoc2013-evolution-85a98452d427710f11788613101aae330dbb4bca.tar
gsoc2013-evolution-85a98452d427710f11788613101aae330dbb4bca.tar.gz
gsoc2013-evolution-85a98452d427710f11788613101aae330dbb4bca.tar.bz2
gsoc2013-evolution-85a98452d427710f11788613101aae330dbb4bca.tar.lz
gsoc2013-evolution-85a98452d427710f11788613101aae330dbb4bca.tar.xz
gsoc2013-evolution-85a98452d427710f11788613101aae330dbb4bca.tar.zst
gsoc2013-evolution-85a98452d427710f11788613101aae330dbb4bca.zip
Add a workaround for an EText bug. (e_select_names_completion_begin): Fix
* 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. svn path=/trunk/; revision=10194
Diffstat (limited to 'addressbook')
-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);
}