From 32f545cdf031ebe3718791f18e8fb6b6141fd081 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Fri, 28 Aug 2009 20:21:54 -0400 Subject: Simplify EPlugin loading at startup. - Require all EPlugin and EPluginHook subtypes be registered before loading plugins. This drastically simplifies the EPlugin/EPluginHook negotiation. - Turn most EPluginHook subtypes into GTypeModules and register their types from an e_module_load() function (does not include shell hooks). - Convert EPluginLib and the Mono and Python bindings to GTypeModules and register their types from an e_module_load() function, and kill EPluginTypeHook. --- addressbook/gui/widgets/eab-config.c | 46 ------------------------------------ 1 file changed, 46 deletions(-) (limited to 'addressbook/gui/widgets/eab-config.c') diff --git a/addressbook/gui/widgets/eab-config.c b/addressbook/gui/widgets/eab-config.c index 91056e0544..f47a696195 100644 --- a/addressbook/gui/widgets/eab-config.c +++ b/addressbook/gui/widgets/eab-config.c @@ -27,7 +27,6 @@ #include "eab-config.h" static GObjectClass *ecp_parent_class; -static GObjectClass *ecph_parent_class; struct _EABConfigPrivate { guint source_changed_id; @@ -143,48 +142,3 @@ eab_config_target_new_source (EABConfig *ecp, struct _ESource *source) return t; } - -static const EConfigHookTargetMask ecph_no_masks[] = { - { NULL } -}; - -static const EConfigHookTargetMap ecph_targets[] = { - { "source", EAB_CONFIG_TARGET_SOURCE, ecph_no_masks }, - { NULL }, -}; - -static void -ecph_class_init (EPluginHookClass *klass) -{ - gint i; - - klass->id = "org.gnome.evolution.addressbook.config:1.0"; - - for (i = 0; ecph_targets[i].type; i++) { - e_config_hook_class_add_target_map ((EConfigHookClass *)klass, &ecph_targets[i]); - } - - ((EConfigHookClass *)klass)->config_class = g_type_class_ref (eab_config_get_type ()); -} - -GType -eab_config_hook_get_type (void) -{ - static GType type = 0; - - if (!type) { - static const GTypeInfo info = { - sizeof (EABConfigHookClass), - NULL, NULL, - (GClassInitFunc) ecph_class_init, - NULL, NULL, - sizeof (EABConfigHook), 0, - (GInstanceInitFunc) NULL - }; - - ecph_parent_class = g_type_class_ref (e_config_hook_get_type ()); - type = g_type_register_static (e_config_hook_get_type (), "EABConfigHook", &info, 0); - } - - return type; -} -- cgit v1.2.3