diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/gui/gwps-common.c | 10 | ||||
-rw-r--r-- | apps/gui/gwps.c | 27 | ||||
-rw-r--r-- | apps/gui/gwps.h | 7 | ||||
-rw-r--r-- | apps/gui/wps_debug.c | 3 | ||||
-rw-r--r-- | apps/gui/wps_parser.c | 14 |
5 files changed, 8 insertions, 53 deletions
diff --git a/apps/gui/gwps-common.c b/apps/gui/gwps-common.c index e40aa772cb..a81b8555f7 100644 --- a/apps/gui/gwps-common.c +++ b/apps/gui/gwps-common.c | |||
@@ -1394,16 +1394,6 @@ static const char *get_token_value(struct gui_wps *gwps, | |||
1394 | token->value.i)) | 1394 | token->value.i)) |
1395 | return "v"; | 1395 | return "v"; |
1396 | return NULL; | 1396 | return NULL; |
1397 | case WPS_TOKEN_VIEWMODE: | ||
1398 | if (intval) | ||
1399 | { | ||
1400 | if (data->current_mode > limit) | ||
1401 | data->current_mode = 1; | ||
1402 | *intval = data->current_mode; | ||
1403 | } | ||
1404 | snprintf(buf, buf_size, "%d", data->current_mode); | ||
1405 | return buf; | ||
1406 | |||
1407 | default: | 1397 | default: |
1408 | return NULL; | 1398 | return NULL; |
1409 | } | 1399 | } |
diff --git a/apps/gui/gwps.c b/apps/gui/gwps.c index bac5032440..9b6d6b5558 100644 --- a/apps/gui/gwps.c +++ b/apps/gui/gwps.c | |||
@@ -136,7 +136,7 @@ long gui_wps_show(void) | |||
136 | bool update_track = false; | 136 | bool update_track = false; |
137 | int i; | 137 | int i; |
138 | long last_left = 0, last_right = 0; | 138 | long last_left = 0, last_right = 0; |
139 | bool isremote = false; | 139 | |
140 | wps_state_init(); | 140 | wps_state_init(); |
141 | 141 | ||
142 | #ifdef HAVE_LCD_CHARCELLS | 142 | #ifdef HAVE_LCD_CHARCELLS |
@@ -234,10 +234,7 @@ long gui_wps_show(void) | |||
234 | #else | 234 | #else |
235 | button = get_action(CONTEXT_WPS|ALLOW_SOFTLOCK,HZ/5); | 235 | button = get_action(CONTEXT_WPS|ALLOW_SOFTLOCK,HZ/5); |
236 | #endif | 236 | #endif |
237 | #if NB_SCREENS > 1 | 237 | |
238 | isremote = get_action_statuscode(NULL)&ACTION_REMOTE; | ||
239 | #endif | ||
240 | |||
241 | /* Exit if audio has stopped playing. This can happen if using the | 238 | /* Exit if audio has stopped playing. This can happen if using the |
242 | sleep timer with the charger plugged or if starting a recording | 239 | sleep timer with the charger plugged or if starting a recording |
243 | from F1 */ | 240 | from F1 */ |
@@ -295,23 +292,13 @@ long gui_wps_show(void) | |||
295 | break; | 292 | break; |
296 | 293 | ||
297 | case ACTION_WPS_BROWSE: | 294 | case ACTION_WPS_BROWSE: |
298 | if (gui_wps[isremote?1:0].data->current_mode > -1) | ||
299 | { | ||
300 | /* will get set to 0 eventually again in wps_parser.c */ | ||
301 | gui_wps[isremote?1:0].data->current_mode = | ||
302 | gui_wps[isremote?1:0].data->current_mode+1; | ||
303 | restore = true; | ||
304 | } | ||
305 | else | ||
306 | { | ||
307 | #ifdef HAVE_LCD_CHARCELLS | 295 | #ifdef HAVE_LCD_CHARCELLS |
308 | status_set_record(false); | 296 | status_set_record(false); |
309 | status_set_audio(false); | 297 | status_set_audio(false); |
310 | #endif | 298 | #endif |
311 | FOR_NB_SCREENS(i) | 299 | FOR_NB_SCREENS(i) |
312 | gui_wps[i].display->stop_scroll(); | 300 | gui_wps[i].display->stop_scroll(); |
313 | return GO_TO_PREVIOUS_BROWSER; | 301 | return GO_TO_PREVIOUS_BROWSER; |
314 | } | ||
315 | break; | 302 | break; |
316 | 303 | ||
317 | /* play/pause */ | 304 | /* play/pause */ |
diff --git a/apps/gui/gwps.h b/apps/gui/gwps.h index a414ca3986..6a4849c347 100644 --- a/apps/gui/gwps.h +++ b/apps/gui/gwps.h | |||
@@ -295,10 +295,7 @@ enum wps_token_type { | |||
295 | WPS_VIEWPORT_ENABLE, | 295 | WPS_VIEWPORT_ENABLE, |
296 | 296 | ||
297 | /* buttons */ | 297 | /* buttons */ |
298 | WPS_TOKEN_BUTTON_VOLUME, | 298 | WPS_TOKEN_BUTTON_VOLUME |
299 | |||
300 | WPS_TOKEN_VIEWMODE | ||
301 | |||
302 | }; | 299 | }; |
303 | 300 | ||
304 | struct wps_token { | 301 | struct wps_token { |
@@ -432,8 +429,6 @@ struct wps_data | |||
432 | 429 | ||
433 | /* tick the volume button was last pressed */ | 430 | /* tick the volume button was last pressed */ |
434 | unsigned int button_time_volume; | 431 | unsigned int button_time_volume; |
435 | /* the current mode (used with %mo tag), -1 means modes not being used */ | ||
436 | char current_mode; | ||
437 | }; | 432 | }; |
438 | 433 | ||
439 | /* initial setup of wps_data */ | 434 | /* initial setup of wps_data */ |
diff --git a/apps/gui/wps_debug.c b/apps/gui/wps_debug.c index ad595e305a..5a18218a52 100644 --- a/apps/gui/wps_debug.c +++ b/apps/gui/wps_debug.c | |||
@@ -435,9 +435,6 @@ static char *get_token_desc(struct wps_token *token, struct wps_data *data, | |||
435 | snprintf(buf, bufsize, "Volume button timeout:%d", | 435 | snprintf(buf, bufsize, "Volume button timeout:%d", |
436 | token->value.i); | 436 | token->value.i); |
437 | break; | 437 | break; |
438 | case WPS_TOKEN_VIEWMODE: | ||
439 | snprintf(buf, bufsize, "viewmode"); | ||
440 | break; | ||
441 | default: | 438 | default: |
442 | snprintf(buf, bufsize, "FIXME (code: %d)", | 439 | snprintf(buf, bufsize, "FIXME (code: %d)", |
443 | token->type); | 440 | token->type); |
diff --git a/apps/gui/wps_parser.c b/apps/gui/wps_parser.c index f421a0c8d4..1b845c9f8a 100644 --- a/apps/gui/wps_parser.c +++ b/apps/gui/wps_parser.c | |||
@@ -162,8 +162,6 @@ static int parse_albumart_load(const char *wps_bufptr, | |||
162 | static int parse_albumart_conditional(const char *wps_bufptr, | 162 | static int parse_albumart_conditional(const char *wps_bufptr, |
163 | struct wps_token *token, struct wps_data *wps_data); | 163 | struct wps_token *token, struct wps_data *wps_data); |
164 | #endif /* HAVE_ALBUMART */ | 164 | #endif /* HAVE_ALBUMART */ |
165 | static int parse_viewmode(const char *wps_bufptr, | ||
166 | struct wps_token *token, struct wps_data *wps_data); | ||
167 | 165 | ||
168 | #ifdef CONFIG_RTC | 166 | #ifdef CONFIG_RTC |
169 | #define WPS_RTC_REFRESH WPS_REFRESH_DYNAMIC | 167 | #define WPS_RTC_REFRESH WPS_REFRESH_DYNAMIC |
@@ -283,8 +281,6 @@ static const struct wps_tag all_tags[] = { | |||
283 | { WPS_TOKEN_PLAYBACK_STATUS, "mp", WPS_REFRESH_DYNAMIC, NULL }, | 281 | { WPS_TOKEN_PLAYBACK_STATUS, "mp", WPS_REFRESH_DYNAMIC, NULL }, |
284 | { WPS_TOKEN_BUTTON_VOLUME, "mv", WPS_REFRESH_DYNAMIC, | 282 | { WPS_TOKEN_BUTTON_VOLUME, "mv", WPS_REFRESH_DYNAMIC, |
285 | parse_timeout }, | 283 | parse_timeout }, |
286 | { WPS_TOKEN_VIEWMODE, "mo", WPS_REFRESH_STATIC, | ||
287 | parse_viewmode }, | ||
288 | 284 | ||
289 | #ifdef HAVE_LCD_BITMAP | 285 | #ifdef HAVE_LCD_BITMAP |
290 | { WPS_TOKEN_PEAKMETER, "pm", WPS_REFRESH_PEAK_METER, NULL }, | 286 | { WPS_TOKEN_PEAKMETER, "pm", WPS_REFRESH_PEAK_METER, NULL }, |
@@ -1146,15 +1142,6 @@ static int parse_albumart_conditional(const char *wps_bufptr, | |||
1146 | }; | 1142 | }; |
1147 | #endif /* HAVE_ALBUMART */ | 1143 | #endif /* HAVE_ALBUMART */ |
1148 | 1144 | ||
1149 | static int parse_viewmode(const char *wps_bufptr, | ||
1150 | struct wps_token *token, | ||
1151 | struct wps_data *wps_data) | ||
1152 | { | ||
1153 | (void)wps_bufptr; (void)token; | ||
1154 | wps_data->current_mode = 1; | ||
1155 | /* are we going to add parameters? */ | ||
1156 | return 0; | ||
1157 | } | ||
1158 | /* Parse a generic token from the given string. Return the length read */ | 1145 | /* Parse a generic token from the given string. Return the length read */ |
1159 | static int parse_token(const char *wps_bufptr, struct wps_data *wps_data) | 1146 | static int parse_token(const char *wps_bufptr, struct wps_data *wps_data) |
1160 | { | 1147 | { |
@@ -1489,7 +1476,6 @@ void wps_data_init(struct wps_data *wps_data) | |||
1489 | wps_data->full_line_progressbar = false; | 1476 | wps_data->full_line_progressbar = false; |
1490 | #endif | 1477 | #endif |
1491 | wps_data->button_time_volume = 0; | 1478 | wps_data->button_time_volume = 0; |
1492 | wps_data->current_mode = -1; | ||
1493 | wps_data->wps_loaded = false; | 1479 | wps_data->wps_loaded = false; |
1494 | } | 1480 | } |
1495 | 1481 | ||