summaryrefslogtreecommitdiff
path: root/apps/gui/wps_parser.c
diff options
context:
space:
mode:
authorBrandon Low <lostlogic@rockbox.org>2007-06-16 20:33:30 +0000
committerBrandon Low <lostlogic@rockbox.org>2007-06-16 20:33:30 +0000
commit9a550524af741e247805801754116e0bb2cba7ba (patch)
tree2a7700e55bc803ca5121f66b2f90228eb841ad73 /apps/gui/wps_parser.c
parente097b5fd62bcbd4469ee31544c77bab4902cbe05 (diff)
downloadrockbox-9a550524af741e247805801754116e0bb2cba7ba.zip
rockbox-9a550524af741e247805801754116e0bb2cba7ba.tar.gz
rockbox-9a550524af741e247805801754116e0bb2cba7ba.tar.bz2
rockbox-9a550524af741e247805801754116e0bb2cba7ba.tar.xz
Make RTC tags display hyphens instead of nothing on non-rtc targets. This makes WPSs that use RTC tags look decent again with the new separated RTC tag style
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13639 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/wps_parser.c')
-rw-r--r--apps/gui/wps_parser.c42
1 files changed, 23 insertions, 19 deletions
diff --git a/apps/gui/wps_parser.c b/apps/gui/wps_parser.c
index 6b1f666..cb930bc 100644
--- a/apps/gui/wps_parser.c
+++ b/apps/gui/wps_parser.c
@@ -126,6 +126,12 @@ static int parse_image_load(const char *wps_bufptr,
struct wps_token *token, struct wps_data *wps_data);
#endif /*HAVE_LCD_BITMAP */
+#ifdef CONFIG_RTC
+#define WPS_RTC_REFRESH WPS_REFRESH_DYNAMIC
+#else
+#define WPS_RTC_REFRESH WPS_REFRESH_STATIC
+#endif
+
/* array of available tags - those with more characters have to go first
(e.g. "xl" and "xd" before "x"). It needs to end with the unknown token. */
static const struct wps_tag all_tags[] = {
@@ -145,25 +151,23 @@ static const struct wps_tag all_tags[] = {
{ WPS_TOKEN_BATTERY_CHARGER_CONNECTED,"bp", WPS_REFRESH_DYNAMIC, NULL },
#endif
-#if CONFIG_RTC
- { WPS_TOKEN_RTC_DAY_OF_MONTH, "cd", WPS_REFRESH_DYNAMIC, NULL },
- { WPS_TOKEN_RTC_DAY_OF_MONTH_BLANK_PADDED,"ce", WPS_REFRESH_DYNAMIC, NULL },
- { WPS_TOKEN_RTC_HOUR_24_ZERO_PADDED, "cH", WPS_REFRESH_DYNAMIC, NULL },
- { WPS_TOKEN_RTC_HOUR_24, "ck", WPS_REFRESH_DYNAMIC, NULL },
- { WPS_TOKEN_RTC_HOUR_12_ZERO_PADDED, "cI", WPS_REFRESH_DYNAMIC, NULL },
- { WPS_TOKEN_RTC_HOUR_12, "cl", WPS_REFRESH_DYNAMIC, NULL },
- { WPS_TOKEN_RTC_MONTH, "cm", WPS_REFRESH_DYNAMIC, NULL },
- { WPS_TOKEN_RTC_MINUTE, "cM", WPS_REFRESH_DYNAMIC, NULL },
- { WPS_TOKEN_RTC_SECOND, "cS", WPS_REFRESH_DYNAMIC, NULL },
- { WPS_TOKEN_RTC_YEAR_2_DIGITS, "cy", WPS_REFRESH_DYNAMIC, NULL },
- { WPS_TOKEN_RTC_YEAR_4_DIGITS, "cY", WPS_REFRESH_DYNAMIC, NULL },
- { WPS_TOKEN_RTC_AM_PM_UPPER, "cP", WPS_REFRESH_DYNAMIC, NULL },
- { WPS_TOKEN_RTC_AM_PM_LOWER, "cp", WPS_REFRESH_DYNAMIC, NULL },
- { WPS_TOKEN_RTC_WEEKDAY_NAME, "ca", WPS_REFRESH_DYNAMIC, NULL },
- { WPS_TOKEN_RTC_MONTH_NAME, "cb", WPS_REFRESH_DYNAMIC, NULL },
- { WPS_TOKEN_RTC_DAY_OF_WEEK_START_MON, "cu", WPS_REFRESH_DYNAMIC, NULL },
- { WPS_TOKEN_RTC_DAY_OF_WEEK_START_SUN, "cw", WPS_REFRESH_DYNAMIC, NULL },
-#endif
+ { WPS_TOKEN_RTC_DAY_OF_MONTH, "cd", WPS_RTC_REFRESH, NULL },
+ { WPS_TOKEN_RTC_DAY_OF_MONTH_BLANK_PADDED,"ce", WPS_RTC_REFRESH, NULL },
+ { WPS_TOKEN_RTC_HOUR_24_ZERO_PADDED, "cH", WPS_RTC_REFRESH, NULL },
+ { WPS_TOKEN_RTC_HOUR_24, "ck", WPS_RTC_REFRESH, NULL },
+ { WPS_TOKEN_RTC_HOUR_12_ZERO_PADDED, "cI", WPS_RTC_REFRESH, NULL },
+ { WPS_TOKEN_RTC_HOUR_12, "cl", WPS_RTC_REFRESH, NULL },
+ { WPS_TOKEN_RTC_MONTH, "cm", WPS_RTC_REFRESH, NULL },
+ { WPS_TOKEN_RTC_MINUTE, "cM", WPS_RTC_REFRESH, NULL },
+ { WPS_TOKEN_RTC_SECOND, "cS", WPS_RTC_REFRESH, NULL },
+ { WPS_TOKEN_RTC_YEAR_2_DIGITS, "cy", WPS_RTC_REFRESH, NULL },
+ { WPS_TOKEN_RTC_YEAR_4_DIGITS, "cY", WPS_RTC_REFRESH, NULL },
+ { WPS_TOKEN_RTC_AM_PM_UPPER, "cP", WPS_RTC_REFRESH, NULL },
+ { WPS_TOKEN_RTC_AM_PM_LOWER, "cp", WPS_RTC_REFRESH, NULL },
+ { WPS_TOKEN_RTC_WEEKDAY_NAME, "ca", WPS_RTC_REFRESH, NULL },
+ { WPS_TOKEN_RTC_MONTH_NAME, "cb", WPS_RTC_REFRESH, NULL },
+ { WPS_TOKEN_RTC_DAY_OF_WEEK_START_MON, "cu", WPS_RTC_REFRESH, NULL },
+ { WPS_TOKEN_RTC_DAY_OF_WEEK_START_SUN, "cw", WPS_RTC_REFRESH, NULL },
/* current file */
{ WPS_TOKEN_FILE_BITRATE, "fb", WPS_REFRESH_STATIC, NULL },