From: Art Cancro Date: Wed, 30 Jul 2008 21:48:09 +0000 (+0000) Subject: * debug messages now show serialized recurrence rules X-Git-Tag: v7.86~2064 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=f75dd6f7be10a9bea9fa8608ccb19321f910fc6d;p=citadel.git * debug messages now show serialized recurrence rules * Event editor dialog is now tabbed Event/Attendees/Recurrence when running in TECH_PREVIEW mode. Attendees are *not* yet moved into the Attendees tab. Recurrence rules are shown as serialized iCalendar code rather than as an actual usable editor. --- diff --git a/webcit/calendar.c b/webcit/calendar.c index 8d41f02d4..77bc4ddea 100644 --- a/webcit/calendar.c +++ b/webcit/calendar.c @@ -495,6 +495,8 @@ void display_individual_cal(icalcomponent *cal, long msgnum, char *from, int unr ritr = icalrecur_iterator_new(recur, dtstart); if (!ritr) return; + lprintf(9, "Recurrence found: %s\n", icalrecurrencetype_as_string(&recur)); + while (next = icalrecur_iterator_next(ritr), !icaltime_is_null_time(next) ) { ++num_recur; diff --git a/webcit/event.c b/webcit/event.c index 6a72c0b97..05d08400a 100644 --- a/webcit/event.c +++ b/webcit/event.c @@ -9,9 +9,9 @@ /* - * \brief Display an event by itself (for editing) - * \param supplied_vevent the event to edit - * \param msgnum reference on the citserver + * Display an event by itself (for editing) + * supplied_vevent the event to edit + * msgnum reference on the citserver */ void display_edit_individual_event(icalcomponent *supplied_vevent, long msgnum, char *from, int unread) { icalcomponent *vevent; @@ -40,7 +40,7 @@ void display_edit_individual_event(icalcomponent *supplied_vevent, long msgnum, if (supplied_vevent != NULL) { vevent = supplied_vevent; - /** + /* * If we're looking at a fully encapsulated VCALENDAR * rather than a VEVENT component, attempt to use the first * relevant VEVENT subcomponent. If there is none, the @@ -62,13 +62,13 @@ void display_edit_individual_event(icalcomponent *supplied_vevent, long msgnum, created_new_vevent = 1; } - /** Learn the sequence */ + /* Learn the sequence */ p = icalcomponent_get_first_property(vevent, ICAL_SEQUENCE_PROPERTY); if (p != NULL) { sequence = icalproperty_get_sequence(p); } - /** Begin output */ + /* Begin output */ output_headers(1, 1, 2, 0, 0, 0); wprintf("
\n"); wprintf("

"); @@ -78,8 +78,10 @@ void display_edit_individual_event(icalcomponent *supplied_vevent, long msgnum, wprintf("
\n"); - wprintf("
" - "
\n"); + wprintf("
"); +#ifndef TECH_PREVIEW + wprintf("
\n"); +#endif /************************************************************ * Uncomment this to see the UID in calendar events for debugging @@ -106,7 +108,18 @@ void display_edit_individual_event(icalcomponent *supplied_vevent, long msgnum, wprintf("\n", bstr("day")); - /** Put it in a borderless table so it lines up nicely */ +#ifdef TECH_PREVIEW + char *tabnames[] = { // FIXME localize these when the code is finished + "Event", + "Attendees", + "Recurrence" + }; + + tabbed_dialog(3, tabnames); + begin_tab(0, 3); +#endif + + /* Put it in a borderless table so it lines up nicely */ wprintf("\n"); wprintf("
"); @@ -375,13 +388,37 @@ void display_edit_individual_event(icalcomponent *supplied_vevent, long msgnum, ); wprintf("\n"); +#ifndef TECH_PREVIEW + wprintf("
"); +#endif - wprintf("
\n"); +#ifdef TECH_PREVIEW + end_tab(0, 3); + + /* Attendees tab (need to move things here) */ + begin_tab(1, 3); + end_tab(1, 3); + + /* Recurrence tab */ + begin_tab(2, 3); + icalproperty *rrule = NULL; + struct icalrecurrencetype recur; + + rrule = icalcomponent_get_first_property(vevent, ICAL_RRULE_PROPERTY); + if (rrule) { + recur = icalproperty_get_rrule(rrule); + wprintf("%s
\n", icalrecurrencetype_as_string(&recur)); + } + end_tab(2, 3); + +#endif + + wprintf("\n"); + wprintf("\n" ); - address_book_popup(); wDumpContent(1); @@ -684,7 +721,7 @@ STARTOVER: for (attendee = icalcomponent_get_first_property(vevent, ICAL_ATTENDE /** Or, check attendee availability if the user asked for that. */ if ( (encaps != NULL) && (havebstr("check_button")) ) { - /** Call this function, which does the real work */ + /* Call this function, which does the real work */ check_attendee_availability(encaps); /** This displays the form again, with our annotations */ @@ -712,5 +749,3 @@ STARTOVER: for (attendee = icalcomponent_get_first_property(vevent, ICAL_ATTENDE readloop("readfwd"); } } - -