evolution-mapi r107 - in trunk/src: camel libexchangemapi



Author: jjohnny
Date: Mon Feb  9 07:47:19 2009
New Revision: 107
URL: http://svn.gnome.org/viewvc/evolution-mapi?rev=107&view=rev

Log:
Do not allow operations on Mailbox (name) folder. Partially fixes #568519.

Modified:
   trunk/src/camel/ChangeLog
   trunk/src/camel/camel-mapi-store.c
   trunk/src/libexchangemapi/ChangeLog
   trunk/src/libexchangemapi/exchange-mapi-connection.c

Modified: trunk/src/camel/camel-mapi-store.c
==============================================================================
--- trunk/src/camel/camel-mapi-store.c	(original)
+++ trunk/src/camel/camel-mapi-store.c	Mon Feb  9 07:47:19 2009
@@ -1003,7 +1003,10 @@
 		case olFolderDeletedItems:
 			fi->flags |= CAMEL_FOLDER_TYPE_TRASH;
 			break;
-		/*TODO : case olFolderJunkMail */
+		/*Fixme : IsMailboxFolder doesn't support this yet*/
+		/* case olFolderJunkMail: */
+		/* 	fi->flags |= CAMEL_FOLDER_TYPE_JUNK; */
+		/* 	break; */
 		}
 
 		fi->flags |= CAMEL_FOLDER_SYSTEM;
@@ -1153,7 +1156,7 @@
 	for (;folder_list != NULL; folder_list = g_slist_next (folder_list)) {
 		ExchangeMAPIFolder *folder = (ExchangeMAPIFolder *) folder_list->data;
 		
-		if (exchange_mapi_folder_is_root ((ExchangeMAPIFolder *)(folder)))
+		if (folder->default_type == olPublicFoldersAllPublicFolders)
 			continue;
 
 		if ( folder->container_class != MAPI_FOLDER_TYPE_MAIL) 

Modified: trunk/src/libexchangemapi/exchange-mapi-connection.c
==============================================================================
--- trunk/src/libexchangemapi/exchange-mapi-connection.c	(original)
+++ trunk/src/libexchangemapi/exchange-mapi-connection.c	Mon Feb  9 07:47:19 2009
@@ -2609,7 +2609,11 @@
 	utf8_mailbox_name = utf8tolinux (mailbox_name);
 
 	/* FIXME: May have to get the child folders count? Do we need/use it? */
-	folder = exchange_mapi_folder_new (utf8_mailbox_name, IPF_NOTE, MAPI_PERSONAL_FOLDER, mailbox_id, 0, 0, 0 ,0); 
+	folder = exchange_mapi_folder_new (utf8_mailbox_name, IPF_NOTE, 
+					   MAPI_PERSONAL_FOLDER, mailbox_id, 0, 0, 0 ,0); 
+	folder->is_default = true;
+	folder->default_type = olFolderTopInformationStore; /*Is this correct ?*/
+
 	*mapi_folders = g_slist_prepend (*mapi_folders, folder);
 
 	/* FIXME: check status of get_child_folders */
@@ -2668,7 +2672,10 @@
 	}
 
 	/*  TODO : Localized string */
-	folder = exchange_mapi_folder_new ("All Public Folders", IPF_NOTE, 0, mailbox_id, 0, 0, 0 ,0);
+	folder = exchange_mapi_folder_new ("All Public Folders", IPF_NOTE, 0, 
+					   mailbox_id, 0, 0, 0 ,0);
+	folder->is_default = true;
+	folder->default_type = olPublicFoldersAllPublicFolders;
 
 	*mapi_folders = g_slist_prepend (*mapi_folders, folder);
 



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