From e70be54943aaecb9e80b0786efd44d9f46e4f193 Mon Sep 17 00:00:00 2001 From: JP Rosevear Date: Tue, 15 Mar 2005 15:57:10 +0000 Subject: set the type appropriately so that assigned tasks can be handled 2005-03-11 JP Rosevear * itip-formatter.c (extract_itip_data): set the type appropriately so that assigned tasks can be handled svn path=/trunk/; revision=29025 --- plugins/itip-formatter/ChangeLog | 5 +++++ plugins/itip-formatter/itip-formatter.c | 14 ++++++++++++++ 2 files changed, 19 insertions(+) (limited to 'plugins/itip-formatter') diff --git a/plugins/itip-formatter/ChangeLog b/plugins/itip-formatter/ChangeLog index 3048ef53eb..b2d2af5489 100644 --- a/plugins/itip-formatter/ChangeLog +++ b/plugins/itip-formatter/ChangeLog @@ -1,3 +1,8 @@ +2005-03-11 JP Rosevear + + * itip-formatter.c (extract_itip_data): set the type appropriately + so that assigned tasks can be handled + 2005-02-24 Björn Torkelsson * org-gnome-itip-formatter.eplug.in: Added author and description. diff --git a/plugins/itip-formatter/itip-formatter.c b/plugins/itip-formatter/itip-formatter.c index d1954a8cb9..fed28f445b 100644 --- a/plugins/itip-formatter/itip-formatter.c +++ b/plugins/itip-formatter/itip-formatter.c @@ -1010,6 +1010,20 @@ extract_itip_data (FormatItipPObject *pitip, GtkContainer *container) return FALSE; } + + switch (kind) { + case ICAL_VEVENT_COMPONENT: + pitip->type = E_CAL_SOURCE_TYPE_EVENT; + break; + case ICAL_VTODO_COMPONENT: + pitip->type = E_CAL_SOURCE_TYPE_TODO; + break; + default: + set_itip_error (pitip, container, + _("The item in the calendar is not valid"), + _("The message does contain a calendar, but the calendar contains no events, tasks or free/busy information")); + return FALSE; + } pitip->total = icalcomponent_count_components (pitip->main_comp, ICAL_VEVENT_COMPONENT); pitip->total += icalcomponent_count_components (pitip->main_comp, ICAL_VTODO_COMPONENT); -- cgit v1.2.3