From 32a43e2ee688bf8b3c930685400a52910c512a1e Mon Sep 17 00:00:00 2001 From: Christi Scarborough Date: Fri, 18 Nov 2005 15:33:05 +0000 Subject: When fixing things is it better to do it in a way that causes them to actually work. Some more bugs in wpsbuild.pl squashed. Also, themes moved to the main menu. Resetting to default themes now works properly. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7965 a1c6a512-1295-4272-9138-f99709370657 --- apps/gui/gwps.c | 15 +++++++++++++-- apps/lang/english.lang | 4 ++-- apps/main_menu.c | 10 +++++++++- apps/settings.h | 2 +- apps/settings_menu.c | 6 ------ 5 files changed, 25 insertions(+), 12 deletions(-) (limited to 'apps') diff --git a/apps/gui/gwps.c b/apps/gui/gwps.c index 2fff66e337..5877cf7c4b 100644 --- a/apps/gui/gwps.c +++ b/apps/gui/gwps.c @@ -731,11 +731,22 @@ bool wps_data_load(struct wps_data *wps_data, * wants to be a virtual file. Feel free to modify dirbrowse() * if you're feeling brave. */ - if (! strcmp(buf, WPS_DEFAULTCFG) || !strcmp(buf, RWPS_DEFAULTCFG) ) + if (! strcmp(buf, WPS_DEFAULTCFG) ) { wps_reset(wps_data); + global_settings.wps_file[0] = 0; return false; - } + } + +#ifdef HAVE_REMOTE_LCD + if (! strcmp(buf, RWPS_DEFAULTCFG) ) + { + wps_reset(wps_data); + global_settings.rwps_file[0] = 0; + return false; + } +#endif + size_t bmpdirlen; char *bmpdir = strrchr(buf, '.'); bmpdirlen = bmpdir - buf; diff --git a/apps/lang/english.lang b/apps/lang/english.lang index 9ec8416ad9..f11ac9efcb 100644 --- a/apps/lang/english.lang +++ b/apps/lang/english.lang @@ -3451,6 +3451,6 @@ new: id: LANG_CUSTOM_THEME desc: Custom themes menu -eng: "Browse themes" -voice: "Browse themes" +eng: "Browse Themes" +voice: "Browse Themes" new: diff --git a/apps/main_menu.c b/apps/main_menu.c index f76c211f0a..262dd61a20 100644 --- a/apps/main_menu.c +++ b/apps/main_menu.c @@ -241,6 +241,11 @@ static bool plugin_browse(void) return rockbox_browse(PLUGIN_DIR, SHOW_PLUGINS); } +static bool custom_theme_browse(void) +{ + return rockbox_browse(THEME_DIR, SHOW_CFG); +} + #ifdef HAVE_RECORDING static bool recording_settings(void) @@ -311,7 +316,7 @@ bool main_menu(void) int i = 0; /* main menu */ - struct menu_item items[10]; + struct menu_item items[11]; items[i].desc = ID2P(LANG_BOOKMARK_MENU_RECENT_BOOKMARKS); items[i++].function = bookmark_mrb_load; @@ -325,6 +330,9 @@ bool main_menu(void) items[i].desc = ID2P(LANG_MANAGE_MENU); items[i++].function = manage_settings_menu; + items[i].desc = ID2P(LANG_CUSTOM_THEME); + items[i++].function = custom_theme_browse; + #ifdef CONFIG_TUNER if(radio_hardware_present()) { items[i].desc = ID2P(LANG_FM_RADIO); diff --git a/apps/settings.h b/apps/settings.h index caaead6a10..04f6da667e 100644 --- a/apps/settings.h +++ b/apps/settings.h @@ -32,7 +32,7 @@ #define FONT_DIR "/fonts" #define LANG_DIR "/langs" #define WPS_DIR ROCKBOX_DIR "/wps" -#define THEME_DIR ROCKBOX_DIR "/theme" +#define THEME_DIR ROCKBOX_DIR "/themes" #define PLUGIN_DIR ROCKBOX_DIR"/rocks" #define REC_BASE_DIR "/recordings" diff --git a/apps/settings_menu.c b/apps/settings_menu.c index 41beb4d016..27e24347a3 100644 --- a/apps/settings_menu.c +++ b/apps/settings_menu.c @@ -1003,11 +1003,6 @@ static bool custom_remote_wps_browse(void) return rockbox_browse(WPS_DIR, SHOW_RWPS); } #endif - -static bool custom_theme_browse(void) -{ - return rockbox_browse(THEME_DIR, SHOW_CFG); -} static bool custom_cfg_browse(void) { @@ -1589,7 +1584,6 @@ static bool display_settings_menu(void) #ifdef HAVE_LCD_BITMAP { ID2P(LANG_CUSTOM_FONT), font_browse }, #endif - { ID2P(LANG_CUSTOM_THEME), custom_theme_browse }, { ID2P(LANG_WHILE_PLAYING), custom_wps_browse }, #ifdef HAVE_REMOTE_LCD { ID2P(LANG_REMOTE_WHILE_PLAYING), custom_remote_wps_browse }, -- cgit v1.2.3