return NULL;
}
+FolderItem *folder_get_default_outbox_for_class(FolderType type)
+{
+ GList *flist;
+
+ for (flist = folder_list; flist != NULL; flist = g_list_next(flist)) {
+ Folder * folder = FOLDER(flist->data);
+
+ if (folder == NULL)
+ continue;
+ if (folder->outbox == NULL)
+ continue;
+ if (folder->klass->type != type)
+ continue;
+
+ return folder->outbox;
+ }
+
+ return NULL;
+}
+
FolderItem *folder_get_default_draft(void)
{
GList *flist;
return NULL;
}
+FolderItem *folder_get_default_draft_for_class(FolderType type)
+{
+ GList *flist;
+
+ for (flist = folder_list; flist != NULL; flist = g_list_next(flist)) {
+ Folder * folder = FOLDER(flist->data);
+
+ if (folder == NULL)
+ continue;
+ if (folder->draft == NULL)
+ continue;
+ if (folder->klass->type != type)
+ continue;
+
+ return folder->draft;
+ }
+
+ return NULL;
+}
+
FolderItem *folder_get_default_queue(void)
{
GList *flist;
return NULL;
}
+FolderItem *folder_get_default_queue_for_class(FolderType type)
+{
+ GList *flist;
+
+ for (flist = folder_list; flist != NULL; flist = g_list_next(flist)) {
+ Folder * folder = FOLDER(flist->data);
+
+ if (folder == NULL)
+ continue;
+ if (folder->queue == NULL)
+ continue;
+ if (folder->klass->type != type)
+ continue;
+
+ return folder->queue;
+ }
+
+ return NULL;
+}
+
FolderItem *folder_get_default_trash(void)
{
GList *flist;
return NULL;
}
+FolderItem *folder_get_default_trash_for_class(FolderType type)
+{
+ GList *flist;
+
+ for (flist = folder_list; flist != NULL; flist = g_list_next(flist)) {
+ Folder * folder = FOLDER(flist->data);
+
+ if (folder == NULL)
+ continue;
+ if (folder->trash == NULL)
+ continue;
+ if (folder->klass->type != type)
+ continue;
+
+ return folder->trash;
+ }
+
+ return NULL;
+}
+
#define CREATE_FOLDER_IF_NOT_EXIST(member, dir, type) \
{ \
if (!folder->member) { \
return -1;
debug_print("fetching all messages in %s ...\n", item->path ? item->path : "(null)");
- statusbar_print_all(_("Fetching all messages in %s ...\n"), item->path ? item->path : "(null)");
+ statuswindow_print_all(_("Fetching all messages in %s ...\n"), item->path ? item->path : "(null)");
folder = item->folder;
}
statusbar_progress_all(0,0,0);
- statusbar_pop_all();
+ statuswindow_pop_all();
procmsg_msg_list_free(mlist);
return ret;
debug_print("%s %s to %s\n", copy?"Copying":"Moving", src->path, dest->path);
new_item = folder_create_folder(dest, src->name);
if (new_item == NULL) {
- printf("Can't create folder\n");
+ g_print("Can't create folder\n");
return NULL;
}
if (!item->cache) folder_item_read_cache(item);
+ msginfo = msgcache_get_msg(item->cache, num);
+ if (MSG_IS_LOCKED(msginfo->flags)) {
+ procmsg_msginfo_free(msginfo);
+ return -1;
+ }
ret = folder->klass->remove_msg(folder, item, num);
- msginfo = msgcache_get_msg(item->cache, num);
if (msginfo != NULL) {
remove_msginfo_from_cache(item, msginfo);
procmsg_msginfo_free(msginfo);
if (!item)
return;
if (item->prefs->offlinesync && item->folder->klass->synchronise) {
- statusbar_print_all(_("Synchronising %s for offline use...\n"), item->path ? item->path : "(null)");
+ statuswindow_print_all(_("Synchronising %s for offline use...\n"), item->path ? item->path : "(null)");
item->folder->klass->synchronise(item,
item->prefs->offlinesync_days);
if (item->prefs->offlinesync_days > 0 &&
item->prefs->remove_old_bodies)
folder_item_clean_local_files(item, item->prefs->offlinesync_days);
- statusbar_pop_all();
+ statuswindow_pop_all();
}
}