aboutsummaryrefslogtreecommitdiffstats
path: root/e-util
diff options
context:
space:
mode:
authorSankar P <psankar@novell.com>2007-08-07 16:01:21 +0800
committerSankarasivasubramanian Pasupathilingam <psankar@src.gnome.org>2007-08-07 16:01:21 +0800
commit2574884bdd9ea8d1a04f6e4abaf914422c30e66b (patch)
tree1c1ae8cbef4ff5460c18d895d019687411ea8190 /e-util
parent30836f283690ba0217f30618bef02b802f221ae6 (diff)
downloadgsoc2013-evolution-2574884bdd9ea8d1a04f6e4abaf914422c30e66b.tar
gsoc2013-evolution-2574884bdd9ea8d1a04f6e4abaf914422c30e66b.tar.gz
gsoc2013-evolution-2574884bdd9ea8d1a04f6e4abaf914422c30e66b.tar.bz2
gsoc2013-evolution-2574884bdd9ea8d1a04f6e4abaf914422c30e66b.tar.lz
gsoc2013-evolution-2574884bdd9ea8d1a04f6e4abaf914422c30e66b.tar.xz
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')
-rw-r--r--e-util/ChangeLog9
-rw-r--r--e-util/e-plugin.c16
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)