diff options
Diffstat (limited to 'apps/gui/skin_engine/skin_display.c')
-rw-r--r-- | apps/gui/skin_engine/skin_display.c | 36 |
1 files changed, 7 insertions, 29 deletions
diff --git a/apps/gui/skin_engine/skin_display.c b/apps/gui/skin_engine/skin_display.c index ef1c39c1c7..a5ea28619a 100644 --- a/apps/gui/skin_engine/skin_display.c +++ b/apps/gui/skin_engine/skin_display.c | |||
@@ -168,7 +168,7 @@ static void draw_progressbar(struct gui_wps *gwps, | |||
168 | elapsed = 0; | 168 | elapsed = 0; |
169 | length = 0; | 169 | length = 0; |
170 | } | 170 | } |
171 | 171 | ||
172 | if (pb->have_bitmap_pb) | 172 | if (pb->have_bitmap_pb) |
173 | gui_bitmap_scrollbar_draw(display, pb->bm, | 173 | gui_bitmap_scrollbar_draw(display, pb->bm, |
174 | pb->x, y, pb->width, pb->bm.height, | 174 | pb->x, y, pb->width, pb->bm.height, |
@@ -482,12 +482,7 @@ static bool evaluate_conditional(struct gui_wps *gwps, int *token_index) | |||
482 | #ifdef HAVE_LCD_BITMAP | 482 | #ifdef HAVE_LCD_BITMAP |
483 | /* clear all pictures in the conditional and nested ones */ | 483 | /* clear all pictures in the conditional and nested ones */ |
484 | if (data->tokens[i].type == WPS_TOKEN_IMAGE_PRELOAD_DISPLAY) | 484 | if (data->tokens[i].type == WPS_TOKEN_IMAGE_PRELOAD_DISPLAY) |
485 | { | 485 | clear_image_pos(gwps, find_image(data->tokens[i].value.i&0xFF, gwps->data)); |
486 | struct gui_img *tmp = find_image(data->tokens[i].value.i&0xFF, | ||
487 | data); | ||
488 | if (tmp) | ||
489 | clear_image_pos(gwps, tmp); | ||
490 | } | ||
491 | #endif | 486 | #endif |
492 | #ifdef HAVE_ALBUMART | 487 | #ifdef HAVE_ALBUMART |
493 | if (data->albumart && data->tokens[i].type == WPS_TOKEN_ALBUMART_DISPLAY) | 488 | if (data->albumart && data->tokens[i].type == WPS_TOKEN_ALBUMART_DISPLAY) |
@@ -504,35 +499,17 @@ static bool evaluate_conditional(struct gui_wps *gwps, int *token_index) | |||
504 | #ifdef HAVE_LCD_BITMAP | 499 | #ifdef HAVE_LCD_BITMAP |
505 | struct gui_img* find_image(char label, struct wps_data *data) | 500 | struct gui_img* find_image(char label, struct wps_data *data) |
506 | { | 501 | { |
507 | static int i = 0; | ||
508 | struct gui_img *ret = NULL; | ||
509 | struct skin_token_list *list = data->images; | 502 | struct skin_token_list *list = data->images; |
510 | if (data->debug) | ||
511 | { | ||
512 | DEBUGF("%s >> requesting image (id: %d)\n", __func__, n); | ||
513 | DEBUGF("%s >> first list data (p: %p\n", __func__, data->images); | ||
514 | } | ||
515 | while (list) | 503 | while (list) |
516 | { | 504 | { |
517 | struct gui_img *img = (struct gui_img *)list->token->value.data; | 505 | struct gui_img *img = (struct gui_img *)list->token->value.data; |
518 | if (img->label == label) | 506 | if (img->label == label) |
519 | { | 507 | return img; |
520 | i = 0; | ||
521 | ret = img; goto end; | ||
522 | } | ||
523 | list = list->next; | 508 | list = list->next; |
524 | /* | ||
525 | if (!list && data->debug) | ||
526 | DEBUGF("failed to find: %s\n", img->bm.data); | ||
527 | */ | ||
528 | } | 509 | } |
529 | i = 0; | 510 | return NULL; |
530 | end: | 511 | } |
531 | if (data->debug) | 512 | #endif |
532 | DEBUGF("%s >> returning %p\n", __func__, ret); | ||
533 | return ret; | ||
534 | } | ||
535 | #endif | ||
536 | 513 | ||
537 | struct skin_viewport* find_viewport(char label, struct wps_data *data) | 514 | struct skin_viewport* find_viewport(char label, struct wps_data *data) |
538 | { | 515 | { |
@@ -547,6 +524,7 @@ struct skin_viewport* find_viewport(char label, struct wps_data *data) | |||
547 | return NULL; | 524 | return NULL; |
548 | } | 525 | } |
549 | 526 | ||
527 | |||
550 | /* Read a (sub)line to the given alignment format buffer. | 528 | /* Read a (sub)line to the given alignment format buffer. |
551 | linebuf is the buffer where the data is actually stored. | 529 | linebuf is the buffer where the data is actually stored. |
552 | align is the alignment format that'll be used to display the text. | 530 | align is the alignment format that'll be used to display the text. |