aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/merging/eab-contact-compare.c
diff options
context:
space:
mode:
authorChris Toshok <toshok@ximian.com>2004-01-21 10:19:19 +0800
committerChris Toshok <toshok@src.gnome.org>2004-01-21 10:19:19 +0800
commitb476b5573e56fb9da9bc7730d920f18b5a771ab1 (patch)
tree83fe791b612895af9f99c6a9a688c8489bc54334 /addressbook/gui/merging/eab-contact-compare.c
parent855cc92b474f9fc863915942dbb7193817dc6dc0 (diff)
downloadgsoc2013-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
Diffstat (limited to 'addressbook/gui/merging/eab-contact-compare.c')
-rw-r--r--addressbook/gui/merging/eab-contact-compare.c11
1 files changed, 8 insertions, 3 deletions
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