evolution r35821 - branches/EXCHANGE_MAPI_BRANCH/plugins/exchange-mapi



Author: msuman
Date: Wed Jul 23 06:49:42 2008
New Revision: 35821
URL: http://svn.gnome.org/viewvc/evolution?rev=35821&view=rev

Log:
Default folders should not be deletable, set auth-type on newly created folders.

Modified:
   branches/EXCHANGE_MAPI_BRANCH/plugins/exchange-mapi/ChangeLog
   branches/EXCHANGE_MAPI_BRANCH/plugins/exchange-mapi/exchange-account-listener.c
   branches/EXCHANGE_MAPI_BRANCH/plugins/exchange-mapi/exchange-mapi-account-setup.c

Modified: branches/EXCHANGE_MAPI_BRANCH/plugins/exchange-mapi/exchange-account-listener.c
==============================================================================
--- branches/EXCHANGE_MAPI_BRANCH/plugins/exchange-mapi/exchange-account-listener.c	(original)
+++ branches/EXCHANGE_MAPI_BRANCH/plugins/exchange-mapi/exchange-account-listener.c	Wed Jul 23 06:49:42 2008
@@ -211,7 +211,7 @@
 {
 	ESourceList *source_list = NULL;
 	ESourceGroup *group = NULL;
-	const gchar *conf_key = NULL, *source_selection_key = NULL, *primary_source_name = NULL;
+	const gchar *conf_key = NULL, *source_selection_key = NULL;
  	GSList *temp_list = NULL;
 	GConfClient* client;
 	GSList *ids, *temp ;
@@ -220,15 +220,12 @@
 	if (folder_type ==  MAPI_FOLDER_TYPE_APPOINTMENT) { 
 		conf_key = CALENDAR_SOURCES;
 		source_selection_key = SELECTED_CALENDARS;
-//		primary_source_name = "Calendar";
 	} else if (folder_type == MAPI_FOLDER_TYPE_TASK) { 
 		conf_key = TASK_SOURCES;
 		source_selection_key = SELECTED_TASKS;
-//		primary_source_name = "Tasks";
 	} else if (folder_type == MAPI_FOLDER_TYPE_MEMO) {
 		conf_key = JOURNAL_SOURCES;
 		source_selection_key = SELECTED_JOURNALS;
-//		primary_source_name = "Notes";
 	} else {
 		g_warning ("%s(%d): %s: Unknown ExchangeMAPIFolderType\n", __FILE__, __LINE__, __PRETTY_FUNCTION__);
 		return;
@@ -274,11 +271,9 @@
 		e_source_set_property (source, "offline_sync", 
 					       camel_url_get_param (url, "offline_sync") ? "1" : "0");
 
-		/* FIXME: The primary folders cannot be deleted */
-#if 0
-		if (strcmp (folder->folder_name, primary_source_name) == 0) 
+		if (folder->is_default) 
 			e_source_set_property (source, "delete", "no");
-#endif
+
 		if (folder->parent_folder_id) {
 			gchar *tmp = exchange_mapi_util_mapi_id_to_string (folder->parent_folder_id);
 			e_source_set_property (source, "parent-fid", tmp);
@@ -311,6 +306,7 @@
 
 	if (!e_source_list_add_group (source_list, group, -1))
 		return;
+
 	if (!e_source_list_sync (source_list, NULL))
 		return;
 

Modified: branches/EXCHANGE_MAPI_BRANCH/plugins/exchange-mapi/exchange-mapi-account-setup.c
==============================================================================
--- branches/EXCHANGE_MAPI_BRANCH/plugins/exchange-mapi/exchange-mapi-account-setup.c	(original)
+++ branches/EXCHANGE_MAPI_BRANCH/plugins/exchange-mapi/exchange-mapi-account-setup.c	Wed Jul 23 06:49:42 2008
@@ -719,16 +719,12 @@
 	exchange_mapi_util_mapi_id_from_string (sfid, &pfid);
 
 	fid = exchange_mapi_create_folder (type, pfid, e_source_peek_name (source));
-	printf("Created %016llX\n", fid);
-
-	grp = e_source_peek_group (source);
 
 	e_source_set_property (source, "auth", "1");
 	e_source_set_property (source, "auth-domain", E_PASSWORD_COMPONENT);
+	e_source_set_property (source, "auth-type", "plain/password");
 
-	tmp = e_source_group_get_property (grp, "use_ssl");
-	e_source_set_property (source, "use_ssl", tmp);
-	g_free (tmp);
+	grp = e_source_peek_group (source);
 
 	tmp = e_source_group_get_property (grp, "username");
 	e_source_set_property (source, "username", tmp);
@@ -738,9 +734,6 @@
 	e_source_set_property (source, "host", tmp);
 	g_free (tmp);
 
-//	e_source_set_property (source, "offline_sync", 
-//				       camel_url_get_param (url, "offline_sync") ? "1" : "0");
-
 	tmp = e_source_group_get_property (grp, "profile");
 	e_source_set_property (source, "profile", tmp);
 	g_free (tmp);
@@ -754,6 +747,12 @@
 	e_source_set_property (source, "folder-id", tmp);
 	g_free (tmp);
 
+	tmp = e_source_group_get_property (grp, "use_ssl");
+	e_source_set_property (source, "use_ssl", tmp);
+	g_free (tmp);
+
+	e_source_set_property (source, "offline_sync", "0");
+
 	/* Delegatees can never create folders for delegators. So we can copy safely. */
 	tmp = e_source_group_get_property (grp, "acl-user-name");
 	e_source_set_property (source, "acl-user-name", tmp);



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