if ( (havebstr("save_button"))
|| (havebstr("check_button")) ) {
-
+ StrBuf *Buf = NewStrBuf();
/* Replace values in the component with ones from the form */
while (prop = icalcomponent_get_first_property(vevent,
}
if (havebstr("summary")) {
- icalcomponent_add_property(vevent,
- icalproperty_new_summary(bstr("summary")));
+ FlushStrBuf(Buf);
+ StrBufRFC2047encode(&Buf, sbstr("summary"));
+ icalcomponent_add_property(
+ vevent,
+ icalproperty_new_summary(ChrPtr(Buf)));
} else {
- icalcomponent_add_property(vevent,
- icalproperty_new_summary(_("Untitled Event")));
+ StrBuf *Untitled;
+ FlushStrBuf(Buf);
+ Untitled = NewStrBufPlain(_("Untitled Event"), -1);
+ StrBufRFC2047encode(&Buf, Untitled);
+ FreeStrBuf(&Untitled);
+ icalcomponent_add_property(
+ vevent,
+ icalproperty_new_summary(ChrPtr(Buf)));
}
while (prop = icalcomponent_get_first_property(vevent,
icalproperty_free(prop);
}
if (havebstr("location")) {
- icalcomponent_add_property(vevent,
- icalproperty_new_location(bstr("location")));
+ FlushStrBuf(Buf);
+ StrBufRFC2047encode(&Buf, sbstr("location"));
+ icalcomponent_add_property(
+ vevent,
+ icalproperty_new_location(ChrPtr(Buf)));
}
while (prop = icalcomponent_get_first_property(vevent,
ICAL_DESCRIPTION_PROPERTY), prop != NULL) {
icalproperty_free(prop);
}
if (havebstr("description")) {
- icalcomponent_add_property(vevent,
- icalproperty_new_description(bstr("description")));
+ FlushStrBuf(Buf);
+ StrBufRFC2047encode(&Buf, sbstr("description"));
+ icalcomponent_add_property(
+ vevent,
+ icalproperty_new_description(ChrPtr(Buf)));
}
while (prop = icalcomponent_get_first_property(vevent,
icalcomponent_free(encaps);
encaps = NULL;
}
-
+ FreeStrBuf(&Buf);
}
/*