[Commits] [SCM] claws branch, master, updated. 3.17.3-16-g6408f4a
ticho at claws-mail.org
ticho at claws-mail.org
Sun Dec 30 00:35:21 CET 2018
The branch, master has been updated
via 6408f4a501cf08f6e33bb920b8bb4e51dddb23db (commit)
via 2a3e98d24814b8a92b0d995c94a4c24c580a4c4a (commit)
from aca15d9a473bdfdeef4a572b112ff3679d745247 (commit)
Summary of changes:
src/folder.c | 10 ++++++----
src/summaryview.c | 14 ++++++++++----
2 files changed, 16 insertions(+), 8 deletions(-)
- Log -----------------------------------------------------------------
commit 6408f4a501cf08f6e33bb920b8bb4e51dddb23db
Author: Stephan Sachse <ste.sachse at gmail.com>
Date: Sun Jul 26 02:22:15 2015 +0200
fix nntp manually filtering with account specific rules
manually running filter on nntp folders doesn't work correctly with
account specific rules. filtering_match_condition() in filtering.c:568
always gets a NULL as ac_prefs and every check with ac_prefs fails
subsequently. later cur_account is used instead, what is imo clearly
wrong and useless.
i have patched summaryview.c:5649 summary_filter() to extract the
account data from summaryview and hand over them as new parameter to
summary_filter_func().
works for me on fedora 22 and claws-mail-3.11.1
Signed-off-by: Stephan Sachse <ste.sachse at gmail.com>
Signed-off-by: Andrej Kacian <ticho at claws-mail.org>
diff --git a/src/summaryview.c b/src/summaryview.c
index 7d35dec..a4709c9 100644
--- a/src/summaryview.c
+++ b/src/summaryview.c
@@ -231,7 +231,8 @@ static void summary_unthread_for_exec_func (GtkCMCTree *ctree,
void summary_simplify_subject(SummaryView *summaryview, gchar * rexp,
GSList * mlist);
-static void summary_filter_func (MsgInfo *msginfo);
+static void summary_filter_func (MsgInfo *msginfo,
+ PrefsAccount *ac_prefs);
static void summary_colorlabel_menu_item_activate_cb
(GtkWidget *widget,
@@ -5821,6 +5822,7 @@ static gboolean summary_filter_get_mode(void)
void summary_filter(SummaryView *summaryview, gboolean selected_only)
{
GSList *mlist = NULL, *cur_list;
+ PrefsAccount *ac_prefs = NULL;
summary_lock(summaryview);
/* are there any per-account filtering rules? */
@@ -5855,9 +5857,13 @@ void summary_filter(SummaryView *summaryview, gboolean selected_only)
mlist = folder_item_get_msg_list(summaryview->folder_item);
}
+ ac_prefs = ((summaryview->folder_item->folder != NULL) &&
+ (summaryview->folder_item->folder->account != NULL))
+ ? summaryview->folder_item->folder->account : NULL;
+
folder_item_set_batch(summaryview->folder_item, TRUE);
for (cur_list = mlist; cur_list; cur_list = cur_list->next) {
- summary_filter_func((MsgInfo *)cur_list->data);
+ summary_filter_func((MsgInfo *)cur_list->data, ac_prefs);
}
folder_item_set_batch(summaryview->folder_item, FALSE);
@@ -5884,7 +5890,7 @@ void summary_filter(SummaryView *summaryview, gboolean selected_only)
summary_show(summaryview, summaryview->folder_item);
}
-static void summary_filter_func(MsgInfo *msginfo)
+static void summary_filter_func(MsgInfo *msginfo, PrefsAccount *ac_prefs)
{
MailFilteringData mail_filtering_data;
@@ -5895,7 +5901,7 @@ static void summary_filter_func(MsgInfo *msginfo)
if (hooks_invoke(MAIL_MANUAL_FILTERING_HOOKLIST, &mail_filtering_data))
return;
- filter_message_by_msginfo(filtering_rules, msginfo, NULL,
+ filter_message_by_msginfo(filtering_rules, msginfo, ac_prefs,
FILTERING_MANUALLY, NULL);
}
commit 2a3e98d24814b8a92b0d995c94a4c24c580a4c4a
Author: Stephan Sachse <ste.sachse at gmail.com>
Date: Sun Jul 26 01:34:55 2015 +0200
fix nntp filtering on incoming messages
this should fix bug #1920 and bug #2627
folder_item_scan_full() in folder.c at line 2343 applies filter only to
folder items of special type F_INBOX. but nntp folder items are of
special folder item type F_NORMAL and folder type F_NEWS. so i change
the condition for do_filter to also match nntp folders. works for me on
fedora 22 and claws-mail-3.11.1
Signed-off-by: Stephan Sachse <ste.sachse at gmail.com>
Signed-off-by: Andrej Kacian <ticho at claws-mail.org>
diff --git a/src/folder.c b/src/folder.c
index 1637ea0..b9a9c99 100644
--- a/src/folder.c
+++ b/src/folder.c
@@ -2372,10 +2372,12 @@ gint folder_item_scan_full(FolderItem *item, gboolean filtering)
if (newmsg_list != NULL) {
GSList *elem, *to_filter = NULL;
gboolean do_filter = (filtering == TRUE) &&
- (item->stype == F_INBOX) &&
- (item->folder->account != NULL) &&
- (item->folder->account->filter_on_recv);
-
+ (item->folder->account != NULL) &&
+ (item->folder->account->filter_on_recv) &&
+ ((item->stype == F_INBOX) ||
+ ((item->stype == F_NORMAL) &&
+ (FOLDER_TYPE(item->folder) == F_NEWS)));
+
for (elem = newmsg_list; elem != NULL; elem = g_slist_next(elem)) {
MsgInfo *msginfo = (MsgInfo *) elem->data;
-----------------------------------------------------------------------
hooks/post-receive
--
Claws Mail
More information about the Commits
mailing list