}
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);
}
/********************* 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);
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);
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);
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);
}
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;
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)
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) ||
* 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;
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);
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;
static gboolean
-groupwise_connect (CamelService *service, CamelException *ex)
+groupwise_transport_connect (CamelService *service, CamelException *ex)
{
return TRUE;