aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/itip-formatter/itip-formatter.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/itip-formatter/itip-formatter.c')
-rw-r--r--plugins/itip-formatter/itip-formatter.c14
1 files changed, 14 insertions, 0 deletions
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);