evolution-data-server r9416 - branches/EXCHANGE_MAPI_BRANCH/camel/providers/mapi



Author: jjohnny
Date: Thu Aug 21 11:04:43 2008
New Revision: 9416
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=9416&view=rev

Log:
Mark default folder in folderinfo


Modified:
   branches/EXCHANGE_MAPI_BRANCH/camel/providers/mapi/ChangeLog
   branches/EXCHANGE_MAPI_BRANCH/camel/providers/mapi/camel-mapi-store.c

Modified: branches/EXCHANGE_MAPI_BRANCH/camel/providers/mapi/camel-mapi-store.c
==============================================================================
--- branches/EXCHANGE_MAPI_BRANCH/camel/providers/mapi/camel-mapi-store.c	(original)
+++ branches/EXCHANGE_MAPI_BRANCH/camel/providers/mapi/camel-mapi-store.c	Thu Aug 21 11:04:43 2008
@@ -820,6 +820,7 @@
 	const char *name;
 	CamelFolderInfo *fi;
 	CamelMapiStorePrivate *priv = mapi_store->priv;
+	char *excl_parent;
 
 	fi = g_malloc0(sizeof(*fi));
 	
@@ -846,13 +847,17 @@
 	else
 		name++;
 
-	if (!strcmp (folder_name, "Sent Items"))
+	/*Exclude the parent and check; FIXME! */
+	excl_parent = strchr(fi->full_name , '/');
+	excl_parent ++;
+
+	if (!strcmp (excl_parent, "Sent Items"))
 		fi->flags |= CAMEL_FOLDER_TYPE_SENT;
-	else if (!strcmp (folder_name, "Inbox"))
+	else if (!strcmp (excl_parent, "Inbox"))
 		fi->flags |= CAMEL_FOLDER_TYPE_INBOX;
-	else if (!strcmp (folder_name, "Deleted Items"))
+	else if (!strcmp (excl_parent, "Deleted Items"))
 		fi->flags |= CAMEL_FOLDER_TYPE_TRASH;
-	else if (!strcmp (folder_name, "Junk Mail"))
+	else if (!strcmp (excl_parent, "Junk Mail"))
 		fi->flags |= CAMEL_FOLDER_TYPE_JUNK;
 		
 	fi->name = g_strdup(name);



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