aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2005-03-16 14:53:58 +0800
committerMichael Zucci <zucchi@src.gnome.org>2005-03-16 14:53:58 +0800
commit2f16f0202e677bd85e8362f450552b21966b317c (patch)
tree8bc9263af453049310127dc8bb4f284b05bf2444 /mail
parent6aba3ad9c4d0348c601763ce1899b05e8d7885be (diff)
downloadgsoc2013-evolution-2f16f0202e677bd85e8362f450552b21966b317c.tar
gsoc2013-evolution-2f16f0202e677bd85e8362f450552b21966b317c.tar.gz
gsoc2013-evolution-2f16f0202e677bd85e8362f450552b21966b317c.tar.bz2
gsoc2013-evolution-2f16f0202e677bd85e8362f450552b21966b317c.tar.lz
gsoc2013-evolution-2f16f0202e677bd85e8362f450552b21966b317c.tar.xz
gsoc2013-evolution-2f16f0202e677bd85e8362f450552b21966b317c.tar.zst
gsoc2013-evolution-2f16f0202e677bd85e8362f450552b21966b317c.zip
** See bug #73550
2005-03-14 Not Zed <NotZed@Ximian.com> ** See bug #73550 * em-format-hook.c (emfh_format_format): if we are disabled, don't invoke handler, try to invoke old handler if there was one. svn path=/trunk/; revision=29032
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog7
-rw-r--r--mail/em-format-hook.c15
2 files changed, 18 insertions, 4 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index f5ac325af0..fe454129dd 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,10 @@
+2005-03-14 Not Zed <NotZed@Ximian.com>
+
+ ** See bug #73550
+
+ * em-format-hook.c (emfh_format_format): if we are disabled, don't
+ invoke handler, try to invoke old handler if there was one.
+
2005-03-10 Not Zed <NotZed@Ximian.com>
** See bug #73293
diff --git a/mail/em-format-hook.c b/mail/em-format-hook.c
index 627def3aa2..62bab84957 100644
--- a/mail/em-format-hook.c
+++ b/mail/em-format-hook.c
@@ -69,11 +69,16 @@ static void
emfh_format_format(EMFormat *md, struct _CamelStream *stream, struct _CamelMimePart *part, const EMFormatHandler *info)
{
struct _EMFormatHookItem *item = (EMFormatHookItem *)info;
- EMFormatHookTarget target = {
- md, stream, part, item
- };
- e_plugin_invoke(item->hook->hook.plugin, item->format, &target);
+ if (item->hook->hook.plugin->enabled) {
+ EMFormatHookTarget target = {
+ md, stream, part, item
+ };
+
+ e_plugin_invoke(item->hook->hook.plugin, item->format, &target);
+ } else if (info->old) {
+ info->old->handler(md, stream, part, info->old);
+ }
}
static void
@@ -180,6 +185,8 @@ emfh_construct(EPluginHook *eph, EPlugin *ep, xmlNodePtr root)
for (;l;l=g_slist_next(l)) {
EMFormatHookItem *item = l->data;
/* TODO: only add handlers if enabled? */
+ /* Well, disabling is handled by the callback, if we leave as is,
+ then we can enable the plugin after startup and it will start working automagically */
em_format_class_add_handler(klass, &item->handler);
}
}