aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/sa-junk-plugin
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/sa-junk-plugin')
-rw-r--r--plugins/sa-junk-plugin/ChangeLog154
-rw-r--r--plugins/sa-junk-plugin/em-junk-filter.c20
2 files changed, 9 insertions, 165 deletions
diff --git a/plugins/sa-junk-plugin/ChangeLog b/plugins/sa-junk-plugin/ChangeLog
deleted file mode 100644
index 46f51c7003..0000000000
--- a/plugins/sa-junk-plugin/ChangeLog
+++ /dev/null
@@ -1,154 +0,0 @@
-2008-12-03 Matthew Barnes <mbarnes@redhat.com>
-
- ** Fixes bug #560420 (patch by hp@syntomax.com)
-
- * em-junk-filter.c (pipe_to_sa_full):
- spamc and spamassassin use error codes >= 64 to denote execution
- errors. Positive error codes < 64 means the message was identified
- as spam.
-
-2008-09-29 Sankar P <psankar@novell.com>
-
-License Changes
-
- * em-junk-filter.c:
-
-2008-09-25 Philip Withnall <philip@tecnocode.co.uk>
-
- ** Fix for bug #551121
-
- * em-junk-filter.c (pipe_to_sa_full), (em_junk_sa_respawn_spamd):
- * org-gnome-sa-junk-plugin.eplug.xml: Standardise use of
- "SpamAssassin" vs. "spamassassin" or "Spamassassin".
-
-2008-09-12 Milan Crha <mcrha@redhat.com>
-
- ** Fix for bug #505016
-
- * em-junk-filter.c: (em_junk_sa_check_junk):
- Check for NULL to prevent crash when error occurred.
-
-2008-04-25 Milan Crha <mcrha@redhat.com>
-
- ** Fix for bug #273041
-
- * em-junk-filter.c: (em_junk_sa_commit_reports),
- (em_junk_sa_validate_binary): Fix function prototype.
- * em-junk-filter.c: (pipe_to_sa_full), (em_junk_sa_test_spamd_running),
- (em_junk_sa_test_spamassassin), (pipe_to_sa), (em_junk_sa_run_spamd),
- (em_junk_sa_test_spamd), (em_junk_sa_is_available),
- (em_junk_sa_check_junk), (get_spamassassin_version),
- (em_junk_sa_report_junk), (em_junk_sa_report_non_junk):
- Propagate possible errors to the UI.
-
-2008-03-13 Milan Crha <mcrha@redhat.com>
-
- ** Fix for bug #515786
-
- * org-gnome-sa-junk-plugin.eplug.xml:
- * em-junk-filter.c: (org_gnome_sa_use_remote_tests):
- Fix misspelled SpamAssassin word.
-
-2007-11-26 Matthew Barnes <mbarnes@redhat.com>
-
- ** Fixes bug #499644
-
- * em-junk-filter.c (user_remote_tests_cb),
- (org_gnome_sa_use_remote_tests):
- The behavior of the "Include remote tests" check button was swapped
- with respect to its state. Probably why SpamAssassin seemed slow.
-
-2007-09-07 Milan Crha <mcrha@redhat.com>
-
- ** Part of fix for bug #473903
-
- * em-junk-filter.c: (em_junk_sa_validate_binary): Changing function
- prototype to fit what is expected in 'invoke', returns value based on it.
-
-2007-08-22 Srinivasa Ragavan <sragavan@novell.com>
-
- ** Fix for bug #468303
-
- * org-gnome-sa-junk-plugin.eplug.xml: Add strings for i18n.
-
-2007-05-11 Jules Colding <colding@omesc.com>
-
- * em-junk-filter.c (pipe_to_sa_full): File descriptor leaks fixed.
- Fixes bug #437664.
-
-2007-05-11 Gilles Dartiguelongue <dartigug@esiee.fr>
-
- * em-junk-filter.c: (pipe_to_sa_full), (em_junk_sa_check_junk),
- (org_gnome_sa_use_remote_tests): Fix casts and prototypes,
- fixes part of bug #437584.
-
-2007-04-03 Srinivasa Ragavan <sragavan@novell.com>
-
- Added few more plugin callbacks and moved the UI options from core
- mail to plugin.
-
- * em-junk-filter.c: (em_junk_sa_validate_binary),
- (use_remote_tests_cb), (org_gnome_sa_use_remote_tests):
- * org-gnome-sa-junk-plugin.eplug.xml:
-
-2007-04-03 Matthew Barnes <mbarnes@redhat.com>
-
- * em-junk-filter.c (em_junk_sa_get_name):
- * org-gnome-sa-junk-plugin.eplug.xml:
- Correctly capitalize SpamAssassin. (#375577)
- Patch from Priit Laes.
-
-2006-08-22 Kjartan Maraas <kmaraas@gnome.org>
-
- * em-junk-filter.c: (em_junk_sa_init): #if 0 out unused function and
- plug a leak.
-
-2006-01-09 Kjartan Maraas <kmaraas@gnome.org>
-
- * em-junk-filter.c: (em_junk_sa_run_spamd): Remove unused var.
-
-2006-01-11 Andre Klapper <a9016009@gmx.de>
- * org-gnome-sa-junk-plugin.eplug.xml: Changing strings to be more precise.
- Fixes bug 325132.
-
-2005-01-04 Shi Pu <shi.pu@sun.com>
-
- See bug ** 325210
-
- * em-junk-filter.c:
- (get_spamassassin_version): gets the spamassassin version which evolution used
- (em_junk_sa_report_junk),
- (em_junk_sa_report_non_junk),
- (em_junk_sa_commit_reports): judge spamassassin version to decide
- which sync option should be used
-
-2005-10-06 Vivek Jain <jvivek@novell.com>
-
- ** See Bug #268852
- * em-junk-filter.c : (em_junk_sa_run_spamd)
- allow max one chid to be spawned for
- spamd.
-
-2005-10-03 Vivek Jain <jvivek@novell.com>
-
- * em-junk-filter.c: added (e_plugin_lib_enable)
- calls init here to initialize all settings
- **Fixes #317792
- unref GConfClient in finalize
-
-2005-08-23 Not Zed <NotZed@Ximian.com>
-
- * em-junk-filter.c (em_junk_sa_report_non_junk): pre-define.
-
-2005-07-06 Vivek Jain <jvivek@novell.com>
-
- * Makefile.am: Use NO_UNDEFINED. Link with more libraries.
-
-2005-07-06 Vivek Jain <jvivek@novell.com>
-
- sa-junk-plugin : plugin that uses spam assasin for junk mail
- handling
- moved em-junk-filter.c from mail/ to here and modified it to listen
- to the callbacks from the plugin.
-
-
diff --git a/plugins/sa-junk-plugin/em-junk-filter.c b/plugins/sa-junk-plugin/em-junk-filter.c
index c8c53c6169..537831a07e 100644
--- a/plugins/sa-junk-plugin/em-junk-filter.c
+++ b/plugins/sa-junk-plugin/em-junk-filter.c
@@ -34,18 +34,12 @@
#include <signal.h>
#include <time.h>
-#include <camel/camel-mime-message.h>
-#include <camel/camel-debug.h>
-#include <camel/camel-file-utils.h>
-#include <camel/camel-data-wrapper.h>
-#include <camel/camel-stream-fs.h>
-#include <camel/camel-stream-mem.h>
-#include <camel/camel-i18n.h>
#include <mail/em-junk.h>
#include <mail/em-utils.h>
#include <e-util/e-mktemp.h>
#include <gtk/gtk.h>
+#include <glib/gi18n.h>
#include "mail/em-config.h"
#include "shell/e-shell.h"
@@ -195,7 +189,7 @@ pipe_to_sa_full (CamelMimeMessage *msg, const gchar *in, const gchar **argv, gin
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);
} else if (in) {
camel_write (fds[1], in, strlen (in));
close (fds[1]);
@@ -210,7 +204,7 @@ pipe_to_sa_full (CamelMimeMessage *msg, const gchar *in, const gchar **argv, gin
camel_stream_mem_set_byte_array (memstream, output_buffer);
camel_stream_write_to_stream (stream, (CamelStream *) memstream);
- camel_object_unref (stream);
+ g_object_unref (stream);
g_byte_array_append (output_buffer, (guchar *)"", 1);
d(printf ("child process output: %s len: %d\n", output_buffer->data, output_buffer->len));
@@ -930,7 +924,9 @@ org_gnome_sa_use_remote_tests (struct _EPlugin *epl, struct _EConfigHookItemFact
EShell *shell;
GtkWidget *check, *vbox, *label;
gchar *text = g_strdup_printf (" <small>%s</small>", _("This will make SpamAssassin more reliable, but slower"));
- 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;
@@ -945,7 +941,9 @@ org_gnome_sa_use_remote_tests (struct _EPlugin *epl, struct _EConfigHookItemFact
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check), !em_junk_sa_local_only);
g_signal_connect (GTK_TOGGLE_BUTTON (check), "toggled", G_CALLBACK (use_remote_tests_cb), (gpointer) "/apps/evolution/mail/junk/sa/local_only");
- gtk_table_attach((GtkTable *)data->parent, vbox, 0, 1, i, i+1, 0, 0, 0, 0);
+ gtk_table_attach (
+ GTK_TABLE (data->parent), vbox,
+ 0, 1, n_rows, n_rows+1, 0, 0, 0, 0);
shell = e_shell_get_default ();
if (e_shell_get_express_mode (shell))