From 2012acf0a805793d970621ec0ab32bdb2b6ebd61 Mon Sep 17 00:00:00 2001 From: Markus Braun Date: Fri, 9 Aug 2002 13:50:58 +0000 Subject: changed display format for time/date setting menu git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1646 a1c6a512-1295-4272-9138-f99709370657 --- apps/settings.c | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) (limited to 'apps/settings.c') diff --git a/apps/settings.c b/apps/settings.c index 826d87ab60..274a124d31 100644 --- a/apps/settings.c +++ b/apps/settings.c @@ -553,8 +553,10 @@ void set_option(char* string, int* variable, char* options[], int numoptions ) #ifdef HAVE_RTC #define INDEX_X 0 #define INDEX_Y 1 +#define INDEX_WIDTH 2 char *dayname[]={"Sun","Mon","Tue","Wed","Thu","Fri","Sat"}; -char cursor[][2]={{9, 1}, {12, 1}, {15, 1}, {9, 2}, {12, 2}, {15, 2}}; +char *monthname[]={"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"}; +char cursor[][3]={{0, 1, 2}, {3, 1, 2}, {6, 1, 2}, {4, 2, 4}, {9, 2, 3}, {13, 2, 2}}; char daysinmonth[]={31,28,31,30,31,30,31,31,30,31,30,31}; void set_time(char* string, int timedate[]) @@ -574,36 +576,36 @@ void set_time(char* string, int timedate[]) while ( !done ) { /* calculate the number of days in febuary */ - realyear=timedate[5]+2000; + realyear=timedate[3]+2000; if((realyear%4==0 && !(realyear%100 == 0)) || realyear%400 == 0) /* for february depends on year */ daysinmonth[1]=29; else daysinmonth[1]=28; /* fix day if month or year changed */ - timedate[3]=timedate[3]