diff options
author | Chris Toshok <toshok@ximian.com> | 2004-01-21 10:19:19 +0800 |
---|---|---|
committer | Chris Toshok <toshok@src.gnome.org> | 2004-01-21 10:19:19 +0800 |
commit | b476b5573e56fb9da9bc7730d920f18b5a771ab1 (patch) | |
tree | 83fe791b612895af9f99c6a9a688c8489bc54334 | |
parent | 855cc92b474f9fc863915942dbb7193817dc6dc0 (diff) | |
download | gsoc2013-evolution-b476b5573e56fb9da9bc7730d920f18b5a771ab1.tar gsoc2013-evolution-b476b5573e56fb9da9bc7730d920f18b5a771ab1.tar.gz gsoc2013-evolution-b476b5573e56fb9da9bc7730d920f18b5a771ab1.tar.bz2 gsoc2013-evolution-b476b5573e56fb9da9bc7730d920f18b5a771ab1.tar.lz gsoc2013-evolution-b476b5573e56fb9da9bc7730d920f18b5a771ab1.tar.xz gsoc2013-evolution-b476b5573e56fb9da9bc7730d920f18b5a771ab1.tar.zst gsoc2013-evolution-b476b5573e56fb9da9bc7730d920f18b5a771ab1.zip |
[ fixes bug #52955 ] handle the case properly where there are no query
2004-01-20 Chris Toshok <toshok@ximian.com>
[ fixes bug #52955 ]
* gui/merging/eab-contact-compare.c (use_common_book_cb): handle
the case properly where there are no query parts (p == 0).
Instead of passing "" to e_book_query_from_string, just set the
query to NULL.
* util/eab-book-util.c (eab_contact_list_to_string): we need to
put a blank line here, so \r\n\r\n, not just \r\n.
svn path=/trunk/; revision=24340
-rw-r--r-- | addressbook/ChangeLog | 11 | ||||
-rw-r--r-- | addressbook/gui/merging/eab-contact-compare.c | 11 | ||||
-rw-r--r-- | addressbook/util/eab-book-util.c | 2 |
3 files changed, 20 insertions, 4 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index cf39251cb5..d041e6b7e8 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,5 +1,16 @@ 2004-01-20 Chris Toshok <toshok@ximian.com> + [ fixes bug #52955 ] + * gui/merging/eab-contact-compare.c (use_common_book_cb): handle + the case properly where there are no query parts (p == 0). + Instead of passing "" to e_book_query_from_string, just set the + query to NULL. + + * util/eab-book-util.c (eab_contact_list_to_string): we need to + put a blank line here, so \r\n\r\n, not just \r\n. + +2004-01-20 Chris Toshok <toshok@ximian.com> + * gui/component/addressbook-migrate.c (create_groups): deal with the groups/sources already being there. Essentially make this function idempotent. diff --git a/addressbook/gui/merging/eab-contact-compare.c b/addressbook/gui/merging/eab-contact-compare.c index de0c7b4675..ec80f12639 100644 --- a/addressbook/gui/merging/eab-contact-compare.c +++ b/addressbook/gui/merging/eab-contact-compare.c @@ -669,14 +669,18 @@ use_common_book_cb (EBook *book, gpointer closure) qj = g_strjoinv (" ", query_parts); for(i = 0; query_parts[i] != NULL; i++) g_free(query_parts[i]); - if (p > 0) { + if (p > 1) { char *s; s = g_strdup_printf ("(or %s)", qj); query = e_book_query_from_string (s); g_free (s); - } else { + } + else if (p == 1) { query = e_book_query_from_string (qj); } + else { + query = NULL; + } if (query) e_book_async_get_contacts (book, query, query_cb, info); @@ -684,7 +688,8 @@ use_common_book_cb (EBook *book, gpointer closure) query_cb (book, E_BOOK_ERROR_OK, NULL, info); g_free (qj); - e_book_query_unref (query); + if (query) + e_book_query_unref (query); } void diff --git a/addressbook/util/eab-book-util.c b/addressbook/util/eab-book-util.c index 2c80d6f8a1..611944b22d 100644 --- a/addressbook/util/eab-book-util.c +++ b/addressbook/util/eab-book-util.c @@ -200,7 +200,7 @@ eab_contact_list_to_string (GList *contacts) g_string_append (str, vcard_str); if (l->next) - g_string_append (str, "\r\n"); + g_string_append (str, "\r\n\r\n"); } return g_string_free (str, FALSE); |