recurrence editor stuff
authorArt Cancro <ajc@citadel.org>
Thu, 16 Oct 2008 02:29:07 +0000 (02:29 +0000)
committerArt Cancro <ajc@citadel.org>
Thu, 16 Oct 2008 02:29:07 +0000 (02:29 +0000)
webcit/event.c

index bb10286534fd4225a4747d6205cfa222b99108ba..08f5dc7e2785a18bc94251c4c87e3971dd61b5f4 100644 (file)
@@ -570,8 +570,20 @@ void display_edit_individual_event(icalcomponent *supplied_vevent, long msgnum,
        wprintf("</div>\n");                            /* end 'monthday_selector' div */
 
 
+       int rrymweek = 1;                               /* FIXME default to same as event start */
+       int rrymweekday = 1;                            /* FIXME default to same as event start */
+       int rrymonth = 1;                               /* FIXME default to same as event start */
+
+       int which_rryeartype_is_preselected = 0;
+
+       if ( (recur.by_day[0] != ICAL_RECURRENCE_ARRAY_MAX) 
+          && (recur.by_month[0] != ICAL_RECURRENCE_ARRAY_MAX) ) {
+               which_rryeartype_is_preselected = 1;    /* FIXME finish this */
+               rrymweek = icalrecurrencetype_day_position(recur.by_day[0]);
+               rrymweekday = icalrecurrencetype_day_day_of_week(recur.by_day[0]) - 1;
+               rrymonth = recur.by_month[0];
+       }
 
-       int which_rryeartype_is_preselected = 0;        /* FIXME set default correctly */
        wprintf("<div id=\"yearday_selector\">");       /* begin 'yearday_selector' div */
 
        wprintf("<input type=\"radio\" name=\"rryeartype\" id=\"rrmonthtype_ymday\" "
@@ -586,7 +598,7 @@ void display_edit_individual_event(icalcomponent *supplied_vevent, long msgnum,
                ((which_rrmonthtype_is_preselected == 1) ? "checked" : "")
        );
 
-       wprintf("on the (Grelfth) (Funday) of (Octobuary)<br />");      /* FIXME */
+       wprintf("on the (%d) (%d) of (%d)<br />", rrymweek, rrymweekday, rrymonth);     /* FIXME */
 
        wprintf("</div>\n");                            /* end 'yearday_selector' div */