aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-ops.c
diff options
context:
space:
mode:
Diffstat (limited to 'mail/mail-ops.c')
-rw-r--r--mail/mail-ops.c85
1 files changed, 0 insertions, 85 deletions
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index 99a7367378..ca2027c25d 100644
--- a/mail/mail-ops.c
+++ b/mail/mail-ops.c
@@ -2349,88 +2349,3 @@ mail_execute_shell_command (CamelFilterDriver *driver, int argc, char **argv, vo
gnome_execute_async_fds (NULL, argc, argv, TRUE);
}
-
-/* [Un]mark junk flag */
-
-struct _mark_junk_mail_msg {
- struct _mail_msg msg;
-
- CamelFolder *folder;
- GPtrArray *uids;
- gboolean junk;
-};
-
-static char *
-mark_junk_describe (struct _mail_msg *mm, int complete)
-{
- return g_strdup (_("Changing junk status"));
-}
-
-static void
-mark_junk_mark (struct _mail_msg *mm)
-{
- struct _mark_junk_mail_msg *m = (struct _mark_junk_mail_msg *) mm;
- CamelJunkPlugin *csp = ((CamelService *)m->folder->parent_store)->session->junk_plugin;
- gboolean commit_reports = FALSE;
- void (*report)(CamelJunkPlugin *, CamelMimeMessage *);
- int i;
-
- if (csp == NULL)
- return;
-
- /* FIXME: This should probably be implictly handled by the
- folder when you apply the junk bit, e.g. at sync time. */
-
- if (m->junk)
- report = camel_junk_plugin_report_junk;
- else
- report = camel_junk_plugin_report_notjunk;
-
- for (i=0; i<m->uids->len; i++) {
- CamelMimeMessage *msg = camel_folder_get_message(m->folder, m->uids->pdata[i], NULL);
-
- if (msg) {
- report(csp, msg);
- commit_reports = TRUE;
- camel_object_unref(msg);
- }
- }
-
- if (commit_reports)
- camel_junk_plugin_commit_reports(csp);
-}
-
-static void
-mark_junk_marked (struct _mail_msg *mm)
-{
-}
-
-static void
-mark_junk_free (struct _mail_msg *mm)
-{
- struct _mark_junk_mail_msg *m = (struct _mark_junk_mail_msg *)mm;
-
- camel_object_unref(m->folder);
- em_utils_uids_free(m->uids);
-}
-
-static struct _mail_msg_op mark_junk_op = {
- mark_junk_describe,
- mark_junk_mark,
- mark_junk_marked,
- mark_junk_free,
-};
-
-void
-mail_mark_junk(CamelFolder *folder, GPtrArray *uids, gboolean junk)
-{
- struct _mark_junk_mail_msg *m;
-
- m = mail_msg_new(&mark_junk_op, NULL, sizeof (*m));
- m->folder = folder;
- camel_object_ref(folder);
- m->uids = uids;
- m->junk = junk;
-
- e_thread_put(mail_thread_queued, (EMsg *) m);
-}