diff options
author | Dan Winship <danw@src.gnome.org> | 2002-02-26 00:40:37 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2002-02-26 00:40:37 +0800 |
commit | 7330d192f06105417dfaecacf1656033e19f63b8 (patch) | |
tree | ec4f789385f8dbbf32c13a8b5784abeca59867b0 /calendar | |
parent | c91f7c6b59f1a845bc98797c9d6bae5344136854 (diff) | |
download | gsoc2013-evolution-7330d192f06105417dfaecacf1656033e19f63b8.tar gsoc2013-evolution-7330d192f06105417dfaecacf1656033e19f63b8.tar.gz gsoc2013-evolution-7330d192f06105417dfaecacf1656033e19f63b8.tar.bz2 gsoc2013-evolution-7330d192f06105417dfaecacf1656033e19f63b8.tar.lz gsoc2013-evolution-7330d192f06105417dfaecacf1656033e19f63b8.tar.xz gsoc2013-evolution-7330d192f06105417dfaecacf1656033e19f63b8.tar.zst gsoc2013-evolution-7330d192f06105417dfaecacf1656033e19f63b8.zip |
[pullup from evolution-1-0-branch]
* gui/itip-utils.c (itip_send_comp): use
GNOME_Evolution_Composer_setBody rather than _setMultipartType and
_attachData now, to send a message containing just a text/calendar
part. Fixes 14705. Mostly.
(comp_content_type): Include the filename here since we can't add
a Content-Disposition now.
svn path=/trunk/; revision=15834
Diffstat (limited to 'calendar')
-rw-r--r-- | calendar/ChangeLog | 9 | ||||
-rw-r--r-- | calendar/gui/itip-utils.c | 41 |
2 files changed, 17 insertions, 33 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 9b938908cd..61e8cc5cf1 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,12 @@ +2002-02-25 Dan Winship <danw@ximian.com> + + * gui/itip-utils.c (itip_send_comp): use + GNOME_Evolution_Composer_setBody rather than _setMultipartType and + _attachData now, to send a message containing just a text/calendar + part. Fixes 14705. Mostly. + (comp_content_type): Include the filename here since we can't add + a Content-Disposition now. + 2002-02-24 Chris Toshok <toshok@ximian.com> * gui/cal-search-bar.c (cal_search_bar_class_init): change diff --git a/calendar/gui/itip-utils.c b/calendar/gui/itip-utils.c index 1f1a0a9883..2c0621a38a 100644 --- a/calendar/gui/itip-utils.c +++ b/calendar/gui/itip-utils.c @@ -323,27 +323,18 @@ comp_subject (CalComponent *comp) } static CORBA_char * -comp_content_type (CalComponentItipMethod method) +comp_content_type (CalComponent *comp, CalComponentItipMethod method) { char tmp[256]; - sprintf (tmp, "text/calendar; charset=utf-8; METHOD=%s", itip_methods[method]); + sprintf (tmp, "text/calendar; name=\"%s\"; charset=utf-8; METHOD=%s", + cal_component_get_vtype (comp) == CAL_COMPONENT_FREEBUSY ? + "freebusy.ifb" : "calendar.ics", itip_methods[method]); return CORBA_string_dup (tmp); } static CORBA_char * -comp_filename (CalComponent *comp) -{ - switch (cal_component_get_vtype (comp)) { - case CAL_COMPONENT_FREEBUSY: - return CORBA_string_dup ("freebusy.ifb"); - default: - return CORBA_string_dup ("calendar.ics"); - } -} - -static CORBA_char * comp_description (CalComponent *comp) { CORBA_char *description; @@ -712,12 +703,6 @@ itip_send_comp (CalComponentItipMethod method, CalComponent *send_comp, g_return_if_fail (bonobo_server != NULL); composer_server = BONOBO_OBJREF (bonobo_server); - GNOME_Evolution_Composer_setMultipartType (composer_server, GNOME_Evolution_Composer_MIXED, &ev); - if (BONOBO_EX (&ev)) { - g_warning ("Unable to set multipart type while sending iTip message"); - goto cleanup; - } - comp = comp_compliant (method, send_comp); if (comp == NULL) goto cleanup; @@ -741,15 +726,8 @@ itip_send_comp (CalComponentItipMethod method, CalComponent *send_comp, goto cleanup; } - /* Plain text body */ - body = comp_description (comp); - GNOME_Evolution_Composer_setBodyText (composer_server, body, &ev); - - /* Content type, suggested file name, description */ - content_type = comp_content_type (method); - filename = comp_filename (comp); - description = comp_description (comp); - show_inline = TRUE; + /* Content type */ + content_type = comp_content_type (comp, method); ical_string = comp_string (method, comp, client, zones); attach_data = GNOME_Evolution_Composer_AttachmentData__alloc (); @@ -758,11 +736,8 @@ itip_send_comp (CalComponentItipMethod method, CalComponent *send_comp, attach_data->_buffer = CORBA_sequence_CORBA_char_allocbuf (attach_data->_length); strcpy (attach_data->_buffer, ical_string); - GNOME_Evolution_Composer_attachData (composer_server, - content_type, filename, description, - show_inline, attach_data, - &ev); - + GNOME_Evolution_Composer_setBody (composer_server, ical_string, content_type, &ev); + if (BONOBO_EX (&ev)) { g_warning ("Unable to attach data to the composer while sending iTip message"); goto cleanup; |