* When displaying edit controls for time of day in the calendar, only show
authorArt Cancro <ajc@citadel.org>
Thu, 16 Jan 2003 04:41:26 +0000 (04:41 +0000)
committerArt Cancro <ajc@citadel.org>
Thu, 16 Jan 2003 04:41:26 +0000 (04:41 +0000)
  minutes that are multiples of 5 ... unless the existing value is not a
  multiple of 5, in which case we show that too.

webcit/ChangeLog
webcit/calendar_tools.c

index 59e179ec060ebe55c55fb58da9dcee3bfdfb41cc..aa0dcdbeaa1302bc088e878d8052f7e7625dad51 100644 (file)
@@ -1,4 +1,9 @@
 $Log$
+Revision 400.85  2003/01/16 04:41:26  ajc
+* When displaying edit controls for time of day in the calendar, only show
+  minutes that are multiples of 5 ... unless the existing value is not a
+  multiple of 5, in which case we show that too.
+
 Revision 400.84  2003/01/15 17:34:04  ajc
 * event.c: fixed a misspelling
 * config.guess, config.sub: updated using latest from ftp.gnu.org
@@ -1244,3 +1249,4 @@ Sun Dec  6 19:50:55 EST 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
 
 1998-12-03 Nathan Bryant <bryant@cs.usm.maine.edu>
        * webserver.c: warning fix
+
index dfc97f3bc3271e52b0ca030cb72a8f595bb29833..37d953f1542478c7e9d7cb4ba93ad75a512bb828 100644 (file)
@@ -135,10 +135,12 @@ void display_icaltimetype_as_webform(struct icaltimetype *t, char *prefix) {
        wprintf("Minute: ");
        wprintf("<SELECT NAME=\"%s_minute\" SIZE=\"1\">\n", prefix);
        for (i=0; i<=59; ++i) {
-               wprintf("<OPTION %s VALUE=\"%d\">:%02d</OPTION>\n",
-                       ((tm.tm_min == i) ? "SELECTED" : ""),
-                       i, i
-               );
+               if ( (i % 5 == 0) || (tm.tm_min == i) ) {
+                       wprintf("<OPTION %s VALUE=\"%d\">:%02d</OPTION>\n",
+                               ((tm.tm_min == i) ? "SELECTED" : ""),
+                               i, i
+                       );
+               }
        }
        wprintf("</SELECT>\n");
 }