diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2007-02-06 07:59:36 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2007-02-06 07:59:36 +0000 |
commit | 57d3cf597bc3161b682906beac134d80f6f9b8d7 (patch) | |
tree | f4a0b0d5484cdc6a5d4e6da1bb7512abd2dcdaf4 /libsylph | |
parent | e80b802395604008b0f978e454e95affb39e240a (diff) |
filter junk mails from local mbox even if prefs_common.filter_on_inc is FALSE.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@1531 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'libsylph')
-rw-r--r-- | libsylph/mbox.c | 15 | ||||
-rw-r--r-- | libsylph/mbox.h | 7 |
2 files changed, 17 insertions, 5 deletions
diff --git a/libsylph/mbox.c b/libsylph/mbox.c index 7385c285..10e94297 100644 --- a/libsylph/mbox.c +++ b/libsylph/mbox.c @@ -1,6 +1,6 @@ /* * LibSylph -- E-Mail client library - * Copyright (C) 1999-2006 Hiroyuki Yamamoto + * Copyright (C) 1999-2007 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -58,6 +58,13 @@ gint proc_mbox(FolderItem *dest, const gchar *mbox, GHashTable *folder_table) { + return proc_mbox_full(dest, mbox, folder_table, + folder_table ? TRUE : FALSE); +} + +gint proc_mbox_full(FolderItem *dest, const gchar *mbox, + GHashTable *folder_table, gboolean apply_filter) +{ FILE *mbox_fp; gchar buf[MSGBUFSIZE], from_line[MSGBUFSIZE]; gchar *tmp_file; @@ -204,18 +211,18 @@ gint proc_mbox(FolderItem *dest, const gchar *mbox, GHashTable *folder_table) fltinfo->flags.perm_flags = MSG_NEW|MSG_UNREAD; fltinfo->flags.tmp_flags = MSG_RECEIVED; - if (folder_table && prefs_common.enable_junk && + if (prefs_common.enable_junk && prefs_common.filter_junk_on_recv && prefs_common.filter_junk_before) { filter_apply(prefs_common.junk_fltlist, tmp_file, fltinfo); } - if (!fltinfo->drop_done && folder_table) + if (!fltinfo->drop_done && apply_filter) filter_apply(prefs_common.fltlist, tmp_file, fltinfo); if (!fltinfo->drop_done && - folder_table && prefs_common.enable_junk && + prefs_common.enable_junk && prefs_common.filter_junk_on_recv && !prefs_common.filter_junk_before) { filter_apply(prefs_common.junk_fltlist, tmp_file, diff --git a/libsylph/mbox.h b/libsylph/mbox.h index ce0f9112..eb29ecac 100644 --- a/libsylph/mbox.h +++ b/libsylph/mbox.h @@ -1,6 +1,6 @@ /* * LibSylph -- E-Mail client library - * Copyright (C) 1999-2005 Hiroyuki Yamamoto + * Copyright (C) 1999-2007 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -32,6 +32,11 @@ typedef enum { gint proc_mbox (FolderItem *dest, const gchar *mbox, GHashTable *folder_table); +gint proc_mbox_full (FolderItem *dest, + const gchar *mbox, + GHashTable *folder_table, + gboolean apply_filter); + gint lock_mbox (const gchar *base, LockType type); gint unlock_mbox (const gchar *base, |