aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-event.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-08-29 08:21:54 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-08-30 05:23:20 +0800
commit32f545cdf031ebe3718791f18e8fb6b6141fd081 (patch)
tree980723161c32da855ca91b135318d7fa67dc18c7 /mail/em-event.c
parente8382099228d46ebef684c5384bab6ec710283ce (diff)
downloadgsoc2013-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 'mail/em-event.c')
-rw-r--r--mail/em-event.c80
1 files changed, 0 insertions, 80 deletions
diff --git a/mail/em-event.c b/mail/em-event.c
index 2cdbb23125..de8f468fa9 100644
--- a/mail/em-event.c
+++ b/mail/em-event.c
@@ -204,83 +204,3 @@ em_event_target_new_custom_icon(EMEvent *eme, GtkTreeStore *store, GtkTreeIter *
return t;
}
-
-/* ********************************************************************** */
-
-static gpointer emeh_parent_class;
-#define emeh ((EMEventHook *)eph)
-
-static const EEventHookTargetMask emeh_folder_masks[] = {
- { "newmail", EM_EVENT_FOLDER_NEWMAIL },
- { NULL }
-};
-
-static const EEventHookTargetMask emeh_composer_masks[] = {
- { "sendoption", EM_EVENT_COMPOSER_SEND_OPTION },
- { NULL }
-};
-
-static const EEventHookTargetMask emeh_message_masks[] = {
- { "replyall", EM_EVENT_MESSAGE_REPLY_ALL },
- { "reply", EM_EVENT_MESSAGE_REPLY },
- { NULL }
-};
-
-static const EEventHookTargetMask emeh_send_receive_masks[] = {
- { "sendreceive", EM_EVENT_SEND_RECEIVE },
- { NULL }
-};
-
-static const EEventHookTargetMask emeh_custom_icon_masks[] = {
- { "customicon", EM_EVENT_CUSTOM_ICON },
- { NULL }
-};
-
-static const EEventHookTargetMap emeh_targets[] = {
- { "folder", EM_EVENT_TARGET_FOLDER, emeh_folder_masks },
- { "message", EM_EVENT_TARGET_MESSAGE, emeh_message_masks },
- { "composer", EM_EVENT_TARGET_COMPOSER, emeh_composer_masks},
- { "sendreceive", EM_EVENT_TARGET_SEND_RECEIVE, emeh_send_receive_masks},
- { "customicon", EM_EVENT_TARGET_CUSTOM_ICON, emeh_custom_icon_masks},
- { NULL }
-};
-
-static void
-emeh_finalise(GObject *o)
-{
- /*EPluginHook *eph = (EPluginHook *)o;*/
-
- ((GObjectClass *)emeh_parent_class)->finalize(o);
-}
-
-static void
-emeh_class_init(EPluginHookClass *klass)
-{
- gint i;
-
- ((GObjectClass *)klass)->finalize = emeh_finalise;
- ((EPluginHookClass *)klass)->id = "org.gnome.evolution.mail.events:1.0";
-
- for (i=0;emeh_targets[i].type;i++)
- e_event_hook_class_add_target_map((EEventHookClass *)klass, &emeh_targets[i]);
-
- ((EEventHookClass *)klass)->event = (EEvent *)em_event_peek();
-}
-
-GType
-em_event_hook_get_type(void)
-{
- static GType type = 0;
-
- if (!type) {
- static const GTypeInfo info = {
- sizeof(EMEventHookClass), NULL, NULL, (GClassInitFunc) emeh_class_init, NULL, NULL,
- sizeof(EMEventHook), 0, (GInstanceInitFunc) NULL,
- };
-
- emeh_parent_class = g_type_class_ref(e_event_hook_get_type());
- type = g_type_register_static(e_event_hook_get_type(), "EMEventHook", &info, 0);
- }
-
- return type;
-}