Advertisement
Guest User

Untitled

a guest
Apr 18th, 2010
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.11 KB | None | 0 0
  1. Index: apps/gui/skin_engine/skin_parser.c
  2. ===================================================================
  3. --- apps/gui/skin_engine/skin_parser.c (revision 25663)
  4. +++ apps/gui/skin_engine/skin_parser.c (working copy)
  5. @@ -1158,6 +1158,7 @@
  6. pb->have_bitmap_pb = false;
  7. pb->bm.data = NULL; /* no bitmap specified */
  8. pb->follow_lang_direction = follow_lang_direction > 0;
  9. + pb->draw = false;
  10.  
  11. if (*wps_bufptr != '|') /* regular old style */
  12. {
  13. @@ -1174,7 +1175,14 @@
  14.  
  15. if (!(ptr = parse_list("sdddd", &set, '|', ptr, &filename,
  16. &x, &y, &width, &height)))
  17. + {
  18. + /* if we are in a conditional then we probably don't want to fail
  19. + * if the above doesnt work. so ASSume the | is breaking the conditional
  20. + * and move on. the next token will fail if this is incorrect */
  21. + if (level > 0)
  22. + return 0;
  23. return WPS_ERROR_INVALID_PARAM;
  24. + }
  25.  
  26. if (LIST_VALUE_PARSED(set, PB_FILENAME)) /* filename */
  27. pb->bm.data = (char*)filename;
  28. Index: apps/gui/skin_engine/skin_display.c
  29. ===================================================================
  30. --- apps/gui/skin_engine/skin_display.c (revision 25661)
  31. +++ apps/gui/skin_engine/skin_display.c (working copy)
  32. @@ -609,6 +609,12 @@
  33. /* clear all pictures in the conditional and nested ones */
  34. if (data->tokens[i].type == WPS_TOKEN_IMAGE_PRELOAD_DISPLAY)
  35. clear_image_pos(gwps, find_image(data->tokens[i].value.i&0xFF, data));
  36. + else if (data->tokens[i].type == WPS_TOKEN_VOLUMEBAR ||
  37. + data->tokens[i].type == WPS_TOKEN_PROGRESSBAR)
  38. + {
  39. + struct progressbar *bar = (struct progressbar*)data->tokens[i].value.data;
  40. + bar->draw = false;
  41. + }
  42. #endif
  43. #ifdef HAVE_ALBUMART
  44. if (data->albumart && data->tokens[i].type == WPS_TOKEN_ALBUMART_DISPLAY)
  45. @@ -671,6 +677,13 @@
  46. break;
  47.  
  48. #ifdef HAVE_LCD_BITMAP
  49. + case WPS_TOKEN_VOLUMEBAR:
  50. + case WPS_TOKEN_PROGRESSBAR:
  51. + {
  52. + struct progressbar *bar = (struct progressbar*)data->tokens[i].value.data;
  53. + bar->draw = true;
  54. + }
  55. + break;
  56. case WPS_TOKEN_IMAGE_PRELOAD_DISPLAY:
  57. {
  58. char n = data->tokens[i].value.i & 0xFF;
  59. @@ -1256,7 +1269,7 @@
  60. while (bar)
  61. {
  62. struct progressbar *thisbar = (struct progressbar*)bar->token->value.data;
  63. - if (thisbar->vp == &skin_viewport->vp)
  64. + if (thisbar->vp == &skin_viewport->vp && thisbar->draw)
  65. {
  66. draw_progressbar(gwps, thisbar);
  67. }
  68. Index: apps/gui/skin_engine/wps_internals.h
  69. ===================================================================
  70. --- apps/gui/skin_engine/wps_internals.h (revision 25659)
  71. +++ apps/gui/skin_engine/wps_internals.h (working copy)
  72. @@ -105,6 +105,8 @@
  73. /*progressbar image*/
  74. struct bitmap bm;
  75. bool have_bitmap_pb;
  76. +
  77. + bool draw;
  78. };
  79. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement