summaryrefslogtreecommitdiff
path: root/apps/settings_list.c
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2009-10-19 15:28:15 +0000
committerThomas Martitz <kugel@rockbox.org>2009-10-19 15:28:15 +0000
commit1016ee4e809776619fa9e4e773ceb1523bd7bc66 (patch)
tree585cd873c118bee7c2459205e6eb54ff3e76a21b /apps/settings_list.c
parent00695baac0b797cbe46e7bc2999a83f73b36aae8 (diff)
downloadrockbox-1016ee4e809776619fa9e4e773ceb1523bd7bc66.tar.gz
rockbox-1016ee4e809776619fa9e4e773ceb1523bd7bc66.zip
Initial custom statusbar commit.
The custom statusbar can be used as a WPS for the main UI, using .(r)sbs files. It's using the skin engine and knows all tags the WPS also knows. The default folder for .sbs is the wps folder to reuse images used in the WPS. As it can be shown in the WPS also, it's useful to move shared parts to the custom statusbar in order to save skin buffer space. There are a few restrictions/TODOs: *) Peak meter doesn't redraw nicely(not frequent enough), as very frequent updates would slow the UI down as hell (some targets fight with it in the WPS already: FS#10686) *) No touchregion support as the statusbar doesn't have any action handling (it won't fail to parse though). *) Drawing stuff into the default VP is forbidden (loading images in it is not). You *need* to use viewports for the displaying stuff (parsing fails if no viewport is used). *) Themes that don't use a custom ui viewport can be fixed up using the new %Vi tag to avoid nasty redraw effectts (you must not draw into it as well, it's used to fix up the ui viewport). %Vi describes the viewport that the lists can use without getting in the way of the statusbar. Otherwise, it behaves like the classic statusbar, it can be configured in the theme settings, and can be turned off in the wps using %wd. Note to translaters: When translating LANG_STATUSBAR_CUSTOM, please consider using the same translation as for LANG_CHANNEL_CUSTOM if it's compatible. They could be combined later then. Flyspray: FS#10566 Author: myself git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23258 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/settings_list.c')
-rw-r--r--apps/settings_list.c23
1 files changed, 15 insertions, 8 deletions
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"),