X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Fevent.c;h=c8e60639db818da0fc6a82d77795bd2ef82395d3;hb=4cad9896baf2c56abf05e8b1c5824b79e9324230;hp=86014aaba470df76b5b7b3eb9e7dfe5056d2ebab;hpb=cb88dc45bd418f3426f3ad47c63e2bcdcf6209d6;p=citadel.git diff --git a/webcit/event.c b/webcit/event.c index 86014aaba..c8e60639d 100644 --- a/webcit/event.c +++ b/webcit/event.c @@ -402,6 +402,7 @@ void display_edit_individual_event(icalcomponent *supplied_vevent, long msgnum, /* blank recurrence with some sensible defaults */ memset(&recur, 0, sizeof(struct icalrecurrencetype)); recur.count = 3; + recur.until = icaltime_null_time(); recur.interval = 1; recur.freq = ICAL_WEEKLY_RECURRENCE; } @@ -491,8 +492,9 @@ void display_edit_individual_event(icalcomponent *supplied_vevent, long msgnum, wprintf("\n"); - - // FIXME preselect the correct radio button + int which_rrend_is_preselected = 0; + if (!icaltime_is_null_time(recur.until)) which_rrend_is_preselected = 2; + if (recur.count > 0) which_rrend_is_preselected = 1; wprintf(""); wprintf(_("Recurrence range")); @@ -500,13 +502,13 @@ void display_edit_individual_event(icalcomponent *supplied_vevent, long msgnum, wprintf("", - (1 ? "checked" : "") + ((which_rrend_is_preselected == 0) ? "checked" : "") ); wprintf("%s
\n", _("No ending date")); wprintf("", - (0 ? "checked" : "") + ((which_rrend_is_preselected == 1) ? "checked" : "") ); wprintf(_("Repeat this event")); wprintf(" "); @@ -517,7 +519,7 @@ void display_edit_individual_event(icalcomponent *supplied_vevent, long msgnum, wprintf("", - (0 ? "checked" : "") + ((which_rrend_is_preselected == 2) ? "checked" : "") ); wprintf(_("Repeat this event until ")); wprintf("");