diff options
Diffstat (limited to 'e-util')
-rw-r--r-- | e-util/ChangeLog | 9 | ||||
-rw-r--r-- | e-util/e-plugin.c | 16 |
2 files changed, 19 insertions, 6 deletions
diff --git a/e-util/ChangeLog b/e-util/ChangeLog index bd2b5f79b1..9c2a4fb489 100644 --- a/e-util/ChangeLog +++ b/e-util/ChangeLog @@ -1,3 +1,12 @@ +2007-08-07 Sankar P <psankar@novell.com> + + reviewed by: Srinivasa Ragavan <sragavan@novell.com> + + * e-plugin.c: (ep_load_pending): + Do not load pending hooks, + if the corresponding plugin is disabled. + Fixes #383684 + 2007-07-29 Hiroyuki Ikezoe <poincare@ikezoe.net> ** Fix for bug #451211. diff --git a/e-util/e-plugin.c b/e-util/e-plugin.c index 28d6c962fa..89bcb0b666 100644 --- a/e-util/e-plugin.c +++ b/e-util/e-plugin.c @@ -438,12 +438,16 @@ ep_load_pending(EPlugin *ep, EPluginHookClass *type) if (class) { if (strcmp(class, type->id) == 0) { hook = g_object_new(G_OBJECT_CLASS_TYPE(type), NULL); - res = type->construct(hook, ep, node); - if (res == -1) { - g_warning("Plugin '%s' failed to load hook '%s'", ep->name, type->id); - g_object_unref(hook); - } else { - ep->hooks = g_slist_append(ep->hooks, hook); + + /* Don't bother loading hooks for plugins that are not anyway enabled */ + if (ep->enabled) { + res = type->construct(hook, ep, node); + if (res == -1) { + g_warning("Plugin '%s' failed to load hook '%s'", ep->name, type->id); + g_object_unref(hook); + } else { + ep->hooks = g_slist_append(ep->hooks, hook); + } } if (p) |