summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2008-06-23 06:04:17 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2008-06-23 06:04:17 +0000
commit5a169bb71707dae31a886e1b932341b70eacf2df (patch)
treee6823f6addf964c292383182e1cbb077328c770d
parent66530722928b5e3c9870feb121c261e138807492 (diff)
downloadrockbox-5a169bb71707dae31a886e1b932341b70eacf2df.tar.gz
rockbox-5a169bb71707dae31a886e1b932341b70eacf2df.tar.bz2
rockbox-5a169bb71707dae31a886e1b932341b70eacf2df.zip
commit FS#9027 - conditional viewports
** BREAKS CURRENT WPS's ** * %P has been removed, merged with the new %pb * %pb is now %pb or %pb|bitmap|x|y|width|height| (any of those params can be - to use sane defaults... check wiki/task for more explaination) * New %Vl and %Vd tags which are used to setup and display conditionaly displayed viewports (%Vl|<id>|<usual %V params>| to set up, then %Vd<id> to enable the viewport * bumps the max allowed viewport count to 24 * you can setup 3 different progressbars in a WPS... max of one per viewport though http://www.rockbox.org/tracker/task/9027?getfile=16785 is a simple perl script to convert old %P/%pb to the new %pb syntax I'll commit changes to the cabbie wps soon which shows how to use %Vl/%Vd properly... Reminder: %m will be removed soonish also so when fixing your WPS's remember to use conditional viewports to replace %m git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17759 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/gui/gwps-common.c133
-rw-r--r--apps/gui/gwps.h31
-rw-r--r--apps/gui/wps_debug.c4
-rw-r--r--apps/gui/wps_parser.c178
-rw-r--r--apps/settings.c37
-rw-r--r--wps/Rockboxed.112x64x1.wps2
-rw-r--r--wps/Rockboxed.128x128x16.wps3
-rw-r--r--wps/Rockboxed.132x80x16.wps3
-rw-r--r--wps/Rockboxed.138x110x2.wps3
-rw-r--r--wps/Rockboxed.160x128x16.wps3
-rw-r--r--wps/Rockboxed.160x128x2.wps3
-rw-r--r--wps/Rockboxed.176x132x16.wps3
-rw-r--r--wps/Rockboxed.176x220x16.wps3
-rw-r--r--wps/Rockboxed.220x176x16.wps3
-rw-r--r--wps/Rockboxed.240x320x16.wps3
-rw-r--r--wps/Rockboxed.320x240x16.wps3
-rw-r--r--wps/UniCatcher.128x96x1.wps2
-rw-r--r--wps/UniCatcher.160x128x16.wps2
-rw-r--r--wps/UniCatcher.160x128x2.wps2
-rw-r--r--wps/UniCatcher.176x132x16.wps2
-rw-r--r--wps/UniCatcher.176x220x16.wps2
-rw-r--r--wps/UniCatcher.220x176x16.wps2
-rw-r--r--wps/UniCatcher.240x320x16.wps2
-rw-r--r--wps/UniCatcher.320x240x16.wps2
-rw-r--r--wps/boxes.220x176x16.wps3
-rw-r--r--wps/cabbiev2.112x64x1.wps3
-rw-r--r--wps/cabbiev2.128x128x16.wps3
-rw-r--r--wps/cabbiev2.128x64x1.wps3
-rw-r--r--wps/cabbiev2.128x96x2.wps3
-rw-r--r--wps/cabbiev2.132x80x16.wps3
-rw-r--r--wps/cabbiev2.138x110x2.wps3
-rw-r--r--wps/cabbiev2.160x128x1.wps3
-rw-r--r--wps/cabbiev2.160x128x16.wps3
-rw-r--r--wps/cabbiev2.160x128x2.wps3
-rw-r--r--wps/cabbiev2.176x132x16.wps3
-rw-r--r--wps/cabbiev2.176x220x16.wps3
-rw-r--r--wps/cabbiev2.220x176x16.wps3
-rw-r--r--wps/cabbiev2.240x320x16.wps3
-rw-r--r--wps/cabbiev2.320x240x16.wps3
-rw-r--r--wps/iCatcher.112x64x1.wps2
-rw-r--r--wps/iCatcher.128x128x16.wps2
-rw-r--r--wps/iCatcher.128x64x1.160x128x2.wps2
-rw-r--r--wps/iCatcher.128x96x1.wps2
-rw-r--r--wps/iCatcher.132x80x16.wps2
-rw-r--r--wps/iCatcher.138x110x2.wps2
-rw-r--r--wps/iCatcher.160x128x16.wps2
-rw-r--r--wps/iCatcher.160x128x2.wps2
-rw-r--r--wps/iCatcher.176x132x16.wps2
-rw-r--r--wps/iCatcher.176x220x16.wps2
-rw-r--r--wps/iCatcher.220x176x16.wps2
-rw-r--r--wps/iCatcher.240x320x16.wps2
-rw-r--r--wps/iCatcher.320x240x16.wps2
52 files changed, 297 insertions, 205 deletions
diff --git a/apps/gui/gwps-common.c b/apps/gui/gwps-common.c
index 634d199461..6e159b88b4 100644
--- a/apps/gui/gwps-common.c
+++ b/apps/gui/gwps-common.c
@@ -506,53 +506,33 @@ void display_keylock_text(bool locked)
#ifdef HAVE_LCD_BITMAP
-static void draw_progressbar(struct gui_wps *gwps, int line)
+static void draw_progressbar(struct gui_wps *gwps,
+ struct progressbar *pb)
{
- struct wps_data *data = gwps->data;
struct screen *display = gwps->display;
struct wps_state *state = gwps->state;
- int h = font_get(display->getfont())->height;
-
- int sb_y;
- if (data->progress_top < 0)
- sb_y = line*h + display->getymargin() +
- ((h > data->progress_height + 1)
- ? (h - data->progress_height) / 2 : 1);
- else
- sb_y = data->progress_top;
-
- if (!data->progress_end)
- data->progress_end=display->getwidth();
-
- if (gwps->data->progressbar.have_bitmap_pb)
- gui_bitmap_scrollbar_draw(display, data->progressbar.bm,
- data->progress_start, sb_y,
- data->progress_end-data->progress_start,
- data->progressbar.bm.height,
+ if (pb->have_bitmap_pb)
+ gui_bitmap_scrollbar_draw(display, pb->bm,
+ pb->x, pb->y, pb->width, pb->bm.height,
state->id3->length ? state->id3->length : 1, 0,
state->id3->length ? state->id3->elapsed
- + state->ff_rewind_count : 0,
- HORIZONTAL);
+ + state->ff_rewind_count : 0,
+ HORIZONTAL);
else
- gui_scrollbar_draw(display, data->progress_start, sb_y,
- data->progress_end-data->progress_start,
- data->progress_height,
+ gui_scrollbar_draw(display, pb->x, pb->y, pb->width, pb->height,
state->id3->length ? state->id3->length : 1, 0,
state->id3->length ? state->id3->elapsed
- + state->ff_rewind_count : 0,
- HORIZONTAL);
-
+ + state->ff_rewind_count : 0,
+ HORIZONTAL);
#ifdef AB_REPEAT_ENABLE
if ( ab_repeat_mode_enabled() && state->id3->length != 0 )
ab_draw_markers(display, state->id3->length,
- data->progress_start, data->progress_end, sb_y,
- data->progress_height);
+ pb->x, pb->x + pb->width, pb->y, pb->height);
#endif
if ( cuesheet_is_enabled() && state->id3->cuesheet_type )
cue_draw_markers(display, state->id3->length,
- data->progress_start, data->progress_end,
- sb_y+1, data->progress_height-2);
+ pb->x, pb->x + pb->width, pb->y+1, pb->height-2);
}
/* clears the area where the image was shown */
@@ -1621,7 +1601,24 @@ static bool get_line(struct gui_wps *gwps,
*buf++ = 0;
cur_align_start = buf;
break;
-
+ case WPS_VIEWPORT_ENABLE:
+ {
+ char label = data->tokens[i].value.i;
+ int j;
+ char temp = VP_DRAW_HIDEABLE;
+ for(j=0;j<data->num_viewports;j++)
+ {
+ temp = VP_DRAW_HIDEABLE;
+ if ((data->viewports[j].hidden_flags&VP_DRAW_HIDEABLE) &&
+ (data->viewports[j].label == label))
+ {
+ if (data->viewports[j].hidden_flags&VP_DRAW_WASHIDDEN)
+ temp |= VP_DRAW_WASHIDDEN;
+ data->viewports[j].hidden_flags = temp;
+ }
+ }
+ }
+ break;
default:
{
/* get the value of the tag and copy it to the buffer */
@@ -1945,6 +1942,7 @@ bool gui_wps_refresh(struct gui_wps *gwps,
int v, line, i, subline_idx;
unsigned char flags;
char linebuf[MAX_PATH];
+ unsigned char vp_refresh_mode;
struct align_pos align;
align.left = NULL;
@@ -1994,14 +1992,21 @@ bool gui_wps_refresh(struct gui_wps *gwps,
state->ff_rewind_count = ffwd_offset;
+ /* disable any viewports which are conditionally displayed */
for (v = 0; v < data->num_viewports; v++)
{
- display->set_viewport(&data->viewports[v].vp);
-
- if (refresh_mode == WPS_REFRESH_ALL)
+ if (data->viewports[v].hidden_flags&VP_DRAW_HIDEABLE)
{
- display->clear_viewport();
+ if (data->viewports[v].hidden_flags&VP_DRAW_HIDDEN)
+ data->viewports[v].hidden_flags |= VP_DRAW_WASHIDDEN;
+ else
+ data->viewports[v].hidden_flags |= VP_DRAW_HIDDEN;
}
+ }
+ for (v = 0; v < data->num_viewports; v++)
+ {
+ display->set_viewport(&data->viewports[v].vp);
+ vp_refresh_mode = refresh_mode;
#ifdef HAVE_LCD_BITMAP
/* Set images to not to be displayed */
@@ -2010,7 +2015,26 @@ bool gui_wps_refresh(struct gui_wps *gwps,
data->img[i].display = -1;
}
#endif
-
+ /* dont redraw the viewport if its disabled */
+ if ((data->viewports[v].hidden_flags&VP_DRAW_HIDDEN))
+ {
+ if (!(data->viewports[v].hidden_flags&VP_DRAW_WASHIDDEN))
+ display->scroll_stop(&data->viewports[v].vp);
+ data->viewports[v].hidden_flags |= VP_DRAW_WASHIDDEN;
+ continue;
+ }
+ else if (((data->viewports[v].hidden_flags&
+ (VP_DRAW_WASHIDDEN|VP_DRAW_HIDEABLE))
+ == (VP_DRAW_WASHIDDEN|VP_DRAW_HIDEABLE)))
+ {
+ vp_refresh_mode = WPS_REFRESH_ALL;
+ data->viewports[v].hidden_flags = VP_DRAW_HIDEABLE;
+ }
+ if (vp_refresh_mode == WPS_REFRESH_ALL)
+ {
+ display->clear_viewport();
+ }
+
for (line = data->viewports[v].first_line;
line <= data->viewports[v].last_line; line++)
{
@@ -2024,30 +2048,21 @@ bool gui_wps_refresh(struct gui_wps *gwps,
data->lines[line].curr_subline);
flags = data->sublines[subline_idx].line_type;
- if (refresh_mode == WPS_REFRESH_ALL || (flags & refresh_mode)
+ if (vp_refresh_mode == WPS_REFRESH_ALL || (flags & vp_refresh_mode)
|| new_subline_refresh)
{
/* get_line tells us if we need to update the line */
update_line = get_line(gwps, line, data->lines[line].curr_subline,
&align, linebuf, sizeof(linebuf));
}
-
#ifdef HAVE_LCD_BITMAP
- /* progressbar */
- if (flags & refresh_mode & WPS_REFRESH_PLAYER_PROGRESS)
- {
- /* the progressbar should be alone on its line */
- update_line = false;
- draw_progressbar(gwps, line - data->viewports[v].first_line);
- }
-
/* peakmeter */
- if (flags & refresh_mode & WPS_REFRESH_PEAK_METER)
+ if (flags & vp_refresh_mode & WPS_REFRESH_PEAK_METER)
{
/* the peakmeter should be alone on its line */
update_line = false;
- int h = font_get(display->getfont())->height;
+ int h = font_get(data->viewports[v].vp.font)->height;
int peak_meter_y = display->getymargin() + (line - data->viewports[v].first_line)* h;
/* The user might decide to have the peak meter in the last
@@ -2066,7 +2081,7 @@ bool gui_wps_refresh(struct gui_wps *gwps,
#else /* HAVE_LCD_CHARCELL */
/* progressbar */
- if (flags & refresh_mode & WPS_REFRESH_PLAYER_PROGRESS)
+ if (flags & vp_refresh_mode & WPS_REFRESH_PLAYER_PROGRESS)
{
if (data->full_line_progressbar)
draw_player_fullbar(gwps, linebuf, sizeof(linebuf));
@@ -2075,22 +2090,32 @@ bool gui_wps_refresh(struct gui_wps *gwps,
}
#endif
- if (update_line)
+ if (update_line &&
+ /* conditionals clear the line which means if the %Vd is put into the default
+ viewport there will be a blank line.
+ To get around this we dont allow any actual drawing to happen in the
+ deault vp if other vp's are defined */
+ ((data->num_viewports>1 && v!=0) || data->num_viewports == 1))
{
if (flags & WPS_REFRESH_SCROLL)
{
/* if the line is a scrolling one we don't want to update
too often, so that it has the time to scroll */
- if ((refresh_mode & WPS_REFRESH_SCROLL) || new_subline_refresh)
+ if ((vp_refresh_mode & WPS_REFRESH_SCROLL) || new_subline_refresh)
write_line(display, &align, line - data->viewports[v].first_line, true);
}
else
write_line(display, &align, line - data->viewports[v].first_line, false);
}
-
}
#ifdef HAVE_LCD_BITMAP
+ /* progressbar */
+ if (vp_refresh_mode & WPS_REFRESH_PLAYER_PROGRESS)
+ {
+ if (data->viewports[v].pb)
+ draw_progressbar(gwps, data->viewports[v].pb);
+ }
/* Now display any images in this viewport */
wps_display_images(gwps, &data->viewports[v].vp);
#endif
diff --git a/apps/gui/gwps.h b/apps/gui/gwps.h
index 494d12a084..25cfc08505 100644
--- a/apps/gui/gwps.h
+++ b/apps/gui/gwps.h
@@ -70,7 +70,13 @@ struct gui_img{
bool always_display; /* not using the preload/display mechanism */
};
-struct prog_img{ /*progressbar image*/
+struct progressbar {
+ /* regular pb */
+ short x;
+ short y;
+ short width;
+ short height;
+ /*progressbar image*/
struct bitmap bm;
bool have_bitmap_pb;
};
@@ -85,6 +91,7 @@ struct align_pos {
#ifdef HAVE_LCD_BITMAP
#define MAX_IMAGES (26*2) /* a-z and A-Z */
+#define MAX_PROGRESSBARS 3
/* The image buffer is big enough to store one full-screen native bitmap,
plus two full-screen mono bitmaps. */
@@ -92,7 +99,7 @@ struct align_pos {
#define IMG_BUFSIZE ((LCD_HEIGHT*LCD_WIDTH*LCD_DEPTH/8) \
+ (2*LCD_HEIGHT*LCD_WIDTH/8))
-#define WPS_MAX_VIEWPORTS 16
+#define WPS_MAX_VIEWPORTS 24
#define WPS_MAX_LINES ((LCD_HEIGHT/5+1) * 2)
#define WPS_MAX_SUBLINES (WPS_MAX_LINES*3)
#define WPS_MAX_TOKENS 1024
@@ -271,8 +278,11 @@ enum wps_token_type {
#if (CONFIG_LED == LED_VIRTUAL) || defined(HAVE_REMOTE_LCD)
/* Virtual LED */
- WPS_TOKEN_VLED_HDD
+ WPS_TOKEN_VLED_HDD,
#endif
+
+ /* Viewport display */
+ WPS_VIEWPORT_ENABLE
};
struct wps_token {
@@ -323,12 +333,17 @@ struct wps_line {
long subline_expire_time;
};
+#define VP_DRAW_HIDEABLE 0x1
+#define VP_DRAW_HIDDEN 0x2
+#define VP_DRAW_WASHIDDEN 0x4
struct wps_viewport {
struct viewport vp; /* The LCD viewport struct */
-
+ struct progressbar *pb;
/* Indexes of the first and last lines belonging to this viewport in the
lines[] array */
int first_line, last_line;
+ char hidden_flags;
+ char label;
};
/* wps_data
@@ -338,17 +353,15 @@ struct wps_data
{
#ifdef HAVE_LCD_BITMAP
struct gui_img img[MAX_IMAGES];
- struct prog_img progressbar;
unsigned char img_buf[IMG_BUFSIZE];
unsigned char* img_buf_ptr;
int img_buf_free;
bool wps_sb_tag;
bool show_sb_on_wps;
- short progress_top;
- short progress_height;
- short progress_start;
- short progress_end;
+ struct progressbar progressbar[MAX_PROGRESSBARS];
+ short progressbar_count;
+
bool peak_meter_enabled;
#ifdef HAVE_ALBUMART
diff --git a/apps/gui/wps_debug.c b/apps/gui/wps_debug.c
index 9bff1d23ae..4fa12167f2 100644
--- a/apps/gui/wps_debug.c
+++ b/apps/gui/wps_debug.c
@@ -431,6 +431,10 @@ static char *get_token_desc(struct wps_token *token, struct wps_data *data,
snprintf(buf, bufsize, "pitch value");
break;
#endif
+ case WPS_VIEWPORT_ENABLE:
+ snprintf(buf, bufsize, "enable VP:%d",
+ token->value.i);
+ break;
default:
snprintf(buf, bufsize, "FIXME (code: %d)",
diff --git a/apps/gui/wps_parser.c b/apps/gui/wps_parser.c
index 53605e27cc..dc9abd98fb 100644
--- a/apps/gui/wps_parser.c
+++ b/apps/gui/wps_parser.c
@@ -80,13 +80,13 @@ static int line;
#ifdef HAVE_LCD_BITMAP
#if LCD_DEPTH > 1
-#define MAX_BITMAPS (MAX_IMAGES+2) /* WPS images + pbar bitmap + backdrop */
+#define MAX_BITMAPS (MAX_IMAGES+MAX_PROGRESSBARS+1) /* WPS images + pbar bitmap + backdrop */
#else
-#define MAX_BITMAPS (MAX_IMAGES+1) /* WPS images + pbar bitmap */
+#define MAX_BITMAPS (MAX_IMAGES+MAX_PROGRESSBARS) /* WPS images + pbar bitmap */
#endif
#define PROGRESSBAR_BMP MAX_IMAGES
-#define BACKDROP_BMP (MAX_IMAGES+1)
+#define BACKDROP_BMP (MAX_BITMAPS-1)
/* pointers to the bitmap filenames in the WPS source */
static const char *bmp_names[MAX_BITMAPS];
@@ -129,6 +129,8 @@ static int parse_dir_level(const char *wps_bufptr,
struct wps_token *token, struct wps_data *wps_data);
#ifdef HAVE_LCD_BITMAP
+static int parse_viewport_display(const char *wps_bufptr,
+ struct wps_token *token, struct wps_data *wps_data);
static int parse_viewport(const char *wps_bufptr,
struct wps_token *token, struct wps_data *wps_data);
static int parse_leftmargin(const char *wps_bufptr,
@@ -317,13 +319,14 @@ static const struct wps_tag all_tags[] = {
parse_image_display },
{ WPS_TOKEN_IMAGE_DISPLAY, "x", 0, parse_image_load },
- { WPS_TOKEN_IMAGE_PROGRESS_BAR, "P", 0, parse_image_special },
#ifdef HAVE_ALBUMART
{ WPS_NO_TOKEN, "Cl", 0, parse_albumart_load },
{ WPS_TOKEN_ALBUMART_DISPLAY, "C", WPS_REFRESH_STATIC,
parse_albumart_conditional },
#endif
+ { WPS_VIEWPORT_ENABLE, "Vd", WPS_REFRESH_DYNAMIC,
+ parse_viewport_display },
{ WPS_NO_TOKEN, "V", 0, parse_viewport },
#if (LCD_DEPTH > 1) || (defined(HAVE_REMOTE_LCD) && (LCD_REMOTE_DEPTH > 1))
@@ -536,6 +539,22 @@ static int parse_image_load(const char *wps_bufptr,
return skip_end_of_line(wps_bufptr);
}
+static int parse_viewport_display(const char *wps_bufptr,
+ struct wps_token *token,
+ struct wps_data *wps_data)
+{
+ (void)wps_data;
+ char letter = wps_bufptr[0];
+
+ if (letter < 'a' || letter > 'z')
+ {
+ /* invalid viewport tag */
+ return WPS_ERROR_INVALID_PARAM;
+ }
+ token->value.i = letter;
+ return 1;
+}
+
static int parse_viewport(const char *wps_bufptr,
struct wps_token *token,
struct wps_data *wps_data)
@@ -563,17 +582,35 @@ static int parse_viewport(const char *wps_bufptr,
}
#endif
- if (*wps_bufptr != '|')
- return WPS_ERROR_INVALID_PARAM; /* malformed token: e.g. %Cl7 */
-
- ptr = wps_bufptr + 1;
- /* format: %V|x|y|width|height|font|fg_pattern|bg_pattern| */
-
if (wps_data->num_viewports >= WPS_MAX_VIEWPORTS)
return WPS_ERROR_INVALID_PARAM;
-
+
wps_data->num_viewports++;
+ /* check for the optional letter to signify its a hideable viewport */
+ /* %Vl|<label>|<rest of tags>| */
+ wps_data->viewports[wps_data->num_viewports].hidden_flags = 0;
+
+ if (*ptr == 'l')
+ {
+ if (*(ptr+1) == '|')
+ {
+ char label = *(ptr+2);
+ if (label >= 'a' && label < 'a' + WPS_MAX_VIEWPORTS)
+ {
+ wps_data->viewports[wps_data->num_viewports].hidden_flags = VP_DRAW_HIDEABLE;
+ wps_data->viewports[wps_data->num_viewports].label = label;
+ }
+ else
+ return WPS_ERROR_INVALID_PARAM; /* malformed token: e.g. %Cl7 */
+ ptr += 3;
+ }
+ }
+ if (*ptr != '|')
+ return WPS_ERROR_INVALID_PARAM;
+
+ ptr++;
vp = &wps_data->viewports[wps_data->num_viewports].vp;
+ /* format: %V|x|y|width|height|font|fg_pattern|bg_pattern| */
/* Set the defaults for fields not user-specified */
vp->drawmode = DRMODE_SOLID;
@@ -687,14 +724,8 @@ static int parse_image_special(const char *wps_bufptr,
if (pos > newline)
return WPS_ERROR_INVALID_PARAM;
-
- if (token->type == WPS_TOKEN_IMAGE_PROGRESS_BAR)
- {
- /* format: %P|filename.bmp| */
- bmp_names[PROGRESSBAR_BMP] = wps_bufptr + 1;
- }
#if LCD_DEPTH > 1
- else if (token->type == WPS_TOKEN_IMAGE_BACKDROP)
+ if (token->type == WPS_TOKEN_IMAGE_BACKDROP)
{
/* format: %X|filename.bmp| */
bmp_names[BACKDROP_BMP] = wps_bufptr + 1;
@@ -762,40 +793,82 @@ static int parse_progressbar(const char *wps_bufptr,
struct wps_data *wps_data)
{
(void)token; /* Kill warnings */
+ /* %pb or %pb|filename|x|y|width|height|
+ using - for any of the params uses "sane" values */
#ifdef HAVE_LCD_BITMAP
+ enum {
+ PB_FILENAME = 0,
+ PB_X,
+ PB_Y,
+ PB_WIDTH,
+ PB_HEIGHT
+ };
+ const char *filename;
+ int x, y, height, width, set = 0;
+ const char *ptr = wps_bufptr;
+ struct progressbar *pb;
+ struct viewport *vp = &wps_data->viewports[wps_data->num_viewports].vp;
+ int font_height = font_get(vp->font)->height;
+ int line_y_pos = font_height*(wps_data->num_lines -
+ wps_data->viewports[wps_data->num_viewports].first_line);
+
+ /** Remove this bit when the remove lcd margins patch goes in **/
+ bool draw_sb = global_settings.statusbar;
- short *vals[] = {
- &wps_data->progress_height,
- &wps_data->progress_start,
- &wps_data->progress_end,
- &wps_data->progress_top };
-
- /* default values : */
- wps_data->progress_height = 6;
- wps_data->progress_start = 0;
- wps_data->progress_end = 0;
- wps_data->progress_top = -1;
-
- int i = 0;
- char *newline = strchr(wps_bufptr, '\n');
- char *prev = strchr(wps_bufptr, '|');
- if (prev && prev < newline) {
- char *next = strchr(prev+1, '|');
- while (i < 4 && next && next < newline)
- {
- *(vals[i++]) = atoi(++prev);
- prev = strchr(prev, '|');
- next = strchr(++next, '|');
- }
+ if (wps_data->wps_sb_tag)
+ draw_sb = wps_data->show_sb_on_wps;
- if (wps_data->progress_height < 3)
- wps_data->progress_height = 3;
- if (wps_data->progress_end < wps_data->progress_start + 3)
- wps_data->progress_end = 0;
+ if (wps_data->num_viewports == 0 && draw_sb)
+ line_y_pos += STATUSBAR_HEIGHT;
+ /** Remove the above bit when the remove lcd margins patch goes in **/
+
+ if (wps_data->progressbar_count +1 >= MAX_PROGRESSBARS)
+ return WPS_ERROR_INVALID_PARAM;
+
+ pb = &wps_data->progressbar[wps_data->progressbar_count];
+ pb->have_bitmap_pb = false;
+
+ if (*wps_bufptr != '|') /* regular old style */
+ {
+ pb->x = 0;
+ pb->width = vp->width;
+ pb->height = SYSFONT_HEIGHT-2;
+ pb->y = line_y_pos + (font_height-pb->height)/2;
+
+ wps_data->viewports[wps_data->num_viewports].pb =
+ &wps_data->progressbar[wps_data->progressbar_count];
+ wps_data->progressbar_count++;
+ return 0;
}
-
- return newline - wps_bufptr;
-
+ ptr = wps_bufptr + 1;
+
+ if (!(ptr = parse_list("sdddd", &set, '|', ptr, &filename,
+ &x, &y, &width, &height)))
+ return WPS_ERROR_INVALID_PARAM;
+ if (LIST_VALUE_PARSED(set, PB_FILENAME)) /* filename */
+ bmp_names[PROGRESSBAR_BMP+wps_data->progressbar_count] = filename;
+ if (LIST_VALUE_PARSED(set, PB_X)) /* x */
+ pb->x = x;
+ else
+ pb->x = vp->x;
+ if (LIST_VALUE_PARSED(set, PB_WIDTH)) /* width */
+ pb->width = width;
+ else
+ pb->width = vp->width - pb->x;
+ if (LIST_VALUE_PARSED(set, PB_HEIGHT)) /* height, default to font height */
+ pb->height = height;
+ else
+ pb->height = font_height;
+ if (LIST_VALUE_PARSED(set, PB_Y)) /* y */
+ pb->y = y;
+ else
+ pb->y = line_y_pos + (font_height-pb->height)/2;
+ wps_data->progressbar[wps_data->progressbar_count].have_bitmap_pb = false;
+ wps_data->viewports[wps_data->num_viewports].pb =
+ &wps_data->progressbar[wps_data->progressbar_count];
+ wps_data->progressbar_count++;
+ /* Skip the rest of the line */
+ return skip_end_of_line(wps_bufptr)-1;
#else
if (*(wps_bufptr-1) == 'f')
@@ -1359,7 +1432,6 @@ static void wps_images_clear(struct wps_data *data)
data->img[i].always_display = false;
data->img[i].num_subimages = 1;
}
- data->progressbar.have_bitmap_pb = false;
}
#endif
@@ -1373,6 +1445,8 @@ void wps_data_init(struct wps_data *wps_data)
wps_data->img_buf_ptr = wps_data->img_buf; /* where in image buffer */
wps_data->img_buf_free = IMG_BUFSIZE; /* free space in image buffer */
wps_data->peak_meter_enabled = false;
+ /* progress bars */
+ wps_data->progressbar_count = 0;
#else /* HAVE_LCD_CHARCELLS */
int i;
for (i = 0; i < 8; i++)
@@ -1414,10 +1488,10 @@ static bool load_wps_bitmaps(struct wps_data *wps_data, char *bmpdir)
get_image_filename(bmp_names[n], bmpdir,
img_path, sizeof(img_path));
- if (n == PROGRESSBAR_BMP) {
+ if (n >= PROGRESSBAR_BMP ) {
/* progressbar bitmap */
- bitmap = &wps_data->progressbar.bm;
- loaded = &wps_data->progressbar.have_bitmap_pb;
+ bitmap = &wps_data->progressbar[n-PROGRESSBAR_BMP].bm;
+ loaded = &wps_data->progressbar[n-PROGRESSBAR_BMP].have_bitmap_pb;
} else {
/* regular bitmap */
bitmap = &wps_data->img[n].bm;
diff --git a/apps/settings.c b/apps/settings.c
index 340adba5b8..8834c9d9bf 100644
--- a/apps/settings.c
+++ b/apps/settings.c
@@ -791,6 +791,25 @@ void settings_apply(bool read_disk)
if (read_disk)
{
+
+#ifdef HAVE_LCD_BITMAP
+ /* fonts need to be loaded before the WPS */
+ if ( global_settings.font_file[0]) {
+ snprintf(buf, sizeof buf, FONT_DIR "/%s.fnt",
+ global_settings.font_file);
+ font_load(buf);
+ }
+ else
+ font_reset();
+
+ if ( global_settings.kbd_file[0]) {
+ snprintf(buf, sizeof buf, ROCKBOX_DIR "/%s.kbd",
+ global_settings.kbd_file);
+ load_kbd(buf);
+ }
+ else
+ load_kbd(NULL);
+#endif
#if LCD_DEPTH > 1
unload_wps_backdrop();
#endif
@@ -838,24 +857,6 @@ void settings_apply(bool read_disk)
gui_wps[1].data->remote_wps = true;
}
#endif
-
-#ifdef HAVE_LCD_BITMAP
- if ( global_settings.font_file[0]) {
- snprintf(buf, sizeof buf, FONT_DIR "/%s.fnt",
- global_settings.font_file);
- font_load(buf);
- }
- else
- font_reset();
-
- if ( global_settings.kbd_file[0]) {
- snprintf(buf, sizeof buf, ROCKBOX_DIR "/%s.kbd",
- global_settings.kbd_file);
- load_kbd(buf);
- }
- else
- load_kbd(NULL);
-#endif
if ( global_settings.lang_file[0]) {
snprintf(buf, sizeof buf, LANG_DIR "/%s.lng",
global_settings.lang_file);
diff --git a/wps/Rockboxed.112x64x1.wps b/wps/Rockboxed.112x64x1.wps
index fee3a5c081..17a1223680 100644
--- a/wps/Rockboxed.112x64x1.wps
+++ b/wps/Rockboxed.112x64x1.wps
@@ -12,7 +12,7 @@
%al%s%ac%?id<%id|%d1>%ar
%al%s%ac%?it<%it|%fn>%ar
%ac%t3%ig;%ac%iy
-%pb|5|10|102|
+%pb|-|10|-|92|5|
%al %pc%ac%?fc<mp1|mp2|mp3|aiff|wav|unknown>%ar%pt
%?ps<%xdBa|%xdBb>
%?mp<%xdAa|%xdAb|%xdAc|%xdAd|%xdAe>
diff --git a/wps/Rockboxed.128x128x16.wps b/wps/Rockboxed.128x128x16.wps
index ffd749148f..66b47459ab 100644
--- a/wps/Rockboxed.128x128x16.wps
+++ b/wps/Rockboxed.128x128x16.wps
@@ -2,7 +2,6 @@
# License: GNU GPL v2 or later.
%wd
%X|bg-128x128x16.bmp|
-%P|pg-108.bmp|
%xl|A|mode-color-small.bmp|62|109|4|
%xl|B|shuffle-color-small.bmp|34|109|
%xl|C|volume-color-small.bmp|15|111|9|
@@ -15,7 +14,7 @@
%al %s%ac%?it<%it|%fn>%ar
%ac%t3%ig;%ac%iy
-%pb|5|10|118|76|
+%pb|pg-108.bmp|10|76|108|5|
%al %pc%ac%?fc<mp1|mp2|mp3|aiff|wav|vorbis|flac|mpc|a52|wavpack|alac|aac|shn|sid|adx|nsf|speex|spc|ape|wma|unknown>%ar%pt
%?ps<%xdB>
%?mp<%xdAb|%xdAa|%xdAb|%xdAc|%xdAd>
diff --git a/wps/Rockboxed.132x80x16.wps b/wps/Rockboxed.132x80x16.wps
index 437a6ed9a9..c4ec5a1cea 100644
--- a/wps/Rockboxed.132x80x16.wps
+++ b/wps/Rockboxed.132x80x16.wps
@@ -2,7 +2,6 @@
# License: GNU GPL v2 or later.
%wd
%X|bg-132x80x16.bmp|
-%P|pg-108.bmp|
%xl|A|mode-color-small.bmp|62|65|4|
%xl|B|shuffle-color-small.bmp|34|65|
%xl|C|volume-color-small.bmp|15|67|9|
@@ -13,7 +12,7 @@
%al %s%ac%?ia<%ia|%d2>%ar
%al %s%ac%?id<%id|%d1>%ar
%al %s%ac%?it<%it|%fn>%ar
-%pb|5|12|118|43|
+%pb|pg-108.bmp|12|43|106|5|
%al %pc%ac%?fc<mp1|mp2|mp3|aiff|wav|vorbis|flac|mpc|a52|wavpack|alac|aac|shn|sid|adx|unknown|nsf|speex|spc|ape|wma>%ar%pt
%?ps<%xdB>
%?mp<%xdAb|%xdAa|%xdAb|%xdAc|%xdAd>
diff --git a/wps/Rockboxed.138x110x2.wps b/wps/Rockboxed.138x110x2.wps
index 419141292c..e871b07feb 100644
--- a/wps/Rockboxed.138x110x2.wps
+++ b/wps/Rockboxed.138x110x2.wps
@@ -2,7 +2,6 @@
# License: GNU GPL v2 or later.
%wd
%X|bg-138x110x2.bmp|
-%P|pg-grey-118.bmp|
%xl|A|mode-grey.bmp|68|91|4|
%xl|B|shuffle-grey-medium.bmp|35|91|
%xl|C|volume-grey.bmp|15|93|9|
@@ -14,7 +13,7 @@
%al %s%ac%?id<%id|%d1>%ar
%al %s%ac%?it<%it|%fn>%ar
%ac%t3%ig;%ac%iy
-%pb|5|10|128|
+%pb|pg-grey-118.bmp|10|-|118|5|
%al %pc%ac%?fc<mp1|mp2|mp3|aiff|wav|vorbis|flac|mpc|a52|wavpack|alac|aac|shn|sid|adx|nsf|speex|spc|ape|wma|unknown>%ar%pt
%?ps<%xdB>
%?mp<%xdAb|%xdAa|%xdAb|%xdAc|%xdAd>
diff --git a/wps/Rockboxed.160x128x16.wps b/wps/Rockboxed.160x128x16.wps
index 41cd72f41d..37e8256521 100644
--- a/wps/Rockboxed.160x128x16.wps
+++ b/wps/Rockboxed.160x128x16.wps
@@ -2,7 +2,6 @@
# License: GNU GPL v2 or later.
%wd
%X|bg-160x128x16.bmp|
-%P|pg-140.bmp|
%xl|A|mode-color-big.bmp|72|109|4|
%xl|B|shuffle-color-big.bmp|36|109|
%xl|C|volume-color-medium.bmp|15|111|9|
@@ -15,7 +14,7 @@
%al %s%ac%?it<%it|%fn>%ar
%ac%t3%ig;%ac%iy
-%pb|5|10|150|76|
+%pb|pg-140.bmp|10|76|140|5|
%al %pc%ac%?fc<mp1|mp2|mp3|aiff|wav|vorbis|flac|mpc|a52|wavpack|alac|aac|shn|sid|adx|nsf|speex|spc|ape|wma|unknown>%ar%pt
%?ps<%xdB>
%?mp<%xdAb|%xdAa|%xdAb|%xdAc|%xdAd>
diff --git a/wps/Rockboxed.160x128x2.wps b/wps/Rockboxed.160x128x2.wps
index 328d86d650..2ee7c08502 100644
--- a/wps/Rockboxed.160x128x2.wps
+++ b/wps/Rockboxed.160x128x2.wps
@@ -2,7 +2,6 @@
# License: GNU GPL v2 or later.
%wd
%X|bg-160x128x2.bmp|
-%P|pg-grey-140.bmp|
%xl|A|mode-grey.bmp|72|109|4|
%xl|B|shuffle-grey-big.bmp|36|109|
%xl|C|volume-grey.bmp|15|111|9|
@@ -15,7 +14,7 @@
%al %s%ac%?it<%it|%fn>%ar
%ac%t3%ig;%ac%iy
-%pb|5|10|150|
+%pb|pg-grey-140.bmp|10|-|140|5|
%al %pc%ac%?fc<mp1|mp2|mp3|aiff|wav|vorbis|flac|mpc|a52|wavpack|alac|aac|shn|sid|adx|nsf|speex|spc|ape|wma|unknown>%ar%pt
%?ps<%xdB>
%?mp<%xdAb|%xdAa|%xdAb|%xdAc|%xdAd>
diff --git a/wps/Rockboxed.176x132x16.wps b/wps/Rockboxed.176x132x16.wps
index c710e96fee..92cae29fe1 100644
--- a/wps/Rockboxed.176x132x16.wps
+++ b/wps/Rockboxed.176x132x16.wps
@@ -2,7 +2,6 @@
# License: GNU GPL v2 or later.
%wd
%X|bg-176x132x16.bmp|
-%P|pg-156.bmp|
%xl|A|mode-color-big.bmp|81|113|4|
%xl|B|shuffle-color-big.bmp|40|113|
%xl|C|volume-color-big.bmp|15|115|11|
@@ -15,7 +14,7 @@
%al %s%ac%?it<%it|%fn>%ar
%ac%t3%ig;%ac%iy
-%pb|5|10|166|75|
+%pb|pg-156.bmp|10|75|156|5|
%al %pc%ac%?fc<mp1|mp2|mp3|aiff|wav|vorbis|flac|mpc|a52|wavpack|alac|aac|shn|sid|adx|nsf|speex|spc|ape|wma|unknown>%ar%pt
%?ps<%xdB>
%?mp<%xdAb|%xdAa|%xdAb|%xdAc|%xdAd>
diff --git a/wps/Rockboxed.176x220x16.wps b/wps/Rockboxed.176x220x16.wps
index c483127764..ddbd790094 100644
--- a/wps/Rockboxed.176x220x16.wps
+++ b/wps/Rockboxed.176x220x16.wps
@@ -2,7 +2,6 @@
# License: GNU GPL v2 or later.
%wd
%X|bg-176x220x16.bmp|
-%P|pg-156.bmp|
%xl|A|mode-color-big.bmp|81|201|4|
%xl|B|shuffle-color-big.bmp|40|201|
%xl|C|volume-color-big.bmp|15|203|11|
@@ -23,7 +22,7 @@
-%pb|5|10|166|171|
+%pb|pg-156.bmp|10|171|156|5|
%al %pc%ac%?fc<mp1|mp2|mp3|aiff|wav|vorbis|flac|mpc|a52|wavpack|alac|aac|shn|sid|adx|nsf|speex|spc|ape|wma|unknown>%ar%pt
%?ps<%xdB>
%?mp<%xdAb|%xdAa|%xdAb|%xdAc|%xdAd>
diff --git a/wps/Rockboxed.220x176x16.wps b/wps/Rockboxed.220x176x16.wps
index 97781a2274..9814b1372b 100644
--- a/wps/Rockboxed.220x176x16.wps
+++ b/wps/Rockboxed.220x176x16.wps
@@ -2,7 +2,6 @@
# License: GNU GPL v2 or later.
%wd
%X|bg-220x176x16.bmp|
-%P|pg-200.bmp|
%xl|A|mode-color-big.bmp|102|156|4|
%xl|B|shuffle-color-big.bmp|57|156|
%xl|C|volume-color-big.bmp|15|158|11|
@@ -17,7 +16,7 @@
%al %s%ac%?it<%it|%fn>%ar
%ac%t3%ig;%ac%iy
-%pb|5|10|210|116|
+%pb|pg-200.bmp|10|116|200|5|
%al %pc%ac%?fc<mp1|mp2|mp3|aiff|wav|vorbis|flac|mpc|a52|wavpack|alac|aac|shn|sid|adx|nsf|speex|spc|ape|wma|unknown>%ar%pt
%?ps<%xdB>
%?mp<%xdAb|%xdAa|%xdAb|%xdAc|%xdAd>
diff --git a/wps/Rockboxed.240x320x16.wps b/wps/Rockboxed.240x320x16.wps
index 37f1c3512b..291f1894fb 100644
--- a/wps/Rockboxed.240x320x16.wps
+++ b/wps/Rockboxed.240x320x16.wps
@@ -2,7 +2,6 @@
# License: GNU GPL v2 or later.
%wd
%X|bg-240x320x16.bmp|
-%P|pg-220.bmp|
%xl|A|mode-color-big.bmp|112|300|4|
%xl|B|shuffle-color-big.bmp|57|300|
%xl|C|volume-color-big.bmp|15|302|11|
@@ -22,7 +21,7 @@
%ac%t3%ig;%ac%iy
-%pb|5|10|230|256|
+%pb|pg-220.bmp|10|256|220|5|
%al %pc%ac%?fc<mp1|mp2|mp3|aiff|wav|vorbis|flac|mpc|a52|wavpack|alac|aac|shn|sid|adx|nsf|speex|spc|ape|wma|unknown>%ar%pt
%?ps<%xdB>
%?mp<%xdAb|%xdAa|%xdAb|%xdAc|%xdAd>
diff --git a/wps/Rockboxed.320x240x16.wps b/wps/Rockboxed.320x240x16.wps
index 23ffa83ec3..05d1077feb 100644
--- a/wps/Rockboxed.320x240x16.wps
+++ b/wps/Rockboxed.320x240x16.wps
@@ -2,7 +2,6 @@
# License: GNU GPL v2 or later.
%wd
%X|bg-320x240x16.bmp|
-%P|pg-300.bmp|
%xl|A|mode-color-big.bmp|153|220|4|
%xl|B|shuffle-color-big.bmp|113|220|
%xl|C|volume-color-big.bmp|15|222|11|
@@ -18,7 +17,7 @@
%ac%t3%ig;%ac%iy
-%pb|5|10|310|178|
+%pb|pg-300.bmp|10|178|300|5|
%al %pc%ac%?fc<mp1|mp2|mp3|aiff|wav|vorbis|flac|mpc|a52|wavpack|alac|aac|shn|sid|adx|nsf|speex|spc|ape|wma|unknown>%ar%pt
%?ps<%xdB>
%?mp<%xdAb|%xdAa|%xdAb|%xdAc|%xdAd>
diff --git a/wps/UniCatcher.128x96x1.wps b/wps/UniCatcher.128x96x1.wps
index e6ef042edf..b96ff5b9e4 100644
--- a/wps/UniCatcher.128x96x1.wps
+++ b/wps/UniCatcher.128x96x1.wps
@@ -3,7 +3,7 @@
%t1 %?mp<%al%pp/%pe%ar-:--/-:--|%al%pp/%pe%ar%pc/%pt|%al%pp/%pe%ar%pc/%pt|%al%pp/%pe%ar%pc/%pt|%al%pp/%pe%ar%pc/%pt>;%t1 %?mp<%al%pp/%pe%ar-:--/-:--|%al%pp/%pe%ar%pc/%pt|%al%pp/%pe|%al%pp/%pe%ar%pc/%pt|%al%pp/%pe%ar%pc/%pt>
%s%ac%?ia<%ia|%?d2<%d2|Unknown Artist>>
%s%ac%?id<%id|%?d1<%d1|Unknown Album>>
-%pb|4|11|117|
+%pb|-|11|-|106|4|
%s%ac%?in<%in|%pp> - %?it<%it|%fn>
%xl|A|battery-s.bmp|109|3|5|
diff --git a/wps/UniCatcher.160x128x16.wps b/wps/UniCatcher.160x128x16.wps
index d3aa176c4d..4fe806f090 100644
--- a/wps/UniCatcher.160x128x16.wps
+++ b/wps/UniCatcher.160x128x16.wps
@@ -6,7 +6,7 @@
%s%ac%?ia<%ia|%?d2<%d2|Unknown Artist>>
%s%ac%?id<%id|%?d1<%d1|Unknown Album>>
%al %fbKbps
-%pb|4|10|150|
+%pb|-|10|-|140|4|
%s%ac%?in<%in|%pp> - %?it<%it|%fn>
%xl|A|battery.bmp|135|8|5|
diff --git a/wps/UniCatcher.160x128x2.wps b/wps/UniCatcher.160x128x2.wps
index 2ba0d6dc7a..85f964ac24 100644
--- a/wps/UniCatcher.160x128x2.wps
+++ b/wps/UniCatcher.160x128x2.wps
@@ -6,7 +6,7 @@
%s%ac%?ia<%ia|%?d2<%d2|Unknown Artist>>
%s%ac%?id<%id|%?d1<%d1|Unknown Album>>
%al %fbKbps
-%pb|4|10|150|
+%pb|-|10|-|140|4|
%s%ac%?in<%in|%pp> - %?it<%it|%fn>
%xl|A|battery-g.bmp|135|8|5|
diff --git a/wps/UniCatcher.176x132x16.wps b/wps/UniCatcher.176x132x16.wps
index 41cd648c63..df850d99b4 100644
--- a/wps/UniCatcher.176x132x16.wps
+++ b/wps/UniCatcher.176x132x16.wps
@@ -6,7 +6,7 @@
%s%ac%?ia<%ia|%?d2<%d2|Unknown Artist>>
%s%ac%?id<%id|%?d1<%d1|Unknown Album>>
%al %fbKbps
-%pb|4|10|166|
+%pb|-|10|-|156|4|
%s%ac%?in<%in|%pp> - %?it<%it|%fn>
%xl|A|battery.bmp|151|8|5|
diff --git a/wps/UniCatcher.176x220x16.wps b/wps/UniCatcher.176x220x16.wps
index 2100b1d72a..9d60ff5ae7 100644
--- a/wps/UniCatcher.176x220x16.wps
+++ b/wps/UniCatcher.176x220x16.wps
@@ -11,7 +11,7 @@
%al %fbKbps
-%pb|4|10|166|
+%pb|-|10|-|156|4|
%s%acNext: %?It<%It|%?Fn<%Fn|?>>
%xl|A|battery.bmp|151|8|5|
diff --git a/wps/UniCatcher.220x176x16.wps b/wps/UniCatcher.220x176x16.wps
index 0ed45ce35d..44ceda9fb5 100644
--- a/wps/UniCatcher.220x176x16.wps
+++ b/wps/UniCatcher.220x176x16.wps
@@ -8,7 +8,7 @@
%s%ac%?id<%id|%?d1<%d1|Unknown Album>>
%s%ac%?in<%in|%pp> - %?it<%it|%fn>
%al %fbKbps
-%pb|6|11|209|
+%pb|-|11|-|198|6|
%s%acNext: %?It<%It|%?Fn<%Fn|?>>
diff --git a/wps/UniCatcher.240x320x16.wps b/wps/UniCatcher.240x320x16.wps
index cd0532bf80..17e3bcc256 100644
--- a/wps/UniCatcher.240x320x16.wps
+++ b/wps/UniCatcher.240x320x16.wps
@@ -16,7 +16,7 @@
%al %fbKbps
-%pb|7|11|229|
+%pb|-|11|-|218|7|
%s%acNext: %?It<%It|%?Fn<%Fn|?>>
diff --git a/wps/UniCatcher.320x240x16.wps b/wps/UniCatcher.320x240x16.wps
index b6410c3b7a..f36d11ea07 100644
--- a/wps/UniCatcher.320x240x16.wps
+++ b/wps/UniCatcher.320x240x16.wps
@@ -11,7 +11,7 @@
%al %fbKbps
-%pb|7|11|309|
+%pb|-|11|-|298|7|
%s%acNext: %?It<%It|%?Fn<%Fn|?>>
diff --git a/wps/boxes.220x176x16.wps b/wps/boxes.220x176x16.wps
index f008223ffb..4b6fdd6f3c 100644
--- a/wps/boxes.220x176x16.wps
+++ b/wps/boxes.220x176x16.wps
@@ -1,5 +1,4 @@
%X|backdrop-220x176.bmp|
-%P|pb-220.bmp|
%xl|A|codec.bmp|40|102|22|
%xl|B|encoding.bmp|40|108|2|
%xl|C|repeat.bmp|124|10|4|
@@ -27,7 +26,7 @@
%fbk
-%pb|8|0|208|
+%pb|pb-220.bmp|0|-|208|8|
%ac%t5%s%?It<%It|%Fn>;%ac%t5%s%?Ia<%Ia|%D2>
diff --git a/wps/cabbiev2.112x64x1.wps b/wps/cabbiev2.112x64x1.wps
index 2982c1cedd..bf981b1197 100644
--- a/wps/cabbiev2.112x64x1.wps
+++ b/wps/cabbiev2.112x64x1.wps
@@ -2,7 +2,6 @@
# derived from cabbie 2.0 default (C) 2007, Johannes Voggenthaler (Zinc Alloy)
%wd
%x|z|wpsbackdrop-112x64x1.bmp|0|0|
-%P|pb-112x64x1.bmp|
%xl|A|lock-112x64x1.bmp|4|56|2|
%xl|B|battery-112x64x1.bmp|22|56|9|
%xl|C|volume-112x64x1.bmp|41|56|9|
@@ -15,7 +14,7 @@
%s%ac%?ia<%ia|%?d2<%d2|(root)>>
%s%ac%?id<%id|%?d1<%d1|(root)>>
%t5%ac%s%?Fn<Next: %?It<%It|%Fn>|%ac%pp of %pe>;%t5%ac%s%?Fn<Next: %?Ia<%Ia|%Fn>|%ac%pp of %pe>
-%pb|4|1|111|42|
+%pb|pb-112x64x1.bmp|1|42|110|4|
%pc%ar%pr
#Bottom status bar
%?mh<%xdAa|%xdAb>
diff --git a/wps/cabbiev2.128x128x16.wps b/wps/cabbiev2.128x128x16.wps
index 0d4567e49d..99cda7b93a 100644
--- a/wps/cabbiev2.128x128x16.wps
+++ b/wps/cabbiev2.128x128x16.wps
@@ -3,7 +3,6 @@
#derived from "cabbie" (C) Yohann Misquitta
%wd
%X|wpsbackdrop-128x128x16.bmp|
-%P|pb-128x128x16.bmp|
%xl|A|lock-128x128x16.bmp|3|110|2|
%xl|B|battery-128x128x16.bmp|23|110|10|
%xl|C|volume-128x128x16.bmp|51|110|10|
@@ -11,7 +10,7 @@
%xl|E|repeat-128x128x16.bmp|97|110|4|
%xl|F|playmode-128x128x16.bmp|111|110|5|
%Cl|4|12|s60|s60|
-%pb|6|3|125|87|
+%pb|pb-128x128x16.bmp|3|87|122|6|
#NowPlaying
%?C<%s%m|70|%al%?it<%it|%fn>|%s%ac%?it<%it|%fn>>
%?C<%s%m|70|%al%?ia<%ia|%?d2<%d2|(root)>>|%s%ac%?ia<%ia|%?d2<%d2|(root)>>>
diff --git a/wps/cabbiev2.128x64x1.wps b/wps/cabbiev2.128x64x1.wps
index 8b360291a6..7ea6889b75 100644
--- a/wps/cabbiev2.128x64x1.wps
+++ b/wps/cabbiev2.128x64x1.wps
@@ -1,9 +1,8 @@
# cabbie 2.0 default rwps for Iriver Players by Johannes Voggenthaler (Zinc Alloy)
# derived from cabbie 2.0 default rwps (C) 2007, Marc Guay
%wd
-%P|pb-128x64x1.bmp|
%x|A|wpsbackdrop-128x64x1.bmp|0|0|
-%pb|8|1|126|38|
+%pb|pb-128x64x1.bmp|1|38|125|8|
%s%ac%?it<%it|%fn>
%s%ac%?ia<%ia|%?d2<%d2|(root)>>
diff --git a/wps/cabbiev2.128x96x2.wps b/wps/cabbiev2.128x96x2.wps
index 637e74e5b9..c3e4337ff0 100644
--- a/wps/cabbiev2.128x96x2.wps
+++ b/wps/cabbiev2.128x96x2.wps
@@ -2,14 +2,13 @@
# derived from cabbie 2.0 default (C) 2007, Johannes Voggenthaler (Zinc Alloy)
%wd
%X|wpsbackdrop-128x96x2.bmp|
-%P|pb-128x96x2.bmp|
%xl|A|lock-160x128x2.bmp|3|1|2|
%xl|B|battery-160x128x2.bmp|26|2|10|
%xl|C|volume-160x128x2.bmp|49|1|10|
%xl|D|shuffle-160x128x2.bmp|72|2|
%xl|E|repeat-160x128x2.bmp|93|0|4|
%xl|F|playmode-160x128x2.bmp|112|1|5|
-%pb|7|1|126|61|
+%pb|pb-128x96x2.bmp|1|61|125|7|
%V|0|83|128|13|1|0|3|
%?mh<%xdAa|%xdAb>
%?bp<%?bc<%xdBa|%xdBb>|%?bl<|%xdBc|%xdBd|%xdBe|%xdBf|%xdBg|%xdBh|%xdBi|%xdBj>>
diff --git a/wps/cabbiev2.132x80x16.wps b/wps/cabbiev2.132x80x16.wps
index 2b0caed4fb..cfc8a38900 100644
--- a/wps/cabbiev2.132x80x16.wps
+++ b/wps/cabbiev2.132x80x16.wps
@@ -2,7 +2,6 @@
# derived from cabbie 2.0 default (C) 2007, Johannes Voggenthaler (Zinc Alloy)
%wd
%X|wpsbackdrop-132x80x16.bmp|
-%P|pb-132x80x16.bmp|
%xl|A|lock-132x80x16.bmp|36|69|2|
%xl|B|battery-132x80x16.bmp|51|69|10|
%xl|C|volume-132x80x16.bmp|69|69|10|
@@ -10,7 +9,7 @@
%xl|E|repeat-132x80x16.bmp|105|67|4|
%xl|F|playmode-132x80x16.bmp|118|67|5|
%Cl|3|14|c40|c40|
-%pb|6|2|129|58|
+%pb|pb-132x80x16.bmp|2|58|127|6|
#NowPlaying
%?C<%s%m|48|%al%?it<%it|%fn>|%s%ac%?it<%it|%fn>>
%?C<%s%m|48|%al%?ia<%ia|%?d2<%d2|(root)>>|%s%ac%?ia<%ia|%?d2<%d2|(root)>>>
diff --git a/wps/cabbiev2.138x110x2.wps b/wps/cabbiev2.138x110x2.wps
index 0112b479c7..c9d4c5a900 100644
--- a/wps/cabbiev2.138x110x2.wps
+++ b/wps/cabbiev2.138x110x2.wps
@@ -4,7 +4,6 @@
# derived from "cabbie" (C) Yohann Misquitta
%wd
%X|wpsbackdrop-138x110x2.bmp|
-%P|pb-138x110x2.bmp|
%xl|A|lock-160x128x2.bmp|4|98|2|
%xl|B|battery-160x128x2.bmp|28|99|10|
%xl|C|volume-160x128x2.bmp|53|98|10|
@@ -12,7 +11,7 @@
%xl|E|repeat-160x128x2.bmp|102|97|4|
%xl|F|playmode-160x128x2.bmp|123|98|5|
%Cl|5|15|s55|s55|
-%pb|6|2|136|75|
+%pb|pb-138x110x2.bmp|2|75|134|6|
%?C<%s%m|65|%al%?it<%it|%fn>|%s%ac%?it<%it|%fn>>
%?C<%s%m|65|%al%?ia<%ia|%?d2<%d2|(root)>>|%s%ac%?ia<%ia|%?d2<%d2|(root)>>>
%?C<%s%m|65|%al%?id<%id|%?d1<%d1|(root)>>|%s%ac%?id<%id|%?d1<%d1|(root)>>>
diff --git a/wps/cabbiev2.160x128x1.wps b/wps/cabbiev2.160x128x1.wps
index 8727a446a6..643ddd136c 100644
--- a/wps/cabbiev2.160x128x1.wps
+++ b/wps/cabbiev2.160x128x1.wps
@@ -5,14 +5,13 @@
# derived from "cabbie" (C) Yohann Misquitta
%wd
%x|z|wpsbackdrop-160x128x1.bmp|0|0|
-%P|pb-160x128x1.bmp|
%xl|A|lock-160x128x1.bmp|48|114|2|
%xl|B|battery-160x128x1.bmp|66|115|10|
%xl|C|volume-160x128x1.bmp|87|114|10|
%xl|D|shuffle-160x128x1.bmp|107|115|
%xl|E|repeat-160x128x1.bmp|127|113|4|
%xl|F|playmode-160x128x1.bmp|145|114|5|
-%pb|8|1|159|86|
+%pb|pb-160x128x1.bmp|1|86|158|8|
%s%ac%?it<%it|%fn>
%s%ac%?ia<%ia|%?d2<%d2|(root)>>
%s%ac%?id<%id|%?d1<%d1|(root)>>
diff --git a/wps/cabbiev2.160x128x16.wps b/wps/cabbiev2.160x128x16.wps
index f35eb2dda3..ed5135c41b 100644
--- a/wps/cabbiev2.160x128x16.wps
+++ b/wps/cabbiev2.160x128x16.wps
@@ -2,7 +2,6 @@
# (C) 2007, Johannes Voggenthaler (Zinc Alloy)
#derived from "cabbie" (C) Yohann Misquitta
%wd
-%P|pb-160x128x16.bmp|
%X|wpsbackdrop-160x128x16.bmp|
%xl|A|lock-160x128x16.bmp|48|114|2|
%xl|B|battery-160x128x16.bmp|66|115|10|
@@ -11,7 +10,7 @@
%xl|E|repeat-160x128x16.bmp|125|112|4|
%xl|F|playmode-160x128x16.bmp|142|114|5|
%Cl|7|16|c65|c65|
-%pb|8|6|155|86|
+%pb|pb-160x128x16.bmp|6|86|149|8|
#NowPlaying
%?C<%s%m|77|%al%?it<%it|%fn>|%s%ac%?it<%it|%fn>>
%?C<%s%m|77|%al%?ia<%ia|%?d2<%d2|(root)>>|%s%ac%?ia<%ia|%?d2<%d2|(root)>>>
diff --git a/wps/cabbiev2.160x128x2.wps b/wps/cabbiev2.160x128x2.wps
index 6307129407..20025525aa 100644
--- a/wps/cabbiev2.160x128x2.wps
+++ b/wps/cabbiev2.160x128x2.wps
@@ -5,7 +5,6 @@
# derived from "cabbie" (C) Yohann Misquitta
%wd
%X|wpsbackdrop-160x128x2.bmp|
-%P|pb-160x128x2.bmp|
%xl|A|lock-160x128x2.bmp|48|114|2|
%xl|B|battery-160x128x2.bmp|66|115|10|
%xl|C|volume-160x128x2.bmp|87|114|10|
@@ -13,7 +12,7 @@
%xl|E|repeat-160x128x2.bmp|127|113|4|
%xl|F|playmode-160x128x2.bmp|145|114|5|
%Cl|2|16|s64|s64|
-%pb|8|1|159|86|
+%pb|pb-160x128x2.bmp|1|86|158|8|
%?C<%s%m|70|%al%?it<%it|%fn>|%s%ac%?it<%it|%fn>>
%?C<%s%m|70|%al%?ia<%ia|%?d2<%d2|(root)>>|%s%ac%?ia<%ia|%?d2<%d2|(root)>>>
%?C<%s%m|70|%al%?id<%id|%?d1<%d1|(root)>>|%s%ac%?id<%id|%?d1<%d1|(root)>>>
diff --git a/wps/cabbiev2.176x132x16.wps b/wps/cabbiev2.176x132x16.wps
index 93a207bc10..85d40fc4b9 100644
--- a/wps/cabbiev2.176x132x16.wps
+++ b/wps/cabbiev2.176x132x16.wps
@@ -3,7 +3,6 @@
#derived from "cabbie" (C) Yohann Misquitta
#Ported to nano by crzyboyster
%wd
-%P|pb-176x132x16.bmp|
%X|wpsbackdrop-176x132x16.bmp|
%xl|A|lock-176x132x16.bmp|65|116|2|
%xl|B|battery-176x132x16.bmp|83|117|10|
@@ -12,7 +11,7 @@
%xl|E|repeat-176x132x16.bmp|139|113|4|
%xl|F|playmode-176x132x16.bmp|156|115|5|
%Cl|9|16|s65|s65|
-%pb|8|8|168|86|
+%pb|pb-176x132x16.bmp|8|86|160|8|
#NowPlaying
%?C<%s%m|81|%al%?it<%it|%fn>|%s%ac%?it<%it|%fn>>
%?C<%s%m|81|%al%?ia<%ia|%?d2<%d2|(root)>>|%s%ac%?ia<%ia|%?d2<%d2|(root)>>>
diff --git a/wps/cabbiev2.176x220x16.wps b/wps/cabbiev2.176x220x16.wps
index 042ffcdf01..3c8cd035ee 100644
--- a/wps/cabbiev2.176x220x16.wps
+++ b/wps/cabbiev2.176x220x16.wps
@@ -2,7 +2,6 @@
# derived from cabbie 2.0 default (C) 2007, Johannes Voggenthaler (Zinc Alloy)
%wd
%X|wpsbackdrop-176x220x16.bmp|
-%P|pb-176x220x16.bmp|
%xl|A|lock-176x220x16.bmp|51|204|2|
%xl|B|battery-176x220x16.bmp|73|206|10|
%xl|C|volume-176x220x16.bmp|97|206|10|
@@ -10,7 +9,7 @@
%xl|E|repeat-176x220x16.bmp|144|204|4|
%xl|F|playmode-176x220x16.bmp|159|204|5|
%Cl|29|20|c120|c120|
-%pb|8|5|171|182|
+%pb|pb-176x220x16.bmp|5|182|166|8|
#NowPlaying
diff --git a/wps/cabbiev2.220x176x16.wps b/wps/cabbiev2.220x176x16.wps
index 94cf128d43..ce8dc2b091 100644
--- a/wps/cabbiev2.220x176x16.wps
+++ b/wps/cabbiev2.220x176x16.wps
@@ -3,7 +3,6 @@
#derived from "cabbie" (C) Yohann Misquitta
%wd
%X|wpsbackdrop-220x176x16.bmp|
-%P|pb-220x176x16.bmp|
%xl|A|lock-220x176x16.bmp|88|152|2|
%xl|B|battery-220x176x16.bmp|110|153|10|
%xl|C|volume-220x176x16.bmp|134|153|10|
@@ -11,7 +10,7 @@
%xl|E|repeat-220x176x16.bmp|182|151|4|
%xl|F|playmode-220x176x16.bmp|200|152|5|
%Cl|15|32|s75|s75|
-%pb|8|11|210|121|
+%pb|pb-220x176x16.bmp|11|121|199|8|
#NowPlaying
diff --git a/wps/cabbiev2.240x320x16.wps b/wps/cabbiev2.240x320x16.wps
index 2ed0b4a842..207052b1d6 100644
--- a/wps/cabbiev2.240x320x16.wps
+++ b/wps/cabbiev2.240x320x16.wps
@@ -5,7 +5,6 @@
%wd
%X|wpsbackdrop-240x320x16.bmp|
-%P|pb-240x320x16.bmp|
%xl|A|lock-240x320x16.bmp|11|292|2|
%xl|B|battery-240x320x16.bmp|46|292|10|
%xl|C|volume-240x320x16.bmp|98|292|10|
@@ -13,7 +12,7 @@
%xl|E|repeat-240x320x16.bmp|182|292|4|
%xl|F|playmode-240x320x16.bmp|206|292|5|
%Cl|55|30|c130|c130|
-%pb|13|22|221|254|
+%pb|pb-240x320x16.bmp|22|254|199|13|
%?C<|>
%?C<|%s%ac%?it<%it|%fn>>
%?C<|%s%ac%?ia<%ia|%?d2<%d2|(root)>>>
diff --git a/wps/cabbiev2.320x240x16.wps b/wps/cabbiev2.320x240x16.wps
index f6495948e9..cbe967d9a9 100644
--- a/wps/cabbiev2.320x240x16.wps
+++ b/wps/cabbiev2.320x240x16.wps
@@ -3,7 +3,6 @@
#derived from "cabbie" (C) Yohann Misquitta
%wd
%X|wpsbackdrop-320x240x16.bmp|
-%P|pb-320x240x16.bmp|
%xl|A|lock-320x240x16.bmp|91|207|2|
%xl|B|battery-320x240x16.bmp|126|207|10|
%xl|C|volume-320x240x16.bmp|177|207|10|
@@ -11,7 +10,7 @@
%xl|E|repeat-320x240x16.bmp|261|207|4|
%xl|F|playmode-320x240x16.bmp|286|207|5|
%Cl|16|32|s120|s120|
-%pb|15|10|310|162|
+%pb|pb-320x240x16.bmp|10|162|300|15|
#NowPlaying
%?C<%s%m|153|%al%?it<%it|%fn>|%s%ac%?it<%it|%fn>>
diff --git a/wps/iCatcher.112x64x1.wps b/wps/iCatcher.112x64x1.wps
index 68cfd79a2a..1f54a1193b 100644
--- a/wps/iCatcher.112x64x1.wps
+++ b/wps/iCatcher.112x64x1.wps
@@ -5,7 +5,7 @@
%s%ac%?ia<%ia|%?d2<%d2|Unknown Artist>>
%s%ac%?id<%id|%?d1<%d1|Unknown Album>>
%s%ac%?in<%in|%pp> - %?it<%it|%fn>
-%pb|3|11|101|
+%pb|-|11|-|90|3|
%t6%s%ac%?Fm<Next: %?It<%It|%Fn>|%fbKbps %fc>;%t6%s%ac%?Fm<Next: %?It<%It|%Fn>|%fbKbps %fc>
%xl|A|battery-s.bmp|93|3|5|
diff --git a/wps/iCatcher.128x128x16.wps b/wps/iCatcher.128x128x16.wps
index 691ed8d9c4..9f24f09cce 100644
--- a/wps/iCatcher.128x128x16.wps
+++ b/wps/iCatcher.128x128x16.wps
@@ -11,7 +11,7 @@
%al %fbKbps
-%pb|4|11|117|
+%pb|-|11|-|106|4|
%s%acNext: %?It<%It|%?Fn<%Fn|?>>
diff --git a/wps/iCatcher.128x64x1.160x128x2.wps b/wps/iCatcher.128x64x1.160x128x2.wps
index e137a08be6..3d0702644c 100644
--- a/wps/iCatcher.128x64x1.160x128x2.wps
+++ b/wps/iCatcher.128x64x1.160x128x2.wps
@@ -4,7 +4,7 @@
%t1 %?mp<%al %pp/%pe%ar-:--/-:-- |%al %pp/%pe%ar%pc/%pt |%al %pp/%pe%ar%pc/%pt |%al %pp/%pe%ar%pc/%pt |%al %pp/%pe%ar%pc/%pt >;%t1 %?mp<%al %pp/%pe%ar-:--/-:-- |%al %pp/%pe%ar%pc/%pt |%al %pp/%pe|%al %pp/%pe%ar%pc/%pt |%al %pp/%pe%ar%pc/%pt >
%s%ac%?ia<%ia|%?d2<%d2|Unknown Artist>>
%s%ac%?id<%id|%?d1<%d1|Unknown Album>>
-%pb|4|11|117|
+%pb|-|11|-|106|4|
%s%ac%?in<%in|%pp> - %?it<%it|%fn>
%xl|A|battery-s.bmp|109|3|5|
diff --git a/wps/iCatcher.128x96x1.wps b/wps/iCatcher.128x96x1.wps
index 0ebea5f7d5..1222642adf 100644
--- a/wps/iCatcher.128x96x1.wps
+++ b/wps/iCatcher.128x96x1.wps
@@ -6,7 +6,7 @@
%s%ac%?ia<%ia|%?d2<%d2|Unknown Artist>>
%s%ac%?id<%id|%?d1<%d1|Unknown Album>>
%s%ac%?in<%in|%pp> - %?it<%it|%fn>
-%pb|4|11|117|
+%pb|-|11|-|106|4|
%s%acNext: %?It<%It|%?Fn<%Fn|?>>
diff --git a/wps/iCatcher.132x80x16.wps b/wps/iCatcher.132x80x16.wps
index 428d28b7c2..bc730a2c2f 100644
--- a/wps/iCatcher.132x80x16.wps
+++ b/wps/iCatcher.132x80x16.wps
@@ -6,7 +6,7 @@
%s%ac%?ia<%ia|%?d2<%d2|Unknown Artist>>
%s%ac%?id<%id|%?d1<%d1|Unknown Album>>
%s%ac%?in<%in|%pp> - %?it<%it|%fn>
-%pb|4|11|117|
+%pb|-|11|-|106|4|
%s%acNext: %?It<%It|%?Fn<%Fn|?>>
diff --git a/wps/iCatcher.138x110x2.wps b/wps/iCatcher.138x110x2.wps
index 5e1c651b4a..c4a64acc92 100644
--- a/wps/iCatcher.138x110x2.wps
+++ b/wps/iCatcher.138x110x2.wps
@@ -10,7 +10,7 @@
%s%ac%?in<%in|%pp> - %?it<%it|%fn>
%al %fbKbps
-%pb|4|10|128|
+%pb|-|10|-|118|4|
%s%acNext: %?It<%It|%?Fn<%Fn|?>>
diff --git a/wps/iCatcher.160x128x16.wps b/wps/iCatcher.160x128x16.wps
index 8147214b70..8604ba39b0 100644
--- a/wps/iCatcher.160x128x16.wps
+++ b/wps/iCatcher.160x128x16.wps
@@ -11,7 +11,7 @@
%s%ac%?in<%in|%pp> - %?it<%it|%fn>
%al %fbKbps
-%pb|4|10|150|
+%pb|-|10|-|140|4|
%s%acNext: %?It<%It|%?Fn<%Fn|?>>
diff --git a/wps/iCatcher.160x128x2.wps b/wps/iCatcher.160x128x2.wps
index e2d786de3b..1405dc3ad6 100644
--- a/wps/iCatcher.160x128x2.wps
+++ b/wps/iCatcher.160x128x2.wps
@@ -11,7 +11,7 @@
%s%ac%?in<%in|%pp> - %?it<%it|%fn>
%al %fbKbps
-%pb|4|10|150|
+%pb|-|10|-|140|4|
%s%acNext: %?It<%It|%?Fn<%Fn|?>>
diff --git a/wps/iCatcher.176x132x16.wps b/wps/iCatcher.176x132x16.wps
index 2064246e7d..b6bd62a699 100644
--- a/wps/iCatcher.176x132x16.wps
+++ b/wps/iCatcher.176x132x16.wps
@@ -11,7 +11,7 @@
%s%ac%?in<%in|%pp> - %?it<%it|%fn>
%al %fbKbps
-%pb|4|10|166|
+%pb|-|10|-|156|4|
%s%acNext: %?It<%It|%?Fn<%Fn|?>>
diff --git a/wps/iCatcher.176x220x16.wps b/wps/iCatcher.176x220x16.wps
index 4c74d53bdf..18a634a867 100644
--- a/wps/iCatcher.176x220x16.wps
+++ b/wps/iCatcher.176x220x16.wps
@@ -15,7 +15,7 @@
%al %fbKbps
-%pb|4|10|166|
+%pb|-|10|-|156|4|
%s%acNext: %?It<%It|%?Fn<%Fn|?>>
diff --git a/wps/iCatcher.220x176x16.wps b/wps/iCatcher.220x176x16.wps
index 45ead21d42..dea2c1a3d9 100644
--- a/wps/iCatcher.220x176x16.wps
+++ b/wps/iCatcher.220x176x16.wps
@@ -9,7 +9,7 @@
%s%ac%?in<%in|%pp> - %?it<%it|%fn>
%al %fbKbps
-%pb|6|11|209|
+%pb|-|11|-|198|6|
%s%acNext: %?It<%It|%?Fn<%Fn|?>>
diff --git a/wps/iCatcher.240x320x16.wps b/wps/iCatcher.240x320x16.wps
index dff593068b..b2774d46dd 100644
--- a/wps/iCatcher.240x320x16.wps
+++ b/wps/iCatcher.240x320x16.wps
@@ -13,7 +13,7 @@
%al %fbKbps
-%pb|7|11|229|
+%pb|-|11|-|218|7|
%s%acNext: %?It<%It|%?Fn<%Fn|?>>
diff --git a/wps/iCatcher.320x240x16.wps b/wps/iCatcher.320x240x16.wps
index ec7cef15dd..59d9d49925 100644
--- a/wps/iCatcher.320x240x16.wps
+++ b/wps/iCatcher.320x240x16.wps
@@ -9,7 +9,7 @@
%s%ac%?in<%in|%pp> - %?it<%it|%fn>
%al %fbKbps
-%pb|7|11|309|
+%pb|-|11|-|298|7|
%s%acNext: %?It<%It|%?Fn<%Fn|?>>