aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/bogo-junk-plugin
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/bogo-junk-plugin')
-rw-r--r--plugins/bogo-junk-plugin/Makefile.am6
-rw-r--r--plugins/bogo-junk-plugin/bf-junk-filter.c26
-rw-r--r--plugins/bogo-junk-plugin/org-gnome-bogo-junk-plugin.eplug.xml13
3 files changed, 23 insertions, 22 deletions
diff --git a/plugins/bogo-junk-plugin/Makefile.am b/plugins/bogo-junk-plugin/Makefile.am
index f488ddf0f7..00453ef090 100644
--- a/plugins/bogo-junk-plugin/Makefile.am
+++ b/plugins/bogo-junk-plugin/Makefile.am
@@ -11,8 +11,10 @@ plugin_LTLIBRARIES = liborg-gnome-bogo-junk-plugin.la
liborg_gnome_bogo_junk_plugin_la_SOURCES = bf-junk-filter.c
liborg_gnome_bogo_junk_plugin_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
liborg_gnome_bogo_junk_plugin_la_LIBADD = \
- $(GNOME_PLATFORM_LIBS) \
- $(top_builddir)/e-util/libeutil.la
+ $(top_builddir)/mail/libevolution-mail.la \
+ $(top_builddir)/e-util/libeutil.la \
+ $(EVOLUTION_MAIL_LIBS) \
+ $(GNOME_PLATFORM_LIBS)
schemadir = $(GCONF_SCHEMA_FILE_DIR)
schema_in_files = bogo-junk-plugin.schemas.in
diff --git a/plugins/bogo-junk-plugin/bf-junk-filter.c b/plugins/bogo-junk-plugin/bf-junk-filter.c
index 3de8c30955..da384225c8 100644
--- a/plugins/bogo-junk-plugin/bf-junk-filter.c
+++ b/plugins/bogo-junk-plugin/bf-junk-filter.c
@@ -44,7 +44,7 @@
#include <gtk/gtk.h>
#include <e-util/e-plugin.h>
#include "mail/em-config.h"
-#include <mail/em-junk-hook.h>
+#include <mail/em-junk.h>
#include <camel/camel-data-wrapper.h>
#include <camel/camel-mime-message.h>
#include <camel/camel-mime-parser.h>
@@ -70,15 +70,15 @@ static const gchar em_junk_bf_gconf_dir[] = EM_JUNK_BF_GCONF_DIR;
GtkWidget * org_gnome_bogo_convert_unicode (struct _EPlugin *epl, struct _EConfigHookItemFactoryData *data);
/* plugin fonction prototypes */
-gboolean em_junk_bf_check_junk (EPlugin *ep, EMJunkHookTarget *target);
-gpointer em_junk_bf_validate_binary (EPlugin *ep, EMJunkHookTarget *target);
-void em_junk_bf_report_junk (EPlugin *ep, EMJunkHookTarget *target);
-void em_junk_bf_report_non_junk (EPlugin *ep, EMJunkHookTarget *target);
-void em_junk_bf_commit_reports (EPlugin *ep, EMJunkHookTarget *target);
+gboolean em_junk_bf_check_junk (EPlugin *ep, EMJunkTarget *target);
+gpointer em_junk_bf_validate_binary (EPlugin *ep, EMJunkTarget *target);
+void em_junk_bf_report_junk (EPlugin *ep, EMJunkTarget *target);
+void em_junk_bf_report_non_junk (EPlugin *ep, EMJunkTarget *target);
+void em_junk_bf_commit_reports (EPlugin *ep, EMJunkTarget *target);
static gint pipe_to_bogofilter (CamelMimeMessage *msg, const gchar **argv, GError **error);
/* eplugin stuff */
-gint e_plugin_lib_enable (EPluginLib *ep, gint enable);
+gint e_plugin_lib_enable (EPlugin *ep, gint enable);
#define EM_JUNK_BF_GCONF_DIR_LENGTH (G_N_ELEMENTS (em_junk_bf_gconf_dir) - 1)
@@ -241,7 +241,7 @@ em_junk_bf_setting_notify (GConfClient *gconf,
}
gboolean
-em_junk_bf_check_junk (EPlugin *ep, EMJunkHookTarget *target)
+em_junk_bf_check_junk (EPlugin *ep, EMJunkTarget *target)
{
CamelMimeMessage *msg = target->m;
gint rv;
@@ -266,7 +266,7 @@ em_junk_bf_check_junk (EPlugin *ep, EMJunkHookTarget *target)
}
void
-em_junk_bf_report_junk (EPlugin *ep, EMJunkHookTarget *target)
+em_junk_bf_report_junk (EPlugin *ep, EMJunkTarget *target)
{
CamelMimeMessage *msg = target->m;
@@ -287,7 +287,7 @@ em_junk_bf_report_junk (EPlugin *ep, EMJunkHookTarget *target)
}
void
-em_junk_bf_report_non_junk (EPlugin *ep, EMJunkHookTarget *target)
+em_junk_bf_report_non_junk (EPlugin *ep, EMJunkTarget *target)
{
CamelMimeMessage *msg = target->m;
@@ -308,18 +308,18 @@ em_junk_bf_report_non_junk (EPlugin *ep, EMJunkHookTarget *target)
}
void
-em_junk_bf_commit_reports (EPlugin *ep, EMJunkHookTarget *target)
+em_junk_bf_commit_reports (EPlugin *ep, EMJunkTarget *target)
{
}
gpointer
-em_junk_bf_validate_binary (EPlugin *ep, EMJunkHookTarget *target)
+em_junk_bf_validate_binary (EPlugin *ep, EMJunkTarget *target)
{
return g_file_test (em_junk_bf_binary, G_FILE_TEST_EXISTS) ? (gpointer) "1" : NULL;
}
gint
-e_plugin_lib_enable (EPluginLib *ep, gint enable)
+e_plugin_lib_enable (EPlugin *ep, gint enable)
{
GConfClient *gconf;
diff --git a/plugins/bogo-junk-plugin/org-gnome-bogo-junk-plugin.eplug.xml b/plugins/bogo-junk-plugin/org-gnome-bogo-junk-plugin.eplug.xml
index e1d8cc83a0..1317b988d9 100644
--- a/plugins/bogo-junk-plugin/org-gnome-bogo-junk-plugin.eplug.xml
+++ b/plugins/bogo-junk-plugin/org-gnome-bogo-junk-plugin.eplug.xml
@@ -7,13 +7,12 @@
<_description>Filter junk messages using Bogofilter.</_description>
<author name="Mikhail Zabaluev" email="mhz@altlinux.org"/>
<hook class="org.gnome.evolution.mail.junk:1.0">
- <group id="EMJunk" >
- <item name="Bogofilter" report_non_junk="em_junk_bf_report_non_junk"
- report_junk="em_junk_bf_report_junk"
- check_junk="em_junk_bf_check_junk"
- commit_reports="em_junk_bf_commit_reports"
- validate_binary="em_junk_bf_validate_binary"/>
- </group>
+ <interface name="Bogofilter"
+ report_non_junk="em_junk_bf_report_non_junk"
+ report_junk="em_junk_bf_report_junk"
+ check_junk="em_junk_bf_check_junk"
+ commit_reports="em_junk_bf_commit_reports"
+ validate_binary="em_junk_bf_validate_binary"/>
</hook>
<!-- hook into the 'mail properties' menu -->
<hook class="org.gnome.evolution.mail.config:1.0">