diff options
-rw-r--r-- | apps/SOURCES | 3 | ||||
-rw-r--r-- | apps/filetree.c | 21 | ||||
-rw-r--r-- | apps/filetypes.c | 6 | ||||
-rw-r--r-- | apps/filetypes.h | 2 | ||||
-rw-r--r-- | apps/gui/skin_engine/skin_display.c | 57 | ||||
-rw-r--r-- | apps/gui/skin_engine/skin_engine.h | 2 | ||||
-rw-r--r-- | apps/gui/skin_engine/skin_parser.c | 42 | ||||
-rw-r--r-- | apps/gui/skin_engine/wps_internals.h | 13 | ||||
-rw-r--r-- | apps/gui/statusbar-skinned.c | 152 | ||||
-rw-r--r-- | apps/gui/statusbar-skinned.h | 51 | ||||
-rw-r--r-- | apps/gui/statusbar.c | 3 | ||||
-rw-r--r-- | apps/gui/statusbar.h | 3 | ||||
-rw-r--r-- | apps/gui/viewport.c | 101 | ||||
-rw-r--r-- | apps/gui/viewport.h | 20 | ||||
-rw-r--r-- | apps/gui/wps.c | 26 | ||||
-rw-r--r-- | apps/lang/english.lang | 42 | ||||
-rw-r--r-- | apps/main.c | 3 | ||||
-rw-r--r-- | apps/menus/theme_menu.c | 8 | ||||
-rw-r--r-- | apps/playback.c | 2 | ||||
-rw-r--r-- | apps/plugin.c | 7 | ||||
-rw-r--r-- | apps/settings.c | 30 | ||||
-rw-r--r-- | apps/settings.h | 9 | ||||
-rw-r--r-- | apps/settings_list.c | 23 | ||||
-rw-r--r-- | wps/WPSLIST | 21 | ||||
-rwxr-xr-x | wps/wpsbuild.pl | 87 |
25 files changed, 586 insertions, 148 deletions
diff --git a/apps/SOURCES b/apps/SOURCES index bac376589a..f5bd9d819c 100644 --- a/apps/SOURCES +++ b/apps/SOURCES | |||
@@ -81,6 +81,9 @@ gui/wps.c | |||
81 | gui/scrollbar.c | 81 | gui/scrollbar.c |
82 | gui/splash.c | 82 | gui/splash.c |
83 | gui/statusbar.c | 83 | gui/statusbar.c |
84 | #ifdef HAVE_LCD_BITMAP | ||
85 | gui/statusbar-skinned.c | ||
86 | #endif | ||
84 | gui/yesno.c | 87 | gui/yesno.c |
85 | gui/viewport.c | 88 | gui/viewport.c |
86 | 89 | ||
diff --git a/apps/filetree.c b/apps/filetree.c index 3468051b55..d11b45a1f0 100644 --- a/apps/filetree.c +++ b/apps/filetree.c | |||
@@ -477,7 +477,26 @@ int ft_enter(struct tree_context* c) | |||
477 | break; | 477 | break; |
478 | #endif | 478 | #endif |
479 | 479 | ||
480 | 480 | #ifdef HAVE_LCD_BITMAP | |
481 | case FILE_ATTR_SBS: | ||
482 | splash(0, ID2P(LANG_WAIT)); | ||
483 | set_file(buf, (char *)global_settings.sbs_file, | ||
484 | MAX_FILENAME); | ||
485 | global_settings.statusbar = STATUSBAR_CUSTOM; | ||
486 | settings_apply_skins(); | ||
487 | viewportmanager_theme_changed(THEME_STATUSBAR); | ||
488 | break; | ||
489 | #endif | ||
490 | #ifdef HAVE_REMOTE_LCD | ||
491 | case FILE_ATTR_RSBS: | ||
492 | splash(0, ID2P(LANG_WAIT)); | ||
493 | set_file(buf, (char *)global_settings.rsbs_file, | ||
494 | MAX_FILENAME); | ||
495 | global_settings.remote_statusbar = STATUSBAR_CUSTOM; | ||
496 | settings_apply_skins(); | ||
497 | viewportmanager_theme_changed(THEME_STATUSBAR); | ||
498 | break; | ||
499 | #endif | ||
481 | /* wps config file */ | 500 | /* wps config file */ |
482 | case FILE_ATTR_WPS: | 501 | case FILE_ATTR_WPS: |
483 | splash(0, ID2P(LANG_WAIT)); | 502 | splash(0, ID2P(LANG_WAIT)); |
diff --git a/apps/filetypes.c b/apps/filetypes.c index ed3d938fe9..2c737ce883 100644 --- a/apps/filetypes.c +++ b/apps/filetypes.c | |||
@@ -108,6 +108,12 @@ static const struct filetype inbuilt_filetypes[] = { | |||
108 | #endif | 108 | #endif |
109 | { "bmark",FILE_ATTR_BMARK, Icon_Bookmark, VOICE_EXT_BMARK }, | 109 | { "bmark",FILE_ATTR_BMARK, Icon_Bookmark, VOICE_EXT_BMARK }, |
110 | { "cue", FILE_ATTR_CUE, Icon_Bookmark, VOICE_EXT_CUESHEET }, | 110 | { "cue", FILE_ATTR_CUE, Icon_Bookmark, VOICE_EXT_CUESHEET }, |
111 | #ifdef HAVE_LCD_BITMAP | ||
112 | { "sbs", FILE_ATTR_SBS, Icon_Wps, VOICE_EXT_SBS }, | ||
113 | #endif | ||
114 | #ifdef HAVE_REMOTE_LCD | ||
115 | { "rsbs", FILE_ATTR_RSBS, Icon_Wps, VOICE_EXT_RSBS }, | ||
116 | #endif | ||
111 | #ifdef BOOTFILE_EXT | 117 | #ifdef BOOTFILE_EXT |
112 | { BOOTFILE_EXT, FILE_ATTR_MOD, Icon_Firmware, VOICE_EXT_AJZ }, | 118 | { BOOTFILE_EXT, FILE_ATTR_MOD, Icon_Firmware, VOICE_EXT_AJZ }, |
113 | #endif | 119 | #endif |
diff --git a/apps/filetypes.h b/apps/filetypes.h index f872cf86f0..d3846b03bf 100644 --- a/apps/filetypes.h +++ b/apps/filetypes.h | |||
@@ -41,6 +41,8 @@ | |||
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_SBS 0x0F00 /* statusbar file */ | ||
45 | #define FILE_ATTR_RSBS 0x1000 /* remote statusbar file */ | ||
44 | #define FILE_ATTR_MASK 0xFF00 /* which bits tree.c uses for file types */ | 46 | #define FILE_ATTR_MASK 0xFF00 /* which bits tree.c uses for file types */ |
45 | 47 | ||
46 | struct filetype { | 48 | struct filetype { |
diff --git a/apps/gui/skin_engine/skin_display.c b/apps/gui/skin_engine/skin_display.c index 8abbcddb39..66675ce95a 100644 --- a/apps/gui/skin_engine/skin_display.c +++ b/apps/gui/skin_engine/skin_display.c | |||
@@ -64,6 +64,7 @@ | |||
64 | 64 | ||
65 | #include "wps_internals.h" | 65 | #include "wps_internals.h" |
66 | #include "skin_engine.h" | 66 | #include "skin_engine.h" |
67 | #include "statusbar-skinned.h" | ||
67 | 68 | ||
68 | static bool skin_redraw(struct gui_wps *gwps, unsigned refresh_mode); | 69 | static bool skin_redraw(struct gui_wps *gwps, unsigned refresh_mode); |
69 | 70 | ||
@@ -83,7 +84,6 @@ bool gui_wps_display(struct gui_wps *gwps) | |||
83 | vp->bg_pattern = display->get_background(); | 84 | vp->bg_pattern = display->get_background(); |
84 | } | 85 | } |
85 | #endif | 86 | #endif |
86 | display->clear_display(); | ||
87 | display->backdrop_show(BACKDROP_SKIN_WPS); | 87 | display->backdrop_show(BACKDROP_SKIN_WPS); |
88 | return skin_redraw(gwps, WPS_REFRESH_ALL); | 88 | return skin_redraw(gwps, WPS_REFRESH_ALL); |
89 | } | 89 | } |
@@ -115,28 +115,30 @@ void skin_statusbar_changed(struct gui_wps *skin) | |||
115 | return; | 115 | return; |
116 | struct wps_data *data = skin->data; | 116 | struct wps_data *data = skin->data; |
117 | const struct screen *display = skin->display; | 117 | const struct screen *display = skin->display; |
118 | const int screen = display->screen_type; | ||
118 | 119 | ||
119 | struct viewport *vp = &find_viewport(VP_DEFAULT_LABEL, data)->vp; | 120 | struct viewport *vp = &find_viewport(VP_DEFAULT_LABEL, data)->vp; |
120 | viewport_set_fullscreen(vp, display->screen_type); | 121 | viewport_set_fullscreen(vp, screen); |
121 | 122 | ||
122 | if (data->wps_sb_tag) | 123 | if (data->wps_sb_tag) |
123 | { /* fix up the default viewport */ | 124 | { /* fix up the default viewport */ |
124 | if (data->show_sb_on_wps) | 125 | if (data->show_sb_on_wps) |
125 | { | 126 | { |
126 | bool bar_at_top = | 127 | if (statusbar_position(screen) != STATUSBAR_OFF) |
127 | statusbar_position(display->screen_type) != STATUSBAR_BOTTOM; | 128 | return; /* vp is fixed already */ |
128 | 129 | ||
129 | vp->y = bar_at_top?STATUSBAR_HEIGHT:0; | 130 | vp->y = STATUSBAR_HEIGHT; |
130 | vp->height = display->lcdheight - STATUSBAR_HEIGHT; | 131 | vp->height = display->lcdheight - STATUSBAR_HEIGHT; |
131 | } | 132 | } |
132 | else | 133 | else |
133 | { | 134 | { |
134 | vp->y = 0; | 135 | if (statusbar_position(screen) == STATUSBAR_OFF) |
136 | return; /* vp is fixed already */ | ||
137 | vp->y = vp->x = 0; | ||
135 | vp->height = display->lcdheight; | 138 | vp->height = display->lcdheight; |
139 | vp->width = display->lcdwidth; | ||
136 | } | 140 | } |
137 | } | 141 | } |
138 | |||
139 | |||
140 | } | 142 | } |
141 | 143 | ||
142 | static void draw_progressbar(struct gui_wps *gwps, | 144 | static void draw_progressbar(struct gui_wps *gwps, |
@@ -168,7 +170,7 @@ static void draw_progressbar(struct gui_wps *gwps, | |||
168 | elapsed = 0; | 170 | elapsed = 0; |
169 | length = 0; | 171 | length = 0; |
170 | } | 172 | } |
171 | 173 | ||
172 | if (pb->have_bitmap_pb) | 174 | if (pb->have_bitmap_pb) |
173 | gui_bitmap_scrollbar_draw(display, pb->bm, | 175 | gui_bitmap_scrollbar_draw(display, pb->bm, |
174 | pb->x, y, pb->width, pb->bm.height, | 176 | pb->x, y, pb->width, pb->bm.height, |
@@ -256,7 +258,7 @@ static void wps_display_images(struct gui_wps *gwps, struct viewport* vp) | |||
256 | } | 258 | } |
257 | #ifdef HAVE_ALBUMART | 259 | #ifdef HAVE_ALBUMART |
258 | /* now draw the AA */ | 260 | /* now draw the AA */ |
259 | if (data->albumart && data->albumart->vp == vp | 261 | if (data->albumart && data->albumart->vp == vp |
260 | && data->albumart->draw) | 262 | && data->albumart->draw) |
261 | { | 263 | { |
262 | draw_album_art(gwps, playback_current_aa_hid(data->playback_aa_slot), | 264 | draw_album_art(gwps, playback_current_aa_hid(data->playback_aa_slot), |
@@ -496,6 +498,7 @@ static bool evaluate_conditional(struct gui_wps *gwps, int *token_index) | |||
496 | 498 | ||
497 | return true; | 499 | return true; |
498 | } | 500 | } |
501 | |||
499 | #ifdef HAVE_LCD_BITMAP | 502 | #ifdef HAVE_LCD_BITMAP |
500 | struct gui_img* find_image(char label, struct wps_data *data) | 503 | struct gui_img* find_image(char label, struct wps_data *data) |
501 | { | 504 | { |
@@ -946,15 +949,19 @@ static bool skin_redraw(struct gui_wps *gwps, unsigned refresh_mode) | |||
946 | if (refresh_mode == WPS_REFRESH_ALL) | 949 | if (refresh_mode == WPS_REFRESH_ALL) |
947 | { | 950 | { |
948 | struct skin_line *line; | 951 | struct skin_line *line; |
952 | struct skin_viewport *skin_viewport = find_viewport(VP_DEFAULT_LABEL, data); | ||
949 | 953 | ||
950 | display->set_viewport(&find_viewport(VP_DEFAULT_LABEL, data)->vp); | 954 | if (!(skin_viewport->hidden_flags & VP_NEVER_VISIBLE)) |
951 | display->clear_viewport(); | 955 | { |
956 | display->set_viewport(&skin_viewport->vp); | ||
957 | display->clear_viewport(); | ||
958 | } | ||
952 | 959 | ||
953 | for (viewport_list = data->viewports; | 960 | for (viewport_list = data->viewports; |
954 | viewport_list; viewport_list = viewport_list->next) | 961 | viewport_list; viewport_list = viewport_list->next) |
955 | { | 962 | { |
956 | struct skin_viewport *skin_viewport = | 963 | skin_viewport = |
957 | (struct skin_viewport *)viewport_list->token->value.data; | 964 | (struct skin_viewport *)viewport_list->token->value.data; |
958 | for(line = skin_viewport->lines; line; line = line->next) | 965 | for(line = skin_viewport->lines; line; line = line->next) |
959 | { | 966 | { |
960 | line->curr_subline = NULL; | 967 | line->curr_subline = NULL; |
@@ -977,6 +984,10 @@ static bool skin_redraw(struct gui_wps *gwps, unsigned refresh_mode) | |||
977 | { | 984 | { |
978 | struct skin_viewport *skin_viewport = | 985 | struct skin_viewport *skin_viewport = |
979 | (struct skin_viewport *)viewport_list->token->value.data; | 986 | (struct skin_viewport *)viewport_list->token->value.data; |
987 | if (skin_viewport->hidden_flags&VP_NEVER_VISIBLE) | ||
988 | { | ||
989 | continue; | ||
990 | } | ||
980 | if (skin_viewport->hidden_flags&VP_DRAW_HIDEABLE) | 991 | if (skin_viewport->hidden_flags&VP_DRAW_HIDEABLE) |
981 | { | 992 | { |
982 | if (skin_viewport->hidden_flags&VP_DRAW_HIDDEN) | 993 | if (skin_viewport->hidden_flags&VP_DRAW_HIDDEN) |
@@ -992,8 +1003,11 @@ static bool skin_redraw(struct gui_wps *gwps, unsigned refresh_mode) | |||
992 | struct skin_viewport *skin_viewport = | 1003 | struct skin_viewport *skin_viewport = |
993 | (struct skin_viewport *)viewport_list->token->value.data; | 1004 | (struct skin_viewport *)viewport_list->token->value.data; |
994 | unsigned vp_refresh_mode = refresh_mode; | 1005 | unsigned vp_refresh_mode = refresh_mode; |
1006 | |||
995 | display->set_viewport(&skin_viewport->vp); | 1007 | display->set_viewport(&skin_viewport->vp); |
996 | 1008 | ||
1009 | int hidden_vp = 0; | ||
1010 | |||
997 | #ifdef HAVE_LCD_BITMAP | 1011 | #ifdef HAVE_LCD_BITMAP |
998 | /* Set images to not to be displayed */ | 1012 | /* Set images to not to be displayed */ |
999 | struct skin_token_list *imglist = data->images; | 1013 | struct skin_token_list *imglist = data->images; |
@@ -1005,7 +1019,11 @@ static bool skin_redraw(struct gui_wps *gwps, unsigned refresh_mode) | |||
1005 | } | 1019 | } |
1006 | #endif | 1020 | #endif |
1007 | /* dont redraw the viewport if its disabled */ | 1021 | /* dont redraw the viewport if its disabled */ |
1008 | if ((skin_viewport->hidden_flags&VP_DRAW_HIDDEN)) | 1022 | if (skin_viewport->hidden_flags&VP_NEVER_VISIBLE) |
1023 | { /* don't draw anything into this one */ | ||
1024 | vp_refresh_mode = 0; hidden_vp = true; | ||
1025 | } | ||
1026 | else if ((skin_viewport->hidden_flags&VP_DRAW_HIDDEN)) | ||
1009 | { | 1027 | { |
1010 | if (!(skin_viewport->hidden_flags&VP_DRAW_WASHIDDEN)) | 1028 | if (!(skin_viewport->hidden_flags&VP_DRAW_WASHIDDEN)) |
1011 | display->scroll_stop(&skin_viewport->vp); | 1029 | display->scroll_stop(&skin_viewport->vp); |
@@ -1019,6 +1037,7 @@ static bool skin_redraw(struct gui_wps *gwps, unsigned refresh_mode) | |||
1019 | vp_refresh_mode = WPS_REFRESH_ALL; | 1037 | vp_refresh_mode = WPS_REFRESH_ALL; |
1020 | skin_viewport->hidden_flags = VP_DRAW_HIDEABLE; | 1038 | skin_viewport->hidden_flags = VP_DRAW_HIDEABLE; |
1021 | } | 1039 | } |
1040 | |||
1022 | if (vp_refresh_mode == WPS_REFRESH_ALL) | 1041 | if (vp_refresh_mode == WPS_REFRESH_ALL) |
1023 | { | 1042 | { |
1024 | display->clear_viewport(); | 1043 | display->clear_viewport(); |
@@ -1040,7 +1059,7 @@ static bool skin_redraw(struct gui_wps *gwps, unsigned refresh_mode) | |||
1040 | flags = line->curr_subline->line_type; | 1059 | flags = line->curr_subline->line_type; |
1041 | 1060 | ||
1042 | if (vp_refresh_mode == WPS_REFRESH_ALL || (flags & vp_refresh_mode) | 1061 | if (vp_refresh_mode == WPS_REFRESH_ALL || (flags & vp_refresh_mode) |
1043 | || new_subline_refresh) | 1062 | || new_subline_refresh || hidden_vp) |
1044 | { | 1063 | { |
1045 | /* get_line tells us if we need to update the line */ | 1064 | /* get_line tells us if we need to update the line */ |
1046 | update_line = get_line(gwps, subline, | 1065 | update_line = get_line(gwps, subline, |
@@ -1086,7 +1105,7 @@ static bool skin_redraw(struct gui_wps *gwps, unsigned refresh_mode) | |||
1086 | } | 1105 | } |
1087 | #endif | 1106 | #endif |
1088 | 1107 | ||
1089 | if (update_line && | 1108 | if (update_line && !hidden_vp && |
1090 | /* conditionals clear the line which means if the %Vd is put into the default | 1109 | /* conditionals clear the line which means if the %Vd is put into the default |
1091 | viewport there will be a blank line. | 1110 | viewport there will be a blank line. |
1092 | To get around this we dont allow any actual drawing to happen in the | 1111 | To get around this we dont allow any actual drawing to happen in the |
@@ -1105,7 +1124,6 @@ static bool skin_redraw(struct gui_wps *gwps, unsigned refresh_mode) | |||
1105 | write_line(display, &align, line_count, false); | 1124 | write_line(display, &align, line_count, false); |
1106 | } | 1125 | } |
1107 | } | 1126 | } |
1108 | |||
1109 | #ifdef HAVE_LCD_BITMAP | 1127 | #ifdef HAVE_LCD_BITMAP |
1110 | /* progressbar */ | 1128 | /* progressbar */ |
1111 | if (vp_refresh_mode & WPS_REFRESH_PLAYER_PROGRESS) | 1129 | if (vp_refresh_mode & WPS_REFRESH_PLAYER_PROGRESS) |
@@ -1116,7 +1134,8 @@ static bool skin_redraw(struct gui_wps *gwps, unsigned refresh_mode) | |||
1116 | } | 1134 | } |
1117 | } | 1135 | } |
1118 | /* Now display any images in this viewport */ | 1136 | /* Now display any images in this viewport */ |
1119 | wps_display_images(gwps, &skin_viewport->vp); | 1137 | if (!hidden_vp) |
1138 | wps_display_images(gwps, &skin_viewport->vp); | ||
1120 | #endif | 1139 | #endif |
1121 | } | 1140 | } |
1122 | 1141 | ||
diff --git a/apps/gui/skin_engine/skin_engine.h b/apps/gui/skin_engine/skin_engine.h index c52f720d06..704a7851c2 100644 --- a/apps/gui/skin_engine/skin_engine.h +++ b/apps/gui/skin_engine/skin_engine.h | |||
@@ -27,7 +27,6 @@ | |||
27 | 27 | ||
28 | #include "wps_internals.h" /* TODO: remove this line.. shoudlnt be needed */ | 28 | #include "wps_internals.h" /* TODO: remove this line.. shoudlnt be needed */ |
29 | 29 | ||
30 | |||
31 | #ifdef HAVE_TOUCHSCREEN | 30 | #ifdef HAVE_TOUCHSCREEN |
32 | int wps_get_touchaction(struct wps_data *data); | 31 | int wps_get_touchaction(struct wps_data *data); |
33 | #endif | 32 | #endif |
@@ -44,7 +43,6 @@ bool skin_update(struct gui_wps *gwps, unsigned int update_type); | |||
44 | * or from a skinfile (isfile = true) | 43 | * or from a skinfile (isfile = true) |
45 | */ | 44 | */ |
46 | bool skin_data_load(struct wps_data *wps_data, | 45 | bool skin_data_load(struct wps_data *wps_data, |
47 | struct screen *display, | ||
48 | const char *buf, | 46 | const char *buf, |
49 | bool isfile); | 47 | bool isfile); |
50 | 48 | ||
diff --git a/apps/gui/skin_engine/skin_parser.c b/apps/gui/skin_engine/skin_parser.c index fa35ed994f..434e7c9fa5 100644 --- a/apps/gui/skin_engine/skin_parser.c +++ b/apps/gui/skin_engine/skin_parser.c | |||
@@ -683,8 +683,15 @@ static int parse_viewport(const char *wps_bufptr, | |||
683 | curr_line = NULL; | 683 | curr_line = NULL; |
684 | if (!skin_start_new_line(skin_vp, wps_data->num_tokens)) | 684 | if (!skin_start_new_line(skin_vp, wps_data->num_tokens)) |
685 | return WPS_ERROR_INVALID_PARAM; | 685 | return WPS_ERROR_INVALID_PARAM; |
686 | 686 | ||
687 | if (*ptr == 'l') | 687 | |
688 | if (*ptr == 'i') | ||
689 | { | ||
690 | skin_vp->label = VP_INFO_LABEL; | ||
691 | skin_vp->hidden_flags = VP_NEVER_VISIBLE; | ||
692 | ++ptr; | ||
693 | } | ||
694 | else if (*ptr == 'l') | ||
688 | { | 695 | { |
689 | if (*(ptr+1) == '|') | 696 | if (*(ptr+1) == '|') |
690 | { | 697 | { |
@@ -1674,7 +1681,6 @@ static bool load_skin_bmp(struct wps_data *wps_data, struct bitmap *bitmap, char | |||
1674 | else | 1681 | else |
1675 | { | 1682 | { |
1676 | /* Abort if we can't load an image */ | 1683 | /* Abort if we can't load an image */ |
1677 | DEBUGF("ERR: Failed to load image - %s\n",img_path); | ||
1678 | loaded = false; | 1684 | loaded = false; |
1679 | } | 1685 | } |
1680 | return loaded; | 1686 | return loaded; |
@@ -1733,7 +1739,6 @@ static bool load_skin_bitmaps(struct wps_data *wps_data, char *bmpdir) | |||
1733 | /* to setup up the wps-data from a format-buffer (isfile = false) | 1739 | /* to setup up the wps-data from a format-buffer (isfile = false) |
1734 | from a (wps-)file (isfile = true)*/ | 1740 | from a (wps-)file (isfile = true)*/ |
1735 | bool skin_data_load(struct wps_data *wps_data, | 1741 | bool skin_data_load(struct wps_data *wps_data, |
1736 | struct screen *display, | ||
1737 | const char *buf, | 1742 | const char *buf, |
1738 | bool isfile) | 1743 | bool isfile) |
1739 | { | 1744 | { |
@@ -1755,6 +1760,7 @@ bool skin_data_load(struct wps_data *wps_data, | |||
1755 | 1760 | ||
1756 | skin_data_reset(wps_data); | 1761 | skin_data_reset(wps_data); |
1757 | 1762 | ||
1763 | /* alloc default viewport, will be fixed up later */ | ||
1758 | curr_vp = skin_buffer_alloc(sizeof(struct skin_viewport)); | 1764 | curr_vp = skin_buffer_alloc(sizeof(struct skin_viewport)); |
1759 | if (!curr_vp) | 1765 | if (!curr_vp) |
1760 | return false; | 1766 | return false; |
@@ -1766,9 +1772,6 @@ bool skin_data_load(struct wps_data *wps_data, | |||
1766 | 1772 | ||
1767 | /* Initialise the first (default) viewport */ | 1773 | /* Initialise the first (default) viewport */ |
1768 | curr_vp->label = VP_DEFAULT_LABEL; | 1774 | curr_vp->label = VP_DEFAULT_LABEL; |
1769 | curr_vp->vp.x = 0; | ||
1770 | curr_vp->vp.width = display->getwidth(); | ||
1771 | curr_vp->vp.height = display->getheight(); | ||
1772 | curr_vp->pb = NULL; | 1775 | curr_vp->pb = NULL; |
1773 | curr_vp->hidden_flags = 0; | 1776 | curr_vp->hidden_flags = 0; |
1774 | curr_vp->lines = NULL; | 1777 | curr_vp->lines = NULL; |
@@ -1777,31 +1780,6 @@ bool skin_data_load(struct wps_data *wps_data, | |||
1777 | if (!skin_start_new_line(curr_vp, 0)) | 1780 | if (!skin_start_new_line(curr_vp, 0)) |
1778 | return false; | 1781 | return false; |
1779 | 1782 | ||
1780 | switch (statusbar_position(display->screen_type)) | ||
1781 | { | ||
1782 | case STATUSBAR_OFF: | ||
1783 | curr_vp->vp.y = 0; | ||
1784 | break; | ||
1785 | case STATUSBAR_TOP: | ||
1786 | curr_vp->vp.y = STATUSBAR_HEIGHT; | ||
1787 | curr_vp->vp.height -= STATUSBAR_HEIGHT; | ||
1788 | break; | ||
1789 | case STATUSBAR_BOTTOM: | ||
1790 | curr_vp->vp.y = 0; | ||
1791 | curr_vp->vp.height -= STATUSBAR_HEIGHT; | ||
1792 | break; | ||
1793 | } | ||
1794 | #ifdef HAVE_LCD_BITMAP | ||
1795 | curr_vp->vp.font = FONT_UI; | ||
1796 | curr_vp->vp.drawmode = DRMODE_SOLID; | ||
1797 | #endif | ||
1798 | #if LCD_DEPTH > 1 | ||
1799 | if (display->depth > 1) | ||
1800 | { | ||
1801 | curr_vp->vp.fg_pattern = display->get_foreground(); | ||
1802 | curr_vp->vp.bg_pattern = display->get_background(); | ||
1803 | } | ||
1804 | #endif | ||
1805 | if (!isfile) | 1783 | if (!isfile) |
1806 | { | 1784 | { |
1807 | return wps_parse(wps_data, buf, false); | 1785 | return wps_parse(wps_data, buf, false); |
diff --git a/apps/gui/skin_engine/wps_internals.h b/apps/gui/skin_engine/wps_internals.h index e0e2882556..3dbf4e0087 100644 --- a/apps/gui/skin_engine/wps_internals.h +++ b/apps/gui/skin_engine/wps_internals.h | |||
@@ -191,11 +191,14 @@ struct skin_line { | |||
191 | struct skin_line *next; | 191 | struct skin_line *next; |
192 | }; | 192 | }; |
193 | 193 | ||
194 | #define VP_DRAW_HIDEABLE 0x1 | 194 | #define VP_DRAW_HIDEABLE 0x1 |
195 | #define VP_DRAW_HIDDEN 0x2 | 195 | #define VP_DRAW_HIDDEN 0x2 |
196 | #define VP_DRAW_WASHIDDEN 0x4 | 196 | #define VP_DRAW_WASHIDDEN 0x4 |
197 | #define VP_DEFAULT_LABEL '|' | 197 | /* these are never drawn, nor cleared, i.e. just ignored */ |
198 | #define VP_NO_LABEL '-' | 198 | #define VP_NEVER_VISIBLE 0x8 |
199 | #define VP_DEFAULT_LABEL '|' | ||
200 | #define VP_NO_LABEL '-' | ||
201 | #define VP_INFO_LABEL '_' | ||
199 | struct skin_viewport { | 202 | struct skin_viewport { |
200 | struct viewport vp; /* The LCD viewport struct */ | 203 | struct viewport vp; /* The LCD viewport struct */ |
201 | struct progressbar *pb; | 204 | struct progressbar *pb; |
diff --git a/apps/gui/statusbar-skinned.c b/apps/gui/statusbar-skinned.c new file mode 100644 index 0000000000..1cb6aa3623 --- /dev/null +++ b/apps/gui/statusbar-skinned.c | |||
@@ -0,0 +1,152 @@ | |||
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 | |||
22 | #include "config.h" | ||
23 | |||
24 | #include "system.h" | ||
25 | #include "settings.h" | ||
26 | #include "appevents.h" | ||
27 | #include "screens.h" | ||
28 | #include "screen_access.h" | ||
29 | #include "skin_engine/skin_engine.h" | ||
30 | #include "skin_engine/wps_internals.h" | ||
31 | #include "viewport.h" | ||
32 | #include "statusbar.h" | ||
33 | #include "statusbar-skinned.h" | ||
34 | #include "debug.h" | ||
35 | |||
36 | |||
37 | /* currently only one wps_state is needed */ | ||
38 | extern struct wps_state wps_state; /* from wps.c */ | ||
39 | static struct gui_wps sb_skin[NB_SCREENS] = {{ .data = NULL }}; | ||
40 | static struct wps_data sb_skin_data[NB_SCREENS] = {{ .wps_loaded = 0 }}; | ||
41 | |||
42 | /* initial setup of wps_data */ | ||
43 | static void sb_skin_update(void*); | ||
44 | static bool loaded_ok[NB_SCREENS] = { false }; | ||
45 | static int skinbars = 0; | ||
46 | static int update_delay = DEFAULT_UPDATE_DELAY; | ||
47 | |||
48 | |||
49 | void sb_skin_data_load(enum screen_type screen, const char *buf, bool isfile) | ||
50 | { | ||
51 | struct wps_data *data = sb_skin[screen].data; | ||
52 | |||
53 | int success; | ||
54 | success = buf && skin_data_load(data, buf, isfile); | ||
55 | |||
56 | if (success) | ||
57 | { /* hide the sb's default viewport because it has nasty effect with stuff | ||
58 | * not part of the statusbar, | ||
59 | * hence .sbs's without any other vps are unsupported*/ | ||
60 | struct skin_viewport *vp = find_viewport(VP_DEFAULT_LABEL, data); | ||
61 | struct skin_token_list *next_vp = data->viewports->next; | ||
62 | |||
63 | if (!next_vp) | ||
64 | { /* no second viewport, let parsing fail */ | ||
65 | success = false; | ||
66 | } | ||
67 | /* hide this viewport, forever */ | ||
68 | vp->hidden_flags = VP_NEVER_VISIBLE; | ||
69 | } | ||
70 | |||
71 | if (!success) | ||
72 | remove_event(GUI_EVENT_ACTIONUPDATE, sb_skin_update); | ||
73 | |||
74 | #ifdef HAVE_REMOVE_LCD | ||
75 | data->remote_wps = !(screen == SCREEN_MAIN); | ||
76 | #endif | ||
77 | loaded_ok[screen] = success; | ||
78 | } | ||
79 | |||
80 | struct viewport *sb_skin_get_info_vp(enum screen_type screen) | ||
81 | { | ||
82 | return &find_viewport(VP_INFO_LABEL, sb_skin[screen].data)->vp; | ||
83 | } | ||
84 | |||
85 | inline bool sb_skin_get_state(enum screen_type screen) | ||
86 | { | ||
87 | return loaded_ok[screen] && (skinbars & VP_SB_ONSCREEN(screen)); | ||
88 | } | ||
89 | |||
90 | void sb_skin_set_state(int state, enum screen_type screen) | ||
91 | { | ||
92 | sb_skin[screen].state->do_full_update = true; | ||
93 | if (state) | ||
94 | { | ||
95 | skinbars |= VP_SB_ONSCREEN(screen); | ||
96 | } | ||
97 | else | ||
98 | { | ||
99 | skinbars &= ~VP_SB_ONSCREEN(screen); | ||
100 | } | ||
101 | |||
102 | if (skinbars) | ||
103 | add_event(GUI_EVENT_ACTIONUPDATE, false, sb_skin_update); | ||
104 | else | ||
105 | remove_event(GUI_EVENT_ACTIONUPDATE, sb_skin_update); | ||
106 | } | ||
107 | |||
108 | static void sb_skin_update(void* param) | ||
109 | { | ||
110 | static long next_update = 0; | ||
111 | int i; | ||
112 | int forced_draw = param || sb_skin[SCREEN_MAIN].state->do_full_update; | ||
113 | if (TIME_AFTER(current_tick, next_update) || forced_draw) | ||
114 | { | ||
115 | FOR_NB_SCREENS(i) | ||
116 | { | ||
117 | if (sb_skin_get_state(i)) | ||
118 | { | ||
119 | skin_update(&sb_skin[i], forced_draw? | ||
120 | WPS_REFRESH_ALL : WPS_REFRESH_NON_STATIC); | ||
121 | } | ||
122 | } | ||
123 | next_update = current_tick + update_delay; /* don't update too often */ | ||
124 | sb_skin[SCREEN_MAIN].state->do_full_update = false; | ||
125 | } | ||
126 | } | ||
127 | |||
128 | void sb_skin_set_update_delay(int delay) | ||
129 | { | ||
130 | update_delay = delay; | ||
131 | } | ||
132 | |||
133 | void sb_skin_init(void) | ||
134 | { | ||
135 | int i; | ||
136 | FOR_NB_SCREENS(i) | ||
137 | { | ||
138 | #ifdef HAVE_ALBUMART | ||
139 | sb_skin_data[i].albumart = NULL; | ||
140 | sb_skin_data[i].playback_aa_slot = -1; | ||
141 | #endif | ||
142 | #ifdef HAVE_REMOTE_LCD | ||
143 | sb_skin_data[i].remote_wps = (i == SCREEN_REMOTE); | ||
144 | #endif | ||
145 | sb_skin[i].data = &sb_skin_data[i]; | ||
146 | sb_skin[i].display = &screens[i]; | ||
147 | /* Currently no seperate wps_state needed/possible | ||
148 | so use the only available ( "global" ) one */ | ||
149 | sb_skin[i].state = &wps_state; | ||
150 | sb_skin[i].statusbars = &skinbars; | ||
151 | } | ||
152 | } | ||
diff --git a/apps/gui/statusbar-skinned.h b/apps/gui/statusbar-skinned.h new file mode 100644 index 0000000000..7c81eb8d01 --- /dev/null +++ b/apps/gui/statusbar-skinned.h | |||
@@ -0,0 +1,51 @@ | |||
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 | #ifndef __STATUSBAR_SKINNED_H__ | ||
22 | #define __STATUSBAR_SKINNED_H__ | ||
23 | |||
24 | #define DEFAULT_UPDATE_DELAY (HZ/7) | ||
25 | |||
26 | #ifdef HAVE_LCD_BITMAP | ||
27 | |||
28 | #include <stdio.h> | ||
29 | #include <string.h> | ||
30 | #include <stdlib.h> | ||
31 | #include "config.h" | ||
32 | |||
33 | |||
34 | void sb_skin_data_load(enum screen_type screen, const char *buf, bool isfile); | ||
35 | |||
36 | /* probably temporary, to shut the classic statusbar up */ | ||
37 | bool sb_skin_get_state(enum screen_type screen); | ||
38 | void sb_skin_set_state(int state, enum screen_type screen); | ||
39 | void sb_skin_init(void); | ||
40 | struct viewport *sb_skin_get_info_vp(enum screen_type screen); | ||
41 | |||
42 | void sb_skin_set_update_delay(int delay); | ||
43 | |||
44 | #else /* CHARCELL */ | ||
45 | #define sb_skin_init() | ||
46 | #define sb_skin_data_load(a,b,c) | ||
47 | #define sb_skin_set_update_delay(a) | ||
48 | #define sb_skin_set_state(a,b) | ||
49 | #define sb_skin_get_state(a) | ||
50 | #endif | ||
51 | #endif /* __STATUSBAR_SKINNED_H__ */ | ||
diff --git a/apps/gui/statusbar.c b/apps/gui/statusbar.c index 5aac200157..4710ebac42 100644 --- a/apps/gui/statusbar.c +++ b/apps/gui/statusbar.c | |||
@@ -188,6 +188,9 @@ void gui_statusbar_draw(struct gui_statusbar * bar, bool force_redraw) | |||
188 | { | 188 | { |
189 | struct screen * display = bar->display; | 189 | struct screen * display = bar->display; |
190 | 190 | ||
191 | if (!display) | ||
192 | return; | ||
193 | |||
191 | #ifdef HAVE_LCD_CHARCELLS | 194 | #ifdef HAVE_LCD_CHARCELLS |
192 | int val; | 195 | int val; |
193 | (void)force_redraw; /* The Player always has "redraw" */ | 196 | (void)force_redraw; /* The Player always has "redraw" */ |
diff --git a/apps/gui/statusbar.h b/apps/gui/statusbar.h index 84d37858e2..b25edbfab3 100644 --- a/apps/gui/statusbar.h +++ b/apps/gui/statusbar.h | |||
@@ -55,7 +55,8 @@ struct status_info { | |||
55 | }; | 55 | }; |
56 | 56 | ||
57 | /* statusbar visibility/position, used for settings also */ | 57 | /* statusbar visibility/position, used for settings also */ |
58 | enum statusbar_values { STATUSBAR_OFF = 0, STATUSBAR_TOP, STATUSBAR_BOTTOM }; | 58 | enum statusbar_values { STATUSBAR_OFF = 0, STATUSBAR_TOP, STATUSBAR_BOTTOM, |
59 | STATUSBAR_CUSTOM }; | ||
59 | 60 | ||
60 | struct gui_statusbar | 61 | struct gui_statusbar |
61 | { | 62 | { |
diff --git a/apps/gui/viewport.c b/apps/gui/viewport.c index fdd06bdc46..f39a299521 100644 --- a/apps/gui/viewport.c +++ b/apps/gui/viewport.c | |||
@@ -58,6 +58,9 @@ | |||
58 | #ifdef HAVE_LCD_BITMAP | 58 | #ifdef HAVE_LCD_BITMAP |
59 | #include "language.h" | 59 | #include "language.h" |
60 | #endif | 60 | #endif |
61 | #include "statusbar-skinned.h" | ||
62 | #include "debug.h" | ||
63 | |||
61 | 64 | ||
62 | static int statusbar_enabled = 0; | 65 | static int statusbar_enabled = 0; |
63 | 66 | ||
@@ -93,8 +96,9 @@ static bool showing_bars(enum screen_type screen) | |||
93 | if (statusbar_enabled & VP_SB_ONSCREEN(screen)) | 96 | if (statusbar_enabled & VP_SB_ONSCREEN(screen)) |
94 | { | 97 | { |
95 | #ifdef HAVE_LCD_BITMAP | 98 | #ifdef HAVE_LCD_BITMAP |
96 | bool ignore = statusbar_enabled & VP_SB_IGNORE_SETTING(screen); | 99 | int ignore; |
97 | return ignore || (statusbar_position(screen)); | 100 | ignore = statusbar_enabled & VP_SB_IGNORE_SETTING(screen); |
101 | return ignore || (statusbar_position(screen) != STATUSBAR_OFF); | ||
98 | #else | 102 | #else |
99 | return true; | 103 | return true; |
100 | #endif | 104 | #endif |
@@ -109,22 +113,30 @@ void viewport_set_fullscreen(struct viewport *vp, | |||
109 | vp->width = screens[screen].lcdwidth; | 113 | vp->width = screens[screen].lcdwidth; |
110 | 114 | ||
111 | #ifdef HAVE_LCD_BITMAP | 115 | #ifdef HAVE_LCD_BITMAP |
112 | set_default_align_flags(vp); | 116 | struct viewport *sb_skin_vp = sb_skin_get_info_vp(screen); |
113 | vp->drawmode = DRMODE_SOLID; | 117 | if (sb_skin_vp && sb_skin_get_state(screen) |
114 | vp->font = FONT_UI; /* default to UI to discourage SYSFONT use */ | 118 | && statusbar_enabled & VP_SB_ONSCREEN(screen)) |
115 | 119 | { | |
116 | vp->height = screens[screen].lcdheight; | 120 | *vp = *sb_skin_vp; |
117 | if (statusbar_position(screen) != STATUSBAR_BOTTOM | 121 | } |
118 | && showing_bars(screen)) | 122 | else |
119 | vp->y = STATUSBAR_HEIGHT; | 123 | { |
120 | else | 124 | if (statusbar_position(screen) != STATUSBAR_BOTTOM && showing_bars(screen)) |
121 | vp->y = 0; | 125 | vp->y = STATUSBAR_HEIGHT; |
126 | else | ||
127 | vp->y = 0; | ||
122 | #else | 128 | #else |
123 | vp->y = 0; | 129 | { |
130 | vp->y = 0; | ||
124 | #endif | 131 | #endif |
125 | vp->height = screens[screen].lcdheight | 132 | vp->height = screens[screen].lcdheight |
126 | - (showing_bars(screen)?STATUSBAR_HEIGHT:0); | 133 | - (showing_bars(screen)?STATUSBAR_HEIGHT:0); |
134 | } | ||
127 | 135 | ||
136 | #ifdef HAVE_LCD_BITMAP | ||
137 | set_default_align_flags(vp); | ||
138 | vp->font = FONT_UI; /* default to UI to discourage SYSFONT use */ | ||
139 | vp->drawmode = DRMODE_SOLID; | ||
128 | #if LCD_DEPTH > 1 | 140 | #if LCD_DEPTH > 1 |
129 | #ifdef HAVE_REMOTE_LCD | 141 | #ifdef HAVE_REMOTE_LCD |
130 | /* We only need this test if there is a remote LCD */ | 142 | /* We only need this test if there is a remote LCD */ |
@@ -144,7 +156,7 @@ void viewport_set_fullscreen(struct viewport *vp, | |||
144 | vp->bg_pattern = LCD_REMOTE_DEFAULT_BG; | 156 | vp->bg_pattern = LCD_REMOTE_DEFAULT_BG; |
145 | } | 157 | } |
146 | #endif | 158 | #endif |
147 | 159 | #endif | |
148 | } | 160 | } |
149 | 161 | ||
150 | void viewport_set_defaults(struct viewport *vp, | 162 | void viewport_set_defaults(struct viewport *vp, |
@@ -180,21 +192,29 @@ int viewportmanager_get_statusbar(void) | |||
180 | int viewportmanager_set_statusbar(const int enabled) | 192 | int viewportmanager_set_statusbar(const int enabled) |
181 | { | 193 | { |
182 | int old = statusbar_enabled; | 194 | int old = statusbar_enabled; |
195 | int i; | ||
196 | |||
183 | statusbar_enabled = enabled; | 197 | statusbar_enabled = enabled; |
184 | if (enabled) | 198 | |
199 | FOR_NB_SCREENS(i) | ||
185 | { | 200 | { |
186 | int i; | 201 | if (showing_bars(i) |
187 | FOR_NB_SCREENS(i) | 202 | && statusbar_position(i) != STATUSBAR_CUSTOM) |
188 | { | 203 | { |
189 | if (showing_bars(i)) | 204 | add_event(GUI_EVENT_ACTIONUPDATE, false, viewportmanager_redraw); |
190 | gui_statusbar_draw(&statusbars.statusbars[i], true); | 205 | gui_statusbar_draw(&statusbars.statusbars[i], true); |
191 | } | 206 | } |
192 | add_event(GUI_EVENT_ACTIONUPDATE, false, viewportmanager_redraw); | 207 | else |
208 | remove_event(GUI_EVENT_ACTIONUPDATE, viewportmanager_redraw); | ||
193 | } | 209 | } |
194 | else | 210 | |
211 | #ifdef HAVE_LCD_BITMAP | ||
212 | FOR_NB_SCREENS(i) | ||
195 | { | 213 | { |
196 | remove_event(GUI_EVENT_ACTIONUPDATE, viewportmanager_redraw); | 214 | sb_skin_set_state(showing_bars(i) |
215 | && statusbar_position(i) == STATUSBAR_CUSTOM, i); | ||
197 | } | 216 | } |
217 | #endif | ||
198 | return old; | 218 | return old; |
199 | } | 219 | } |
200 | 220 | ||
@@ -204,7 +224,8 @@ static void viewportmanager_redraw(void* data) | |||
204 | 224 | ||
205 | FOR_NB_SCREENS(i) | 225 | FOR_NB_SCREENS(i) |
206 | { | 226 | { |
207 | if (showing_bars(i)) | 227 | if (showing_bars(i) |
228 | && statusbar_position(i) != STATUSBAR_CUSTOM) | ||
208 | gui_statusbar_draw(&statusbars.statusbars[i], NULL != data); | 229 | gui_statusbar_draw(&statusbars.statusbars[i], NULL != data); |
209 | } | 230 | } |
210 | } | 231 | } |
@@ -234,11 +255,6 @@ void viewportmanager_theme_changed(const int which) | |||
234 | /* reset the ui viewport */ | 255 | /* reset the ui viewport */ |
235 | FOR_NB_SCREENS(i) | 256 | FOR_NB_SCREENS(i) |
236 | ui_vp_info.active[i] = retval & BIT_N(i); | 257 | ui_vp_info.active[i] = retval & BIT_N(i); |
237 | |||
238 | if (retval != 0) | ||
239 | add_event(GUI_EVENT_REFRESH, false, viewportmanager_ui_vp_changed); | ||
240 | else | ||
241 | remove_event(GUI_EVENT_REFRESH, viewportmanager_ui_vp_changed); | ||
242 | /* and point to it */ | 258 | /* and point to it */ |
243 | ui_vp_info.vp = custom_vp; | 259 | ui_vp_info.vp = custom_vp; |
244 | } | 260 | } |
@@ -249,18 +265,14 @@ void viewportmanager_theme_changed(const int which) | |||
249 | } | 265 | } |
250 | if (which & THEME_STATUSBAR) | 266 | if (which & THEME_STATUSBAR) |
251 | { | 267 | { |
252 | statusbar_enabled = VP_SB_HIDE_ALL; | 268 | statusbar_enabled = 0; |
253 | |||
254 | FOR_NB_SCREENS(i) | 269 | FOR_NB_SCREENS(i) |
255 | { | 270 | { |
256 | if (statusbar_position(i) != STATUSBAR_OFF) | 271 | if (statusbar_position(i) != STATUSBAR_OFF) |
257 | statusbar_enabled |= VP_SB_ONSCREEN(i); | 272 | statusbar_enabled |= VP_SB_ONSCREEN(i); |
258 | } | 273 | } |
259 | 274 | ||
260 | if (statusbar_enabled != VP_SB_HIDE_ALL) | 275 | viewportmanager_set_statusbar(statusbar_enabled); |
261 | add_event(GUI_EVENT_ACTIONUPDATE, false, viewportmanager_redraw); | ||
262 | else | ||
263 | remove_event(GUI_EVENT_ACTIONUPDATE, viewportmanager_redraw); | ||
264 | 276 | ||
265 | /* reposition viewport to fit statusbar, only if not using the ui vp */ | 277 | /* reposition viewport to fit statusbar, only if not using the ui vp */ |
266 | 278 | ||
@@ -270,6 +282,19 @@ void viewportmanager_theme_changed(const int which) | |||
270 | viewport_set_fullscreen(&custom_vp[i], i); | 282 | viewport_set_fullscreen(&custom_vp[i], i); |
271 | } | 283 | } |
272 | } | 284 | } |
285 | |||
286 | int event_add = 0; | ||
287 | FOR_NB_SCREENS(i) | ||
288 | { | ||
289 | event_add |= ui_vp_info.active[i]; | ||
290 | event_add |= (statusbar_position(i) == STATUSBAR_CUSTOM); | ||
291 | } | ||
292 | |||
293 | if (event_add) | ||
294 | add_event(GUI_EVENT_REFRESH, false, viewportmanager_ui_vp_changed); | ||
295 | else | ||
296 | remove_event(GUI_EVENT_REFRESH, viewportmanager_ui_vp_changed); | ||
297 | |||
273 | send_event(GUI_EVENT_THEME_CHANGED, NULL); | 298 | send_event(GUI_EVENT_THEME_CHANGED, NULL); |
274 | } | 299 | } |
275 | 300 | ||
@@ -283,10 +308,10 @@ static void viewportmanager_ui_vp_changed(void *param) | |||
283 | FOR_NB_SCREENS(i) | 308 | FOR_NB_SCREENS(i) |
284 | screens[i].clear_display(); | 309 | screens[i].clear_display(); |
285 | /* redraw the statusbar if it was enabled */ | 310 | /* redraw the statusbar if it was enabled */ |
286 | viewportmanager_set_statusbar(statusbar_enabled); | 311 | send_event(GUI_EVENT_ACTIONUPDATE, (void*)true); |
287 | /* call the passed function which will redraw the content of | 312 | /* call the passed function which will redraw the content of |
288 | * the current screen */ | 313 | * the current screen */ |
289 | if (param != NULL) | 314 | if (draw_func != NULL) |
290 | draw_func(); | 315 | draw_func(); |
291 | FOR_NB_SCREENS(i) | 316 | FOR_NB_SCREENS(i) |
292 | screens[i].update(); | 317 | screens[i].update(); |
diff --git a/apps/gui/viewport.h b/apps/gui/viewport.h index cffc7fbaef..0e5ad30f35 100644 --- a/apps/gui/viewport.h +++ b/apps/gui/viewport.h | |||
@@ -56,16 +56,16 @@ void viewport_set_defaults(struct viewport *vp, | |||
56 | */ | 56 | */ |
57 | 57 | ||
58 | 58 | ||
59 | #define THEME_STATUSBAR (BIT_N(0)) | 59 | #define THEME_STATUSBAR (BIT_N(0)) |
60 | #define THEME_UI_VIEWPORT (BIT_N(1)) | 60 | #define THEME_UI_VIEWPORT (BIT_N(1)) |
61 | #define THEME_BUTTONBAR (BIT_N(2)) | 61 | #define THEME_BUTTONBAR (BIT_N(2)) |
62 | #define THEME_LANGUAGE (BIT_N(3)) | 62 | #define THEME_LANGUAGE (BIT_N(3)) |
63 | #define THEME_ALL (~(0u)) | 63 | #define THEME_ALL (~(0u)) |
64 | 64 | ||
65 | #define VP_SB_HIDE_ALL 0 | 65 | #define VP_SB_HIDE_ALL 0 |
66 | #define VP_SB_ONSCREEN(screen) BIT_N(screen) | 66 | #define VP_SB_ONSCREEN(screen) BIT_N(screen) |
67 | #define VP_SB_IGNORE_SETTING(screen) BIT_N(4+screen) | 67 | #define VP_SB_IGNORE_SETTING(screen) BIT_N(4+screen) |
68 | #define VP_SB_ALLSCREENS (VP_SB_ONSCREEN(0)|VP_SB_ONSCREEN(1)) | 68 | #define VP_SB_ALLSCREENS (VP_SB_ONSCREEN(0)|VP_SB_ONSCREEN(1)) |
69 | 69 | ||
70 | #ifndef __PCTOOL__ | 70 | #ifndef __PCTOOL__ |
71 | /* | 71 | /* |
diff --git a/apps/gui/wps.c b/apps/gui/wps.c index a74e3d449d..11ce946e98 100644 --- a/apps/gui/wps.c +++ b/apps/gui/wps.c | |||
@@ -31,7 +31,6 @@ | |||
31 | #include "action.h" | 31 | #include "action.h" |
32 | #include "kernel.h" | 32 | #include "kernel.h" |
33 | #include "filetypes.h" | 33 | #include "filetypes.h" |
34 | #include "debug.h" | ||
35 | #include "sprintf.h" | 34 | #include "sprintf.h" |
36 | #include "settings.h" | 35 | #include "settings.h" |
37 | #include "skin_engine/skin_engine.h" | 36 | #include "skin_engine/skin_engine.h" |
@@ -67,6 +66,7 @@ | |||
67 | #include "dsp.h" | 66 | #include "dsp.h" |
68 | #include "playlist_viewer.h" | 67 | #include "playlist_viewer.h" |
69 | #include "wps.h" | 68 | #include "wps.h" |
69 | #include "statusbar-skinned.h" | ||
70 | 70 | ||
71 | #define RESTORE_WPS_INSTANTLY 0l | 71 | #define RESTORE_WPS_INSTANTLY 0l |
72 | #define RESTORE_WPS_NEXT_SECOND ((long)(HZ+current_tick)) | 72 | #define RESTORE_WPS_NEXT_SECOND ((long)(HZ+current_tick)) |
@@ -82,7 +82,7 @@ | |||
82 | static int wpsbars = 0; | 82 | static int wpsbars = 0; |
83 | 83 | ||
84 | /* currently only one wps_state is needed, initialize to 0 */ | 84 | /* currently only one wps_state is needed, initialize to 0 */ |
85 | static struct wps_state wps_state = { .id3 = NULL }; | 85 | struct wps_state wps_state = { .id3 = NULL }; |
86 | static struct gui_wps gui_wps[NB_SCREENS] = {{ .data = NULL }}; | 86 | static struct gui_wps gui_wps[NB_SCREENS] = {{ .data = NULL }}; |
87 | static struct wps_data wps_datas[NB_SCREENS] = {{ .wps_loaded = 0 }}; | 87 | static struct wps_data wps_datas[NB_SCREENS] = {{ .wps_loaded = 0 }}; |
88 | 88 | ||
@@ -129,8 +129,8 @@ void wps_data_load(enum screen_type screen, const char *buf, bool isfile) | |||
129 | 129 | ||
130 | #endif /* __PCTOOL__ */ | 130 | #endif /* __PCTOOL__ */ |
131 | 131 | ||
132 | loaded_ok = buf && skin_data_load(gui_wps[screen].data, | 132 | loaded_ok = buf && skin_data_load(gui_wps[screen].data, buf, isfile); |
133 | &screens[screen], buf, isfile); | 133 | |
134 | if (!loaded_ok) /* load the hardcoded default */ | 134 | if (!loaded_ok) /* load the hardcoded default */ |
135 | { | 135 | { |
136 | char *skin_buf[NB_SCREENS] = { | 136 | char *skin_buf[NB_SCREENS] = { |
@@ -153,11 +153,11 @@ void wps_data_load(enum screen_type screen, const char *buf, bool isfile) | |||
153 | "%pb\n", | 153 | "%pb\n", |
154 | #endif | 154 | #endif |
155 | }; | 155 | }; |
156 | skin_data_load(gui_wps[screen].data, &screens[screen], | 156 | skin_data_load(gui_wps[screen].data, skin_buf[screen], false); |
157 | skin_buf[screen], false); | ||
158 | } | 157 | } |
159 | #ifdef HAVE_REMOVE_LCD | 158 | #ifdef HAVE_REMOVE_LCD |
160 | gui_wps[screen].data->remote_wps = !(screen == SCREEN_MAIN); | 159 | gui_wps[screen].data->remote_wps = !(screen == SCREEN_MAIN); |
160 | |||
161 | #endif | 161 | #endif |
162 | } | 162 | } |
163 | 163 | ||
@@ -587,6 +587,8 @@ static void gwps_leave_wps(void) | |||
587 | /* Play safe and unregister the hook */ | 587 | /* Play safe and unregister the hook */ |
588 | lcd_activation_set_hook(NULL); | 588 | lcd_activation_set_hook(NULL); |
589 | #endif | 589 | #endif |
590 | /* unhandle statusbar update delay */ | ||
591 | sb_skin_set_update_delay(DEFAULT_UPDATE_DELAY); | ||
590 | send_event(GUI_EVENT_REFRESH, NULL); | 592 | send_event(GUI_EVENT_REFRESH, NULL); |
591 | } | 593 | } |
592 | 594 | ||
@@ -739,7 +741,6 @@ long gui_wps_show(void) | |||
739 | #endif | 741 | #endif |
740 | } | 742 | } |
741 | } | 743 | } |
742 | |||
743 | #ifdef HAVE_LCD_BITMAP | 744 | #ifdef HAVE_LCD_BITMAP |
744 | /* when the peak meter is enabled we want to have a | 745 | /* when the peak meter is enabled we want to have a |
745 | few extra updates to make it look smooth. On the | 746 | few extra updates to make it look smooth. On the |
@@ -1175,7 +1176,13 @@ long gui_wps_show(void) | |||
1175 | skin_update(&gui_wps[i], WPS_REFRESH_NON_STATIC); | 1176 | skin_update(&gui_wps[i], WPS_REFRESH_NON_STATIC); |
1176 | } | 1177 | } |
1177 | } | 1178 | } |
1178 | wps_state.do_full_update = false; | 1179 | /* currently skinned statusbar and wps share the same wps_state, |
1180 | * don't steal do_full_update away */ | ||
1181 | if (wps_state.do_full_update) | ||
1182 | { | ||
1183 | send_event(GUI_EVENT_ACTIONUPDATE, (void*)true); | ||
1184 | wps_state.do_full_update = false; | ||
1185 | } | ||
1179 | update = false; | 1186 | update = false; |
1180 | } | 1187 | } |
1181 | 1188 | ||
@@ -1188,6 +1195,9 @@ long gui_wps_show(void) | |||
1188 | #if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP) | 1195 | #if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP) |
1189 | lcd_activation_set_hook(wps_lcd_activation_hook); | 1196 | lcd_activation_set_hook(wps_lcd_activation_hook); |
1190 | #endif | 1197 | #endif |
1198 | /* we remove the update delay since it's not very usable in the wps, | ||
1199 | * e.g. during volume changing or ffwd/rewind */ | ||
1200 | sb_skin_set_update_delay(0); | ||
1191 | FOR_NB_SCREENS(i) | 1201 | FOR_NB_SCREENS(i) |
1192 | { | 1202 | { |
1193 | screens[i].stop_scroll(); | 1203 | screens[i].stop_scroll(); |
diff --git a/apps/lang/english.lang b/apps/lang/english.lang index 15ee6d2936..2a2a34c021 100644 --- a/apps/lang/english.lang +++ b/apps/lang/english.lang | |||
@@ -13089,3 +13089,45 @@ | |||
13089 | *: "Skip to Outro" | 13089 | *: "Skip to Outro" |
13090 | </voice> | 13090 | </voice> |
13091 | </phrase> | 13091 | </phrase> |
13092 | <phrase> | ||
13093 | id: LANG_STATUSBAR_CUSTOM | ||
13094 | desc: if this translation is compatible with LANG_CHANNEL_CUSTOM, then please use the same translation. it can be combined later then | ||
13095 | user: core | ||
13096 | <source> | ||
13097 | *: "Custom" | ||
13098 | </source> | ||
13099 | <dest> | ||
13100 | *: "Custom" | ||
13101 | </dest> | ||
13102 | <voice> | ||
13103 | *: "Custom" | ||
13104 | </voice> | ||
13105 | </phrase> | ||
13106 | <phrase> | ||
13107 | id: VOICE_EXT_SBS | ||
13108 | desc: spoken only, for file extension | ||
13109 | user: core | ||
13110 | <source> | ||
13111 | *: "" | ||
13112 | </source> | ||
13113 | <dest> | ||
13114 | *: "" | ||
13115 | </dest> | ||
13116 | <voice> | ||
13117 | *: "statusbar skin" | ||
13118 | </voice> | ||
13119 | </phrase> | ||
13120 | <phrase> | ||
13121 | id: VOICE_EXT_RSBS | ||
13122 | desc: spoken only, for file extension | ||
13123 | user: core | ||
13124 | <source> | ||
13125 | *: "" | ||
13126 | </source> | ||
13127 | <dest> | ||
13128 | *: "" | ||
13129 | </dest> | ||
13130 | <voice> | ||
13131 | *: "remote statusbar skin" | ||
13132 | </voice> | ||
13133 | </phrase> | ||
diff --git a/apps/main.c b/apps/main.c index ec4829189b..8b6c1bbfbe 100644 --- a/apps/main.c +++ b/apps/main.c | |||
@@ -73,6 +73,7 @@ | |||
73 | #include "scrobbler.h" | 73 | #include "scrobbler.h" |
74 | #include "icon.h" | 74 | #include "icon.h" |
75 | #include "viewport.h" | 75 | #include "viewport.h" |
76 | #include "statusbar-skinned.h" | ||
76 | 77 | ||
77 | #ifdef IPOD_ACCESSORY_PROTOCOL | 78 | #ifdef IPOD_ACCESSORY_PROTOCOL |
78 | #include "iap.h" | 79 | #include "iap.h" |
@@ -319,6 +320,7 @@ static void init(void) | |||
319 | settings_reset(); | 320 | settings_reset(); |
320 | settings_load(SETTINGS_ALL); | 321 | settings_load(SETTINGS_ALL); |
321 | gui_sync_wps_init(); | 322 | gui_sync_wps_init(); |
323 | sb_skin_init(); | ||
322 | settings_apply(true); | 324 | settings_apply(true); |
323 | init_dircache(true); | 325 | init_dircache(true); |
324 | init_dircache(false); | 326 | init_dircache(false); |
@@ -546,6 +548,7 @@ static void init(void) | |||
546 | } | 548 | } |
547 | 549 | ||
548 | gui_sync_wps_init(); | 550 | gui_sync_wps_init(); |
551 | sb_skin_init(); | ||
549 | settings_apply(true); | 552 | settings_apply(true); |
550 | init_dircache(false); | 553 | init_dircache(false); |
551 | #ifdef HAVE_TAGCACHE | 554 | #ifdef HAVE_TAGCACHE |
diff --git a/apps/menus/theme_menu.c b/apps/menus/theme_menu.c index a0e4f02871..704bbe6df1 100644 --- a/apps/menus/theme_menu.c +++ b/apps/menus/theme_menu.c | |||
@@ -162,12 +162,16 @@ static int statusbar_callback_ex(int action,const struct menu_item_ex *this_item | |||
162 | old_bar[screen] = statusbar_position(screen); | 162 | old_bar[screen] = statusbar_position(screen); |
163 | break; | 163 | break; |
164 | case ACTION_EXIT_MENUITEM: | 164 | case ACTION_EXIT_MENUITEM: |
165 | gui_statusbar_changed(screen, old_bar[screen]); | ||
166 | send_event(GUI_EVENT_STATUSBAR_TOGGLE, NULL); | 165 | send_event(GUI_EVENT_STATUSBAR_TOGGLE, NULL); |
167 | send_event(GUI_EVENT_ACTIONUPDATE, (void*)true); | 166 | send_event(GUI_EVENT_ACTIONUPDATE, (void*)true); |
167 | if ((old_bar[screen] == STATUSBAR_CUSTOM) | ||
168 | || (statusbar_position(screen) == STATUSBAR_CUSTOM)) | ||
169 | send_event(GUI_EVENT_REFRESH, NULL); | ||
170 | else | ||
171 | gui_statusbar_changed(screen, old_bar[screen]); | ||
168 | break; | 172 | break; |
169 | } | 173 | } |
170 | return action; | 174 | return ACTION_REDRAW; |
171 | } | 175 | } |
172 | 176 | ||
173 | #ifdef HAVE_REMOTE_LCD | 177 | #ifdef HAVE_REMOTE_LCD |
diff --git a/apps/playback.c b/apps/playback.c index 4a5ef5c450..3fa42b9f94 100644 --- a/apps/playback.c +++ b/apps/playback.c | |||
@@ -161,7 +161,7 @@ enum filling_state { | |||
161 | }; | 161 | }; |
162 | 162 | ||
163 | #define MAX_TRACK 128 | 163 | #define MAX_TRACK 128 |
164 | #define MAX_MULTIPLE_AA 1 | 164 | #define MAX_MULTIPLE_AA 2 |
165 | 165 | ||
166 | #define MAX_TRACK_MASK (MAX_TRACK-1) | 166 | #define MAX_TRACK_MASK (MAX_TRACK-1) |
167 | 167 | ||
diff --git a/apps/plugin.c b/apps/plugin.c index a2059266b2..77fb925ba2 100644 --- a/apps/plugin.c +++ b/apps/plugin.c | |||
@@ -802,8 +802,6 @@ int plugin_load(const char* plugin, const void* parameter) | |||
802 | #ifdef HAVE_TOUCHSCREEN | 802 | #ifdef HAVE_TOUCHSCREEN |
803 | touchscreen_set_mode(global_settings.touch_mode); | 803 | touchscreen_set_mode(global_settings.touch_mode); |
804 | #endif | 804 | #endif |
805 | |||
806 | viewportmanager_set_statusbar(oldbars); | ||
807 | 805 | ||
808 | button_clear_queue(); | 806 | button_clear_queue(); |
809 | 807 | ||
@@ -832,13 +830,14 @@ int plugin_load(const char* plugin, const void* parameter) | |||
832 | #endif | 830 | #endif |
833 | #endif | 831 | #endif |
834 | 832 | ||
833 | viewportmanager_set_statusbar(oldbars); | ||
834 | viewport_set_current_vp(NULL); | ||
835 | |||
835 | if (rc != PLUGIN_GOTO_WPS) | 836 | if (rc != PLUGIN_GOTO_WPS) |
836 | { | 837 | { |
837 | send_event(GUI_EVENT_REFRESH, NULL); | 838 | send_event(GUI_EVENT_REFRESH, NULL); |
838 | } | 839 | } |
839 | 840 | ||
840 | viewportmanager_set_statusbar(oldbars); | ||
841 | viewport_set_current_vp(NULL); | ||
842 | if (pfn_tsr_exit == NULL) | 841 | if (pfn_tsr_exit == NULL) |
843 | plugin_loaded = false; | 842 | plugin_loaded = false; |
844 | 843 | ||
diff --git a/apps/settings.c b/apps/settings.c index 6cbd559f94..f0d3d31b30 100644 --- a/apps/settings.c +++ b/apps/settings.c | |||
@@ -71,6 +71,7 @@ | |||
71 | #include "wps.h" | 71 | #include "wps.h" |
72 | #include "skin_engine/skin_engine.h" | 72 | #include "skin_engine/skin_engine.h" |
73 | #include "viewport.h" | 73 | #include "viewport.h" |
74 | #include "statusbar-skinned.h" | ||
74 | 75 | ||
75 | #if CONFIG_CODEC == MAS3507D | 76 | #if CONFIG_CODEC == MAS3507D |
76 | void dac_line_in(bool enable); | 77 | void dac_line_in(bool enable); |
@@ -740,6 +741,19 @@ void settings_apply_skins(void) | |||
740 | char buf[MAX_PATH]; | 741 | char buf[MAX_PATH]; |
741 | /* re-initialize the skin buffer before we start reloading skins */ | 742 | /* re-initialize the skin buffer before we start reloading skins */ |
742 | skin_buffer_init(); | 743 | skin_buffer_init(); |
744 | #ifdef HAVE_LCD_BITMAP | ||
745 | if ( global_settings.sbs_file[0] && | ||
746 | global_settings.sbs_file[0] != 0xff ) | ||
747 | { | ||
748 | snprintf(buf, sizeof buf, WPS_DIR "/%s.sbs", | ||
749 | global_settings.sbs_file); | ||
750 | sb_skin_data_load(SCREEN_MAIN, buf, true); | ||
751 | } | ||
752 | else | ||
753 | { | ||
754 | sb_skin_data_load(SCREEN_MAIN, NULL, true); | ||
755 | } | ||
756 | #endif | ||
743 | if ( global_settings.wps_file[0] && | 757 | if ( global_settings.wps_file[0] && |
744 | global_settings.wps_file[0] != 0xff ) | 758 | global_settings.wps_file[0] != 0xff ) |
745 | { | 759 | { |
@@ -752,6 +766,16 @@ void settings_apply_skins(void) | |||
752 | wps_data_load(SCREEN_MAIN, NULL, true); | 766 | wps_data_load(SCREEN_MAIN, NULL, true); |
753 | } | 767 | } |
754 | #if defined(HAVE_REMOTE_LCD) && (NB_SCREENS > 1) | 768 | #if defined(HAVE_REMOTE_LCD) && (NB_SCREENS > 1) |
769 | if ( global_settings.rsbs_file[0] && | ||
770 | global_settings.rsbs_file[0] != 0xff ) { | ||
771 | snprintf(buf, sizeof buf, WPS_DIR "/%s.rsbs", | ||
772 | global_settings.rsbs_file); | ||
773 | sb_skin_data_load(SCREEN_REMOTE, buf, true); | ||
774 | } | ||
775 | else | ||
776 | { | ||
777 | sb_skin_data_load(SCREEN_REMOTE, NULL, true); | ||
778 | } | ||
755 | if ( global_settings.rwps_file[0]) | 779 | if ( global_settings.rwps_file[0]) |
756 | { | 780 | { |
757 | snprintf(buf, sizeof buf, WPS_DIR "/%s.rwps", | 781 | snprintf(buf, sizeof buf, WPS_DIR "/%s.rwps", |
@@ -763,6 +787,7 @@ void settings_apply_skins(void) | |||
763 | wps_data_load(SCREEN_REMOTE, NULL, true); | 787 | wps_data_load(SCREEN_REMOTE, NULL, true); |
764 | } | 788 | } |
765 | #endif | 789 | #endif |
790 | viewportmanager_theme_changed(THEME_STATUSBAR); | ||
766 | } | 791 | } |
767 | 792 | ||
768 | void settings_apply(bool read_disk) | 793 | void settings_apply(bool read_disk) |
@@ -997,7 +1022,10 @@ void settings_apply(bool read_disk) | |||
997 | #if defined(HAVE_RECORDING) && CONFIG_CODEC == SWCODEC | 1022 | #if defined(HAVE_RECORDING) && CONFIG_CODEC == SWCODEC |
998 | enc_global_settings_apply(); | 1023 | enc_global_settings_apply(); |
999 | #endif | 1024 | #endif |
1000 | viewportmanager_theme_changed(THEME_ALL); | 1025 | #ifdef HAVE_LCD_BITMAP |
1026 | /* already called with THEME_STATUSBAR in settings_apply_skins() */ | ||
1027 | viewportmanager_theme_changed(THEME_UI_VIEWPORT|THEME_LANGUAGE); | ||
1028 | #endif | ||
1001 | } | 1029 | } |
1002 | 1030 | ||
1003 | 1031 | ||
diff --git a/apps/settings.h b/apps/settings.h index ad250ed3b7..7ad139e485 100644 --- a/apps/settings.h +++ b/apps/settings.h | |||
@@ -60,6 +60,7 @@ 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 SBS_DIR WPS_DIR | ||
63 | #define THEME_DIR ROCKBOX_DIR "/themes" | 64 | #define THEME_DIR ROCKBOX_DIR "/themes" |
64 | #define ICON_DIR ROCKBOX_DIR "/icons" | 65 | #define ICON_DIR ROCKBOX_DIR "/icons" |
65 | 66 | ||
@@ -548,6 +549,13 @@ struct user_settings | |||
548 | int peak_meter_max; /* range maximum */ | 549 | int peak_meter_max; /* range maximum */ |
549 | 550 | ||
550 | unsigned char wps_file[MAX_FILENAME+1]; /* last wps */ | 551 | unsigned char wps_file[MAX_FILENAME+1]; /* last wps */ |
552 | #ifdef HAVE_LCD_BITMAP | ||
553 | unsigned char sbs_file[MAX_FILENAME+1]; /* last statusbar skin */ | ||
554 | #endif | ||
555 | #ifdef HAVE_REMOTE_LCD | ||
556 | unsigned char rwps_file[MAX_FILENAME+1]; /* last remote-wps */ | ||
557 | unsigned char rsbs_file[MAX_FILENAME+1]; /* last remote statusbar skin */ | ||
558 | #endif | ||
551 | unsigned char lang_file[MAX_FILENAME+1]; /* last language */ | 559 | unsigned char lang_file[MAX_FILENAME+1]; /* last language */ |
552 | unsigned char playlist_catalog_dir[MAX_FILENAME+1]; | 560 | unsigned char playlist_catalog_dir[MAX_FILENAME+1]; |
553 | int skip_length; /* skip length */ | 561 | int skip_length; /* skip length */ |
@@ -722,7 +730,6 @@ struct user_settings | |||
722 | bool remote_bl_filter_first_keypress; /* filter first remote keypress when remote dark? */ | 730 | bool remote_bl_filter_first_keypress; /* filter first remote keypress when remote dark? */ |
723 | unsigned char remote_icon_file[MAX_FILENAME+1]; | 731 | unsigned char remote_icon_file[MAX_FILENAME+1]; |
724 | unsigned char remote_viewers_icon_file[MAX_FILENAME+1]; | 732 | unsigned char remote_viewers_icon_file[MAX_FILENAME+1]; |
725 | unsigned char rwps_file[MAX_FILENAME+1]; /* last remote-wps */ | ||
726 | #ifdef HAS_REMOTE_BUTTON_HOLD | 733 | #ifdef HAS_REMOTE_BUTTON_HOLD |
727 | int remote_backlight_on_button_hold; /* what to do with remote backlight when hold | 734 | int remote_backlight_on_button_hold; /* what to do with remote backlight when hold |
728 | switch is on */ | 735 | switch is on */ |
diff --git a/apps/settings_list.c b/apps/settings_list.c index 27675ca0b8..5bfce331cd 100644 --- a/apps/settings_list.c +++ b/apps/settings_list.c | |||
@@ -199,6 +199,7 @@ static const char graphic_numeric[] = "graphic,numeric"; | |||
199 | 199 | ||
200 | /* Default theme settings */ | 200 | /* Default theme settings */ |
201 | #define DEFAULT_WPSNAME "cabbiev2" | 201 | #define DEFAULT_WPSNAME "cabbiev2" |
202 | #define DEFAULT_SBS_NAME DEFAULT_WPSNAME | ||
202 | 203 | ||
203 | #ifdef HAVE_LCD_BITMAP | 204 | #ifdef HAVE_LCD_BITMAP |
204 | 205 | ||
@@ -633,14 +634,14 @@ const struct settings_list settings[] = { | |||
633 | ID2P(LANG_INVERT_CURSOR_BAR)), | 634 | ID2P(LANG_INVERT_CURSOR_BAR)), |
634 | #endif | 635 | #endif |
635 | CHOICE_SETTING(F_THEMESETTING|F_TEMPVAR, statusbar, | 636 | CHOICE_SETTING(F_THEMESETTING|F_TEMPVAR, statusbar, |
636 | LANG_STATUS_BAR, STATUSBAR_TOP, "statusbar","off,top,bottom", | 637 | LANG_STATUS_BAR, STATUSBAR_TOP, "statusbar","off,top,bottom,custom", |
637 | NULL, 3, ID2P(LANG_OFF), ID2P(LANG_STATUSBAR_TOP), | 638 | NULL, 4, ID2P(LANG_OFF), ID2P(LANG_STATUSBAR_TOP), |
638 | ID2P(LANG_STATUSBAR_BOTTOM)), | 639 | ID2P(LANG_STATUSBAR_BOTTOM), ID2P(LANG_STATUSBAR_CUSTOM)), |
639 | #ifdef HAVE_REMOTE_LCD | 640 | #ifdef HAVE_REMOTE_LCD |
640 | CHOICE_SETTING(F_THEMESETTING|F_TEMPVAR, remote_statusbar, | 641 | CHOICE_SETTING(F_THEMESETTING|F_TEMPVAR, remote_statusbar, |
641 | LANG_REMOTE_STATUSBAR, STATUSBAR_TOP, "remote statusbar","off,top,bottom", | 642 | LANG_REMOTE_STATUSBAR, STATUSBAR_TOP, "remote statusbar","off,top,bottom,custom", |
642 | NULL, 3, ID2P(LANG_OFF), ID2P(LANG_STATUSBAR_TOP), | 643 | NULL, 4, ID2P(LANG_OFF), ID2P(LANG_STATUSBAR_TOP), |
643 | ID2P(LANG_STATUSBAR_BOTTOM)), | 644 | ID2P(LANG_STATUSBAR_BOTTOM), ID2P(LANG_STATUSBAR_CUSTOM)), |
644 | #endif | 645 | #endif |
645 | CHOICE_SETTING(F_THEMESETTING|F_TEMPVAR, scrollbar, | 646 | CHOICE_SETTING(F_THEMESETTING|F_TEMPVAR, scrollbar, |
646 | LANG_SCROLL_BAR, SCROLLBAR_LEFT, "scrollbar","off,left,right", | 647 | LANG_SCROLL_BAR, SCROLLBAR_LEFT, "scrollbar","off,left,right", |
@@ -1442,11 +1443,17 @@ const struct settings_list settings[] = { | |||
1442 | #endif | 1443 | #endif |
1443 | TEXT_SETTING(F_THEMESETTING,wps_file, "wps", | 1444 | TEXT_SETTING(F_THEMESETTING,wps_file, "wps", |
1444 | DEFAULT_WPSNAME, WPS_DIR "/", ".wps"), | 1445 | DEFAULT_WPSNAME, WPS_DIR "/", ".wps"), |
1445 | TEXT_SETTING(0,lang_file,"lang","",LANG_DIR "/",".lng"), | 1446 | #ifdef HAVE_LCD_BITMAP |
1447 | TEXT_SETTING(F_THEMESETTING,sbs_file, "sbs", | ||
1448 | DEFAULT_SBS_NAME, SBS_DIR "/", ".sbs"), | ||
1449 | #endif | ||
1446 | #ifdef HAVE_REMOTE_LCD | 1450 | #ifdef HAVE_REMOTE_LCD |
1447 | TEXT_SETTING(F_THEMESETTING,rwps_file,"rwps", | 1451 | TEXT_SETTING(F_THEMESETTING,rwps_file,"rwps", |
1448 | DEFAULT_WPSNAME, WPS_DIR "/", ".rwps"), | 1452 | DEFAULT_SBS_NAME, WPS_DIR "/", ".rwps"), |
1453 | TEXT_SETTING(F_THEMESETTING,rsbs_file, "rsbs", | ||
1454 | DEFAULT_WPSNAME, SBS_DIR "/", ".rsbs"), | ||
1449 | #endif | 1455 | #endif |
1456 | TEXT_SETTING(0,lang_file,"lang","",LANG_DIR "/",".lng"), | ||
1450 | #if LCD_DEPTH > 1 | 1457 | #if LCD_DEPTH > 1 |
1451 | TEXT_SETTING(F_THEMESETTING,backdrop_file,"backdrop", | 1458 | TEXT_SETTING(F_THEMESETTING,backdrop_file,"backdrop", |
1452 | DEFAULT_BACKDROP, BACKDROP_DIR "/", ".bmp"), | 1459 | DEFAULT_BACKDROP, BACKDROP_DIR "/", ".bmp"), |
diff --git a/wps/WPSLIST b/wps/WPSLIST index 662fb82cb0..9b52416ec2 100644 --- a/wps/WPSLIST +++ b/wps/WPSLIST | |||
@@ -44,6 +44,8 @@ selector type: bar (inverse) | |||
44 | <wps> | 44 | <wps> |
45 | Name: rockbox_default.wps | 45 | Name: rockbox_default.wps |
46 | RWPS: rockbox_default.rwps | 46 | RWPS: rockbox_default.rwps |
47 | SBS: | ||
48 | RSBS: | ||
47 | Author: Rockbox team | 49 | Author: Rockbox team |
48 | Font: 08-Schumacher-Clean.fnt | 50 | Font: 08-Schumacher-Clean.fnt |
49 | Font.11x2x1: | 51 | Font.11x2x1: |
@@ -59,6 +61,8 @@ selector type: bar (inverse) | |||
59 | <wps> | 61 | <wps> |
60 | Name: boxes.wps | 62 | Name: boxes.wps |
61 | rwps: boxes.rwps | 63 | rwps: boxes.rwps |
64 | SBS: | ||
65 | RSBS: | ||
62 | Author: Christi Scarborough (after Magnus Westerlund) | 66 | Author: Christi Scarborough (after Magnus Westerlund) |
63 | Font: 08-Schumacher-Clean.fnt | 67 | Font: 08-Schumacher-Clean.fnt |
64 | Statusbar: top | 68 | Statusbar: top |
@@ -76,6 +80,8 @@ remote ui viewport: - | |||
76 | <wps> | 80 | <wps> |
77 | Name: engineeer2.wps | 81 | Name: engineeer2.wps |
78 | RWPS: engineeer2.rwps | 82 | RWPS: engineeer2.rwps |
83 | SBS: | ||
84 | RSBS: | ||
79 | Author: Magnus Westerlund | 85 | Author: Magnus Westerlund |
80 | Font: 08-Nedore.fnt | 86 | Font: 08-Nedore.fnt |
81 | Statusbar: top | 87 | Statusbar: top |
@@ -90,6 +96,8 @@ remote ui viewport: - | |||
90 | <wps> | 96 | <wps> |
91 | Name: iAmp.wps | 97 | Name: iAmp.wps |
92 | RWPS: iAmp.rwps | 98 | RWPS: iAmp.rwps |
99 | SBS: | ||
100 | RSBS: | ||
93 | Author: Raymond Hoh | 101 | Author: Raymond Hoh |
94 | Font: 12-Nimbus.fnt | 102 | Font: 12-Nimbus.fnt |
95 | backdrop: | 103 | backdrop: |
@@ -104,6 +112,8 @@ remote ui viewport: - | |||
104 | <wps> | 112 | <wps> |
105 | Name: zezayer.wps | 113 | Name: zezayer.wps |
106 | RWPS: zezayer.rwps | 114 | RWPS: zezayer.rwps |
115 | SBS: | ||
116 | RSBS: | ||
107 | Author: Jake Owen | 117 | Author: Jake Owen |
108 | Font: 08-Nedore.fnt | 118 | Font: 08-Nedore.fnt |
109 | Statusbar: top | 119 | Statusbar: top |
@@ -153,6 +163,8 @@ Statusbar: top | |||
153 | <wps> | 163 | <wps> |
154 | Name: DancePuffDuo.wps | 164 | Name: DancePuffDuo.wps |
155 | RWPS: DancePuffDuo.rwps | 165 | RWPS: DancePuffDuo.rwps |
166 | SBS: | ||
167 | RSBS: | ||
156 | Author: Chris Oxtoby | 168 | Author: Chris Oxtoby |
157 | Font: 13-Nimbus.fnt | 169 | Font: 13-Nimbus.fnt |
158 | Statusbar: top | 170 | Statusbar: top |
@@ -176,6 +188,8 @@ Statusbar: top | |||
176 | <wps> | 188 | <wps> |
177 | Name: iCatcher.wps | 189 | Name: iCatcher.wps |
178 | RWPS: iCatcher.rwps | 190 | RWPS: iCatcher.rwps |
191 | SBS: | ||
192 | RSBS: | ||
179 | Author: Ioannis Koutoulakis | 193 | Author: Ioannis Koutoulakis |
180 | Font.112x64x1: 08-Rockfont.fnt | 194 | Font.112x64x1: 08-Rockfont.fnt |
181 | Font.128x64x1: 08-Rockfont.fnt | 195 | Font.128x64x1: 08-Rockfont.fnt |
@@ -212,6 +226,8 @@ Statusbar: top | |||
212 | <wps> | 226 | <wps> |
213 | Name: UniCatcher.wps | 227 | Name: UniCatcher.wps |
214 | RWPS: UniCatcher.rwps | 228 | RWPS: UniCatcher.rwps |
229 | SBS: | ||
230 | RSBS: | ||
215 | Author: Ioannis Koutoulakis | 231 | Author: Ioannis Koutoulakis |
216 | Font: 16-GNU-Unifont.fnt | 232 | Font: 16-GNU-Unifont.fnt |
217 | Foreground Color: 000000 | 233 | Foreground Color: 000000 |
@@ -235,6 +251,8 @@ Statusbar: top | |||
235 | <wps> | 251 | <wps> |
236 | Name: Rockboxed.wps | 252 | Name: Rockboxed.wps |
237 | RWPS: rockbox_default.rwps | 253 | RWPS: rockbox_default.rwps |
254 | SBS: | ||
255 | RSBS: | ||
238 | Author: Roan Horning | 256 | Author: Roan Horning |
239 | Font.112x64x1: 08-Schumacher-Clean.fnt | 257 | Font.112x64x1: 08-Schumacher-Clean.fnt |
240 | Font.128x64x1: 08-Schumacher-Clean.fnt | 258 | Font.128x64x1: 08-Schumacher-Clean.fnt |
@@ -268,6 +286,8 @@ Author: Jens Arnold | |||
268 | <wps> | 286 | <wps> |
269 | Name: cabbiev2.wps | 287 | Name: cabbiev2.wps |
270 | RWPS: cabbiev2.rwps | 288 | RWPS: cabbiev2.rwps |
289 | SBS: | ||
290 | RSBS: | ||
271 | # Real name of the creator of the WPS | 291 | # Real name of the creator of the WPS |
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. | 292 | 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. |
273 | 293 | ||
@@ -349,6 +369,7 @@ viewers iconset.240x400x16: /.rockbox/icons/tango_small_viewers.bmp | |||
349 | 369 | ||
350 | # Whether the WPS is designed to have the statusbar on or off | 370 | # Whether the WPS is designed to have the statusbar on or off |
351 | Statusbar: top | 371 | Statusbar: top |
372 | remote statusbar: top | ||
352 | 373 | ||
353 | # list & remote ui viewports | 374 | # list & remote ui viewports |
354 | ui viewport: - | 375 | ui viewport: - |
diff --git a/wps/wpsbuild.pl b/wps/wpsbuild.pl index e9e5c29a30..7378f30b32 100755 --- a/wps/wpsbuild.pl +++ b/wps/wpsbuild.pl | |||
@@ -32,9 +32,18 @@ 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; | ||
35 | my $wps; | 39 | my $wps; |
36 | my $wps_prefix; | 40 | my $wps_prefix; |
41 | my $sbs_prefix; | ||
37 | my $rwps; | 42 | my $rwps; |
43 | my $sbs; | ||
44 | my $sbs_w_size; | ||
45 | my $rsbs; | ||
46 | my $rsbs_w_size; | ||
38 | my $width; | 47 | my $width; |
39 | my $height; | 48 | my $height; |
40 | my $font; | 49 | my $font; |
@@ -42,9 +51,6 @@ my $fgcolor; | |||
42 | my $bgcolor; | 51 | my $bgcolor; |
43 | my $statusbar; | 52 | my $statusbar; |
44 | my $author; | 53 | my $author; |
45 | my $req_g; | ||
46 | my $req_g_wps; | ||
47 | my $req_t_wps; | ||
48 | my $backdrop; | 54 | my $backdrop; |
49 | my $lineselectstart; | 55 | my $lineselectstart; |
50 | my $lineselectend; | 56 | my $lineselectend; |
@@ -191,12 +197,26 @@ sub copywps | |||
191 | my $dir; | 197 | my $dir; |
192 | my @filelist; | 198 | my @filelist; |
193 | my $file; | 199 | my $file; |
200 | my $__sb; | ||
194 | 201 | ||
195 | if($wpslist =~ /(.*)WPSLIST/) { | 202 | if($wpslist =~ /(.*)WPSLIST/) { |
196 | $dir = $1; | 203 | $dir = $1; |
197 | # system("cp $dir/$wps .rockbox/wps/"); | 204 | $__sb = $sbs_prefix . "." . $req_size . ".sbs"; |
198 | #print "$req_t_wps $req_g_wps\n"; | 205 | #print "$req_t_wps $req_g_wps $sbs_prefix\n"; |
206 | #print "$dir/$__sb\n"; | ||
199 | 207 | ||
208 | # system("cp $dir/$wps .rockbox/wps/"); | ||
209 | # check for <name>.WIDTHxHEIGHTxDEPTH.sbs | ||
210 | if (-e "$dir/$__sb") { | ||
211 | system("cp $dir/$__sb $rbdir/wps/$sbs"); | ||
212 | } | ||
213 | # check for <name>.WIDTHxHEIGHTxDEPTH.<model>.sbs and overwrite the | ||
214 | # previous sb if needed | ||
215 | $__sb = $sbs_prefix . "." . $req_size . "." . $modelname . ".sbs"; | ||
216 | if (-e "$dir/$__sb") { | ||
217 | system("cp $dir/$__sb $rbdir/wps/$sbs"); | ||
218 | } | ||
219 | |||
200 | if (-e "$dir/$req_t_wps" ) { | 220 | if (-e "$dir/$req_t_wps" ) { |
201 | system("cp $dir/$req_t_wps $rbdir/wps/$wps"); | 221 | system("cp $dir/$req_t_wps $rbdir/wps/$wps"); |
202 | 222 | ||
@@ -210,9 +230,9 @@ sub copywps | |||
210 | close(WPSFILE); | 230 | close(WPSFILE); |
211 | 231 | ||
212 | if ($#filelist >= 0) { | 232 | if ($#filelist >= 0) { |
213 | if (-e "$dir/$wps_prefix/$req_g") { | 233 | if (-e "$dir/$wps_prefix/$req_size") { |
214 | foreach $file (@filelist) { | 234 | foreach $file (@filelist) { |
215 | system("cp $dir/$wps_prefix/$req_g/$file $rbdir/wps/$wps_prefix/"); | 235 | system("cp $dir/$wps_prefix/$req_size/$file $rbdir/wps/$wps_prefix/"); |
216 | } | 236 | } |
217 | } | 237 | } |
218 | elsif (-e "$dir/$wps_prefix") { | 238 | elsif (-e "$dir/$wps_prefix") { |
@@ -235,7 +255,7 @@ sub copywps | |||
235 | 255 | ||
236 | sub buildcfg { | 256 | sub buildcfg { |
237 | my $cfg = $wps; | 257 | my $cfg = $wps; |
238 | my @out; | 258 | my @out; |
239 | 259 | ||
240 | $cfg =~ s/\.(r|)wps/.cfg/; | 260 | $cfg =~ s/\.(r|)wps/.cfg/; |
241 | 261 | ||
@@ -247,6 +267,20 @@ sub buildcfg { | |||
247 | wps: /$rbdir/wps/$wps | 267 | wps: /$rbdir/wps/$wps |
248 | MOO | 268 | MOO |
249 | ; | 269 | ; |
270 | if(defined($sbs)) { | ||
271 | if ($sbs eq '') { | ||
272 | push @out, "sbs: -\n"; | ||
273 | } else { | ||
274 | push @out, "sbs: /$rbdir/wps/$sbs\n"; | ||
275 | } | ||
276 | } | ||
277 | if(defined($sbs) && $has_remote) { | ||
278 | if ($rsbs eq '') { | ||
279 | push @out, "rsbs: -\n"; | ||
280 | } else { | ||
281 | push @out, "rsbs: /$rbdir/wps/$rsbs\n"; | ||
282 | } | ||
283 | } | ||
250 | if($font) { | 284 | if($font) { |
251 | push @out, "font: /$rbdir/fonts/$font\n"; | 285 | push @out, "font: /$rbdir/fonts/$font\n"; |
252 | } | 286 | } |
@@ -264,7 +298,7 @@ MOO | |||
264 | } | 298 | } |
265 | if(defined($backdrop)) { | 299 | if(defined($backdrop)) { |
266 | if ($backdrop eq '') { | 300 | if ($backdrop eq '') { |
267 | push @out, "backdrop:\n"; | 301 | push @out, "backdrop: -\n"; |
268 | } else { | 302 | } else { |
269 | # clip resolution from filename | 303 | # clip resolution from filename |
270 | $backdrop =~ s/(\.[0-9]*x[0-9]*x[0-9]*)//; | 304 | $backdrop =~ s/(\.[0-9]*x[0-9]*x[0-9]*)//; |
@@ -338,6 +372,8 @@ while(<WPS>) { | |||
338 | undef $wps; | 372 | undef $wps; |
339 | undef $wps_prefix; | 373 | undef $wps_prefix; |
340 | undef $rwps; | 374 | undef $rwps; |
375 | undef $sbs; | ||
376 | undef $rsbs; | ||
341 | undef $width; | 377 | undef $width; |
342 | undef $height; | 378 | undef $height; |
343 | undef $font; | 379 | undef $font; |
@@ -386,23 +422,24 @@ while(<WPS>) { | |||
386 | foreach my $d (@depthlist) { | 422 | foreach my $d (@depthlist) { |
387 | next if ($d > $rdepth); | 423 | next if ($d > $rdepth); |
388 | 424 | ||
389 | $req_g = $rwidth . "x" . $rheight . "x" . $d; | 425 | $req_size = $rwidth . "x" . $rheight . "x" . $d; |
390 | 426 | ||
391 | # check for model specific wps | 427 | # check for model specific wps |
392 | $req_g_wps = $wps_prefix . "." . $req_g . "." . $modelname . ".wps"; | 428 | $req_g_wps = $wps_prefix . "." . $req_size . "." . $modelname . ".wps"; |
393 | last if (-e "$wpsdir/$req_g_wps"); | 429 | last if (-e "$wpsdir/$req_g_wps"); |
394 | 430 | ||
395 | $req_g_wps = $wps_prefix . "." . $req_g . ".wps"; | 431 | # check for normal wps (with WIDTHxHEIGHTxDEPTH) |
432 | $req_g_wps = $wps_prefix . "." . $req_size . ".wps"; | ||
396 | last if (-e "$wpsdir/$req_g_wps"); | 433 | last if (-e "$wpsdir/$req_g_wps"); |
397 | 434 | ||
398 | if ($isrwps) { | 435 | if ($isrwps) { |
399 | $req_g = $req_g . "." . $main_width . "x" . $main_height . "x" . "$main_depth"; | 436 | $req_size = $req_size . "." . $main_width . "x" . $main_height . "x" . "$main_depth"; |
400 | 437 | ||
401 | $req_g_wps = $wps_prefix . "." . $req_g . ".wps"; | 438 | $req_g_wps = $wps_prefix . "." . $req_size . ".wps"; |
402 | last if (-e "$wpsdir/$req_g_wps"); | 439 | last if (-e "$wpsdir/$req_g_wps"); |
403 | } | 440 | } |
404 | } | 441 | } |
405 | $req_t_wps = $wps_prefix . ".txt" . ".wps"; | 442 | $req_t_wps = $wps_prefix . $req_t . ".wps"; |
406 | 443 | ||
407 | #print "LCD: $wps wants $width x $height\n"; | 444 | #print "LCD: $wps wants $width x $height\n"; |
408 | #print "LCD: is $rwidth x $rheight\n"; | 445 | #print "LCD: is $rwidth x $rheight\n"; |
@@ -454,6 +491,20 @@ while(<WPS>) { | |||
454 | elsif($l =~ /^RWPS\.${main_width}x${main_height}x$main_depth: *(.*)/i) { | 491 | elsif($l =~ /^RWPS\.${main_width}x${main_height}x$main_depth: *(.*)/i) { |
455 | $rwps = $1; | 492 | $rwps = $1; |
456 | } | 493 | } |
494 | elsif($l =~ /^SBS: *(.*)/i) { | ||
495 | $sbs = $sbs_prefix = $1; | ||
496 | $sbs_prefix =~ s/\.(r|)sbs//; | ||
497 | } | ||
498 | elsif($l =~ /^SBS\.${main_width}x${main_height}x$main_depth: *(.*)/i) { | ||
499 | $sbs = $sbs_prefix = $1; | ||
500 | $sbs_prefix =~ s/\.(r|)sbs//; | ||
501 | } | ||
502 | elsif($l =~ /^RSBS: *(.*)/i) { | ||
503 | $rsbs = $1; | ||
504 | } | ||
505 | elsif($l =~ /^RSBS\.${main_width}x${main_height}x$main_depth: *(.*)/i) { | ||
506 | $rsbs = $1; | ||
507 | } | ||
457 | elsif($l =~ /^Author: *(.*)/i) { | 508 | elsif($l =~ /^Author: *(.*)/i) { |
458 | $author = $1; | 509 | $author = $1; |
459 | } | 510 | } |
@@ -526,9 +577,15 @@ while(<WPS>) { | |||
526 | elsif($l =~ /^ui viewport: *(.*)/i) { | 577 | elsif($l =~ /^ui viewport: *(.*)/i) { |
527 | $listviewport = $1; | 578 | $listviewport = $1; |
528 | } | 579 | } |
580 | elsif($l =~ /^ui viewport\.${main_width}x${main_height}x$main_depth: *(.*)/i) { | ||
581 | $listviewport = $1; | ||
582 | } | ||
529 | elsif($l =~ /^remote ui viewport: *(.*)/i) { | 583 | elsif($l =~ /^remote ui viewport: *(.*)/i) { |
530 | $remotelistviewport = $1; | 584 | $remotelistviewport = $1; |
531 | } | 585 | } |
586 | elsif($l =~ /^remote ui viewport\.${main_width}x${main_height}x$main_depth: *(.*)/i) { | ||
587 | $remotelistviewport = $1; | ||
588 | } | ||
532 | else{ | 589 | else{ |
533 | #print "Unknown line: $l!\n"; | 590 | #print "Unknown line: $l!\n"; |
534 | } | 591 | } |