diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2005-10-26 11:14:56 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2005-10-26 11:14:56 +0000 |
commit | b539e5dffe69a583b88058dd990d01833b5a87f3 (patch) | |
tree | bc0c5a406cd766f43032b92b2e52b31cfea0973b /libsylph/prefs_common.c | |
parent | 9aa18447c97fffa8f46dbc8752ddf3b5dcbdd4f1 (diff) |
added a setting to delete filtered junk mails from server.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@689 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'libsylph/prefs_common.c')
-rw-r--r-- | libsylph/prefs_common.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/libsylph/prefs_common.c b/libsylph/prefs_common.c index c1f01a70..3e258cd2 100644 --- a/libsylph/prefs_common.c +++ b/libsylph/prefs_common.c @@ -265,6 +265,8 @@ static PrefParam param[] = { {"junk_folder", NULL, &prefs_common.junk_folder, P_STRING}, {"filter_junk_on_receive", "FALSE", &prefs_common.filter_junk_on_recv, P_BOOL}, + {"delete_junk_on_receive", "TRUE", &prefs_common.delete_junk_on_recv, + P_BOOL}, /* Privacy */ {"auto_check_signatures", "TRUE", &prefs_common.auto_check_signatures, @@ -435,10 +437,17 @@ void prefs_common_junk_filter_list_set(void) cond = filter_cond_new(FLT_COND_CMD_TEST, 0, 0, NULL, prefs_common.junk_classify_cmd); cond_list = g_slist_append(NULL, cond); - action = filter_action_new(FLT_ACTION_COPY, prefs_common.junk_folder); - action_list = g_slist_append(NULL, action); - action = filter_action_new(FLT_ACTION_DELETE, NULL); - action_list = g_slist_append(action_list, action); + if (prefs_common.delete_junk_on_recv) { + action = filter_action_new(FLT_ACTION_COPY, + prefs_common.junk_folder); + action_list = g_slist_append(NULL, action); + action = filter_action_new(FLT_ACTION_DELETE, NULL); + action_list = g_slist_append(action_list, action); + } else { + action = filter_action_new(FLT_ACTION_MOVE, + prefs_common.junk_folder); + action_list = g_slist_append(NULL, action); + } rule = filter_rule_new(_("Junk mail filter"), FLT_OR, cond_list, action_list); |