aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@ximian.com>2002-06-15 07:03:14 +0800
committerChris Lahey <clahey@src.gnome.org>2002-06-15 07:03:14 +0800
commitde3f790725856705199c9863f8177f8de26bdf0d (patch)
treeff48a1fd056ce0d1b4f783eeb337975edb93ce05 /addressbook
parentbfccd5b470c3bcc0d23d619e9c0d93f0fdc80cce (diff)
downloadgsoc2013-evolution-de3f790725856705199c9863f8177f8de26bdf0d.tar
gsoc2013-evolution-de3f790725856705199c9863f8177f8de26bdf0d.tar.gz
gsoc2013-evolution-de3f790725856705199c9863f8177f8de26bdf0d.tar.bz2
gsoc2013-evolution-de3f790725856705199c9863f8177f8de26bdf0d.tar.lz
gsoc2013-evolution-de3f790725856705199c9863f8177f8de26bdf0d.tar.xz
gsoc2013-evolution-de3f790725856705199c9863f8177f8de26bdf0d.tar.zst
gsoc2013-evolution-de3f790725856705199c9863f8177f8de26bdf0d.zip
Made "" compare as not equal to "" for addresses. (use_common_book_cb):
2002-06-14 Christopher James Lahey <clahey@ximian.com> * backend/ebook/e-card-compare.c (compare_email_addresses): Made "" compare as not equal to "" for addresses. (use_common_book_cb): Don't bother checking for nickname here since we don't use it as a match later. Don't add "" as an address to the list of query parts. svn path=/trunk/; revision=17191
Diffstat (limited to 'addressbook')
-rw-r--r--addressbook/ChangeLog8
-rw-r--r--addressbook/backend/ebook/e-card-compare.c10
2 files changed, 14 insertions, 4 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index 50e336bc06..36b2dbbc31 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,3 +1,11 @@
+2002-06-14 Christopher James Lahey <clahey@ximian.com>
+
+ * backend/ebook/e-card-compare.c (compare_email_addresses): Made
+ "" compare as not equal to "" for addresses.
+ (use_common_book_cb): Don't bother checking for nickname here
+ since we don't use it as a match later. Don't add "" as an
+ address to the list of query parts.
+
2002-06-13 Christopher James Lahey <clahey@ximian.com>
* gui/contact-editor/e-contact-editor.c (enable_writable_fields):
diff --git a/addressbook/backend/ebook/e-card-compare.c b/addressbook/backend/ebook/e-card-compare.c
index a022c4e394..fb88603552 100644
--- a/addressbook/backend/ebook/e-card-compare.c
+++ b/addressbook/backend/ebook/e-card-compare.c
@@ -420,7 +420,8 @@ match_email_hostname (const gchar *addr1, const gchar *addr2)
static ECardMatchType
compare_email_addresses (const gchar *addr1, const gchar *addr2)
{
- if (addr1 == NULL || addr2 == NULL)
+ if (addr1 == NULL || *addr1 == 0 ||
+ addr2 == NULL || *addr2 == 0)
return E_CARD_MATCH_NOT_APPLICABLE;
if (match_email_username (addr1, addr2))
@@ -598,9 +599,10 @@ use_common_book_cb (EBook *book, gpointer closure)
return;
}
- if (card->nickname)
+#if 0
+ if (card->nickname && *card->nickname)
query_parts[p++] = g_strdup_printf ("(beginswith \"nickname\" \"%s\")", card->nickname);
-
+#endif
if (card->name->given && strlen (card->name->given) > 1)
query_parts[p++] = g_strdup_printf ("(contains \"full_name\" \"%s\")", card->name->given);
@@ -616,7 +618,7 @@ use_common_book_cb (EBook *book, gpointer closure)
EIterator *iter = e_list_get_iterator (card->email);
while (e_iterator_is_valid (iter) && p < MAX_QUERY_PARTS) {
gchar *addr = g_strdup (e_iterator_get (iter));
- if (addr) {
+ if (addr && *addr) {
gchar *s = addr;
while (*s) {
if (*s == '@') {