diff options
-rw-r--r-- | apps/debug_menu.c | 1 | ||||
-rw-r--r-- | apps/lang/english.lang | 14 | ||||
-rw-r--r-- | apps/onplay.c | 19 | ||||
-rw-r--r-- | apps/settings_list.c | 6 | ||||
-rw-r--r-- | manual/rockbox_interface/browsing_and_playing.tex | 7 |
5 files changed, 47 insertions, 0 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c index 36927dd890..c0f6904c8e 100644 --- a/apps/debug_menu.c +++ b/apps/debug_menu.c | |||
@@ -1871,6 +1871,7 @@ static int database_callback(int btn, struct gui_synclist *lists) | |||
1871 | stat->initialized ? "Yes" : "No"); | 1871 | stat->initialized ? "Yes" : "No"); |
1872 | simplelist_addline("DB Ready: %s", | 1872 | simplelist_addline("DB Ready: %s", |
1873 | stat->ready ? "Yes" : "No"); | 1873 | stat->ready ? "Yes" : "No"); |
1874 | simplelist_addline("DB Path: %s", stat->db_path); | ||
1874 | simplelist_addline("RAM Cache: %s", | 1875 | simplelist_addline("RAM Cache: %s", |
1875 | stat->ramcache ? "Yes" : "No"); | 1876 | stat->ramcache ? "Yes" : "No"); |
1876 | simplelist_addline("RAM: %d/%d B", | 1877 | simplelist_addline("RAM: %d/%d B", |
diff --git a/apps/lang/english.lang b/apps/lang/english.lang index 3773d138d4..1287a26c39 100644 --- a/apps/lang/english.lang +++ b/apps/lang/english.lang | |||
@@ -16641,3 +16641,17 @@ | |||
16641 | *: "Go to Last Album" | 16641 | *: "Go to Last Album" |
16642 | </voice> | 16642 | </voice> |
16643 | </phrase> | 16643 | </phrase> |
16644 | <phrase> | ||
16645 | id: LANG_DATABASE_DIR | ||
16646 | desc: in database settings menu | ||
16647 | user: core | ||
16648 | <source> | ||
16649 | *: "Database Directory" | ||
16650 | </source> | ||
16651 | <dest> | ||
16652 | *: "Database Directory" | ||
16653 | </dest> | ||
16654 | <voice> | ||
16655 | *: "Database Directory" | ||
16656 | </voice> | ||
16657 | </phrase> | ||
diff --git a/apps/onplay.c b/apps/onplay.c index ccebee402e..a85284c7d0 100644 --- a/apps/onplay.c +++ b/apps/onplay.c | |||
@@ -1390,9 +1390,27 @@ static bool set_catalogdir(void) | |||
1390 | MENUITEM_FUNCTION(set_catalogdir_item, 0, ID2P(LANG_PLAYLIST_DIR), | 1390 | MENUITEM_FUNCTION(set_catalogdir_item, 0, ID2P(LANG_PLAYLIST_DIR), |
1391 | set_catalogdir, clipboard_callback, Icon_Playlist); | 1391 | set_catalogdir, clipboard_callback, Icon_Playlist); |
1392 | 1392 | ||
1393 | static bool set_databasedir(void) | ||
1394 | { | ||
1395 | path_append(global_settings.tagcache_db_path, selected_file, | ||
1396 | PA_SEP_SOFT, sizeof(global_settings.tagcache_db_path)); | ||
1397 | |||
1398 | struct tagcache_stat *tc_stat = tagcache_get_stat(); | ||
1399 | if (strcasecmp(global_settings.tagcache_db_path, tc_stat->db_path)) | ||
1400 | { | ||
1401 | splashf(HZ, ID2P(LANG_PLEASE_REBOOT)); | ||
1402 | } | ||
1403 | |||
1404 | settings_save(); | ||
1405 | return false; | ||
1406 | } | ||
1407 | MENUITEM_FUNCTION(set_databasedir_item, 0, ID2P(LANG_DATABASE_DIR), | ||
1408 | set_databasedir, clipboard_callback, Icon_Audio); | ||
1409 | |||
1393 | MAKE_ONPLAYMENU(set_as_dir_menu, ID2P(LANG_SET_AS), | 1410 | MAKE_ONPLAYMENU(set_as_dir_menu, ID2P(LANG_SET_AS), |
1394 | clipboard_callback, Icon_NOICON, | 1411 | clipboard_callback, Icon_NOICON, |
1395 | &set_catalogdir_item, | 1412 | &set_catalogdir_item, |
1413 | &set_databasedir_item, | ||
1396 | #ifdef HAVE_RECORDING | 1414 | #ifdef HAVE_RECORDING |
1397 | &set_recdir_item, | 1415 | &set_recdir_item, |
1398 | #endif | 1416 | #endif |
@@ -1454,6 +1472,7 @@ static int clipboard_callback(int action, | |||
1454 | if (this_item == &delete_dir_item || | 1472 | if (this_item == &delete_dir_item || |
1455 | this_item == &set_startdir_item || | 1473 | this_item == &set_startdir_item || |
1456 | this_item == &set_catalogdir_item || | 1474 | this_item == &set_catalogdir_item || |
1475 | this_item == &set_databasedir_item || | ||
1457 | this_item == &set_as_dir_menu | 1476 | this_item == &set_as_dir_menu |
1458 | #ifdef HAVE_RECORDING | 1477 | #ifdef HAVE_RECORDING |
1459 | || this_item == &set_recdir_item | 1478 | || this_item == &set_recdir_item |
diff --git a/apps/settings_list.c b/apps/settings_list.c index 6f6425a693..74db7550bf 100644 --- a/apps/settings_list.c +++ b/apps/settings_list.c | |||
@@ -142,6 +142,12 @@ | |||
142 | (struct filename_setting[]){ \ | 142 | (struct filename_setting[]){ \ |
143 | {prefix,suffix,sizeof(global_settings.var)}}} } | 143 | {prefix,suffix,sizeof(global_settings.var)}}} } |
144 | 144 | ||
145 | #define DIRECTORY_SETTING(flags,var,lang_id,name,default) \ | ||
146 | {flags|F_DIRNAME|F_T_UCHARPTR, &global_settings.var, lang_id, \ | ||
147 | CHARPTR(default), name, NULL, \ | ||
148 | {.filename_setting=(struct filename_setting[]){ \ | ||
149 | {NULL, NULL, sizeof(global_settings.var)}}}} | ||
150 | |||
145 | /* Used for settings which use the set_option() setting screen. | 151 | /* Used for settings which use the set_option() setting screen. |
146 | The ... arg is a list of pointers to strings to display in the setting | 152 | The ... arg is a list of pointers to strings to display in the setting |
147 | screen. These can either be literal strings, or ID2P(LANG_*) */ | 153 | screen. These can either be literal strings, or ID2P(LANG_*) */ |
diff --git a/manual/rockbox_interface/browsing_and_playing.tex b/manual/rockbox_interface/browsing_and_playing.tex index 8460c12ec9..973c8e08de 100644 --- a/manual/rockbox_interface/browsing_and_playing.tex +++ b/manual/rockbox_interface/browsing_and_playing.tex | |||
@@ -179,6 +179,13 @@ each option pertains both to files and directories): | |||
179 | \begin{description} | 179 | \begin{description} |
180 | \item [Playlist Directory.] | 180 | \item [Playlist Directory.] |
181 | Set as default directory for the Playlist Catalogue. | 181 | Set as default directory for the Playlist Catalogue. |
182 | \opt{tagcache}{ | ||
183 | \item [Database Directory.] | ||
184 | Rockbox usually stores database files in the \fname{/.rockbox} folder. | ||
185 | You can choose another location for the database using this setting. | ||
186 | This is mainly useful for multiboot targets, so the same database can | ||
187 | be shared among several builds without needing to rebuild it each time. | ||
188 | } | ||
182 | \opt{recording}{ | 189 | \opt{recording}{ |
183 | \item [Recording Directory.] | 190 | \item [Recording Directory.] |
184 | Save recordings in the selected directory. | 191 | Save recordings in the selected directory. |