diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/gui/skin_engine/skin_tokens.c | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/apps/gui/skin_engine/skin_tokens.c b/apps/gui/skin_engine/skin_tokens.c index 42c56f7203..ba9396ae74 100644 --- a/apps/gui/skin_engine/skin_tokens.c +++ b/apps/gui/skin_engine/skin_tokens.c | |||
@@ -66,6 +66,7 @@ | |||
66 | #include "fixedpoint.h" | 66 | #include "fixedpoint.h" |
67 | #endif | 67 | #endif |
68 | #include "list.h" | 68 | #include "list.h" |
69 | #include "option_select.h" | ||
69 | #include "wps.h" | 70 | #include "wps.h" |
70 | 71 | ||
71 | #define NOINLINE __attribute__ ((noinline)) | 72 | #define NOINLINE __attribute__ ((noinline)) |
@@ -658,6 +659,23 @@ static const char* NOINLINE get_lif_token_value(struct gui_wps *gwps, | |||
658 | return NULL; | 659 | return NULL; |
659 | } | 660 | } |
660 | 661 | ||
662 | #ifdef HAVE_QUICKSCREEN | ||
663 | static const char* get_qs_token_value(enum quickscreen_item item, bool data_token, | ||
664 | char *buf, int buf_size) | ||
665 | { | ||
666 | const struct settings_list *qs_setting = global_settings.qs_items[item]; | ||
667 | |||
668 | if (qs_setting == NULL) | ||
669 | return "ERR"; | ||
670 | |||
671 | if (data_token) | ||
672 | return option_get_valuestring(qs_setting, buf, buf_size, | ||
673 | option_value_as_int(qs_setting)); | ||
674 | |||
675 | return P2STR(ID2P(qs_setting->lang_id)); | ||
676 | } | ||
677 | #endif | ||
678 | |||
661 | /* Return the tags value as text. buf should be used as temp storage if needed. | 679 | /* Return the tags value as text. buf should be used as temp storage if needed. |
662 | 680 | ||
663 | intval is used with conditionals/enums: when this function is called, | 681 | intval is used with conditionals/enums: when this function is called, |
@@ -1374,6 +1392,25 @@ const char *get_token_value(struct gui_wps *gwps, | |||
1374 | return NULL; | 1392 | return NULL; |
1375 | #endif | 1393 | #endif |
1376 | 1394 | ||
1395 | #ifdef HAVE_QUICKSCREEN | ||
1396 | case SKIN_TOKEN_TOP_QUICKSETTING_NAME: | ||
1397 | return get_qs_token_value(QUICKSCREEN_TOP, false, buf, buf_size); | ||
1398 | case SKIN_TOKEN_TOP_QUICKSETTING_VALUE: | ||
1399 | return get_qs_token_value(QUICKSCREEN_TOP, true, buf, buf_size); | ||
1400 | case SKIN_TOKEN_RIGHT_QUICKSETTING_NAME: | ||
1401 | return get_qs_token_value(QUICKSCREEN_RIGHT, false, buf, buf_size); | ||
1402 | case SKIN_TOKEN_RIGHT_QUICKSETTING_VALUE: | ||
1403 | return get_qs_token_value(QUICKSCREEN_RIGHT, true, buf, buf_size); | ||
1404 | case SKIN_TOKEN_BOTTOM_QUICKSETTING_NAME: | ||
1405 | return get_qs_token_value(QUICKSCREEN_BOTTOM, false, buf, buf_size); | ||
1406 | case SKIN_TOKEN_BOTTOM_QUICKSETTING_VALUE: | ||
1407 | return get_qs_token_value(QUICKSCREEN_BOTTOM, true, buf, buf_size); | ||
1408 | case SKIN_TOKEN_LEFT_QUICKSETTING_NAME: | ||
1409 | return get_qs_token_value(QUICKSCREEN_LEFT, false, buf, buf_size); | ||
1410 | case SKIN_TOKEN_LEFT_QUICKSETTING_VALUE: | ||
1411 | return get_qs_token_value(QUICKSCREEN_LEFT, true, buf, buf_size); | ||
1412 | #endif | ||
1413 | |||
1377 | case SKIN_TOKEN_SETTING: | 1414 | case SKIN_TOKEN_SETTING: |
1378 | { | 1415 | { |
1379 | const struct settings_list *s = token->value.xdata; | 1416 | const struct settings_list *s = token->value.xdata; |