From: Parthasarathi Susarla Date: Thu, 4 Aug 2005 09:47:17 +0000 (+0000) Subject: set the service status flag to connected. purge items if it is a Trash X-Git-Tag: upstream/3.7.4~7106 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=41f7f606a4380afe44001e021c3b103f46aa7027;p=platform%2Fupstream%2Fevolution-data-server.git set the service status flag to connected. purge items if it is a Trash 2005-08-04 Parthasarathi Susarla * camel-groupwise-store.c: (groupwise_connect): set the service status flag to connected. * camel-groupwise-folder.c: (groupwise_expunge): purge items if it is a Trash Folder. Fixes Bug ** 311887 --- diff --git a/camel/providers/groupwise/ChangeLog b/camel/providers/groupwise/ChangeLog index c4b02d5..ba4f44d 100644 --- a/camel/providers/groupwise/ChangeLog +++ b/camel/providers/groupwise/ChangeLog @@ -1,3 +1,13 @@ +2005-08-04 Parthasarathi Susarla + + * camel-groupwise-store.c: + (groupwise_connect): set the service status flag to + connected. + * camel-groupwise-folder.c: + (groupwise_expunge): purge items if it is a Trash + Folder. + Fixes Bug ** 311887 + 2005-08-03 Parthasarathi Susarla * camel-groupwise-folder.c: diff --git a/camel/providers/groupwise/camel-groupwise-folder.c b/camel/providers/groupwise/camel-groupwise-folder.c index 77a205c..4ec691b 100644 --- a/camel/providers/groupwise/camel-groupwise-folder.c +++ b/camel/providers/groupwise/camel-groupwise-folder.c @@ -1656,9 +1656,22 @@ groupwise_expunge (CamelFolder *folder, CamelException *ex) CAMEL_SERVICE_LOCK (groupwise_store, connect_lock); - changes = camel_folder_change_info_new (); - cnc = cnc_lookup (priv); + if (!cnc) + return; + + if (!strcmp (folder->full_name, "Trash")) { + status = e_gw_connection_purge_deleted_items (cnc); + if (status == E_GW_CONNECTION_STATUS_OK) { + camel_folder_summary_clear (folder->summary); + camel_folder_summary_save (folder->summary); + } else + g_warning ("Could not Empty Trash\n"); + CAMEL_SERVICE_UNLOCK (groupwise_store, connect_lock); + return; + } + + changes = camel_folder_change_info_new (); container_id = g_strdup (camel_groupwise_store_container_id_lookup (groupwise_store, folder->full_name)) ; diff --git a/camel/providers/groupwise/camel-groupwise-store.c b/camel/providers/groupwise/camel-groupwise-store.c index 1afd6e2..c84c5ea 100644 --- a/camel/providers/groupwise/camel-groupwise-store.c +++ b/camel/providers/groupwise/camel-groupwise-store.c @@ -257,6 +257,8 @@ groupwise_connect (CamelService *service, CamelException *ex) camel_service_disconnect (service, TRUE, NULL); return FALSE; } + + service->status = CAMEL_SERVICE_CONNECTED; if (!e_gw_connection_get_version (priv->cnc)) { camel_session_alert_user(session, @@ -711,6 +713,8 @@ groupwise_get_folder_info (CamelStore *store, const char *top, guint32 flags, Ca if (type == E_GW_CONTAINER_TYPE_INBOX) fi->flags |= CAMEL_FOLDER_TYPE_INBOX; + if (type == E_GW_CONTAINER_TYPE_TRASH) + fi->flags |= CAMEL_FOLDER_TYPE_TRASH; if ( (type == E_GW_CONTAINER_TYPE_INBOX) || (type == E_GW_CONTAINER_TYPE_OUTBOX) ||