[evolution-ews] Allow creation of address books, calendars and task lists.



commit 7dd8cb2428433251c97e10d9083ffefc2016dd80
Author: Matthew Barnes <mbarnes redhat com>
Date:   Fri Aug 3 10:27:51 2012 -0400

    Allow creation of address books, calendars and task lists.

 src/configuration/e-book-config-ews.c |    2 +-
 src/configuration/e-cal-config-ews.c  |   22 +++++++++++++++++++++-
 2 files changed, 22 insertions(+), 2 deletions(-)
---
diff --git a/src/configuration/e-book-config-ews.c b/src/configuration/e-book-config-ews.c
index fa3a2e4..396c1ec 100644
--- a/src/configuration/e-book-config-ews.c
+++ b/src/configuration/e-book-config-ews.c
@@ -28,7 +28,7 @@ G_DEFINE_DYNAMIC_TYPE (
 static gboolean
 book_config_ews_allow_creation (ESourceConfigBackend *backend)
 {
-	return FALSE;
+	return TRUE;
 }
 
 static void
diff --git a/src/configuration/e-cal-config-ews.c b/src/configuration/e-cal-config-ews.c
index 95de674..4b85f24 100644
--- a/src/configuration/e-cal-config-ews.c
+++ b/src/configuration/e-cal-config-ews.c
@@ -28,7 +28,27 @@ G_DEFINE_DYNAMIC_TYPE (
 static gboolean
 cal_config_ews_allow_creation (ESourceConfigBackend *backend)
 {
-	return FALSE;
+	ESourceConfig *config;
+	ECalSourceConfig *cal_config;
+	ECalClientSourceType source_type;
+	gboolean allow_creation = FALSE;
+
+	config = e_source_config_backend_get_config (backend);
+
+	cal_config = E_CAL_SOURCE_CONFIG (config);
+	source_type = e_cal_source_config_get_source_type (cal_config);
+
+	switch (source_type) {
+		case E_CAL_CLIENT_SOURCE_TYPE_EVENTS:
+		case E_CAL_CLIENT_SOURCE_TYPE_TASKS:
+			allow_creation = TRUE;
+			break;
+
+		default:
+			break;
+	}
+
+	return allow_creation;
 }
 
 static void



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