summaryrefslogtreecommitdiff
path: root/apps/gui/gwps-common.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/gui/gwps-common.c')
-rw-r--r--apps/gui/gwps-common.c24
1 files changed, 6 insertions, 18 deletions
diff --git a/apps/gui/gwps-common.c b/apps/gui/gwps-common.c
index 9889a9f96c..cfaabafe90 100644
--- a/apps/gui/gwps-common.c
+++ b/apps/gui/gwps-common.c
@@ -767,24 +767,8 @@ static char *get_token_value(struct gui_wps *gwps,
767 limit = *intval; 767 limit = *intval;
768 *intval = -1; 768 *intval = -1;
769 } 769 }
770#if CONFIG_RTC 770
771 int new_token = token->type;
772 if (token->type == WPS_TOKEN_RTC_HOUR_CFG_ZERO_PADDED)
773 {
774 new_token = global_settings.timeformat == 0?
775 WPS_TOKEN_RTC_HOUR_24_ZERO_PADDED:
776 WPS_TOKEN_RTC_HOUR_12_ZERO_PADDED;
777 }
778 else if (token->type == WPS_TOKEN_RTC_HOUR_CFG)
779 {
780 new_token = global_settings.timeformat == 0?
781 WPS_TOKEN_RTC_HOUR_24:
782 WPS_TOKEN_RTC_HOUR_12;
783 }
784 switch (new_token)
785#else
786 switch (token->type) 771 switch (token->type)
787#endif
788 { 772 {
789 case WPS_TOKEN_CHARACTER: 773 case WPS_TOKEN_CHARACTER:
790 return &(token->value.c); 774 return &(token->value.c);
@@ -1110,7 +1094,11 @@ static char *get_token_value(struct gui_wps *gwps,
1110 *intval = global_settings.repeat_mode + 1; 1094 *intval = global_settings.repeat_mode + 1;
1111 snprintf(buf, buf_size, "%d", *intval); 1095 snprintf(buf, buf_size, "%d", *intval);
1112 return buf; 1096 return buf;
1113 1097 case WPS_TOKEN_RTC_12HOUR_CFG:
1098 if (intval)
1099 *intval = global_settings.timeformat + 1;
1100 snprintf(buf, buf_size, "%d", *intval);
1101 return buf;
1114#if CONFIG_RTC 1102#if CONFIG_RTC
1115 case WPS_TOKEN_RTC_DAY_OF_MONTH: 1103 case WPS_TOKEN_RTC_DAY_OF_MONTH:
1116 /* d: day of month (01..31) */ 1104 /* d: day of month (01..31) */