diff options
Diffstat (limited to 'plugins/sa-junk-plugin/em-junk-filter.c')
-rw-r--r-- | plugins/sa-junk-plugin/em-junk-filter.c | 20 |
1 files changed, 9 insertions, 11 deletions
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)) |