diff options
author | Sankar P <psankar@novell.com> | 2007-08-07 16:01:21 +0800 |
---|---|---|
committer | Sankarasivasubramanian Pasupathilingam <psankar@src.gnome.org> | 2007-08-07 16:01:21 +0800 |
commit | 2574884bdd9ea8d1a04f6e4abaf914422c30e66b (patch) | |
tree | 1c1ae8cbef4ff5460c18d895d019687411ea8190 /e-util/e-plugin.c | |
parent | 30836f283690ba0217f30618bef02b802f221ae6 (diff) | |
download | gsoc2013-evolution-2574884bdd9ea8d1a04f6e4abaf914422c30e66b.tar.gz gsoc2013-evolution-2574884bdd9ea8d1a04f6e4abaf914422c30e66b.tar.zst gsoc2013-evolution-2574884bdd9ea8d1a04f6e4abaf914422c30e66b.zip |
reviewed by: Srinivasa Ragavan <sragavan@novell.com>
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
svn path=/trunk/; revision=33963
Diffstat (limited to 'e-util/e-plugin.c')
-rw-r--r-- | e-util/e-plugin.c | 16 |
1 files changed, 10 insertions, 6 deletions
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) |