diff options
author | Not Zed <NotZed@Ximian.com> | 2005-08-10 10:04:31 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2005-08-10 10:04:31 +0800 |
commit | e14a0019e799ea6c91ca6320ab0ca6c3c89dc7b6 (patch) | |
tree | 11de1e177b25c26eed619ef60b187fc1835aba66 /mail/em-folder-utils.c | |
parent | 7bbb6938b70d7eef0de8e17de3541e447682d9c9 (diff) | |
download | gsoc2013-evolution-e14a0019e799ea6c91ca6320ab0ca6c3c89dc7b6.tar.gz gsoc2013-evolution-e14a0019e799ea6c91ca6320ab0ca6c3c89dc7b6.tar.zst gsoc2013-evolution-e14a0019e799ea6c91ca6320ab0ca6c3c89dc7b6.zip |
** See #312715.
2005-08-09 Not Zed <NotZed@Ximian.com>
** See #312715.
* em-folder-tree.c (emft_drop_folder_rec): removed.
(emft_drop_folder): call em_folder_utils_copy_folders to perform
the operation rather than: doing it sync when it shouldn't be, and
2; copying code redundantly.
* em-folder-utils.c (em_folder_utils_move_folder): remove this
redundant api.
(em_folder_utils_copy_folder): add delete flag.
(em_folder_utils_copy_folders): export this function. fix strange
argument order.
svn path=/trunk/; revision=30066
Diffstat (limited to 'mail/em-folder-utils.c')
-rw-r--r-- | mail/em-folder-utils.c | 36 |
1 files changed, 12 insertions, 24 deletions
diff --git a/mail/em-folder-utils.c b/mail/em-folder-utils.c index ca8299361c..6578423880 100644 --- a/mail/em-folder-utils.c +++ b/mail/em-folder-utils.c @@ -244,11 +244,12 @@ static struct _mail_msg_op copy_folders_op = { emft_copy_folders__free, }; -static void -emfu_copy_folders (CamelStore *tostore, const char *tobase, CamelStore *fromstore, const char *frombase, int delete) +int +em_folder_utils_copy_folders(CamelStore *fromstore, const char *frombase, CamelStore *tostore, const char *tobase, int delete) { struct _EMCopyFolders *m; - + int seq; + m = mail_msg_new (©_folders_op, NULL, sizeof (struct _EMCopyFolders)); camel_object_ref (fromstore); m->fromstore = fromstore; @@ -257,8 +258,11 @@ emfu_copy_folders (CamelStore *tostore, const char *tobase, CamelStore *fromstor m->frombase = g_strdup (frombase); m->tobase = g_strdup (tobase); m->delete = delete; - + seq = m->msg.seq; + e_thread_put (mail_thread_new, (EMsg *) m); + + return seq; } struct _copy_folder_data { @@ -308,7 +312,7 @@ emfu_copy_folder_selected (const char *uri, void *data) if (tobase == NULL) tobase = ""; - emfu_copy_folders (tostore, tobase, fromstore, cfd->fi->full_name, cfd->delete); + em_folder_utils_copy_folders(fromstore, cfd->fi->full_name, tostore, tobase, cfd->delete); camel_url_free (url); fail: @@ -353,31 +357,15 @@ emfu_copy_folder_exclude(EMFolderTree *tree, GtkTreeModel *model, GtkTreeIter *i /* FIXME: this interface references the folderinfo without copying it */ /* FIXME: these functions must be documented */ void -em_folder_utils_copy_folder (CamelFolderInfo *folderinfo) +em_folder_utils_copy_folder(CamelFolderInfo *folderinfo, int delete) { struct _copy_folder_data *cfd; cfd = g_malloc (sizeof (*cfd)); cfd->fi = folderinfo; - cfd->delete = FALSE; - - em_select_folder (NULL, _("Select folder"), _("C_opy"), - NULL, emfu_copy_folder_exclude, - emfu_copy_folder_selected, cfd);} - - -/* FIXME: this interface references the folderinfo without copying it */ -/* FIXME: these functions must be documented */ -void -em_folder_utils_move_folder (CamelFolderInfo *folderinfo) -{ - struct _copy_folder_data *cfd; - - cfd = g_malloc (sizeof (*cfd)); - cfd->fi = folderinfo; - cfd->delete = TRUE; + cfd->delete = delete; - em_select_folder (NULL, _("Select folder"), _("_Move"), + em_select_folder (NULL, _("Select folder"), delete?_("_Move"):_("C_opy"), NULL, emfu_copy_folder_exclude, emfu_copy_folder_selected, cfd); } |