Index: apps/tree.c
===================================================================
--- apps/tree.c (revision 21543)
+++ apps/tree.c (working copy)
@@ -927,6 +927,18 @@
strncpy(current, LANG_DIR "/english.lng", sizeof(current));
}
}
+ /* Center on currently loaded theme */
+ else if (!strcasecmp(root, THEME_DIR))
+ {
+ if (global_settings.theme_file[0]) {
+ snprintf(current, sizeof(current), THEME_DIR "/%s.cfg",
+ global_settings.theme_file);
+ }
+ else
+ {
+ strncpy(current, THEME_DIR "/cabbiev2.cfg", sizeof(current));
+ }
+ }
/* Center on currently loaded WPS */
else if (dirfilter == SHOW_WPS)
{
Index: apps/lang/english.lang
===================================================================
--- apps/lang/english.lang (revision 21543)
+++ apps/lang/english.lang (working copy)
@@ -5187,13 +5187,13 @@
desc: in the main menu
user: core
- *: "Browse Theme Files"
+ *: "Theme"
- *: "Browse Theme Files"
+ *: "Theme"
- *: "Browse Theme Files"
+ *: "Theme"
Index: apps/settings.h
===================================================================
--- apps/settings.h (revision 21543)
+++ apps/settings.h (working copy)
@@ -528,6 +528,7 @@
unsigned char wps_file[MAX_FILENAME+1]; /* last wps */
unsigned char lang_file[MAX_FILENAME+1]; /* last language */
+ unsigned char theme_file[MAX_FILENAME+1];/* last theme */
unsigned char playlist_catalog_dir[MAX_FILENAME+1];
int skip_length; /* skip length */
int max_files_in_dir; /* Max entries in directory (file browser) */
Index: apps/filetree.c
===================================================================
--- apps/filetree.c (revision 21543)
+++ apps/filetree.c (working copy)
@@ -505,6 +505,12 @@
case FILE_ATTR_CFG:
splash(0, ID2P(LANG_WAIT));
+
+ if (!strncasecmp(buf, THEME_DIR, strlen(THEME_DIR)))
+ {
+ set_file(buf, global_settings.theme_file, MAX_FILENAME);
+ }
+
if (!settings_load_config(buf,true))
break;
gui_synclist_draw(&tree_lists);