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



commit 530555a2c40835559fee83867bd5bd2b1c8fcc99
Author: Milan Crha <mcrha redhat com>
Date:   Fri Oct 15 11:35:02 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 3f4ebda..f681bd1 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]