aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2007-02-08 01:53:42 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2007-02-08 01:53:42 +0000
commit51f4fa2f70d527f0496ce93ea67e066119af69bc (patch)
tree8ca6989ced6ecee6c7700d3f16301b148dca6f17
parent71fefa4187e49bc09bfda6cce14fe92ebd1f008d (diff)
don't filter junk on import.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@1535 ee746299-78ed-0310-b773-934348b2243d
-rw-r--r--ChangeLog6
-rw-r--r--ChangeLog.ja7
-rw-r--r--libsylph/mbox.c13
-rw-r--r--libsylph/mbox.h3
-rw-r--r--src/inc.c4
5 files changed, 25 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 533613f2..0f3700f2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-02-08
+
+ * libsylph/mbox.[ch]
+ src/inc.c: added the argument filter_junk to proc_mbox_full().
+ proc_mbox(): don't filter junk if folder_table is NULL.
+
2007-02-07
* version 2.4.0beta3
diff --git a/ChangeLog.ja b/ChangeLog.ja
index bb16173d..551fb686 100644
--- a/ChangeLog.ja
+++ b/ChangeLog.ja
@@ -1,3 +1,10 @@
+2007-02-08
+
+ * libsylph/mbox.[ch]
+ src/inc.c: proc_mbox_full() に引数 filter_junk を追加。
+ proc_mbox(): folder_table が NULL の場合迷惑メールを振り分けない
+ ようにした。
+
2007-02-07
* version 2.4.0beta3
diff --git a/libsylph/mbox.c b/libsylph/mbox.c
index 10e94297..72c2c5f4 100644
--- a/libsylph/mbox.c
+++ b/libsylph/mbox.c
@@ -59,11 +59,14 @@
gint proc_mbox(FolderItem *dest, const gchar *mbox, GHashTable *folder_table)
{
return proc_mbox_full(dest, mbox, folder_table,
- folder_table ? TRUE : FALSE);
+ folder_table ? TRUE : FALSE,
+ folder_table && prefs_common.enable_junk &&
+ prefs_common.filter_junk_on_recv ? TRUE : FALSE);
}
gint proc_mbox_full(FolderItem *dest, const gchar *mbox,
- GHashTable *folder_table, gboolean apply_filter)
+ GHashTable *folder_table, gboolean apply_filter,
+ gboolean filter_junk)
{
FILE *mbox_fp;
gchar buf[MSGBUFSIZE], from_line[MSGBUFSIZE];
@@ -211,8 +214,7 @@ gint proc_mbox_full(FolderItem *dest, const gchar *mbox,
fltinfo->flags.perm_flags = MSG_NEW|MSG_UNREAD;
fltinfo->flags.tmp_flags = MSG_RECEIVED;
- if (prefs_common.enable_junk &&
- prefs_common.filter_junk_on_recv &&
+ if (filter_junk && prefs_common.enable_junk &&
prefs_common.filter_junk_before) {
filter_apply(prefs_common.junk_fltlist, tmp_file,
fltinfo);
@@ -222,8 +224,7 @@ gint proc_mbox_full(FolderItem *dest, const gchar *mbox,
filter_apply(prefs_common.fltlist, tmp_file, fltinfo);
if (!fltinfo->drop_done &&
- prefs_common.enable_junk &&
- prefs_common.filter_junk_on_recv &&
+ filter_junk && prefs_common.enable_junk &&
!prefs_common.filter_junk_before) {
filter_apply(prefs_common.junk_fltlist, tmp_file,
fltinfo);
diff --git a/libsylph/mbox.h b/libsylph/mbox.h
index eb29ecac..cd2f7352 100644
--- a/libsylph/mbox.h
+++ b/libsylph/mbox.h
@@ -35,7 +35,8 @@ gint proc_mbox (FolderItem *dest,
gint proc_mbox_full (FolderItem *dest,
const gchar *mbox,
GHashTable *folder_table,
- gboolean apply_filter);
+ gboolean apply_filter,
+ gboolean filter_junk);
gint lock_mbox (const gchar *base,
LockType type);
diff --git a/src/inc.c b/src/inc.c
index 0aeeb9b3..95f3573a 100644
--- a/src/inc.c
+++ b/src/inc.c
@@ -1403,7 +1403,9 @@ static gint get_spool(FolderItem *dest, const gchar *mbox)
folder_table = g_hash_table_new(NULL, NULL);
msgs = proc_mbox_full(dest, tmp_mbox, folder_table,
- prefs_common.filter_on_inc);
+ prefs_common.filter_on_inc,
+ prefs_common.enable_junk &&
+ prefs_common.filter_junk_on_recv);
g_unlink(tmp_mbox);
if (msgs >= 0) empty_mbox(mbox);