diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2009-08-29 08:21:54 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2009-08-30 05:23:20 +0800 |
commit | 32f545cdf031ebe3718791f18e8fb6b6141fd081 (patch) | |
tree | 980723161c32da855ca91b135318d7fa67dc18c7 /addressbook/gui/widgets | |
parent | e8382099228d46ebef684c5384bab6ec710283ce (diff) | |
download | gsoc2013-evolution-32f545cdf031ebe3718791f18e8fb6b6141fd081.tar gsoc2013-evolution-32f545cdf031ebe3718791f18e8fb6b6141fd081.tar.gz gsoc2013-evolution-32f545cdf031ebe3718791f18e8fb6b6141fd081.tar.bz2 gsoc2013-evolution-32f545cdf031ebe3718791f18e8fb6b6141fd081.tar.lz gsoc2013-evolution-32f545cdf031ebe3718791f18e8fb6b6141fd081.tar.xz gsoc2013-evolution-32f545cdf031ebe3718791f18e8fb6b6141fd081.tar.zst gsoc2013-evolution-32f545cdf031ebe3718791f18e8fb6b6141fd081.zip |
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.
Diffstat (limited to 'addressbook/gui/widgets')
-rw-r--r-- | addressbook/gui/widgets/eab-config.c | 46 | ||||
-rw-r--r-- | addressbook/gui/widgets/eab-config.h | 15 |
2 files changed, 0 insertions, 61 deletions
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; -} diff --git a/addressbook/gui/widgets/eab-config.h b/addressbook/gui/widgets/eab-config.h index 8ecc8525bc..fcf6b76f00 100644 --- a/addressbook/gui/widgets/eab-config.h +++ b/addressbook/gui/widgets/eab-config.h @@ -60,21 +60,6 @@ EABConfig *eab_config_new (gint type, const gchar *menuid); EABConfigTargetSource *eab_config_target_new_source (EABConfig *ecp, struct _ESource *source); -/* ********************************************************************** */ - -typedef struct _EABConfigHook EABConfigHook; -typedef struct _EABConfigHookClass EABConfigHookClass; - -struct _EABConfigHook { - EConfigHook hook; -}; - -struct _EABConfigHookClass { - EConfigHookClass hook_class; -}; - -GType eab_config_hook_get_type (void); - G_END_DECLS #endif |