diff options
author | JP Rosevear <jpr@ximian.com> | 2002-10-24 22:25:53 +0800 |
---|---|---|
committer | JP Rosevear <jpr@src.gnome.org> | 2002-10-24 22:25:53 +0800 |
commit | 1bb481409ffa20416c7531ebe4327d77db1796e2 (patch) | |
tree | 69c59e6eb5877835ac614a1c37b7d9618fc337e5 /calendar/gui/itip-utils.c | |
parent | d91b5bb03431dc5477cacfd2b922a68a1ec623c5 (diff) | |
download | gsoc2013-evolution-1bb481409ffa20416c7531ebe4327d77db1796e2.tar.gz gsoc2013-evolution-1bb481409ffa20416c7531ebe4327d77db1796e2.tar.zst gsoc2013-evolution-1bb481409ffa20416c7531ebe4327d77db1796e2.zip |
initialize new values (clean_up): free new values (find_my_address): if we
2002-10-24 JP Rosevear <jpr@ximian.com>
* gui/e-itip-control.c (init): initialize new values
(clean_up): free new values
(find_my_address): if we have a delegator address, use it instead
(write_html): display delegator info to user
(show_current_event): if we have a calendar uri, use that and
describe the event differently
(show_current_todo): ditto
(show_current): search for delegator X properties
(e_itip_control_set_delegator_address): accessor
(e_itip_control_get_delegator_address): ditto
(e_itip_control_set_delegator_name): ditto
(e_itip_control_get_delegator_name): ditto
(e_itip_control_set_calendar_uri): ditto
(e_itip_control_get_calendar_uri): ditto
* gui/e-itip-control.h: add protos
* gui/itip-utils.c (comp_from): use the first attendee as the from
address for things other than request, cancel and add (use
organizer) and publish (use default address)
svn path=/trunk/; revision=18425
Diffstat (limited to 'calendar/gui/itip-utils.c')
-rw-r--r-- | calendar/gui/itip-utils.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/calendar/gui/itip-utils.c b/calendar/gui/itip-utils.c index 76e23e47f1..f5c70086c0 100644 --- a/calendar/gui/itip-utils.c +++ b/calendar/gui/itip-utils.c @@ -331,10 +331,17 @@ static CORBA_char * comp_from (CalComponentItipMethod method, CalComponent *comp) { CalComponentOrganizer organizer; - + CalComponentAttendee *attendee; + GSList *attendees; + CORBA_char *str; + switch (method) { + case CAL_COMPONENT_METHOD_PUBLISH: + return CORBA_string_dup (""); + case CAL_COMPONENT_METHOD_REQUEST: case CAL_COMPONENT_METHOD_CANCEL: + case CAL_COMPONENT_METHOD_ADD: cal_component_get_organizer (comp, &organizer); if (organizer.value == NULL) { e_notice (NULL, GNOME_MESSAGE_BOX_ERROR, @@ -345,7 +352,15 @@ comp_from (CalComponentItipMethod method, CalComponent *comp) return CORBA_string_dup (itip_strip_mailto (organizer.value)); default: - return CORBA_string_dup (""); + if (!cal_component_has_attendees (comp)) + return CORBA_string_dup (""); + + cal_component_get_attendee_list (comp, &attendees); + attendee = attendees->data; + str = CORBA_string_dup (attendee->value ? itip_strip_mailto (attendee->value) : ""); + cal_component_free_attendee_list (attendees); + + return str; } } |