From c0a255eb90769638d57ae4122932f75c46e4e531 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Thu, 11 Sep 2008 15:34:29 +0000 Subject: Merge revisions 36016:36303 from trunk. svn path=/branches/kill-bonobo/; revision=36307 --- calendar/gui/e-cal-event.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'calendar/gui/e-cal-event.c') diff --git a/calendar/gui/e-cal-event.c b/calendar/gui/e-cal-event.c index fe02d4854e..6e295ab9a8 100644 --- a/calendar/gui/e-cal-event.c +++ b/calendar/gui/e-cal-event.c @@ -1,21 +1,22 @@ /* - * Authors: David Trowbridge - * - * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) - * * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) version 3. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with the program; if not, see * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * Authors: + * David Trowbridge + * + * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) * */ -- cgit v1.2.3 From 6d1aea1b231c120441061c2046157b40e34f8e3a Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sun, 5 Oct 2008 04:12:09 +0000 Subject: Support migration in the new shell design. Some code got duplicated for calendars and tasks. Made a note to revisit. svn path=/branches/kill-bonobo/; revision=36560 --- calendar/gui/e-cal-event.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'calendar/gui/e-cal-event.c') diff --git a/calendar/gui/e-cal-event.c b/calendar/gui/e-cal-event.c index 6e295ab9a8..ecd1ea5b7e 100644 --- a/calendar/gui/e-cal-event.c +++ b/calendar/gui/e-cal-event.c @@ -43,10 +43,10 @@ static void ece_target_free (EEvent *ev, EEventTarget *t) { switch (t->type) { - case E_CAL_EVENT_TARGET_COMPONENT: { - ECalEventTargetComponent *s = (ECalEventTargetComponent *) t; - if (s->component) - g_object_unref (s->component); + case E_CAL_EVENT_TARGET_MODULE: { + ECalEventTargetModule *s = (ECalEventTargetModule *) t; + if (s->shell_module) + g_object_unref (s->shell_module); break; } } @@ -92,12 +92,12 @@ e_cal_event_peek (void) return e_cal_event; } -ECalEventTargetComponent * -e_cal_event_target_new_component (ECalEvent *ece, struct _CalendarComponent *component, guint32 flags) +ECalEventTargetModule * +e_cal_event_target_new_module (ECalEvent *ece, EShellModule *shell_module, guint32 flags) { - ECalEventTargetComponent *t = e_event_target_new (&ece->event, E_CAL_EVENT_TARGET_COMPONENT, sizeof (*t)); + ECalEventTargetModule *t = e_event_target_new (&ece->event, E_CAL_EVENT_TARGET_MODULE, sizeof (*t)); - t->component = g_object_ref (component); + t->shell_module = g_object_ref (shell_module); t->target.mask = ~flags; return t; @@ -107,13 +107,13 @@ e_cal_event_target_new_component (ECalEvent *ece, struct _CalendarComponent *com static void *eceh_parent_class; -static const EEventHookTargetMask eceh_component_masks[] = { - { "migration", E_CAL_EVENT_COMPONENT_MIGRATION }, +static const EEventHookTargetMask eceh_module_masks[] = { + { "migration", E_CAL_EVENT_MODULE_MIGRATION }, { NULL }, }; static const EEventHookTargetMap eceh_targets[] = { - { "component", E_CAL_EVENT_TARGET_COMPONENT, eceh_component_masks }, + { "module", E_CAL_EVENT_TARGET_MODULE, eceh_module_masks }, { NULL }, }; -- cgit v1.2.3 From 2a54f0a220d86b271901697ce938b30c2f3ca41a Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Fri, 8 May 2009 09:45:58 -0400 Subject: Adapt calendar to EShellBackend changes. --- calendar/gui/e-cal-event.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'calendar/gui/e-cal-event.c') diff --git a/calendar/gui/e-cal-event.c b/calendar/gui/e-cal-event.c index ecd1ea5b7e..3bccd137f7 100644 --- a/calendar/gui/e-cal-event.c +++ b/calendar/gui/e-cal-event.c @@ -45,8 +45,8 @@ ece_target_free (EEvent *ev, EEventTarget *t) switch (t->type) { case E_CAL_EVENT_TARGET_MODULE: { ECalEventTargetModule *s = (ECalEventTargetModule *) t; - if (s->shell_module) - g_object_unref (s->shell_module); + if (s->shell_backend) + g_object_unref (s->shell_backend); break; } } @@ -93,11 +93,11 @@ e_cal_event_peek (void) } ECalEventTargetModule * -e_cal_event_target_new_module (ECalEvent *ece, EShellModule *shell_module, guint32 flags) +e_cal_event_target_new_module (ECalEvent *ece, EShellBackend *shell_backend, guint32 flags) { ECalEventTargetModule *t = e_event_target_new (&ece->event, E_CAL_EVENT_TARGET_MODULE, sizeof (*t)); - t->shell_module = g_object_ref (shell_module); + t->shell_backend = g_object_ref (shell_backend); t->target.mask = ~flags; return t; -- cgit v1.2.3 From e4afd3f9fb962ea1295a0657ec9f83a427829171 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Tue, 26 May 2009 23:21:02 -0400 Subject: Remove trailing whitespace, again. --- calendar/gui/e-cal-event.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'calendar/gui/e-cal-event.c') diff --git a/calendar/gui/e-cal-event.c b/calendar/gui/e-cal-event.c index 6e295ab9a8..db7e9abc89 100644 --- a/calendar/gui/e-cal-event.c +++ b/calendar/gui/e-cal-event.c @@ -10,7 +10,7 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with the program; if not, see + * License along with the program; if not, see * * * Authors: -- cgit v1.2.3 From 948235c3d1076dbe6ed2e57a24c16a083bbd9f01 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Wed, 27 May 2009 10:29:19 -0400 Subject: Prefer GLib basic types over C types. --- calendar/gui/e-cal-event.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'calendar/gui/e-cal-event.c') diff --git a/calendar/gui/e-cal-event.c b/calendar/gui/e-cal-event.c index d84a9f968b..a05711a7f4 100644 --- a/calendar/gui/e-cal-event.c +++ b/calendar/gui/e-cal-event.c @@ -105,7 +105,7 @@ e_cal_event_target_new_module (ECalEvent *ece, EShellBackend *shell_backend, gui /* ********************************************************************** */ -static void *eceh_parent_class; +static gpointer eceh_parent_class; static const EEventHookTargetMask eceh_module_masks[] = { { "migration", E_CAL_EVENT_MODULE_MIGRATION }, @@ -126,7 +126,7 @@ eceh_finalize (GObject *o) static void eceh_class_init (EPluginHookClass *klass) { - int i; + gint i; ((GObjectClass *)klass)->finalize = eceh_finalize; ((EPluginHookClass *)klass)->id = "org.gnome.evolution.calendar.events:1.0"; -- cgit v1.2.3 From e68456f60f37d5d6e18fac95a5a9ddea2e9627fa Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Tue, 11 Aug 2009 23:19:03 -0400 Subject: Get the calendar-weather plugin working. --- calendar/gui/e-cal-event.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'calendar/gui/e-cal-event.c') diff --git a/calendar/gui/e-cal-event.c b/calendar/gui/e-cal-event.c index eb37ae190f..5881f5037f 100644 --- a/calendar/gui/e-cal-event.c +++ b/calendar/gui/e-cal-event.c @@ -43,8 +43,8 @@ static void ece_target_free (EEvent *ev, EEventTarget *t) { switch (t->type) { - case E_CAL_EVENT_TARGET_MODULE: { - ECalEventTargetModule *s = (ECalEventTargetModule *) t; + case E_CAL_EVENT_TARGET_BACKEND: { + ECalEventTargetBackend *s = (ECalEventTargetBackend *) t; if (s->shell_backend) g_object_unref (s->shell_backend); if (s->source_list) @@ -94,10 +94,10 @@ e_cal_event_peek (void) return e_cal_event; } -ECalEventTargetModule * +ECalEventTargetBackend * e_cal_event_target_new_module (ECalEvent *ece, EShellBackend *shell_backend, ESourceList *source_list, guint32 flags) { - ECalEventTargetModule *t = e_event_target_new (&ece->event, E_CAL_EVENT_TARGET_MODULE, sizeof (*t)); + ECalEventTargetBackend *t = e_event_target_new (&ece->event, E_CAL_EVENT_TARGET_BACKEND, sizeof (*t)); t->shell_backend = g_object_ref (shell_backend); t->source_list = g_object_ref (source_list); @@ -116,7 +116,7 @@ static const EEventHookTargetMask eceh_module_masks[] = { }; static const EEventHookTargetMap eceh_targets[] = { - { "module", E_CAL_EVENT_TARGET_MODULE, eceh_module_masks }, + { "module", E_CAL_EVENT_TARGET_BACKEND, eceh_module_masks }, { NULL }, }; -- cgit v1.2.3 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. --- calendar/gui/e-cal-event.c | 56 ---------------------------------------------- 1 file changed, 56 deletions(-) (limited to 'calendar/gui/e-cal-event.c') 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; -} -- cgit v1.2.3