From 5a169bb71707dae31a886e1b932341b70eacf2df Mon Sep 17 00:00:00 2001 From: Jonathan Gordon Date: Mon, 23 Jun 2008 06:04:17 +0000 Subject: commit FS#9027 - conditional viewports ** BREAKS CURRENT WPS's ** * %P has been removed, merged with the new %pb * %pb is now %pb or %pb|bitmap|x|y|width|height| (any of those params can be - to use sane defaults... check wiki/task for more explaination) * New %Vl and %Vd tags which are used to setup and display conditionaly displayed viewports (%Vl||| to set up, then %Vd to enable the viewport * bumps the max allowed viewport count to 24 * you can setup 3 different progressbars in a WPS... max of one per viewport though http://www.rockbox.org/tracker/task/9027?getfile=16785 is a simple perl script to convert old %P/%pb to the new %pb syntax I'll commit changes to the cabbie wps soon which shows how to use %Vl/%Vd properly... Reminder: %m will be removed soonish also so when fixing your WPS's remember to use conditional viewports to replace %m git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17759 a1c6a512-1295-4272-9138-f99709370657 --- apps/settings.c | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) (limited to 'apps/settings.c') diff --git a/apps/settings.c b/apps/settings.c index 340adba5b8..8834c9d9bf 100644 --- a/apps/settings.c +++ b/apps/settings.c @@ -791,6 +791,25 @@ void settings_apply(bool read_disk) if (read_disk) { + +#ifdef HAVE_LCD_BITMAP + /* fonts need to be loaded before the WPS */ + if ( global_settings.font_file[0]) { + snprintf(buf, sizeof buf, FONT_DIR "/%s.fnt", + global_settings.font_file); + font_load(buf); + } + else + font_reset(); + + if ( global_settings.kbd_file[0]) { + snprintf(buf, sizeof buf, ROCKBOX_DIR "/%s.kbd", + global_settings.kbd_file); + load_kbd(buf); + } + else + load_kbd(NULL); +#endif #if LCD_DEPTH > 1 unload_wps_backdrop(); #endif @@ -838,24 +857,6 @@ void settings_apply(bool read_disk) gui_wps[1].data->remote_wps = true; } #endif - -#ifdef HAVE_LCD_BITMAP - if ( global_settings.font_file[0]) { - snprintf(buf, sizeof buf, FONT_DIR "/%s.fnt", - global_settings.font_file); - font_load(buf); - } - else - font_reset(); - - if ( global_settings.kbd_file[0]) { - snprintf(buf, sizeof buf, ROCKBOX_DIR "/%s.kbd", - global_settings.kbd_file); - load_kbd(buf); - } - else - load_kbd(NULL); -#endif if ( global_settings.lang_file[0]) { snprintf(buf, sizeof buf, LANG_DIR "/%s.lng", global_settings.lang_file); -- cgit v1.2.3