From 53402391e7a45e413173f9b3c7c2797f05279390 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Fri, 29 Nov 2002 23:56:19 +0000 Subject: [PATCH] * Completed "me as organizer" -- the user's own e-mail address is inserted as the organizer of new events. Detect when the user is the organizer and enable/disable the attendees box accordingly. --- webcit/ChangeLog | 6 +++++- webcit/event.c | 18 ++++++++++-------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/webcit/ChangeLog b/webcit/ChangeLog index dc70f01c8..5a997ad5d 100644 --- a/webcit/ChangeLog +++ b/webcit/ChangeLog @@ -1,4 +1,9 @@ $Log$ +Revision 400.58 2002/11/29 23:56:19 ajc +* Completed "me as organizer" -- the user's own e-mail address is inserted + as the organizer of new events. Detect when the user is the organizer and + enable/disable the attendees box accordingly. + Revision 400.57 2002/11/29 16:38:37 ajc * Started some "me as organizer" stuff. (BROKEN BUILD ... I'll fix soon.) @@ -1145,4 +1150,3 @@ Sun Dec 6 19:50:55 EST 1998 Art Cancro 1998-12-03 Nathan Bryant * webserver.c: warning fix - diff --git a/webcit/event.c b/webcit/event.c index 9959412c0..990a06b2f 100644 --- a/webcit/event.c +++ b/webcit/event.c @@ -39,7 +39,6 @@ void display_edit_individual_event(icalcomponent *supplied_vevent, long msgnum) struct icaltimetype t_start, t_end; time_t now; int created_new_vevent = 0; - icalorganizertype me_as_organizer; icalproperty *organizer = NULL; char organizer_string[SIZ]; icalproperty *attendee = NULL; @@ -215,9 +214,9 @@ void display_edit_individual_event(icalcomponent *supplied_vevent, long msgnum) if (icalcomponent_get_first_property(vevent, ICAL_ORGANIZER_PROPERTY) == NULL) { sprintf(organizer_string, "MAILTO:%s", WC->cs_inet_email); - memset(&me_as_organizer, 0, sizeof(icalorganizertype)); - me_as_organizer.value = strdup(organizer_string); - icalcomponent_set_organizer(vevent, me_as_organizer); + icalcomponent_add_property(vevent, + icalproperty_new_organizer(organizer_string) + ); } /* Determine who is the organizer of this event. This is useless @@ -237,10 +236,11 @@ void display_edit_individual_event(icalcomponent *supplied_vevent, long msgnum) } } } - wprintf("Organizer
(FIXME)"); + wprintf("Organizer"); escputs(organizer_string); if (organizer_is_me) { - wprintf("(you. FIXME)\n"); + wprintf(" " + "(you are the organizer)\n"); } wprintf("\n"); @@ -248,8 +248,10 @@ void display_edit_individual_event(icalcomponent *supplied_vevent, long msgnum) wprintf("Attendes
" "(Separate multiple attendees with commas)" "" - "