diff options
author | Jon Trowbridge <trow@ximian.com> | 2001-12-04 09:31:39 +0800 |
---|---|---|
committer | Jon Trowbridge <trow@src.gnome.org> | 2001-12-04 09:31:39 +0800 |
commit | 4afdf27f16d59449354dd3b5d71248b750c0a20b (patch) | |
tree | abd83f52ba5fa3048979a503fc0e2981c4857461 /addressbook/backend | |
parent | 45170baee7e24ca6b3143290a52ea792bd31d195 (diff) | |
download | gsoc2013-evolution-4afdf27f16d59449354dd3b5d71248b750c0a20b.tar gsoc2013-evolution-4afdf27f16d59449354dd3b5d71248b750c0a20b.tar.gz gsoc2013-evolution-4afdf27f16d59449354dd3b5d71248b750c0a20b.tar.bz2 gsoc2013-evolution-4afdf27f16d59449354dd3b5d71248b750c0a20b.tar.lz gsoc2013-evolution-4afdf27f16d59449354dd3b5d71248b750c0a20b.tar.xz gsoc2013-evolution-4afdf27f16d59449354dd3b5d71248b750c0a20b.tar.zst gsoc2013-evolution-4afdf27f16d59449354dd3b5d71248b750c0a20b.zip |
Make address comparisons case-insensitive. (Fixes 11776)
2001-12-03 Jon Trowbridge <trow@ximian.com>
* backend/ebook/e-destination.c (e_destination_equal): Make address
comparisons case-insensitive. (Fixes 11776)
* backend/ebook/e-card.c (e_card_email_match_single_string): Make address
host comparisons case-insensitive. (Fixes 11776)
svn path=/trunk/; revision=14856
Diffstat (limited to 'addressbook/backend')
-rw-r--r-- | addressbook/backend/ebook/e-card.c | 6 | ||||
-rw-r--r-- | addressbook/backend/ebook/e-destination.c | 7 |
2 files changed, 7 insertions, 6 deletions
diff --git a/addressbook/backend/ebook/e-card.c b/addressbook/backend/ebook/e-card.c index c98f0dce30..d7f5457326 100644 --- a/addressbook/backend/ebook/e-card.c +++ b/addressbook/backend/ebook/e-card.c @@ -1827,12 +1827,12 @@ e_card_email_match_single_string (const gchar *a, const gchar *b) ++xb; while (match && *xa != '@' && *xb != '@') { - match = (*xa == *xb); + match = (tolower (*xa) == tolower (*xb)); --xa; --xb; } - match = match && ((*xa == *xb) || (*xa == '.') || (*xb == '.')); + match = match && ((tolower (*xa) == tolower (*xb)) || (*xa == '.') || (*xb == '.')); return match; } @@ -1866,7 +1866,7 @@ e_card_email_find_number (const ECard *card, const gchar *email) iter = e_list_get_iterator (card->email); for (e_iterator_reset (iter); e_iterator_is_valid (iter); e_iterator_next (iter)) { - if (!strcmp (e_iterator_get (iter), email)) + if (!g_strcasecmp (e_iterator_get (iter), email)) goto finished; ++count; } diff --git a/addressbook/backend/ebook/e-destination.c b/addressbook/backend/ebook/e-destination.c index 508802b823..b82e616601 100644 --- a/addressbook/backend/ebook/e-destination.c +++ b/addressbook/backend/ebook/e-destination.c @@ -331,11 +331,12 @@ nonempty (const gchar *s) gboolean e_destination_is_empty (const EDestination *dest) + { struct _EDestinationPrivate *p; g_return_val_if_fail (E_IS_DESTINATION (dest), TRUE); p = dest->priv; - + return !(p->card != NULL || (p->book_uri && *p->book_uri) || (p->card_uid && *p->card_uid) @@ -389,10 +390,10 @@ e_destination_equal (const EDestination *a, const EDestination *b) /* Just in case name returns NULL */ na = e_destination_get_name (a); nb = e_destination_get_name (b); - if ((na || nb) && !(na && nb && !strcmp (na, nb))) + if ((na || nb) && !(na && nb && ! g_utf8_strcasecmp (na, nb))) return FALSE; - if (!strcmp (e_destination_get_email (a), e_destination_get_email (b))) + if (!g_strcasecmp (e_destination_get_email (a), e_destination_get_email (b))) return TRUE; return FALSE; |