[evolution-data-server] Opening default/system addressbook doesn't always work



commit 9c5ad309843caae9b40cc7989e712eb5f9cc9e3d
Author: Milan Crha <mcrha redhat com>
Date:   Fri Oct 15 11:34:34 2010 +0200

    Opening default/system addressbook doesn't always work

 addressbook/libebook/e-book.c |   19 ++++++++++++++++++-
 1 files changed, 18 insertions(+), 1 deletions(-)
---
diff --git a/addressbook/libebook/e-book.c b/addressbook/libebook/e-book.c
index ea3b68a..77fa771 100644
--- a/addressbook/libebook/e-book.c
+++ b/addressbook/libebook/e-book.c
@@ -3186,7 +3186,24 @@ check_uri (ESource *source, gpointer uri)
 
 	suri = e_source_peek_absolute_uri (source);
 
-	return suri && g_ascii_strcasecmp (suri, uri) == 0;
+	if (suri && g_ascii_strcasecmp (suri, uri) == 0)
+		return TRUE;
+
+	if (!suri && e_source_peek_group (source)) {
+		gboolean res = FALSE;
+		gchar *my_uri = g_strconcat (
+			e_source_group_peek_base_uri (e_source_peek_group (source)),
+			e_source_peek_relative_uri (source),
+			NULL);
+
+		res = my_uri && g_ascii_strcasecmp (my_uri, uri) == 0;
+
+		g_free (my_uri);
+
+		return res;
+	}
+
+	return FALSE;
 }
 
 /**



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]