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/ChangeLog123
-rw-r--r--plugins/bogo-junk-plugin/bf-junk-filter.c21
2 files changed, 10 insertions, 134 deletions
diff --git a/plugins/bogo-junk-plugin/ChangeLog b/plugins/bogo-junk-plugin/ChangeLog
deleted file mode 100644
index b24ac0db6c..0000000000
--- a/plugins/bogo-junk-plugin/ChangeLog
+++ /dev/null
@@ -1,123 +0,0 @@
-2009-01-28 Tor Lillqvist <tml@novell.com>
-
- * Makefile.am: Use -no-undefined on Windows. Link with libeutil.
-
- * bf-junk-filter.c: Tentative port to Windows even though this
- plugin isn't even compiled on Windows for now. Just for
- completeness.
-
-2008-12-15 srinivasa ragavan <sragavan@novell.com>
-
- * makefile.am:
- * bf-junk-filter.c: (init_db), (pipe_to_bogofilter): init the
- bogofilter if it wasn't. say that evolution's welcome message is not
- junk.
-
-2008-10-14 Sankar P <psankar@novell.com>
-
-License Changes
-
- * bf-junk-filter.c:
-
-2008-04-29 Milan Crha <mcrha@redhat.com>
-
- * bf-junk-filter.c: (pipe_to_bogofilter):
- Report errors properly. Thanks to Reid Thompson whom found it.
-
-2008-04-25 Milan Crha <mcrha@redhat.com>
-
- ** Fix for bug #273041
-
- * bf-junk-filter.c: (pipe_to_bogofilter), (em_junk_bf_check_junk),
- (em_junk_bf_report_junk), (em_junk_bf_report_non_junk):
- Propagate possible errors to the UI.
-
-2008-03-19 Sankar P <psankar@novell.com>
-
- ** Fix for bug #519304
-
- * org-gnome-bogo-junk-plugin.eplug.xml:
- Mark plugin name for translation.
-
-2007-09-27 Matthew Barnes <mbarnes@redhat.com>
-
- * bf-junk-filter.c:
- Use consistent terminology for mail messages (#480621).
-
-2007-09-07 Milan Crha <mcrha@redhat.com>
-
- ** Part of fix for bug #473903
-
- * bf-junk-filter.c: (em_junk_bf_validate_binary): Changing function
- prototype to fit what is expected in 'invoke', returns value based on it.
-
-2007-08-27 Srinivasa Ragavan <sragavan@novell.com>
-
- * bf-junk-filter.c: (e_plugin_lib_enable): Avoid re-entrancy in
- enable
-
-2007-08-22 Srinivasa Ragavan <sragavan@novell.com>
-
- ** Fix for bug #468294
-
- * org-gnome-bogo-junk-plugin.eplug.xml: Add a few strings for
- translation.
-
-2007-08-22 Srinivasa Ragavan <sragavan@novell.com>
-
- ** Fix for bug #468303
-
- * org-gnome-bogo-junk-plugin.eplug.xml: Enable strings for i18n.
-
-2007-07-26 Hiroyuki Ikezoe <poincare@ikezoe.net>
-
- * bf-junk-filter.c: (convert_unicode_cb): Plugged memory leak.
-
-2007-06-03 Srinivasa Ragavan <sragavan@novell.com>
-
- ** Fix for version removal from Installed files from Gilles Dartiguelongue
-
- * Makefile.am:
-
-2007-05-12 Matthew Barnes <mbarnes@redhat.com>
-
- ** Fixes part of bug #337616
-
- * Makefile.am: Add $(schema_DATA) to DISTCLEANFILES.
-
- * org-gnome-bogo-junk-plugin.eplug.in: Rename as *.eplug.xml.
-
-2007-05-11 Gilles Dartiguelongue <dartigug@esiee.fr>
-
- * bf-junk-filter.c: add prototypes to clean compilation warnings
- Fixes part of bug #437584
-
-2007-04-23 Matthew Barnes <mbarnes@redhat.com>
-
- * Makefile.am: Distribute bogo-junk-plugin.schemas.in.in. (#432616)
-
-2007-04-03 Srinivasa Ragavan <sragavan@novell.com>
-
- * Makefile.am: Committing the right Makefile.am
-
-2007-04-03 Srinivasa Ragavan <sragavan@novell.com>
-
- ** Added bogofilter part of Evolution source.
-
-2006-02-19 Mikhail Zabaluev <mhz@altlinux.org>
-
-* configure.ac: Switched to evolution-plugin-2.6 for plugin configuration.
-Bumped version to 0.2.0.
-
-* org-altlinux-bf-junk-plugin.eplug.in: Templatized the plugin manifesto,
-with plugin install directory substituted.
-* configure.ac: Added org-altlinux-bf-junk-plugin.eplug to AC_CONFIG_FILES.
-* Makefile.am: Added org-altlinux-bf-junk-plugin.eplug.in to EXTRA_DIST.
-
-* README: Added bug reference to the initial ham training problem.
-
-2005-11-22 Mikhail Zabaluev <mhz@altlinux.org>
-
-* README: Added reference to Spam Trainer.
-
-* README: Reflect on the fix for bug #313096 that made it to Evolution 2.5.2.
diff --git a/plugins/bogo-junk-plugin/bf-junk-filter.c b/plugins/bogo-junk-plugin/bf-junk-filter.c
index 4190eebe86..6cc2e80d4d 100644
--- a/plugins/bogo-junk-plugin/bf-junk-filter.c
+++ b/plugins/bogo-junk-plugin/bf-junk-filter.c
@@ -45,11 +45,6 @@
#include <e-util/e-plugin.h>
#include "mail/em-config.h"
#include <mail/em-junk.h>
-#include <camel/camel-data-wrapper.h>
-#include <camel/camel-mime-message.h>
-#include <camel/camel-mime-parser.h>
-#include <camel/camel-stream-fs.h>
-#include <camel/camel-debug.h>
#include <gconf/gconf-client.h>
#include "shell/e-shell.h"
@@ -100,10 +95,10 @@ init_db (void)
camel_mime_parser_init_with_stream (parser, stream);
camel_mime_parser_scan_from (parser, FALSE);
- camel_object_unref (stream);
+ g_object_unref (stream);
camel_mime_part_construct_from_parser ((CamelMimePart *) msg, parser);
- camel_object_unref (parser);
+ g_object_unref (parser);
d(fprintf (stderr, "Initing the bogofilter DB with Welcome message\n"));
@@ -112,7 +107,7 @@ init_db (void)
}
pipe_to_bogofilter (msg, argv, NULL);
- camel_object_unref (msg);
+ g_object_unref (msg);
}
@@ -172,7 +167,7 @@ retry:
camel_data_wrapper_write_to_stream (CAMEL_DATA_WRAPPER (msg), stream);
camel_stream_flush (stream);
camel_stream_close (stream);
- camel_object_unref (stream);
+ g_object_unref (stream);
#ifndef G_OS_WIN32
waitres = waitpid (child_pid, &status, 0);
@@ -391,7 +386,9 @@ org_gnome_bogo_convert_unicode (struct _EPlugin *epl, struct _EConfigHookItemFac
{
EShell *shell;
GtkWidget *check;
- guint i = ((GtkTable *)data->parent)->nrows;
+ guint n_rows;
+
+ g_object_get (data->parent, "n-rows", &n_rows, NULL);
if (data->old)
return data->old;
@@ -400,7 +397,9 @@ org_gnome_bogo_convert_unicode (struct _EPlugin *epl, struct _EConfigHookItemFac
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check), em_junk_bf_unicode);
g_signal_connect (GTK_TOGGLE_BUTTON (check), "toggled", G_CALLBACK (convert_unicode_cb), (gpointer) "/apps/evolution/mail/junk/bogofilter/unicode");
- gtk_table_attach((GtkTable *)data->parent, check, 0, 1, i, i+1, 0, 0, 0, 0);
+ gtk_table_attach (
+ GTK_TABLE (data->parent), check,
+ 0, 1, n_rows, n_rows+1, 0, 0, 0, 0);
shell = e_shell_get_default ();
if (e_shell_get_express_mode (shell))