*** empty log message ***
authorParthasarathi Susarla <saps@src.gnome.org>
Fri, 23 Sep 2005 05:53:03 +0000 (05:53 +0000)
committerParthasarathi Susarla <saps@src.gnome.org>
Fri, 23 Sep 2005 05:53:03 +0000 (05:53 +0000)
camel/providers/groupwise/camel-groupwise-folder.c
camel/providers/groupwise/camel-groupwise-store.c
camel/providers/groupwise/camel-groupwise-transport.c

index f9bca43..746b35a 100644 (file)
@@ -950,11 +950,7 @@ groupwise_refresh_folder(CamelFolder *folder, CamelException *ex)
        }
 
        if (list) {
-               if (!strcmp (folder->full_name, "Junk Mail")
-                   || !strcmp (folder->full_name, "Sent Items")) 
-                       gw_update_summary (folder, list, ex);
-               else
-                       gw_update_cache (folder, list, ex);
+               gw_update_cache (folder, list, ex);
        }
        
  
@@ -1167,8 +1163,13 @@ gw_update_cache ( CamelFolder *folder, GList *list, CamelException *ex)
 
                /********************* Summary Stuff ends *************************/
                exists = FALSE;
+               if (!strcmp (folder->full_name, "Junk Mail")|| !strcmp (folder->full_name, "Sent Items"))
+                       continue;
+
                /******************** Begine Caching ************************/
                mail_msg = groupwise_folder_item_to_msg (folder, item, ex);
+               if (mail_msg)
+                       camel_medium_set_header (CAMEL_MEDIUM (mail_msg), "X-Evolution-Source", groupwise_base_url_lookup (priv));
                /* add to cache if its a new message*/
                if (!exists) {
                        CAMEL_GROUPWISE_FOLDER_LOCK (folder, cache_lock);
@@ -1990,7 +1991,7 @@ convert_to_calendar (EGwItem *item, char **str, int *len)
        GSList *attach_list = NULL;
        GString *gstr = g_string_new (NULL);
        int recur_key = 0;
-       char **tmp;
+       char **tmp = NULL;
        const char *temp = NULL;
 
        tmp = g_strsplit (e_gw_item_get_id (item), "@", -1);
@@ -2086,7 +2087,7 @@ convert_to_task (EGwItem *item, char **str, int *len)
        EGwItemOrganizer *org = NULL;
        GSList *recp_list = NULL;
        GString *gstr = g_string_new (NULL);
-       char **tmp;
+       char **tmp = NULL;
        const char *temp = NULL;
        
        tmp = g_strsplit (e_gw_item_get_id (item), "@", -1);
index d34edae..c8b2c1b 100644 (file)
@@ -490,7 +490,7 @@ groupwise_get_folder (CamelStore *store, const char *folder_name, guint32 flags,
        gboolean done = FALSE;
        const char *position = E_GW_CURSOR_POSITION_END; 
        int count = 0, cursor, summary_count = 0;
-       CamelStoreInfo *si;
+       CamelStoreInfo *si = NULL;
        guint total;
        
        folder = groupwise_get_folder_from_disk (store, folder_name, flags, ex);
@@ -537,10 +537,11 @@ groupwise_get_folder (CamelStore *store, const char *folder_name, guint32 flags,
        }
        g_free (folder_dir);
 
-       si = camel_store_summary_path ((CamelStoreSummary *)(gw_store)->summary, folder->full_name);
+       si = camel_store_summary_path ((CamelStoreSummary *)gw_store->summary, folder_name);
        if (si) {
                camel_object_get (folder, NULL, CAMEL_FOLDER_TOTAL, &total, NULL);
                camel_store_summary_info_free ((CamelStoreSummary *)(gw_store)->summary, si);
+               g_print ("TOTAL:%d\n\n", total);
        }
 
        summary = (CamelGroupwiseSummary *) folder->summary;
@@ -579,7 +580,8 @@ groupwise_get_folder (CamelStore *store, const char *folder_name, guint32 flags,
                        
                        count += g_list_length (list);
                
-                       camel_operation_progress (NULL, (100*count)/total);
+                       if (total > 0)
+                               camel_operation_progress (NULL, (100*count)/total);
                        gw_update_summary (folder, list,  ex);
                        
                        if (!list)
@@ -653,6 +655,8 @@ convert_to_folder_info (CamelGroupwiseStore *store, EGwContainer *container, con
                fi->flags |= CAMEL_FOLDER_TYPE_TRASH;
        if (type == E_GW_CONTAINER_TYPE_JUNK)
                fi->flags |= CAMEL_FOLDER_TYPE_JUNK;
+       if (type == E_GW_CONTAINER_TYPE_SENT)
+               fi->flags |= CAMEL_FOLDER_TYPE_SENT;
 
        if ( (type == E_GW_CONTAINER_TYPE_INBOX) ||
                (type == E_GW_CONTAINER_TYPE_SENT) ||
@@ -965,7 +969,7 @@ groupwise_get_folder_info (CamelStore *store, const char *top, guint32 flags, Ca
         * Thanks to Michael, for his cached folders implementation in IMAP
         * is used as is here.
         */
-       if (camel_store_summary_count((CamelStoreSummary *)groupwise_store->summary) > 0) {
+       if ((groupwise_store->list_loaded == TRUE) && camel_store_summary_count((CamelStoreSummary *)groupwise_store->summary) > 0) {
                /*Load from cache*/
                time_t now;
                int ref;
index 6adbd93..a196f40 100644 (file)
@@ -50,7 +50,7 @@ static gboolean groupwise_send_to (CamelTransport *transport,
                                  CamelAddress *recipients,
                                  CamelException *ex);
 
-static gboolean groupwise_connect (CamelService *service, CamelException *ex);
+static gboolean groupwise_transport_connect (CamelService *service, CamelException *ex);
 static char *groupwise_transport_get_name (CamelService *service, gboolean brief);
 static void groupwise_transport_construct (CamelService *service, CamelSession *session,
                                           CamelProvider *provider, CamelURL *url, CamelException *ex);
@@ -71,7 +71,7 @@ camel_groupwise_transport_class_init (CamelGroupwiseTransportClass *camel_groupw
        
        parent_class = CAMEL_TRANSPORT_CLASS (camel_type_get_global_classfuncs (camel_transport_get_type ()));
        
-       camel_service_class->connect = groupwise_connect;
+       camel_service_class->connect = groupwise_transport_connect;
        camel_service_class->get_name = groupwise_transport_get_name;
        camel_service_class->construct = groupwise_transport_construct;
        
@@ -127,7 +127,7 @@ static char *groupwise_transport_get_name (CamelService *service, gboolean brief
 
 
 static gboolean
-groupwise_connect (CamelService *service, CamelException *ex)
+groupwise_transport_connect (CamelService *service, CamelException *ex)
 {
        return TRUE;