diff options
author | Christi Scarborough <christi@coraline.org> | 2005-02-04 10:37:21 +0000 |
---|---|---|
committer | Christi Scarborough <christi@coraline.org> | 2005-02-04 10:37:21 +0000 |
commit | 8a8bd91695f21343baf8fe3d1b118c885716f2a4 (patch) | |
tree | af75cc279c5338d08afbb694f3b09a3508fdcd75 | |
parent | a00619fd7bcf24cd9f34d0779e4a3cd9d82e9379 (diff) | |
download | rockbox-8a8bd91695f21343baf8fe3d1b118c885716f2a4.tar.gz rockbox-8a8bd91695f21343baf8fe3d1b118c885716f2a4.zip |
New Recording Option: Show recording screen on startup
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5778 a1c6a512-1295-4272-9138-f99709370657
-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" | |||
2998 | voice: "Playlist" | 2998 | voice: "Playlist" |
2999 | new: | 2999 | new: |
3000 | 3000 | ||
3001 | id: LANG_RECORD_STARTUP | ||
3002 | desc: Start Rockbox in Recording screen | ||
3003 | eng: "Show recording screen on startup" | ||
3004 | voice: "Show recording screen on startup" | ||
3005 | 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 @@ | |||
23 | 23 | ||
24 | extern int show_logo(void); | 24 | extern int show_logo(void); |
25 | extern bool main_menu(void); | 25 | extern bool main_menu(void); |
26 | extern bool rec_menu(void); | ||
26 | 27 | ||
27 | #endif | 28 | #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[] = | |||
350 | {1, S_O(mdb_enable), 0, "mdb enable", off_on}, | 350 | {1, S_O(mdb_enable), 0, "mdb enable", off_on}, |
351 | {1, S_O(id3_v1_first), 0, "id3 tag priority", "v2-v1,v1-v2"}, | 351 | {1, S_O(id3_v1_first), 0, "id3 tag priority", "v2-v1,v1-v2"}, |
352 | 352 | ||
353 | /* new stuff to be added at the end */ | 353 | #ifdef HAVE_RECORDING |
354 | {1, S_O(rec_startup), false, "rec screen on startup", off_on }, | ||
355 | #endif | ||
354 | 356 | ||
357 | /* new stuff to be added at the end */ | ||
358 | |||
355 | /* Sum of all bit sizes must not grow beyond 0xB8*8 = 1472 */ | 359 | /* Sum of all bit sizes must not grow beyond 0xB8*8 = 1472 */ |
356 | }; | 360 | }; |
357 | 361 | ||
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 | |||
169 | 169 | ||
170 | int rec_prerecord_time; /* In seconds, 0-30, 0 means OFF */ | 170 | int rec_prerecord_time; /* In seconds, 0-30, 0 means OFF */ |
171 | int rec_directory; /* 0=base dir, 1=current dir */ | 171 | int rec_directory; /* 0=base dir, 1=current dir */ |
172 | bool rec_startup; /* true means start Rockbox in recording screen */ | ||
172 | 173 | ||
173 | /* device settings */ | 174 | /* device settings */ |
174 | 175 | ||
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) | |||
374 | names, 2, NULL ); | 374 | names, 2, NULL ); |
375 | } | 375 | } |
376 | 376 | ||
377 | static bool reconstartup(void) | ||
378 | { | ||
379 | return set_bool(str(LANG_RECORD_STARTUP), | ||
380 | &global_settings.rec_startup); | ||
381 | } | ||
382 | |||
377 | #endif /* MAS3587F */ | 383 | #endif /* MAS3587F */ |
378 | 384 | ||
379 | static void set_chanconf(int val) | 385 | static void set_chanconf(int val) |
@@ -437,7 +443,7 @@ bool recording_menu(bool no_source) | |||
437 | { | 443 | { |
438 | int m; | 444 | int m; |
439 | int i = 0; | 445 | int i = 0; |
440 | struct menu_item items[8]; | 446 | struct menu_item items[9]; |
441 | bool result; | 447 | bool result; |
442 | 448 | ||
443 | items[i].desc = ID2P(LANG_RECORDING_QUALITY); | 449 | items[i].desc = ID2P(LANG_RECORDING_QUALITY); |
@@ -458,6 +464,8 @@ bool recording_menu(bool no_source) | |||
458 | items[i++].function = recprerecord; | 464 | items[i++].function = recprerecord; |
459 | items[i].desc = ID2P(LANG_RECORD_DIRECTORY); | 465 | items[i].desc = ID2P(LANG_RECORD_DIRECTORY); |
460 | items[i++].function = recdirectory; | 466 | items[i++].function = recdirectory; |
467 | items[i].desc = ID2P(LANG_RECORD_STARTUP); | ||
468 | items[i++].function = reconstartup; | ||
461 | 469 | ||
462 | m=menu_init( items, i, NULL, NULL, NULL, NULL); | 470 | m=menu_init( items, i, NULL, NULL, NULL, NULL); |
463 | result = menu_run(m); | 471 | 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 @@ | |||
59 | #include "misc.h" | 59 | #include "misc.h" |
60 | #include "filetree.h" | 60 | #include "filetree.h" |
61 | #include "dbtree.h" | 61 | #include "dbtree.h" |
62 | #include "recorder/recording.h" | ||
62 | 63 | ||
63 | #ifdef HAVE_LCD_BITMAP | 64 | #ifdef HAVE_LCD_BITMAP |
64 | #include "widgets.h" | 65 | #include "widgets.h" |
@@ -641,9 +642,22 @@ static bool dirbrowse(void) | |||
641 | lastextra = -1; | 642 | lastextra = -1; |
642 | lastfirstpos = 0; | 643 | lastfirstpos = 0; |
643 | 644 | ||
644 | if (*tc.dirfilter < NUM_FILTER_MODES) | 645 | if (*tc.dirfilter < NUM_FILTER_MODES) { |
645 | start_resume(true); | 646 | start_resume(true); |
646 | 647 | ||
648 | #ifdef HAVE_RECORDING | ||
649 | #ifndef SIMULATOR | ||
650 | if (global_settings.rec_startup && ! start_wps) { | ||
651 | /* We fake being in the menu structure by calling the appropriate */ | ||
652 | /* parent when we drop out of each screen */ | ||
653 | recording_screen(); | ||
654 | rec_menu(); | ||
655 | main_menu(); | ||
656 | } | ||
657 | #endif | ||
658 | #endif | ||
659 | } | ||
660 | |||
647 | if (!start_wps) { | 661 | if (!start_wps) { |
648 | numentries = showdir(); | 662 | numentries = showdir(); |
649 | if (numentries == -1) | 663 | if (numentries == -1) |