summaryrefslogtreecommitdiff
path: root/apps/gui/skin_engine/skin_display.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/gui/skin_engine/skin_display.c')
-rw-r--r--apps/gui/skin_engine/skin_display.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/apps/gui/skin_engine/skin_display.c b/apps/gui/skin_engine/skin_display.c
index 9cef12a690..a0b3497683 100644
--- a/apps/gui/skin_engine/skin_display.c
+++ b/apps/gui/skin_engine/skin_display.c
@@ -27,6 +27,7 @@
27#include "system.h" 27#include "system.h"
28#include "rbunicode.h" 28#include "rbunicode.h"
29#include "sound.h" 29#include "sound.h"
30#include "powermgmt.h"
30#ifdef DEBUG 31#ifdef DEBUG
31#include "debug.h" 32#include "debug.h"
32#endif 33#endif
@@ -145,6 +146,11 @@ static void draw_progressbar(struct gui_wps *gwps,
145 length = maxvol-minvol; 146 length = maxvol-minvol;
146 elapsed = global_settings.volume-minvol; 147 elapsed = global_settings.volume-minvol;
147 } 148 }
149 else if (pb->type == WPS_TOKEN_BATTERY_PERCENTBAR)
150 {
151 length = 100;
152 elapsed = battery_level();
153 }
148 else if (id3 && id3->length) 154 else if (id3 && id3->length)
149 { 155 {
150 length = id3->length; 156 length = id3->length;
@@ -608,8 +614,9 @@ static bool evaluate_conditional(struct gui_wps *gwps, int *token_index)
608 /* clear all pictures in the conditional and nested ones */ 614 /* clear all pictures in the conditional and nested ones */
609 if (data->tokens[i].type == WPS_TOKEN_IMAGE_PRELOAD_DISPLAY) 615 if (data->tokens[i].type == WPS_TOKEN_IMAGE_PRELOAD_DISPLAY)
610 clear_image_pos(gwps, find_image(data->tokens[i].value.i&0xFF, data)); 616 clear_image_pos(gwps, find_image(data->tokens[i].value.i&0xFF, data));
611 else if (data->tokens[i].type == WPS_TOKEN_VOLUMEBAR || 617 else if (data->tokens[i].type == WPS_TOKEN_VOLUMEBAR ||
612 data->tokens[i].type == WPS_TOKEN_PROGRESSBAR) 618 data->tokens[i].type == WPS_TOKEN_PROGRESSBAR ||
619 data->tokens[i].type == WPS_TOKEN_BATTERY_PERCENTBAR )
613 { 620 {
614 struct progressbar *bar = (struct progressbar*)data->tokens[i].value.data; 621 struct progressbar *bar = (struct progressbar*)data->tokens[i].value.data;
615 bar->draw = false; 622 bar->draw = false;
@@ -677,6 +684,7 @@ static bool get_line(struct gui_wps *gwps,
677 684
678#ifdef HAVE_LCD_BITMAP 685#ifdef HAVE_LCD_BITMAP
679 case WPS_TOKEN_VOLUMEBAR: 686 case WPS_TOKEN_VOLUMEBAR:
687 case WPS_TOKEN_BATTERY_PERCENTBAR:
680 case WPS_TOKEN_PROGRESSBAR: 688 case WPS_TOKEN_PROGRESSBAR:
681 { 689 {
682 struct progressbar *bar = (struct progressbar*)data->tokens[i].value.data; 690 struct progressbar *bar = (struct progressbar*)data->tokens[i].value.data;