aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook
diff options
context:
space:
mode:
authorJon Trowbridge <trow@ximian.com>2001-09-15 16:58:02 +0800
committerJon Trowbridge <trow@src.gnome.org>2001-09-15 16:58:02 +0800
commit63a62abfad0269525b53ff4248547edf4d6500b9 (patch)
treeede3c7f7261eb5643833b335a113f5aef2ff9aac /addressbook
parentc2a0bf66ba4970b4a5afb29cfbadeaabbea88d4f (diff)
downloadgsoc2013-evolution-63a62abfad0269525b53ff4248547edf4d6500b9.tar.gz
gsoc2013-evolution-63a62abfad0269525b53ff4248547edf4d6500b9.tar.zst
gsoc2013-evolution-63a62abfad0269525b53ff4248547edf4d6500b9.zip
No loose name matches on family names. (#8802)
2001-09-15 Jon Trowbridge <trow@ximian.com> * backend/ebook/e-card-compare.c (e_card_compare_name): No loose name matches on family names. (#8802) svn path=/trunk/; revision=12857
Diffstat (limited to 'addressbook')
-rw-r--r--addressbook/ChangeLog3
-rw-r--r--addressbook/backend/ebook/e-card-compare.c3
-rw-r--r--addressbook/gui/component/select-names/e-select-names.c5
3 files changed, 10 insertions, 1 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index 48bfa5118b..9f542ab200 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,5 +1,8 @@
2001-09-15 Jon Trowbridge <trow@ximian.com>
+ * backend/ebook/e-card-compare.c (e_card_compare_name): No
+ loose name matches on family names. (#8802)
+
* gui/component/select-names/e-select-names-text-model.c
(e_select_names_text_model_activate_obj): We can't use NULL as the
first arg for e_addressbook_show_contact_editor anymore. Damn.
diff --git a/addressbook/backend/ebook/e-card-compare.c b/addressbook/backend/ebook/e-card-compare.c
index 1de7e2b1f7..d8acbda48e 100644
--- a/addressbook/backend/ebook/e-card-compare.c
+++ b/addressbook/backend/ebook/e-card-compare.c
@@ -134,7 +134,8 @@ e_card_compare_name (ECard *card1, ECard *card2)
if (a->family && b->family) {
++possible;
- if (name_fragment_match (a->family, b->family)) {
+ /* We don't allow "loose matching" (i.e. John vs. Jon) on family names */
+ if (! g_utf8_strcasecmp (a->family, b->family)) {
++matches;
family_match = TRUE;
}
diff --git a/addressbook/gui/component/select-names/e-select-names.c b/addressbook/gui/component/select-names/e-select-names.c
index eda6dbd301..5d76f00689 100644
--- a/addressbook/gui/component/select-names/e-select-names.c
+++ b/addressbook/gui/component/select-names/e-select-names.c
@@ -698,6 +698,7 @@ button_clicked(GtkWidget *button, ESelectNamesChild *child)
static void
remove_address(ETable *table, int row, int col, GdkEvent *event, ESelectNamesChild *child)
{
+ g_message ("remove row %d", row);
e_select_names_model_delete (child->source, row);
}
@@ -732,6 +733,8 @@ remove_cb (GtkWidget *widget, void *data)
{
RightClickData *rcdata = (RightClickData *)data;
+ e_select_names_model_freeze (rcdata->child->source);
+
/* Build a list of selected rows */
e_table_selected_row_foreach (rcdata->table,
etable_selection_foreach_cb,
@@ -742,6 +745,8 @@ remove_cb (GtkWidget *widget, void *data)
(GFunc)selected_rows_foreach_cb,
rcdata->child);
+ e_select_names_model_thaw (rcdata->child->source);
+
/* Free everything we've created */
g_free (rcdata);
g_slist_free (selected_rows);