diff options
-rw-r--r-- | apps/lang/english.lang | 5 | ||||
-rw-r--r-- | apps/main_menu.h | 1 | ||||
-rw-r--r-- | apps/settings.c | 6 | ||||
-rw-r--r-- | apps/settings.h | 1 | ||||
-rw-r--r-- | apps/sound_menu.c | 10 | ||||
-rw-r--r-- | apps/tree.c | 16 |
6 files changed, 36 insertions, 3 deletions
diff --git a/apps/lang/english.lang b/apps/lang/english.lang index e33dfa1aa2..827ec0d002 100644 --- a/apps/lang/english.lang +++ b/apps/lang/english.lang @@ -2998,3 +2998,8 @@ eng: "Playlist" voice: "Playlist" new: +id: LANG_RECORD_STARTUP +desc: Start Rockbox in Recording screen +eng: "Show recording screen on startup" +voice: "Show recording screen on startup" +new: diff --git a/apps/main_menu.h b/apps/main_menu.h index b79528e610..f05cc52adc 100644 --- a/apps/main_menu.h +++ b/apps/main_menu.h @@ -23,5 +23,6 @@ extern int show_logo(void); extern bool main_menu(void); +extern bool rec_menu(void); #endif diff --git a/apps/settings.c b/apps/settings.c index b52f3d8ded..4bda34b53b 100644 --- a/apps/settings.c +++ b/apps/settings.c @@ -350,8 +350,12 @@ static const struct bit_entry hd_bits[] = {1, S_O(mdb_enable), 0, "mdb enable", off_on}, {1, S_O(id3_v1_first), 0, "id3 tag priority", "v2-v1,v1-v2"}, - /* new stuff to be added at the end */ +#ifdef HAVE_RECORDING + {1, S_O(rec_startup), false, "rec screen on startup", off_on }, +#endif + /* new stuff to be added at the end */ + /* Sum of all bit sizes must not grow beyond 0xB8*8 = 1472 */ }; diff --git a/apps/settings.h b/apps/settings.h index 8a12b2623c..dd9c268d19 100644 --- a/apps/settings.h +++ b/apps/settings.h @@ -169,6 +169,7 @@ struct user_settings int rec_prerecord_time; /* In seconds, 0-30, 0 means OFF */ int rec_directory; /* 0=base dir, 1=current dir */ + bool rec_startup; /* true means start Rockbox in recording screen */ /* device settings */ diff --git a/apps/sound_menu.c b/apps/sound_menu.c index 6e5b74bfa3..09e6fb5f28 100644 --- a/apps/sound_menu.c +++ b/apps/sound_menu.c @@ -374,6 +374,12 @@ static bool recdirectory(void) names, 2, NULL ); } +static bool reconstartup(void) +{ + return set_bool(str(LANG_RECORD_STARTUP), + &global_settings.rec_startup); +} + #endif /* MAS3587F */ static void set_chanconf(int val) @@ -437,7 +443,7 @@ bool recording_menu(bool no_source) { int m; int i = 0; - struct menu_item items[8]; + struct menu_item items[9]; bool result; items[i].desc = ID2P(LANG_RECORDING_QUALITY); @@ -458,6 +464,8 @@ bool recording_menu(bool no_source) items[i++].function = recprerecord; items[i].desc = ID2P(LANG_RECORD_DIRECTORY); items[i++].function = recdirectory; + items[i].desc = ID2P(LANG_RECORD_STARTUP); + items[i++].function = reconstartup; m=menu_init( items, i, NULL, NULL, NULL, NULL); result = menu_run(m); diff --git a/apps/tree.c b/apps/tree.c index b97041c099..d59101f937 100644 --- a/apps/tree.c +++ b/apps/tree.c @@ -59,6 +59,7 @@ #include "misc.h" #include "filetree.h" #include "dbtree.h" +#include "recorder/recording.h" #ifdef HAVE_LCD_BITMAP #include "widgets.h" @@ -641,9 +642,22 @@ static bool dirbrowse(void) lastextra = -1; lastfirstpos = 0; - if (*tc.dirfilter < NUM_FILTER_MODES) + if (*tc.dirfilter < NUM_FILTER_MODES) { start_resume(true); +#ifdef HAVE_RECORDING +#ifndef SIMULATOR + if (global_settings.rec_startup && ! start_wps) { + /* We fake being in the menu structure by calling the appropriate */ + /* parent when we drop out of each screen */ + recording_screen(); + rec_menu(); + main_menu(); + } +#endif +#endif + } + if (!start_wps) { numentries = showdir(); if (numentries == -1) |