From 005c303f49f2c49f02b05d7e5ce6931525d98341 Mon Sep 17 00:00:00 2001 From: Srinivasa Ragavan Date: Mon, 27 Aug 2007 05:41:37 +0000 Subject: ** Fix for bug #431459 and #364700 svn path=/trunk/; revision=34113 --- mail/ChangeLog | 15 +++++++++++++++ mail/em-format-hook.c | 2 ++ mail/em-junk-hook.c | 5 +++++ mail/mail-session.c | 1 + 4 files changed, 23 insertions(+) diff --git a/mail/ChangeLog b/mail/ChangeLog index 803b3a6c4a..28566559c8 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,18 @@ +2007-08-27 Srinivasa Ragavan + + ** Fix for bug #431459 + + * em-format-hook.c: (emfh_construct): Enable format plugins while + loading only. + +2007-08-27 Srinivasa Ragavan + + ** Fix for bug #364700 + + * em-junk-hook.c: (em_junk_init): Load/Enable junk plugins while + loading only. + * mail-session.c: (mail_session_add_junk_plugin): + 2007-08-27 Srinivasa Ragavan ** Fix for bug #256878 from Vincent Untz diff --git a/mail/em-format-hook.c b/mail/em-format-hook.c index 8aad0e7076..80d080bd35 100644 --- a/mail/em-format-hook.c +++ b/mail/em-format-hook.c @@ -199,6 +199,8 @@ emfh_construct(EPluginHook *eph, EPlugin *ep, xmlNodePtr root) eph->plugin = ep; + /* Load the plugin as it does a few thing in the formatter thread. */ + ((EPluginClass *)G_OBJECT_GET_CLASS(ep))->enable (ep, 1); return 0; } diff --git a/mail/em-junk-hook.c b/mail/em-junk-hook.c index bdac680584..82c2070615 100644 --- a/mail/em-junk-hook.c +++ b/mail/em-junk-hook.c @@ -61,10 +61,15 @@ static const EPluginHookTargetKey emjh_flag_map[] = { */ +static const char * +em_junk_get_name (CamelJunkPlugin *csp); static void em_junk_init(CamelJunkPlugin *csp) { + struct _EMJunkHookItem *item = (EMJunkHookItem *)csp; + + ((EPluginClass *)G_OBJECT_GET_CLASS(item->hook->hook.plugin))->enable(item->hook->hook.plugin, 1); } static const char * diff --git a/mail/mail-session.c b/mail/mail-session.c index c4014ed329..3d6d1f0674 100644 --- a/mail/mail-session.c +++ b/mail/mail-session.c @@ -737,6 +737,7 @@ mail_session_add_junk_plugin (const char *plugin_name, CamelJunkPlugin *junk_plu if (!strcmp(def_plugin, plugin_name)) { printf("Loading %s as the default junk plugin\n", def_plugin); session->junk_plugin = junk_plugin; + camel_junk_plugin_init (junk_plugin); } } -- cgit v1.2.3