diff options
-rw-r--r-- | camel/ChangeLog | 3 | ||||
-rw-r--r-- | camel/camel-vee-folder.c | 53 |
2 files changed, 56 insertions, 0 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index 15d4d35705..6122390f5a 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,5 +1,8 @@ 2002-06-14 Jeffrey Stedfast <fejj@ximian.com> + * camel-vee-folder.c (vee_freeze): Freeze source folders. + (vee_thaw): Thaw all source folders. Fixes bug #24317. + * providers/imap/camel-imap-folder.c (imap_sync_online): Unlock the command_lock after each UID STORE command so that other (probably more important) threads can send their requests. diff --git a/camel/camel-vee-folder.c b/camel/camel-vee-folder.c index 7904ab5f12..eb9a5d21b9 100644 --- a/camel/camel-vee-folder.c +++ b/camel/camel-vee-folder.c @@ -53,6 +53,9 @@ static void vee_refresh_info(CamelFolder *folder, CamelException *ex); static void vee_sync (CamelFolder *folder, gboolean expunge, CamelException *ex); static void vee_expunge (CamelFolder *folder, CamelException *ex); +static void vee_freeze (CamelFolder *folder); +static void vee_thaw (CamelFolder *folder); + static CamelMimeMessage *vee_get_message (CamelFolder *folder, const gchar *uid, CamelException *ex); static void vee_append_message(CamelFolder *folder, CamelMimeMessage *message, const CamelMessageInfo *info, char **appended_uid, CamelException *ex); static void vee_transfer_messages_to(CamelFolder *source, GPtrArray *uids, CamelFolder *dest, GPtrArray **transferred_uids, gboolean delete_originals, CamelException *ex); @@ -134,6 +137,9 @@ camel_vee_folder_class_init (CamelVeeFolderClass *klass) folder_class->set_message_user_flag = vee_set_message_user_flag; folder_class->rename = vee_rename; + + folder_class->freeze = vee_freeze; + folder_class->thaw = vee_thaw; } static void @@ -1566,3 +1572,50 @@ subfolder_deleted(CamelFolder *f, void *event_data, CamelVeeFolder *vf) { camel_vee_folder_remove_folder(vf, f); } + + +static void +vee_freeze (CamelFolder *folder) +{ + CamelVeeFolder *vfolder = (CamelVeeFolder *) folder; + struct _CamelVeeFolderPrivate *p = _PRIVATE (vfolder); + GList *node; + + CAMEL_VEE_FOLDER_LOCK (vfolder, subfolder_lock); + + node = p->folders; + while (node) { + CamelFolder *f = node->data; + + camel_folder_freeze (f); + node = node->next; + } + + CAMEL_VEE_FOLDER_UNLOCK (vfolder, subfolder_lock); + + /* call parent implementation */ + CAMEL_FOLDER_CLASS (camel_vee_folder_parent)->freeze (folder); +} + +static void +vee_thaw (CamelFolder *folder) +{ + CamelVeeFolder *vfolder = (CamelVeeFolder *) folder; + struct _CamelVeeFolderPrivate *p = _PRIVATE (vfolder); + GList *node; + + CAMEL_VEE_FOLDER_LOCK (vfolder, subfolder_lock); + + node = p->folders; + while (node) { + CamelFolder *f = node->data; + + camel_folder_thaw (f); + node = node->next; + } + + CAMEL_VEE_FOLDER_UNLOCK (vfolder, subfolder_lock); + + /* call parent implementation */ + CAMEL_FOLDER_CLASS (camel_vee_folder_parent)->thaw (folder); +} |