diff options
Diffstat (limited to 'mail/mail-ops.c')
-rw-r--r-- | mail/mail-ops.c | 71 |
1 files changed, 4 insertions, 67 deletions
diff --git a/mail/mail-ops.c b/mail/mail-ops.c index fa43d361f3..9820e855e9 100644 --- a/mail/mail-ops.c +++ b/mail/mail-ops.c @@ -30,7 +30,6 @@ /* #include <ctype.h> */ #include <errno.h> -#include <gnome.h> #include <gal/util/e-util.h> #include <gal/widgets/e-unicode.h> #include <gal/util/e-unicode-i18n.h> @@ -120,14 +119,13 @@ filter_folder_filter (struct _mail_msg *mm) folder_uids = uids = camel_folder_get_uids (folder); camel_filter_driver_filter_folder (m->driver, folder, m->cache, uids, m->delete, &mm->ex); - camel_filter_driver_flush (m->driver, &mm->ex); if (folder_uids) camel_folder_free_uids (folder, folder_uids); - /* sync our source folder */ + /* sync and expunge */ if (!m->cache) - camel_folder_sync (folder, FALSE, camel_exception_is_set (&mm->ex) ? NULL : &mm->ex); + camel_folder_sync (folder, TRUE, camel_exception_is_set (&mm->ex) ? NULL : &mm->ex); camel_folder_thaw (folder); if (m->destination) @@ -177,8 +175,7 @@ static struct _mail_msg_op filter_folder_op = { void mail_filter_folder (CamelFolder *source_folder, GPtrArray *uids, - const char *type, gboolean notify, - CamelOperation *cancel) + const char *type, CamelOperation *cancel) { struct _filter_mail_msg *m; @@ -195,12 +192,6 @@ mail_filter_folder (CamelFolder *source_folder, GPtrArray *uids, m->driver = camel_session_get_filter_driver (session, type, NULL); - if (!notify) { - /* FIXME: have a #define NOTIFY_FILTER_NAME macro? */ - /* the filter name has to stay in sync with mail-session::get_filter_driver */ - camel_filter_driver_remove_rule_by_name (m->driver, "new-mail-notification"); - } - e_thread_put (mail_thread_new, (EMsg *)m); } @@ -208,7 +199,7 @@ mail_filter_folder (CamelFolder *source_folder, GPtrArray *uids, void mail_filter_on_demand (CamelFolder *folder, GPtrArray *uids) { - mail_filter_folder (folder, uids, FILTER_SOURCE_INCOMING, FALSE, NULL); + mail_filter_folder (folder, uids, FILTER_SOURCE_INCOMING, NULL); } /* ********************************************************************** */ @@ -2179,57 +2170,3 @@ mail_store_set_offline (CamelStore *store, gboolean offline, e_thread_put(mail_thread_queued, (EMsg *)m); } - - -/* ** Execute Shell Command ***************************************************** */ - -struct _execute_shell_command_msg { - struct _mail_msg msg; - - char *command; -}; - -static char *execute_shell_command_desc (struct _mail_msg *mm, int done) -{ - struct _execute_shell_command_msg *m = (struct _execute_shell_command_msg *) mm; - char *msg; - - msg = g_strdup_printf (_("Executing shell command: %s"), m->command); - - return msg; -} - -static void execute_shell_command_do (struct _mail_msg *mm) -{ - struct _execute_shell_command_msg *m = (struct _execute_shell_command_msg *) mm; - - gnome_execute_shell (NULL, m->command); -} - -static void execute_shell_command_free (struct _mail_msg *mm) -{ - struct _execute_shell_command_msg *m = (struct _execute_shell_command_msg *) mm; - - g_free (m->command); -} - -static struct _mail_msg_op execute_shell_command_op = { - execute_shell_command_desc, - execute_shell_command_do, - NULL, - execute_shell_command_free, -}; - -void -mail_execute_shell_command (CamelFilterDriver *driver, const char *command, void *data) -{ - struct _execute_shell_command_msg *m; - - if (command == NULL) - return; - - m = mail_msg_new (&execute_shell_command_op, NULL, sizeof (*m)); - m->command = g_strdup (command); - - e_thread_put (mail_thread_queued, (EMsg *) m); -} |