aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/cal-util/calobj.c
diff options
context:
space:
mode:
authorMiguel de Icaza <miguel@nuclecu.unam.mx>1998-04-19 05:37:45 +0800
committerArturo Espinosa <unammx@src.gnome.org>1998-04-19 05:37:45 +0800
commit24f0de634028297d3647779cffa082f8ff6a230a (patch)
tree197addeb391befbf624534683e567c4d6173cd52 /calendar/cal-util/calobj.c
parent6329a627a9e719838427d02e9d4480bf3c6cd76a (diff)
downloadgsoc2013-evolution-24f0de634028297d3647779cffa082f8ff6a230a.tar.gz
gsoc2013-evolution-24f0de634028297d3647779cffa082f8ff6a230a.tar.zst
gsoc2013-evolution-24f0de634028297d3647779cffa082f8ff6a230a.zip
Add Quoted printable property to items containing new lines. (duration):
1998-04-18 Miguel de Icaza <miguel@nuclecu.unam.mx> * calobj.c (ical_object_to_vobject): Add Quoted printable property to items containing new lines. (duration): Use unsigned integers, to work around buggy calendar files generated by korganizer. * main.c (save_calendar_cmd): Do not ask for file name if we are saving. (save_as_calendar_cmd): New command. svn path=/trunk/; revision=158
Diffstat (limited to 'calendar/cal-util/calobj.c')
-rw-r--r--calendar/cal-util/calobj.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/calendar/cal-util/calobj.c b/calendar/cal-util/calobj.c
index 4624b3a485..d9950e0bae 100644
--- a/calendar/cal-util/calobj.c
+++ b/calendar/cal-util/calobj.c
@@ -303,7 +303,7 @@ load_recur_yearly_day (iCalObject *o, char **str)
static void
duration (iCalObject *o, char **str)
{
- int duration = 0;
+ unsigned int duration = 0;
ignore_space (str);
if (**str != '#')
@@ -735,7 +735,7 @@ save_alarm (VObject *o, CalendarAlarm *alarm, iCalObject *ical)
VObject *
ical_object_to_vobject (iCalObject *ical)
{
- VObject *o, *alarm;
+ VObject *o, *alarm, *s;
GList *l;
if (ical->type == ICAL_EVENT)
@@ -757,7 +757,7 @@ ical_object_to_vobject (iCalObject *ical)
addPropValue (o, VCDTendProp, isodate_from_time_t (ical->dtend));
/* dcreated */
- addPropValue (o, VCDTendProp, isodate_from_time_t (ical->created));
+ addPropValue (o, VCDCreatedProp, isodate_from_time_t (ical->created));
/* completed */
if (ical->completed)
@@ -771,11 +771,20 @@ ical_object_to_vobject (iCalObject *ical)
store_list (o, VCExpDateProp, ical->exdate, ',');
/* description/comment */
- addPropValue (o, VCDescriptionProp, ical->comment ? ical->comment : "No Comment");
+ if (ical->comment && strlen (ical->comment)){
+ s = addPropValue (o, VCDescriptionProp, ical->comment);
+ if (strchr (ical->comment, '\n'))
+ addProp (s, VCQuotedPrintableProp);
+ }
/* summary */
- if (ical->summary)
- addPropValue (o, VCSummaryProp, ical->summary);
+ if (strlen (ical->summary)){
+ s = addPropValue (o, VCSummaryProp, ical->summary);
+ if (strchr (ical->summary, '\n'))
+ addProp (s, VCQuotedPrintableProp);
+ } else {
+ addPropValue (o, VCSummaryProp, _("Appointment"));
+ }
/* status */
addPropValue (o, VCStatusProp, ical->status);