From ce05addf52ed784026d9ca8397f3c2e239ff9ed4 Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Sun, 15 Apr 2007 22:16:28 +0000 Subject: Revert recording/repeat timer for now. It is useful as a feature, but didn't receive enough testing on multiple targets, and fixing it is non-trivial. Later reversal would be complicated because of .lng spreading. * The patch should probably redone in a different way, as it's huge for what it does... * Issues: (1) The repeat timer setting has NULL pointer hits. (2) The multi-int setting screen breaks with proportional fonts, and with somewhat larger fonts. (3) On some targets, all values except the leftmost one are unreachable. * Hint: The timer itself would be much simpler if it'd just store & compare ticks (497 days before it wraps). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13172 a1c6a512-1295-4272-9138-f99709370657 --- apps/menus/recording_menu.c | 73 ++------------------------------------------- 1 file changed, 3 insertions(+), 70 deletions(-) (limited to 'apps/menus/recording_menu.c') diff --git a/apps/menus/recording_menu.c b/apps/menus/recording_menu.c index d37fe39bfe..1bc84e90d2 100644 --- a/apps/menus/recording_menu.c +++ b/apps/menus/recording_menu.c @@ -42,7 +42,6 @@ #include "sound.h" #ifdef HAVE_RECORDING #include "audio.h" -#include "recording.h" #if CONFIG_TUNER #include "radio.h" #endif @@ -306,78 +305,12 @@ MENUITEM_SETTING(rec_quality, &global_settings.rec_quality, NULL); MENUITEM_SETTING(rec_editable, &global_settings.rec_editable, NULL); #endif -/* Displays a menu for changing the countdown timer settings */ -static int countdown_timer_func(void) -{ - bool retval; - bool changed = false; - struct timer* timer = get_timerstat(); - - static const struct opt_items names[] = { - { STR(LANG_TIMER_DAYS) }, - { STR(LANG_TIMER_HRS) }, - { STR(LANG_TIMER_MINS) } - }; - - struct opt_settings settings[] = { - { &timer->days, 6 }, - { &timer->hrs, 23 }, - { &timer->mins, 59 } - }; - - retval = set_multi_int(str(LANG_TIMER_SET), names, settings, 3, &changed); - - if (changed) - { - timer->countdown = false; - timer->secs = 0; - timer->timer_display = false; - } - - return retval; -} - -static int countdown_timer_repeat_func(void) -{ - struct timer* timer = get_timerstat(); - bool retval; - - static const struct opt_items names[] = { - { STR(LANG_TIMER_DAYS) }, - { STR(LANG_TIMER_HRS) }, - { STR(LANG_TIMER_MINS) } - }; - - struct opt_settings settings[] = { - { &timer->days_rpt, 6 }, - { &timer->hrs_rpt, 23 }, - { &timer->mins_rpt, 59 } - }; - retval = set_multi_int(str(LANG_TIMER_REPEAT), names, settings, 3, NULL); - - /* automatically select settings necessary for repeated recording */ - if (timer->days_rpt || timer->hrs_rpt || timer->mins_rpt) - { - global_settings.rec_split_type = 1; /* Stop */ - global_settings.rec_split_method = 0; /* Time */ - global_settings.rec_trigger_mode = 0; /* The repeat timer isn't - compatible with the trigger */ - } - - return retval; -} - -MENUITEM_FUNCTION(countdown_timer, 0, ID2P(LANG_TIMER_SET), - countdown_timer_func, NULL, NULL, Icon_Menu_setting); -MENUITEM_FUNCTION(countdown_timer_repeat, 0, ID2P(LANG_TIMER_REPEAT), - countdown_timer_repeat_func, NULL, NULL, Icon_Menu_setting); MENUITEM_SETTING(rec_split_type, &global_settings.rec_split_type, NULL); MENUITEM_SETTING(rec_split_method, &global_settings.rec_split_method, NULL); MENUITEM_SETTING(rec_timesplit, &global_settings.rec_timesplit, NULL); MENUITEM_SETTING(rec_sizesplit, &global_settings.rec_sizesplit, NULL); -MAKE_MENU(timermenu, ID2P(LANG_RECORD_TIMESPLIT), NULL, Icon_NOICON, - &countdown_timer, &countdown_timer_repeat, &rec_split_method, - &rec_split_type, &rec_timesplit, &rec_sizesplit); +MAKE_MENU(filesplitoptionsmenu, ID2P(LANG_RECORD_TIMESPLIT), NULL, Icon_NOICON, + &rec_split_method, &rec_split_type, &rec_timesplit, &rec_sizesplit); MENUITEM_SETTING(rec_prerecord_time, &global_settings.rec_prerecord_time, NULL); @@ -886,7 +819,7 @@ MAKE_MENU(recording_setting_menu, ID2P(LANG_RECORDING_SETTINGS), NULL, Icon_Reco #if CONFIG_CODEC == MAS3587F &rec_editable, #endif - &timermenu, + &filesplitoptionsmenu, &rec_prerecord_time, &recdirectory, #ifdef HAVE_BACKLIGHT -- cgit v1.2.3