/*
* Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2015 Hiroyuki Yamamoto & The Claws Mail Team
+ * Copyright (C) 1999-2020 the Claws Mail Team and Hiroyuki Yamamoto
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
}
}
+gboolean processing_enabled(GSList *filtering_list)
+{
+ GSList *l;
+ for (l = filtering_list; l != NULL; l = g_slist_next(l)) {
+ FilteringProp * filtering = (FilteringProp *) l->data;
+ if (filtering->enabled)
+ return TRUE;
+ }
+ return FALSE;
+}
+
static gboolean filter_msginfo(GSList * filtering_list, MsgInfo * info, PrefsAccount* ac_prefs)
{
GSList *l;
/*
- * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2012 Hiroyuki Yamamoto & The Claws Mail Team
+ * Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
+ * Copyright (C) 1999-2020 the Claws Mail Team and Hiroyuki Yamamoto
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
FilteringProp * filteringprop_parse(gchar **str);
void filter_msginfo_move_or_delete(GSList *filtering_list, MsgInfo *info);
+gboolean processing_enabled(GSList *filtering_list);
gboolean filter_message_by_msginfo(GSList *flist, MsgInfo *info, PrefsAccount *ac_prefs,
FilteringInvocationType context, gchar *extra_info);
/*
* Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2016 Hiroyuki Yamamoto and the Claws Mail team
+ * Copyright (C) 1999-2020 the Claws Mail team and Hiroyuki Yamamoto
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
processing_list = item->prefs->processing;
- if (!pre_global_processing && !processing_list
- && !post_global_processing)
+ if (!processing_enabled(pre_global_processing) &&
+ !processing_enabled(processing_list) &&
+ !processing_enabled(post_global_processing))
return;
debug_print("processing %s\n", item->name);