[evolution-data-server] Bug #627817 - Runtime warning when no default addressbook exists
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Bug #627817 - Runtime warning when no default addressbook exists
- Date: Thu, 2 Sep 2010 18:47:51 +0000 (UTC)
commit b0924e02b01d3050337f64f4652269b8793ab016
Author: Milan Crha <mcrha redhat com>
Date: Thu Sep 2 20:47:08 2010 +0200
Bug #627817 - Runtime warning when no default addressbook exists
libedataserver/e-source-list.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/libedataserver/e-source-list.c b/libedataserver/e-source-list.c
index 029c908..6706e96 100644
--- a/libedataserver/e-source-list.c
+++ b/libedataserver/e-source-list.c
@@ -590,10 +590,14 @@ e_source_list_peek_default_source (ESourceList *source_list)
ESourceGroup *source_group;
GSList *sources;
GSList *iter2;
+ gboolean is_local_group;
source_group = E_SOURCE_GROUP (iter1->data);
sources = e_source_group_peek_sources (source_group);
+ is_local_group = e_source_group_peek_base_uri (source_group)
+ && g_str_equal (e_source_group_peek_base_uri (source_group), "local:");
+
for (iter2 = sources; iter2 != NULL; iter2 = iter2->next) {
ESource *source;
@@ -605,7 +609,9 @@ e_source_list_peek_default_source (ESourceList *source_list)
/* Make a note of the system source. If we fail
* to find a default source we fall back to this. */
- if (e_source_get_property (source, "system"))
+ if (e_source_get_property (source, "system") ||
+ (is_local_group && !system_source && e_source_peek_relative_uri (source)
+ && g_str_equal (e_source_peek_relative_uri (source), "system")))
system_source = source;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]