aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/bogo-junk-plugin/bf-junk-filter.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/bogo-junk-plugin/bf-junk-filter.c')
-rw-r--r--plugins/bogo-junk-plugin/bf-junk-filter.c21
1 files changed, 10 insertions, 11 deletions
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))