aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-junk-hook.c
diff options
context:
space:
mode:
authorSrinivasa Ragavan <sragavan@src.gnome.org>2007-04-03 17:14:16 +0800
committerSrinivasa Ragavan <sragavan@src.gnome.org>2007-04-03 17:14:16 +0800
commit1e8c2df476794bcb93962ec65ccbe5e1e8e33f66 (patch)
tree03e885101854c1ce0d98aa9b005c856cce421c4c /mail/em-junk-hook.c
parent8a5e6ecc960889f624419b0e88dbb231a4b667cc (diff)
downloadgsoc2013-evolution-1e8c2df476794bcb93962ec65ccbe5e1e8e33f66.tar
gsoc2013-evolution-1e8c2df476794bcb93962ec65ccbe5e1e8e33f66.tar.gz
gsoc2013-evolution-1e8c2df476794bcb93962ec65ccbe5e1e8e33f66.tar.bz2
gsoc2013-evolution-1e8c2df476794bcb93962ec65ccbe5e1e8e33f66.tar.lz
gsoc2013-evolution-1e8c2df476794bcb93962ec65ccbe5e1e8e33f66.tar.xz
gsoc2013-evolution-1e8c2df476794bcb93962ec65ccbe5e1e8e33f66.tar.zst
gsoc2013-evolution-1e8c2df476794bcb93962ec65ccbe5e1e8e33f66.zip
Add pluggable junk filter code and move SA options to the plugins.
svn path=/trunk/; revision=33367
Diffstat (limited to 'mail/em-junk-hook.c')
-rw-r--r--mail/em-junk-hook.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/mail/em-junk-hook.c b/mail/em-junk-hook.c
index b02bc4cb59..52fa280588 100644
--- a/mail/em-junk-hook.c
+++ b/mail/em-junk-hook.c
@@ -187,13 +187,16 @@ emjh_construct_item(EPluginHook *eph, EMJunkHookGroup *group, xmlNodePtr root)
item->report_junk = e_plugin_xml_prop(root, "report_junk");
item->report_non_junk = e_plugin_xml_prop(root, "report_non_junk");
item->commit_reports = e_plugin_xml_prop(root, "commit_reports");
+ item->validate_binary = e_plugin_xml_prop(root, "validate_binary");
+
+ item->plugin_name = e_plugin_xml_prop(root, "name");
item->hook = emjh;
if (item->check_junk == NULL || item->report_junk == NULL || item->report_non_junk == NULL || item->commit_reports == NULL)
goto error;
- /* assign the plugin to the session*/
- session->junk_plugin = CAMEL_JUNK_PLUGIN (&(item->csp));
+ /* Add the plugin to the session plugin list*/
+ mail_session_add_junk_plugin (item->plugin_name, CAMEL_JUNK_PLUGIN (&(item->csp)));
return item;
error:
@@ -242,15 +245,14 @@ static int
emjh_construct(EPluginHook *eph, EPlugin *ep, xmlNodePtr root)
{
xmlNodePtr node;
- static gboolean loaded = FALSE;
d(printf("loading junk hook\n"));
if (((EPluginHookClass *)emjh_parent_class)->construct(eph, ep, root) == -1)
return -1;
- if (!ep->enabled || loaded) {
- g_warning ("ignored this junk plugin: not enabled or we have already loaded one");
+ if (!ep->enabled) {
+ g_warning ("ignored this junk plugin: not enabled");
return -1;
}
@@ -268,7 +270,6 @@ emjh_construct(EPluginHook *eph, EPlugin *ep, xmlNodePtr root)
}
eph->plugin = ep;
- loaded = TRUE;
return 0;
}