From fb874ce0c9bb385dc5d77039067209993d0039a4 Mon Sep 17 00:00:00 2001 From: JP Rosevear Date: Mon, 10 Jan 2005 15:51:55 +0000 Subject: first crack at saving attachments for the backend (extract_itip_data): 2005-01-10 JP Rosevear * itip-formatter.c (update_item): first crack at saving attachments for the backend (extract_itip_data): tell the user what to do for more than one attachment svn path=/trunk/; revision=28328 --- plugins/itip-formatter/ChangeLog | 2 ++ plugins/itip-formatter/itip-formatter.c | 13 ++++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) (limited to 'plugins/itip-formatter') diff --git a/plugins/itip-formatter/ChangeLog b/plugins/itip-formatter/ChangeLog index 462220fbe9..2136d63954 100644 --- a/plugins/itip-formatter/ChangeLog +++ b/plugins/itip-formatter/ChangeLog @@ -2,6 +2,8 @@ * itip-formatter.c (update_item): first crack at saving attachments for the backend + (extract_itip_data): tell the user what to do for more than one + attachment 2005-01-09 JP Rosevear diff --git a/plugins/itip-formatter/itip-formatter.c b/plugins/itip-formatter/itip-formatter.c index 5a642c03ec..ff07f6321f 100644 --- a/plugins/itip-formatter/itip-formatter.c +++ b/plugins/itip-formatter/itip-formatter.c @@ -1001,11 +1001,18 @@ extract_itip_data (FormatItipPObject *pitip, GtkContainer *container) pitip->total += icalcomponent_count_components (pitip->main_comp, ICAL_VTODO_COMPONENT); pitip->total += icalcomponent_count_components (pitip->main_comp, ICAL_VFREEBUSY_COMPONENT); - if (pitip->total > 0) + if (pitip->total > 1) { + set_itip_error (pitip, container, + _("The calendar attached contains multiple items"), + _("To process all of these items, the file should be saved and the calendar imported")); + + return FALSE; + } if (pitip->total > 0) { pitip->current = 1; - else + } else { pitip->current = 0; - + } + /* Determine any delegate sections */ prop = icalcomponent_get_first_property (pitip->ical_comp, ICAL_X_PROPERTY); while (prop) { -- cgit v1.2.3