diff options
author | Thomas Martitz <kugel@rockbox.org> | 2009-10-16 20:34:04 +0000 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2009-10-16 20:34:04 +0000 |
commit | 94f76513412cdaf8f3b98054f9c027b97093027e (patch) | |
tree | 6e5b4483ab09c83270bc36b828a297f8fc0b2fc4 | |
parent | 5c244cfcaad88ea6bb660f2daf779c628e00af00 (diff) | |
download | rockbox-94f76513412cdaf8f3b98054f9c027b97093027e.tar.gz rockbox-94f76513412cdaf8f3b98054f9c027b97093027e.zip |
Revert r23212, I committed it accidentally.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23214 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/SOURCES | 1 | ||||
-rw-r--r-- | apps/filetree.c | 17 | ||||
-rw-r--r-- | apps/filetypes.h | 2 | ||||
-rw-r--r-- | apps/gui/list.c | 1 | ||||
-rw-r--r-- | apps/gui/skin_engine/skin_display.c | 36 | ||||
-rw-r--r-- | apps/gui/skin_engine/skin_parser.c | 7 | ||||
-rw-r--r-- | apps/gui/skin_engine/wps_internals.h | 2 | ||||
-rw-r--r-- | apps/gui/statusbar-skinned.c | 127 | ||||
-rw-r--r-- | apps/gui/statusbar-skinned.h | 41 | ||||
-rw-r--r-- | apps/gui/viewport.c | 18 | ||||
-rw-r--r-- | apps/gui/wps.c | 2 | ||||
-rw-r--r-- | apps/main.c | 1 | ||||
-rw-r--r-- | apps/settings.c | 12 | ||||
-rw-r--r-- | apps/settings.h | 2 | ||||
-rw-r--r-- | apps/settings_list.c | 2 | ||||
-rw-r--r-- | wps/WPSLIST | 3 | ||||
-rw-r--r-- | wps/cabbiev2.176x220x16.sb | 20 | ||||
-rwxr-xr-x | wps/wpsbuild.pl | 70 |
18 files changed, 32 insertions, 332 deletions
diff --git a/apps/SOURCES b/apps/SOURCES index 49d248d8ff..bac376589a 100644 --- a/apps/SOURCES +++ b/apps/SOURCES | |||
@@ -78,7 +78,6 @@ gui/quickscreen.c | |||
78 | #endif | 78 | #endif |
79 | 79 | ||
80 | gui/wps.c | 80 | gui/wps.c |
81 | gui/statusbar-skinned.c | ||
82 | gui/scrollbar.c | 81 | gui/scrollbar.c |
83 | gui/splash.c | 82 | gui/splash.c |
84 | gui/statusbar.c | 83 | gui/statusbar.c |
diff --git a/apps/filetree.c b/apps/filetree.c index 504c06c7fb..8fbc39fa67 100644 --- a/apps/filetree.c +++ b/apps/filetree.c | |||
@@ -477,22 +477,7 @@ int ft_enter(struct tree_context* c) | |||
477 | break; | 477 | break; |
478 | #endif | 478 | #endif |
479 | 479 | ||
480 | #ifdef HAVE_LCD_BITMAP | 480 | |
481 | case FILE_ATTR_SB: | ||
482 | splash(0, ID2P(LANG_WAIT)); | ||
483 | set_file(buf, (char *)global_settings.sb_file, | ||
484 | MAX_FILENAME); | ||
485 | settings_apply_skins(); | ||
486 | break; | ||
487 | #endif | ||
488 | #ifdef HAVE_REMOTE_LCD | ||
489 | case FILE_ATTR_RSB: | ||
490 | splash(0, ID2P(LANG_WAIT)); | ||
491 | set_file(buf, (char *)global_settings.rsb_file, | ||
492 | MAX_FILENAME); | ||
493 | settings_apply_skins(); | ||
494 | break; | ||
495 | #endif | ||
496 | /* wps config file */ | 481 | /* wps config file */ |
497 | case FILE_ATTR_WPS: | 482 | case FILE_ATTR_WPS: |
498 | splash(0, ID2P(LANG_WAIT)); | 483 | splash(0, ID2P(LANG_WAIT)); |
diff --git a/apps/filetypes.h b/apps/filetypes.h index 472f792298..f872cf86f0 100644 --- a/apps/filetypes.h +++ b/apps/filetypes.h | |||
@@ -41,8 +41,6 @@ | |||
41 | #define FILE_ATTR_KBD 0x0C00 /* keyboard file */ | 41 | #define FILE_ATTR_KBD 0x0C00 /* keyboard file */ |
42 | #define FILE_ATTR_FMR 0x0D00 /* preset file */ | 42 | #define FILE_ATTR_FMR 0x0D00 /* preset file */ |
43 | #define FILE_ATTR_CUE 0x0E00 /* cuesheet file */ | 43 | #define FILE_ATTR_CUE 0x0E00 /* cuesheet file */ |
44 | #define FILE_ATTR_SB 0x0F00 /* cuesheet file */ | ||
45 | #define FILE_ATTR_RSB 0x1000 /* cuesheet file */ | ||
46 | #define FILE_ATTR_MASK 0xFF00 /* which bits tree.c uses for file types */ | 44 | #define FILE_ATTR_MASK 0xFF00 /* which bits tree.c uses for file types */ |
47 | 45 | ||
48 | struct filetype { | 46 | struct filetype { |
diff --git a/apps/gui/list.c b/apps/gui/list.c index 0090f44b42..d7ecdccd30 100644 --- a/apps/gui/list.c +++ b/apps/gui/list.c | |||
@@ -29,7 +29,6 @@ | |||
29 | #include "kernel.h" | 29 | #include "kernel.h" |
30 | #include "system.h" | 30 | #include "system.h" |
31 | 31 | ||
32 | #include "appevents.h" | ||
33 | #include "action.h" | 32 | #include "action.h" |
34 | #include "screen_access.h" | 33 | #include "screen_access.h" |
35 | #include "list.h" | 34 | #include "list.h" |
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. |
diff --git a/apps/gui/skin_engine/skin_parser.c b/apps/gui/skin_engine/skin_parser.c index 9a8d3f5ce4..fa35ed994f 100644 --- a/apps/gui/skin_engine/skin_parser.c +++ b/apps/gui/skin_engine/skin_parser.c | |||
@@ -603,8 +603,6 @@ static int parse_image_load(const char *wps_bufptr, | |||
603 | return WPS_ERROR_INVALID_PARAM; | 603 | return WPS_ERROR_INVALID_PARAM; |
604 | /* save a pointer to the filename */ | 604 | /* save a pointer to the filename */ |
605 | img->bm.data = (char*)filename; | 605 | img->bm.data = (char*)filename; |
606 | if (wps_data->debug) | ||
607 | DEBUGF("%s >> image parsed (label: %c)\n", __func__, *id); | ||
608 | img->label = *id; | 606 | img->label = *id; |
609 | img->x = x; | 607 | img->x = x; |
610 | img->y = y; | 608 | img->y = y; |
@@ -1641,13 +1639,8 @@ void skin_data_reset(struct wps_data *wps_data) | |||
1641 | wps_data->wps_progress_pat[i] = 0; | 1639 | wps_data->wps_progress_pat[i] = 0; |
1642 | } | 1640 | } |
1643 | wps_data->full_line_progressbar = false; | 1641 | wps_data->full_line_progressbar = false; |
1644 | |||
1645 | #ifdef HAVE_REMOTE_LCD | ||
1646 | data->remote_wps = rwps; | ||
1647 | #endif | 1642 | #endif |
1648 | wps_data->wps_loaded = false; | 1643 | wps_data->wps_loaded = false; |
1649 | if (wps_data->debug) | ||
1650 | DEBUGF("%s >> wps_data trashed (%p)\n", __func__, data); | ||
1651 | } | 1644 | } |
1652 | 1645 | ||
1653 | #ifdef HAVE_LCD_BITMAP | 1646 | #ifdef HAVE_LCD_BITMAP |
diff --git a/apps/gui/skin_engine/wps_internals.h b/apps/gui/skin_engine/wps_internals.h index 1d1bcbc8e4..638fb0a081 100644 --- a/apps/gui/skin_engine/wps_internals.h +++ b/apps/gui/skin_engine/wps_internals.h | |||
@@ -263,6 +263,7 @@ struct wps_data | |||
263 | int num_tokens; | 263 | int num_tokens; |
264 | /* tick the volume button was last pressed */ | 264 | /* tick the volume button was last pressed */ |
265 | unsigned int button_time_volume; | 265 | unsigned int button_time_volume; |
266 | |||
266 | #ifdef HAVE_LCD_BITMAP | 267 | #ifdef HAVE_LCD_BITMAP |
267 | bool peak_meter_enabled; | 268 | bool peak_meter_enabled; |
268 | bool wps_sb_tag; | 269 | bool wps_sb_tag; |
@@ -276,7 +277,6 @@ struct wps_data | |||
276 | /* this must not be reset on skin loading */ | 277 | /* this must not be reset on skin loading */ |
277 | bool remote_wps; | 278 | bool remote_wps; |
278 | #endif | 279 | #endif |
279 | bool debug; | ||
280 | }; | 280 | }; |
281 | 281 | ||
282 | /* wps_data end */ | 282 | /* wps_data end */ |
diff --git a/apps/gui/statusbar-skinned.c b/apps/gui/statusbar-skinned.c deleted file mode 100644 index bb77a5088c..0000000000 --- a/apps/gui/statusbar-skinned.c +++ /dev/null | |||
@@ -1,127 +0,0 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2009 Thomas Martitz | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or | ||
13 | * modify it under the terms of the GNU General Public License | ||
14 | * as published by the Free Software Foundation; either version 2 | ||
15 | * of the License, or (at your option) any later version. | ||
16 | * | ||
17 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
18 | * KIND, either express or implied. | ||
19 | * | ||
20 | ****************************************************************************/ | ||
21 | #include <stdio.h> | ||
22 | #include <string.h> | ||
23 | #include <stdlib.h> | ||
24 | #include "config.h" | ||
25 | |||
26 | #include "system.h" | ||
27 | #include "settings.h" | ||
28 | #include "appevents.h" | ||
29 | #include "screens.h" | ||
30 | #include "screen_access.h" | ||
31 | #include "skin_engine/skin_engine.h" | ||
32 | #include "skin_engine/wps_internals.h" | ||
33 | #include "debug.h" | ||
34 | |||
35 | |||
36 | /* currently only one wps_state is needed */ | ||
37 | extern struct wps_state wps_state; | ||
38 | static struct gui_wps sb_skin[NB_SCREENS]; | ||
39 | static struct wps_data sb_skin_data[NB_SCREENS]; | ||
40 | |||
41 | /* initial setup of wps_data */ | ||
42 | static void sb_skin_update(void*); | ||
43 | static bool loaded_ok = false; | ||
44 | |||
45 | void sb_skin_data_load(enum screen_type screen, const char *buf, bool isfile) | ||
46 | { | ||
47 | |||
48 | loaded_ok = buf && skin_data_load(sb_skin[screen].data, | ||
49 | &screens[screen], buf, isfile); | ||
50 | |||
51 | |||
52 | if (loaded_ok) | ||
53 | add_event(GUI_EVENT_ACTIONUPDATE, false, sb_skin_update); | ||
54 | else | ||
55 | remove_event(GUI_EVENT_ACTIONUPDATE, sb_skin_update); | ||
56 | |||
57 | #ifdef HAVE_REMOVE_LCD | ||
58 | sb_skin[screen].data->remote_wps = !(screen == SCREEN_MAIN); | ||
59 | #endif | ||
60 | } | ||
61 | |||
62 | void sb_skin_data_init(enum screen_type screen) | ||
63 | { | ||
64 | skin_data_init(sb_skin[screen].data); | ||
65 | } | ||
66 | |||
67 | bool sb_skin_active(void) | ||
68 | { | ||
69 | return loaded_ok; | ||
70 | } | ||
71 | |||
72 | void sb_skin_update(void* param) | ||
73 | { | ||
74 | int i; | ||
75 | (void)param; | ||
76 | FOR_NB_SCREENS(i) | ||
77 | { | ||
78 | skin_update(&sb_skin[i], wps_state.do_full_update? | ||
79 | WPS_REFRESH_ALL : WPS_REFRESH_NON_STATIC); | ||
80 | } | ||
81 | } | ||
82 | |||
83 | void sb_skin_init(void) | ||
84 | { | ||
85 | int i; | ||
86 | FOR_NB_SCREENS(i) | ||
87 | { | ||
88 | skin_data_init(&sb_skin_data[i]); | ||
89 | #ifdef HAVE_ALBUMART | ||
90 | sb_skin_data[i].wps_uses_albumart = 0; | ||
91 | #endif | ||
92 | #ifdef HAVE_REMOTE_LCD | ||
93 | sb_skin_data[i].remote_wps = (i == SCREEN_REMOTE); | ||
94 | #endif | ||
95 | sb_skin[i].data = &sb_skin_data[i]; | ||
96 | sb_skin[i].display = &screens[i]; | ||
97 | sb_skin[i].data->debug = true; | ||
98 | DEBUGF("data in init: %p, debug: %d\n", &sb_skin_data[i], sb_skin_data[i].debug); | ||
99 | /* Currently no seperate wps_state needed/possible | ||
100 | so use the only available ( "global" ) one */ | ||
101 | sb_skin[i].state = &wps_state; | ||
102 | } | ||
103 | #ifdef HAVE_LCD_BITMAP | ||
104 | /* | ||
105 | add_event(GUI_EVENT_STATUSBAR_TOGGLE, false, statusbar_toggle_handler); | ||
106 | */ | ||
107 | #endif | ||
108 | } | ||
109 | |||
110 | #ifdef HAVE_ALBUMART | ||
111 | bool sb_skin_uses_statusbar(int *width, int *height) | ||
112 | { | ||
113 | int i; | ||
114 | FOR_NB_SCREENS(i) { | ||
115 | struct gui_wps *gwps = &sb_skin[i]; | ||
116 | if (gwps->data && (gwps->data->wps_uses_albumart != WPS_ALBUMART_NONE)) | ||
117 | { | ||
118 | if (width) | ||
119 | *width = sb_skin[0].data->albumart_max_width; | ||
120 | if (height) | ||
121 | *height = sb_skin[0].data->albumart_max_height; | ||
122 | return true; | ||
123 | } | ||
124 | } | ||
125 | return false; | ||
126 | } | ||
127 | #endif | ||
diff --git a/apps/gui/statusbar-skinned.h b/apps/gui/statusbar-skinned.h deleted file mode 100644 index 7714496e52..0000000000 --- a/apps/gui/statusbar-skinned.h +++ /dev/null | |||
@@ -1,41 +0,0 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2009 Thomas Martitz | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or | ||
13 | * modify it under the terms of the GNU General Public License | ||
14 | * as published by the Free Software Foundation; either version 2 | ||
15 | * of the License, or (at your option) any later version. | ||
16 | * | ||
17 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
18 | * KIND, either express or implied. | ||
19 | * | ||
20 | ****************************************************************************/ | ||
21 | #include <stdio.h> | ||
22 | #include <string.h> | ||
23 | #include <stdlib.h> | ||
24 | #include "config.h" | ||
25 | |||
26 | #ifndef __STATUSBAR_SKINNED_H__ | ||
27 | #define __STATUSBAR_SKINNED_H__ | ||
28 | |||
29 | |||
30 | void sb_skin_data_load(enum screen_type screen, const char *buf, bool isfile); | ||
31 | void sb_skin_data_init(enum screen_type screen); | ||
32 | |||
33 | /* probably temporary, to shut the classic statusbar up */ | ||
34 | bool sb_skin_active(void); | ||
35 | void sb_skin_init(void); | ||
36 | |||
37 | #ifdef HAVE_ALBUMART | ||
38 | bool sb_skin_uses_statusbar(int *width, int *height); | ||
39 | #endif | ||
40 | |||
41 | #endif /* __STATUSBAR_SKINNED_H__ */ | ||
diff --git a/apps/gui/viewport.c b/apps/gui/viewport.c index 1a2b29a65a..fdd06bdc46 100644 --- a/apps/gui/viewport.c +++ b/apps/gui/viewport.c | |||
@@ -189,8 +189,7 @@ int viewportmanager_set_statusbar(const int enabled) | |||
189 | if (showing_bars(i)) | 189 | if (showing_bars(i)) |
190 | gui_statusbar_draw(&statusbars.statusbars[i], true); | 190 | gui_statusbar_draw(&statusbars.statusbars[i], true); |
191 | } | 191 | } |
192 | if (!sb_skin_active()) | 192 | add_event(GUI_EVENT_ACTIONUPDATE, false, viewportmanager_redraw); |
193 | add_event(GUI_EVENT_ACTIONUPDATE, false, viewportmanager_redraw); | ||
194 | } | 193 | } |
195 | else | 194 | else |
196 | { | 195 | { |
@@ -251,13 +250,14 @@ void viewportmanager_theme_changed(const int which) | |||
251 | if (which & THEME_STATUSBAR) | 250 | if (which & THEME_STATUSBAR) |
252 | { | 251 | { |
253 | statusbar_enabled = VP_SB_HIDE_ALL; | 252 | statusbar_enabled = VP_SB_HIDE_ALL; |
254 | if (global_settings.statusbar != STATUSBAR_OFF) | 253 | |
255 | statusbar_enabled = VP_SB_ONSCREEN(SCREEN_MAIN); | 254 | FOR_NB_SCREENS(i) |
256 | #ifdef HAVE_REMOTE_LCD | 255 | { |
257 | if (global_settings.remote_statusbar != STATUSBAR_OFF) | 256 | if (statusbar_position(i) != STATUSBAR_OFF) |
258 | statusbar_enabled |= VP_SB_ONSCREEN(SCREEN_REMOTE); | 257 | statusbar_enabled |= VP_SB_ONSCREEN(i); |
259 | #endif | 258 | } |
260 | if (statusbar_enabled && !sb_skin_active()) | 259 | |
260 | if (statusbar_enabled != VP_SB_HIDE_ALL) | ||
261 | add_event(GUI_EVENT_ACTIONUPDATE, false, viewportmanager_redraw); | 261 | add_event(GUI_EVENT_ACTIONUPDATE, false, viewportmanager_redraw); |
262 | else | 262 | else |
263 | remove_event(GUI_EVENT_ACTIONUPDATE, viewportmanager_redraw); | 263 | remove_event(GUI_EVENT_ACTIONUPDATE, viewportmanager_redraw); |
diff --git a/apps/gui/wps.c b/apps/gui/wps.c index 3ea5cf97f7..342ebdea2b 100644 --- a/apps/gui/wps.c +++ b/apps/gui/wps.c | |||
@@ -131,7 +131,6 @@ void wps_data_load(enum screen_type screen, const char *buf, bool isfile) | |||
131 | 131 | ||
132 | loaded_ok = buf && skin_data_load(gui_wps[screen].data, | 132 | loaded_ok = buf && skin_data_load(gui_wps[screen].data, |
133 | &screens[screen], buf, isfile); | 133 | &screens[screen], buf, isfile); |
134 | DEBUGF("%s >> wps loading\n", __func__); | ||
135 | if (!loaded_ok) /* load the hardcoded default */ | 134 | if (!loaded_ok) /* load the hardcoded default */ |
136 | { | 135 | { |
137 | char *skin_buf[NB_SCREENS] = { | 136 | char *skin_buf[NB_SCREENS] = { |
@@ -1292,7 +1291,6 @@ void gui_sync_wps_init(void) | |||
1292 | #ifdef HAVE_REMOTE_LCD | 1291 | #ifdef HAVE_REMOTE_LCD |
1293 | wps_datas[i].remote_wps = (i == SCREEN_REMOTE); | 1292 | wps_datas[i].remote_wps = (i == SCREEN_REMOTE); |
1294 | #endif | 1293 | #endif |
1295 | wps_datas[i].debug = false; | ||
1296 | gui_wps[i].data = &wps_datas[i]; | 1294 | gui_wps[i].data = &wps_datas[i]; |
1297 | gui_wps[i].display = &screens[i]; | 1295 | gui_wps[i].display = &screens[i]; |
1298 | /* Currently no seperate wps_state needed/possible | 1296 | /* Currently no seperate wps_state needed/possible |
diff --git a/apps/main.c b/apps/main.c index 6e902a73b1..f48dd2d0a0 100644 --- a/apps/main.c +++ b/apps/main.c | |||
@@ -322,7 +322,6 @@ static void init(void) | |||
322 | settings_reset(); | 322 | settings_reset(); |
323 | settings_load(SETTINGS_ALL); | 323 | settings_load(SETTINGS_ALL); |
324 | gui_sync_wps_init(); | 324 | gui_sync_wps_init(); |
325 | sb_skin_init(); | ||
326 | settings_apply(true); | 325 | settings_apply(true); |
327 | init_dircache(true); | 326 | init_dircache(true); |
328 | init_dircache(false); | 327 | init_dircache(false); |
diff --git a/apps/settings.c b/apps/settings.c index 2069bfced4..2a5e31824f 100644 --- a/apps/settings.c +++ b/apps/settings.c | |||
@@ -740,7 +740,6 @@ void settings_apply_skins(void) | |||
740 | char buf[MAX_PATH]; | 740 | char buf[MAX_PATH]; |
741 | /* re-initialize the skin buffer before we start reloading skins */ | 741 | /* re-initialize the skin buffer before we start reloading skins */ |
742 | skin_buffer_init(); | 742 | skin_buffer_init(); |
743 | sb_skin_data_init(SCREEN_MAIN); | ||
744 | if ( global_settings.wps_file[0] && | 743 | if ( global_settings.wps_file[0] && |
745 | global_settings.wps_file[0] != 0xff ) | 744 | global_settings.wps_file[0] != 0xff ) |
746 | { | 745 | { |
@@ -752,17 +751,6 @@ void settings_apply_skins(void) | |||
752 | { | 751 | { |
753 | wps_data_load(SCREEN_MAIN, NULL, true); | 752 | wps_data_load(SCREEN_MAIN, NULL, true); |
754 | } | 753 | } |
755 | if ( global_settings.sb_file[0] && | ||
756 | global_settings.sb_file[0] != 0xff ) { | ||
757 | snprintf(buf, sizeof buf, WPS_DIR "/%s.sb", | ||
758 | global_settings.sb_file); | ||
759 | sb_skin_data_load(SCREEN_MAIN, buf, true); | ||
760 | } | ||
761 | else | ||
762 | { | ||
763 | sb_skin_data_init(SCREEN_MAIN); | ||
764 | sb_skin_data_load(SCREEN_MAIN, NULL, true); | ||
765 | } | ||
766 | #if defined(HAVE_REMOTE_LCD) && (NB_SCREENS > 1) | 754 | #if defined(HAVE_REMOTE_LCD) && (NB_SCREENS > 1) |
767 | if ( global_settings.rwps_file[0]) | 755 | if ( global_settings.rwps_file[0]) |
768 | { | 756 | { |
diff --git a/apps/settings.h b/apps/settings.h index 305ffddcfa..ad250ed3b7 100644 --- a/apps/settings.h +++ b/apps/settings.h | |||
@@ -60,7 +60,6 @@ struct opt_items { | |||
60 | #define FONT_DIR ROCKBOX_DIR "/fonts" | 60 | #define FONT_DIR ROCKBOX_DIR "/fonts" |
61 | #define LANG_DIR ROCKBOX_DIR "/langs" | 61 | #define LANG_DIR ROCKBOX_DIR "/langs" |
62 | #define WPS_DIR ROCKBOX_DIR "/wps" | 62 | #define WPS_DIR ROCKBOX_DIR "/wps" |
63 | #define SB_DIR ROCKBOX_DIR "/statusbar" | ||
64 | #define THEME_DIR ROCKBOX_DIR "/themes" | 63 | #define THEME_DIR ROCKBOX_DIR "/themes" |
65 | #define ICON_DIR ROCKBOX_DIR "/icons" | 64 | #define ICON_DIR ROCKBOX_DIR "/icons" |
66 | 65 | ||
@@ -549,7 +548,6 @@ struct user_settings | |||
549 | int peak_meter_max; /* range maximum */ | 548 | int peak_meter_max; /* range maximum */ |
550 | 549 | ||
551 | unsigned char wps_file[MAX_FILENAME+1]; /* last wps */ | 550 | unsigned char wps_file[MAX_FILENAME+1]; /* last wps */ |
552 | unsigned char sb_file[MAX_FILENAME+1]; /* last wps */ | ||
553 | unsigned char lang_file[MAX_FILENAME+1]; /* last language */ | 551 | unsigned char lang_file[MAX_FILENAME+1]; /* last language */ |
554 | unsigned char playlist_catalog_dir[MAX_FILENAME+1]; | 552 | unsigned char playlist_catalog_dir[MAX_FILENAME+1]; |
555 | int skip_length; /* skip length */ | 553 | int skip_length; /* skip length */ |
diff --git a/apps/settings_list.c b/apps/settings_list.c index 59638bbeed..62a9351782 100644 --- a/apps/settings_list.c +++ b/apps/settings_list.c | |||
@@ -1440,8 +1440,6 @@ const struct settings_list settings[] = { | |||
1440 | #endif | 1440 | #endif |
1441 | TEXT_SETTING(F_THEMESETTING,wps_file, "wps", | 1441 | TEXT_SETTING(F_THEMESETTING,wps_file, "wps", |
1442 | DEFAULT_WPSNAME, WPS_DIR "/", ".wps"), | 1442 | DEFAULT_WPSNAME, WPS_DIR "/", ".wps"), |
1443 | TEXT_SETTING(F_THEMESETTING,sb_file, "sb", | ||
1444 | DEFAULT_WPSNAME, WPS_DIR "/", ".sb"), | ||
1445 | TEXT_SETTING(0,lang_file,"lang","",LANG_DIR "/",".lng"), | 1443 | TEXT_SETTING(0,lang_file,"lang","",LANG_DIR "/",".lng"), |
1446 | #ifdef HAVE_REMOTE_LCD | 1444 | #ifdef HAVE_REMOTE_LCD |
1447 | TEXT_SETTING(F_THEMESETTING,rwps_file,"rwps", | 1445 | TEXT_SETTING(F_THEMESETTING,rwps_file,"rwps", |
diff --git a/wps/WPSLIST b/wps/WPSLIST index 63b111e0dc..662fb82cb0 100644 --- a/wps/WPSLIST +++ b/wps/WPSLIST | |||
@@ -268,8 +268,6 @@ Author: Jens Arnold | |||
268 | <wps> | 268 | <wps> |
269 | Name: cabbiev2.wps | 269 | Name: cabbiev2.wps |
270 | RWPS: cabbiev2.rwps | 270 | RWPS: cabbiev2.rwps |
271 | SB: cabbiev2.sb | ||
272 | RSB: cabbiev2.rsb | ||
273 | # Real name of the creator of the WPS | 271 | # Real name of the creator of the WPS |
274 | Author: Johannes Voggenthaler, Apoo Maha, Marc Guay, Alex Vanderpol, Jerry Lange, Keith Perri, Mark Fawcus, and Marianne Arnold with support from Rockbox developers and forums. Based on Cabbie by Yohann Misquitta. | 272 | Author: Johannes Voggenthaler, Apoo Maha, Marc Guay, Alex Vanderpol, Jerry Lange, Keith Perri, Mark Fawcus, and Marianne Arnold with support from Rockbox developers and forums. Based on Cabbie by Yohann Misquitta. |
275 | 273 | ||
@@ -354,7 +352,6 @@ Statusbar: top | |||
354 | 352 | ||
355 | # list & remote ui viewports | 353 | # list & remote ui viewports |
356 | ui viewport: - | 354 | ui viewport: - |
357 | ui viewport.176x220x16: 0,0,-,180,-,-,- | ||
358 | remote ui viewport: - | 355 | remote ui viewport: - |
359 | </wps> | 356 | </wps> |
360 | 357 | ||
diff --git a/wps/cabbiev2.176x220x16.sb b/wps/cabbiev2.176x220x16.sb deleted file mode 100644 index 505b57f1c8..0000000000 --- a/wps/cabbiev2.176x220x16.sb +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | # cabbie 2.0 default for the Sansa e200 Series by Marc Guay | ||
2 | # derived from cabbie 2.0 default (C) 2007, Johannes Voggenthaler (Zinc Alloy) | ||
3 | %wd | ||
4 | %xl|A|lock-176x220x16.bmp|51|24|2| | ||
5 | %xl|B|battery-176x220x16.bmp|73|26|10| | ||
6 | %xl|C|volume-176x220x16.bmp|97|26|10| | ||
7 | %xl|D|shuffle-176x220x16.bmp|119|27| | ||
8 | %xl|E|repeat-176x220x16.bmp|144|24|4| | ||
9 | %xl|F|playmode-176x220x16.bmp|159|24|5| | ||
10 | #NowPlaying | ||
11 | %V|0|180|-|-|-|-|-| | ||
12 | %pb|pb-176x220x16.bmp|5|2|166|8| | ||
13 | %al %pc%ac%pp of %pe%ar%pr | ||
14 | %?mh<%xdAa|%xdAb> | ||
15 | %?bp<%?bc<%xdBa|%xdBb>|%?bl<|%xdBc|%xdBd|%xdBe|%xdBf|%xdBg|%xdBh|%xdBi|%xdBj>> | ||
16 | %?pv<%xdCa|%xdCb|%xdCc|%xdCd|%xdCe|%xdCf|%xdCg|%xdCh|%xdCi|%xdCj> | ||
17 | %?ps<%xdD> | ||
18 | %?mm<|%xdEa|%xdEb|%xdEc|%xdEd> | ||
19 | %?mp<%xdFa|%xdFb|%xdFc|%xdFd|%xdFe> | ||
20 | #%?C<%C> | ||
diff --git a/wps/wpsbuild.pl b/wps/wpsbuild.pl index 04e2846025..e9e5c29a30 100755 --- a/wps/wpsbuild.pl +++ b/wps/wpsbuild.pl | |||
@@ -32,18 +32,9 @@ my $cppdef = $target; | |||
32 | my @depthlist = ( 16, 8, 4, 2, 1 ); | 32 | my @depthlist = ( 16, 8, 4, 2, 1 ); |
33 | 33 | ||
34 | # These parameters are filled in as we parse wpslist | 34 | # These parameters are filled in as we parse wpslist |
35 | my $req_size; | ||
36 | my $req_g_wps; | ||
37 | my $req_t; | ||
38 | my $req_t_wps; | ||
39 | my $wps; | 35 | my $wps; |
40 | my $wps_prefix; | 36 | my $wps_prefix; |
41 | my $sb_prefix; | ||
42 | my $rwps; | 37 | my $rwps; |
43 | my $sb; | ||
44 | my $sb_w_size; | ||
45 | my $rsb; | ||
46 | my $rsb_w_size; | ||
47 | my $width; | 38 | my $width; |
48 | my $height; | 39 | my $height; |
49 | my $font; | 40 | my $font; |
@@ -51,6 +42,9 @@ my $fgcolor; | |||
51 | my $bgcolor; | 42 | my $bgcolor; |
52 | my $statusbar; | 43 | my $statusbar; |
53 | my $author; | 44 | my $author; |
45 | my $req_g; | ||
46 | my $req_g_wps; | ||
47 | my $req_t_wps; | ||
54 | my $backdrop; | 48 | my $backdrop; |
55 | my $lineselectstart; | 49 | my $lineselectstart; |
56 | my $lineselectend; | 50 | my $lineselectend; |
@@ -197,26 +191,12 @@ sub copywps | |||
197 | my $dir; | 191 | my $dir; |
198 | my @filelist; | 192 | my @filelist; |
199 | my $file; | 193 | my $file; |
200 | my $__sb; | ||
201 | 194 | ||
202 | if($wpslist =~ /(.*)WPSLIST/) { | 195 | if($wpslist =~ /(.*)WPSLIST/) { |
203 | $dir = $1; | 196 | $dir = $1; |
204 | $__sb = $sb_prefix . "." . $req_size . ".sb"; | ||
205 | print "$req_t_wps $req_g_wps $sb_prefix\n"; | ||
206 | print "$dir/$__sb\n"; | ||
207 | |||
208 | # system("cp $dir/$wps .rockbox/wps/"); | 197 | # system("cp $dir/$wps .rockbox/wps/"); |
209 | # check for <name>.WIDTHxHEIGHTxDEPTH.sb | 198 | #print "$req_t_wps $req_g_wps\n"; |
210 | if (-e "$dir/$__sb") { | 199 | |
211 | system("cp $dir/$__sb $rbdir/wps/$sb"); | ||
212 | } | ||
213 | # check for <name>.WIDTHxHEIGHTxDEPTH.<model>.sb and overwrite the | ||
214 | # previous sb if needed | ||
215 | $__sb = $sb_prefix . "." . $req_size . "." . $modelname . ".sb"; | ||
216 | if (-e "$dir/$__sb") { | ||
217 | system("cp $dir/$__sb $rbdir/wps/$sb"); | ||
218 | } | ||
219 | |||
220 | if (-e "$dir/$req_t_wps" ) { | 200 | if (-e "$dir/$req_t_wps" ) { |
221 | system("cp $dir/$req_t_wps $rbdir/wps/$wps"); | 201 | system("cp $dir/$req_t_wps $rbdir/wps/$wps"); |
222 | 202 | ||
@@ -230,9 +210,9 @@ sub copywps | |||
230 | close(WPSFILE); | 210 | close(WPSFILE); |
231 | 211 | ||
232 | if ($#filelist >= 0) { | 212 | if ($#filelist >= 0) { |
233 | if (-e "$dir/$wps_prefix/$req_size") { | 213 | if (-e "$dir/$wps_prefix/$req_g") { |
234 | foreach $file (@filelist) { | 214 | foreach $file (@filelist) { |
235 | system("cp $dir/$wps_prefix/$req_size/$file $rbdir/wps/$wps_prefix/"); | 215 | system("cp $dir/$wps_prefix/$req_g/$file $rbdir/wps/$wps_prefix/"); |
236 | } | 216 | } |
237 | } | 217 | } |
238 | elsif (-e "$dir/$wps_prefix") { | 218 | elsif (-e "$dir/$wps_prefix") { |
@@ -255,7 +235,7 @@ sub copywps | |||
255 | 235 | ||
256 | sub buildcfg { | 236 | sub buildcfg { |
257 | my $cfg = $wps; | 237 | my $cfg = $wps; |
258 | my @out; | 238 | my @out; |
259 | 239 | ||
260 | $cfg =~ s/\.(r|)wps/.cfg/; | 240 | $cfg =~ s/\.(r|)wps/.cfg/; |
261 | 241 | ||
@@ -358,8 +338,6 @@ while(<WPS>) { | |||
358 | undef $wps; | 338 | undef $wps; |
359 | undef $wps_prefix; | 339 | undef $wps_prefix; |
360 | undef $rwps; | 340 | undef $rwps; |
361 | undef $sb; | ||
362 | undef $rsb; | ||
363 | undef $width; | 341 | undef $width; |
364 | undef $height; | 342 | undef $height; |
365 | undef $font; | 343 | undef $font; |
@@ -408,24 +386,23 @@ while(<WPS>) { | |||
408 | foreach my $d (@depthlist) { | 386 | foreach my $d (@depthlist) { |
409 | next if ($d > $rdepth); | 387 | next if ($d > $rdepth); |
410 | 388 | ||
411 | $req_size = $rwidth . "x" . $rheight . "x" . $d; | 389 | $req_g = $rwidth . "x" . $rheight . "x" . $d; |
412 | 390 | ||
413 | # check for model specific wps | 391 | # check for model specific wps |
414 | $req_g_wps = $wps_prefix . "." . $req_size . "." . $modelname . ".wps"; | 392 | $req_g_wps = $wps_prefix . "." . $req_g . "." . $modelname . ".wps"; |
415 | last if (-e "$wpsdir/$req_g_wps"); | 393 | last if (-e "$wpsdir/$req_g_wps"); |
416 | 394 | ||
417 | # check for normal wps (with WIDTHxHEIGHTxDEPTH) | 395 | $req_g_wps = $wps_prefix . "." . $req_g . ".wps"; |
418 | $req_g_wps = $wps_prefix . "." . $req_size . ".wps"; | ||
419 | last if (-e "$wpsdir/$req_g_wps"); | 396 | last if (-e "$wpsdir/$req_g_wps"); |
420 | 397 | ||
421 | if ($isrwps) { | 398 | if ($isrwps) { |
422 | $req_size = $req_size . "." . $main_width . "x" . $main_height . "x" . "$main_depth"; | 399 | $req_g = $req_g . "." . $main_width . "x" . $main_height . "x" . "$main_depth"; |
423 | 400 | ||
424 | $req_g_wps = $wps_prefix . "." . $req_size . ".wps"; | 401 | $req_g_wps = $wps_prefix . "." . $req_g . ".wps"; |
425 | last if (-e "$wpsdir/$req_g_wps"); | 402 | last if (-e "$wpsdir/$req_g_wps"); |
426 | } | 403 | } |
427 | } | 404 | } |
428 | $req_t_wps = $wps_prefix . $req_t . ".wps"; | 405 | $req_t_wps = $wps_prefix . ".txt" . ".wps"; |
429 | 406 | ||
430 | #print "LCD: $wps wants $width x $height\n"; | 407 | #print "LCD: $wps wants $width x $height\n"; |
431 | #print "LCD: is $rwidth x $rheight\n"; | 408 | #print "LCD: is $rwidth x $rheight\n"; |
@@ -477,19 +454,6 @@ while(<WPS>) { | |||
477 | elsif($l =~ /^RWPS\.${main_width}x${main_height}x$main_depth: *(.*)/i) { | 454 | elsif($l =~ /^RWPS\.${main_width}x${main_height}x$main_depth: *(.*)/i) { |
478 | $rwps = $1; | 455 | $rwps = $1; |
479 | } | 456 | } |
480 | elsif($l =~ /^SB: *(.*)/i) { | ||
481 | $sb = $sb_prefix = $1; | ||
482 | $sb_prefix =~ s/\.(r|)sb//; | ||
483 | } | ||
484 | elsif($l =~ /^SB\.${main_width}x${main_height}x$main_depth: *(.*)/i) { | ||
485 | $sb = $1; | ||
486 | } | ||
487 | elsif($l =~ /^RSB: *(.*)/i) { | ||
488 | $rsb = $1; | ||
489 | } | ||
490 | elsif($l =~ /^RSB\.${main_width}x${main_height}x$main_depth: *(.*)/i) { | ||
491 | $rsb = $1; | ||
492 | } | ||
493 | elsif($l =~ /^Author: *(.*)/i) { | 457 | elsif($l =~ /^Author: *(.*)/i) { |
494 | $author = $1; | 458 | $author = $1; |
495 | } | 459 | } |
@@ -562,15 +526,9 @@ while(<WPS>) { | |||
562 | elsif($l =~ /^ui viewport: *(.*)/i) { | 526 | elsif($l =~ /^ui viewport: *(.*)/i) { |
563 | $listviewport = $1; | 527 | $listviewport = $1; |
564 | } | 528 | } |
565 | elsif($l =~ /^ui viewport\.${main_width}x${main_height}x$main_depth: *(.*)/i) { | ||
566 | $listviewport = $1; | ||
567 | } | ||
568 | elsif($l =~ /^remote ui viewport: *(.*)/i) { | 529 | elsif($l =~ /^remote ui viewport: *(.*)/i) { |
569 | $remotelistviewport = $1; | 530 | $remotelistviewport = $1; |
570 | } | 531 | } |
571 | elsif($l =~ /^remote ui viewport\.${main_width}x${main_height}x$main_depth: *(.*)/i) { | ||
572 | $remotelistviewport = $1; | ||
573 | } | ||
574 | else{ | 532 | else{ |
575 | #print "Unknown line: $l!\n"; | 533 | #print "Unknown line: $l!\n"; |
576 | } | 534 | } |