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 /calendar/gui/e-cal-event.c | |
parent | e8382099228d46ebef684c5384bab6ec710283ce (diff) | |
download | gsoc2013-evolution-32f545cdf031ebe3718791f18e8fb6b6141fd081.tar.gz 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 'calendar/gui/e-cal-event.c')
-rw-r--r-- | calendar/gui/e-cal-event.c | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/calendar/gui/e-cal-event.c b/calendar/gui/e-cal-event.c index 5881f5037f..7d0a9d196d 100644 --- a/calendar/gui/e-cal-event.c +++ b/calendar/gui/e-cal-event.c @@ -105,59 +105,3 @@ e_cal_event_target_new_module (ECalEvent *ece, EShellBackend *shell_backend, ESo return t; } - -/* ********************************************************************** */ - -static gpointer eceh_parent_class; - -static const EEventHookTargetMask eceh_module_masks[] = { - { "migration", E_CAL_EVENT_MODULE_MIGRATION }, - { NULL }, -}; - -static const EEventHookTargetMap eceh_targets[] = { - { "module", E_CAL_EVENT_TARGET_BACKEND, eceh_module_masks }, - { NULL }, -}; - -static void -eceh_finalize (GObject *o) -{ - ((GObjectClass *) eceh_parent_class)->finalize (o); -} - -static void -eceh_class_init (EPluginHookClass *klass) -{ - gint i; - - ((GObjectClass *)klass)->finalize = eceh_finalize; - ((EPluginHookClass *)klass)->id = "org.gnome.evolution.calendar.events:1.0"; - - for (i = 0; eceh_targets[i].type; i++) - e_event_hook_class_add_target_map ((EEventHookClass *)klass, &eceh_targets[i]); - - ((EEventHookClass *)klass)->event = (EEvent *) e_cal_event_peek (); -} - -GType -e_cal_event_hook_get_type (void) -{ - static GType type = 0; - - if (!type) { - static const GTypeInfo info = { - sizeof (ECalEventHookClass), - NULL, NULL, - (GClassInitFunc) eceh_class_init, - NULL, NULL, - sizeof (ECalEventHook), 0, - (GInstanceInitFunc) NULL, - }; - - eceh_parent_class = g_type_class_ref (e_event_hook_get_type ()); - type = g_type_register_static (e_event_hook_get_type (), "ECalEventHook", &info, 0); - } - - return type; -} |