Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on May 24th, 2010  |  syntax: None  |  size: 1.35 KB  |  views: 141  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Index: apps/gui/skin_engine/skin_tokens.c
  2. ===================================================================
  3. --- apps/gui/skin_engine/skin_tokens.c  (revision 26245)
  4. +++ apps/gui/skin_engine/skin_tokens.c  (working copy)
  5. @@ -417,11 +417,9 @@
  6.          case WPS_TOKEN_TUNER_CURFREQ:
  7.              return format_freq_MHz(radio_current_frequency(),
  8.                              region_data->freq_step, buf, buf_size);
  9. -        case WPS_TOKEN_PRESET_ID:
  10. -            snprintf(buf, buf_size, "%d", radio_current_preset() + 1 + preset_offset);
  11. -            return buf;
  12.          case WPS_TOKEN_PRESET_NAME:
  13.          case WPS_TOKEN_PRESET_FREQ:
  14. +        case WPS_TOKEN_PRESET_ID:
  15.          {
  16.              int preset_count = radio_preset_count();
  17.              int cur_preset = radio_current_preset();
  18. @@ -434,9 +432,11 @@
  19.                  preset += preset_count;
  20.              if (token->type == WPS_TOKEN_PRESET_NAME)
  21.                  snprintf(buf, buf_size, "%s", radio_get_preset(preset)->name);
  22. -            else
  23. +            else if (token->type == WPS_TOKEN_PRESET_FREQ)
  24.                  format_freq_MHz(radio_get_preset(preset)->frequency,
  25.                                  region_data->freq_step, buf, buf_size);
  26. +            else
  27. +                snprintf(buf, buf_size, "%d", preset + 1;
  28.              return buf;
  29.          }
  30.          case WPS_TOKEN_PRESET_COUNT:
clone this paste RAW Paste Data