diff options
Diffstat (limited to 'apps/gui/skin_engine/skin_tokens.c')
-rw-r--r-- | apps/gui/skin_engine/skin_tokens.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/gui/skin_engine/skin_tokens.c b/apps/gui/skin_engine/skin_tokens.c index 594614aab1..7997290119 100644 --- a/apps/gui/skin_engine/skin_tokens.c +++ b/apps/gui/skin_engine/skin_tokens.c | |||
@@ -417,11 +417,9 @@ const char *get_radio_token(struct wps_token *token, int preset_offset, | |||
417 | case WPS_TOKEN_TUNER_CURFREQ: | 417 | case WPS_TOKEN_TUNER_CURFREQ: |
418 | return format_freq_MHz(radio_current_frequency(), | 418 | return format_freq_MHz(radio_current_frequency(), |
419 | region_data->freq_step, buf, buf_size); | 419 | region_data->freq_step, buf, buf_size); |
420 | case WPS_TOKEN_PRESET_ID: | ||
421 | snprintf(buf, buf_size, "%d", radio_current_preset() + 1 + preset_offset); | ||
422 | return buf; | ||
423 | case WPS_TOKEN_PRESET_NAME: | 420 | case WPS_TOKEN_PRESET_NAME: |
424 | case WPS_TOKEN_PRESET_FREQ: | 421 | case WPS_TOKEN_PRESET_FREQ: |
422 | case WPS_TOKEN_PRESET_ID: | ||
425 | { | 423 | { |
426 | int preset_count = radio_preset_count(); | 424 | int preset_count = radio_preset_count(); |
427 | int cur_preset = radio_current_preset(); | 425 | int cur_preset = radio_current_preset(); |
@@ -434,9 +432,11 @@ const char *get_radio_token(struct wps_token *token, int preset_offset, | |||
434 | preset += preset_count; | 432 | preset += preset_count; |
435 | if (token->type == WPS_TOKEN_PRESET_NAME) | 433 | if (token->type == WPS_TOKEN_PRESET_NAME) |
436 | snprintf(buf, buf_size, "%s", radio_get_preset(preset)->name); | 434 | snprintf(buf, buf_size, "%s", radio_get_preset(preset)->name); |
437 | else | 435 | else if (token->type == WPS_TOKEN_PRESET_FREQ) |
438 | format_freq_MHz(radio_get_preset(preset)->frequency, | 436 | format_freq_MHz(radio_get_preset(preset)->frequency, |
439 | region_data->freq_step, buf, buf_size); | 437 | region_data->freq_step, buf, buf_size); |
438 | else | ||
439 | snprintf(buf, buf_size, "%d", preset + 1); | ||
440 | return buf; | 440 | return buf; |
441 | } | 441 | } |
442 | case WPS_TOKEN_PRESET_COUNT: | 442 | case WPS_TOKEN_PRESET_COUNT: |