diff options
Diffstat (limited to 'apps/gui/skin_engine/skin_parser.c')
-rw-r--r-- | apps/gui/skin_engine/skin_parser.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/apps/gui/skin_engine/skin_parser.c b/apps/gui/skin_engine/skin_parser.c index 58ac5f552c..049c117af3 100644 --- a/apps/gui/skin_engine/skin_parser.c +++ b/apps/gui/skin_engine/skin_parser.c | |||
@@ -483,6 +483,32 @@ static int parse_viewport_gradient_setup(struct skin_element *element, | |||
483 | } | 483 | } |
484 | #endif | 484 | #endif |
485 | 485 | ||
486 | |||
487 | static int parse_listitemviewport(struct skin_element *element, | ||
488 | struct wps_token *token, | ||
489 | struct wps_data *wps_data) | ||
490 | { | ||
491 | struct listitem_viewport_cfg *cfg = | ||
492 | (struct listitem_viewport_cfg *)skin_buffer_alloc( | ||
493 | sizeof(struct listitem_viewport_cfg)); | ||
494 | if (!cfg) | ||
495 | return -1; | ||
496 | cfg->data = wps_data; | ||
497 | cfg->tile = false; | ||
498 | cfg->label = element->params[0].data.text; | ||
499 | cfg->width = -1; | ||
500 | cfg->height = -1; | ||
501 | if (!isdefault(&element->params[1])) | ||
502 | cfg->width = element->params[1].data.number; | ||
503 | if (!isdefault(&element->params[2])) | ||
504 | cfg->height = element->params[2].data.number; | ||
505 | if (element->params_count > 3 && | ||
506 | !strcmp(element->params[3].data.text, "tile")) | ||
507 | cfg->tile = true; | ||
508 | token->value.data = (void*)cfg; | ||
509 | return 0; | ||
510 | } | ||
511 | |||
486 | #if (LCD_DEPTH > 1) || (defined(HAVE_REMOTE_LCD) && (LCD_REMOTE_DEPTH > 1)) | 512 | #if (LCD_DEPTH > 1) || (defined(HAVE_REMOTE_LCD) && (LCD_REMOTE_DEPTH > 1)) |
487 | static int parse_viewporttextstyle(struct skin_element *element, | 513 | static int parse_viewporttextstyle(struct skin_element *element, |
488 | struct wps_token *token, | 514 | struct wps_token *token, |
@@ -877,6 +903,8 @@ static int parse_progressbar_tag(struct skin_element* element, | |||
877 | token->type = SKIN_TOKEN_PEAKMETER_LEFTBAR; | 903 | token->type = SKIN_TOKEN_PEAKMETER_LEFTBAR; |
878 | else if (token->type == SKIN_TOKEN_PEAKMETER_RIGHT) | 904 | else if (token->type == SKIN_TOKEN_PEAKMETER_RIGHT) |
879 | token->type = SKIN_TOKEN_PEAKMETER_RIGHTBAR; | 905 | token->type = SKIN_TOKEN_PEAKMETER_RIGHTBAR; |
906 | else if (token->type == SKIN_TOKEN_LIST_NEEDS_SCROLLBAR) | ||
907 | token->type = SKIN_TOKEN_LIST_SCROLLBAR; | ||
880 | pb->type = token->type; | 908 | pb->type = token->type; |
881 | 909 | ||
882 | return 0; | 910 | return 0; |
@@ -1719,6 +1747,7 @@ static int skin_element_callback(struct skin_element* element, void* data) | |||
1719 | case SKIN_TOKEN_PLAYER_PROGRESSBAR: | 1747 | case SKIN_TOKEN_PLAYER_PROGRESSBAR: |
1720 | case SKIN_TOKEN_PEAKMETER_LEFT: | 1748 | case SKIN_TOKEN_PEAKMETER_LEFT: |
1721 | case SKIN_TOKEN_PEAKMETER_RIGHT: | 1749 | case SKIN_TOKEN_PEAKMETER_RIGHT: |
1750 | case SKIN_TOKEN_LIST_NEEDS_SCROLLBAR: | ||
1722 | #ifdef HAVE_RADIO_RSSI | 1751 | #ifdef HAVE_RADIO_RSSI |
1723 | case SKIN_TOKEN_TUNER_RSSI: | 1752 | case SKIN_TOKEN_TUNER_RSSI: |
1724 | #endif | 1753 | #endif |
@@ -1809,6 +1838,9 @@ static int skin_element_callback(struct skin_element* element, void* data) | |||
1809 | function = parse_skinvar; | 1838 | function = parse_skinvar; |
1810 | break; | 1839 | break; |
1811 | #endif | 1840 | #endif |
1841 | case SKIN_TOKEN_LIST_ITEM_CFG: | ||
1842 | function = parse_listitemviewport; | ||
1843 | break; | ||
1812 | default: | 1844 | default: |
1813 | break; | 1845 | break; |
1814 | } | 1846 | } |