From 6aba3ad9c4d0348c601763ce1899b05e8d7885be Mon Sep 17 00:00:00 2001 From: Not Zed Date: Wed, 16 Mar 2005 06:52:03 +0000 Subject: ** See bug #73550 (related for config pages) 2005-03-14 Not Zed ** See bug #73550 (related for config pages) * e-config.c (ech_config_widget_factory): if we are disabled, then noop. (ech_config_factory, ech_commit, ech_abort): same. svn path=/trunk/; revision=29031 --- e-util/ChangeLog | 8 ++++++++ e-util/e-config.c | 25 +++++++++++++++---------- 2 files changed, 23 insertions(+), 10 deletions(-) (limited to 'e-util') diff --git a/e-util/ChangeLog b/e-util/ChangeLog index 293b8860d3..ed6152ea56 100644 --- a/e-util/ChangeLog +++ b/e-util/ChangeLog @@ -1,3 +1,11 @@ +2005-03-14 Not Zed + + ** See bug #73550 (related for config pages) + + * e-config.c (ech_config_widget_factory): if we are disabled, then + noop. + (ech_config_factory, ech_commit, ech_abort): same. + 2005-03-01 Not Zed * *.c: Remove/disable debug. diff --git a/e-util/e-config.c b/e-util/e-config.c index 356410f396..ed489ab3b6 100644 --- a/e-util/e-config.c +++ b/e-util/e-config.c @@ -1244,7 +1244,7 @@ ech_commit(EConfig *ec, GSList *items, void *data) { struct _EConfigHookGroup *group = data; - if (group->commit) + if (group->commit && group->hook->hook.plugin->enabled) e_plugin_invoke(group->hook->hook.plugin, group->commit, ec->target); } @@ -1253,7 +1253,7 @@ ech_abort(EConfig *ec, GSList *items, void *data) { struct _EConfigHookGroup *group = data; - if (group->abort) + if (group->abort && group->hook->hook.plugin->enabled) e_plugin_invoke(group->hook->hook.plugin, group->abort, ec->target); } @@ -1280,7 +1280,8 @@ ech_config_factory(EConfig *emp, void *data) d(printf("config factory called %s\n", group->id?group->id:"all menus")); - if (emp->target->type != group->target_type) + if (emp->target->type != group->target_type + || !group->hook->hook.plugin->enabled) return; if (group->items) @@ -1313,15 +1314,19 @@ static struct _GtkWidget * ech_config_widget_factory(EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget *old, void *data) { struct _EConfigHookGroup *group = data; - EConfigHookItemFactoryData hdata; - hdata.config = ec; - hdata.item = item; - hdata.target = ec->target; - hdata.parent = parent; - hdata.old = old; + if (group->hook->hook.plugin->enabled) { + EConfigHookItemFactoryData hdata; + + hdata.config = ec; + hdata.item = item; + hdata.target = ec->target; + hdata.parent = parent; + hdata.old = old; - return (struct _GtkWidget *)e_plugin_invoke(group->hook->hook.plugin, (char *)item->user_data, &hdata); + return (struct _GtkWidget *)e_plugin_invoke(group->hook->hook.plugin, (char *)item->user_data, &hdata); + } else + return NULL; } static struct _EConfigItem * -- cgit v1.2.3