diff options
Diffstat (limited to 'apps/menus')
-rw-r--r-- | apps/menus/recording_menu.c | 73 |
1 files changed, 3 insertions, 70 deletions
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 @@ | |||
42 | #include "sound.h" | 42 | #include "sound.h" |
43 | #ifdef HAVE_RECORDING | 43 | #ifdef HAVE_RECORDING |
44 | #include "audio.h" | 44 | #include "audio.h" |
45 | #include "recording.h" | ||
46 | #if CONFIG_TUNER | 45 | #if CONFIG_TUNER |
47 | #include "radio.h" | 46 | #include "radio.h" |
48 | #endif | 47 | #endif |
@@ -306,78 +305,12 @@ MENUITEM_SETTING(rec_quality, &global_settings.rec_quality, NULL); | |||
306 | MENUITEM_SETTING(rec_editable, &global_settings.rec_editable, NULL); | 305 | MENUITEM_SETTING(rec_editable, &global_settings.rec_editable, NULL); |
307 | #endif | 306 | #endif |
308 | 307 | ||
309 | /* Displays a menu for changing the countdown timer settings */ | ||
310 | static int countdown_timer_func(void) | ||
311 | { | ||
312 | bool retval; | ||
313 | bool changed = false; | ||
314 | struct timer* timer = get_timerstat(); | ||
315 | |||
316 | static const struct opt_items names[] = { | ||
317 | { STR(LANG_TIMER_DAYS) }, | ||
318 | { STR(LANG_TIMER_HRS) }, | ||
319 | { STR(LANG_TIMER_MINS) } | ||
320 | }; | ||
321 | |||
322 | struct opt_settings settings[] = { | ||
323 | { &timer->days, 6 }, | ||
324 | { &timer->hrs, 23 }, | ||
325 | { &timer->mins, 59 } | ||
326 | }; | ||
327 | |||
328 | retval = set_multi_int(str(LANG_TIMER_SET), names, settings, 3, &changed); | ||
329 | |||
330 | if (changed) | ||
331 | { | ||
332 | timer->countdown = false; | ||
333 | timer->secs = 0; | ||
334 | timer->timer_display = false; | ||
335 | } | ||
336 | |||
337 | return retval; | ||
338 | } | ||
339 | |||
340 | static int countdown_timer_repeat_func(void) | ||
341 | { | ||
342 | struct timer* timer = get_timerstat(); | ||
343 | bool retval; | ||
344 | |||
345 | static const struct opt_items names[] = { | ||
346 | { STR(LANG_TIMER_DAYS) }, | ||
347 | { STR(LANG_TIMER_HRS) }, | ||
348 | { STR(LANG_TIMER_MINS) } | ||
349 | }; | ||
350 | |||
351 | struct opt_settings settings[] = { | ||
352 | { &timer->days_rpt, 6 }, | ||
353 | { &timer->hrs_rpt, 23 }, | ||
354 | { &timer->mins_rpt, 59 } | ||
355 | }; | ||
356 | retval = set_multi_int(str(LANG_TIMER_REPEAT), names, settings, 3, NULL); | ||
357 | |||
358 | /* automatically select settings necessary for repeated recording */ | ||
359 | if (timer->days_rpt || timer->hrs_rpt || timer->mins_rpt) | ||
360 | { | ||
361 | global_settings.rec_split_type = 1; /* Stop */ | ||
362 | global_settings.rec_split_method = 0; /* Time */ | ||
363 | global_settings.rec_trigger_mode = 0; /* The repeat timer isn't | ||
364 | compatible with the trigger */ | ||
365 | } | ||
366 | |||
367 | return retval; | ||
368 | } | ||
369 | |||
370 | MENUITEM_FUNCTION(countdown_timer, 0, ID2P(LANG_TIMER_SET), | ||
371 | countdown_timer_func, NULL, NULL, Icon_Menu_setting); | ||
372 | MENUITEM_FUNCTION(countdown_timer_repeat, 0, ID2P(LANG_TIMER_REPEAT), | ||
373 | countdown_timer_repeat_func, NULL, NULL, Icon_Menu_setting); | ||
374 | MENUITEM_SETTING(rec_split_type, &global_settings.rec_split_type, NULL); | 308 | MENUITEM_SETTING(rec_split_type, &global_settings.rec_split_type, NULL); |
375 | MENUITEM_SETTING(rec_split_method, &global_settings.rec_split_method, NULL); | 309 | MENUITEM_SETTING(rec_split_method, &global_settings.rec_split_method, NULL); |
376 | MENUITEM_SETTING(rec_timesplit, &global_settings.rec_timesplit, NULL); | 310 | MENUITEM_SETTING(rec_timesplit, &global_settings.rec_timesplit, NULL); |
377 | MENUITEM_SETTING(rec_sizesplit, &global_settings.rec_sizesplit, NULL); | 311 | MENUITEM_SETTING(rec_sizesplit, &global_settings.rec_sizesplit, NULL); |
378 | MAKE_MENU(timermenu, ID2P(LANG_RECORD_TIMESPLIT), NULL, Icon_NOICON, | 312 | MAKE_MENU(filesplitoptionsmenu, ID2P(LANG_RECORD_TIMESPLIT), NULL, Icon_NOICON, |
379 | &countdown_timer, &countdown_timer_repeat, &rec_split_method, | 313 | &rec_split_method, &rec_split_type, &rec_timesplit, &rec_sizesplit); |
380 | &rec_split_type, &rec_timesplit, &rec_sizesplit); | ||
381 | 314 | ||
382 | 315 | ||
383 | MENUITEM_SETTING(rec_prerecord_time, &global_settings.rec_prerecord_time, NULL); | 316 | 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 | |||
886 | #if CONFIG_CODEC == MAS3587F | 819 | #if CONFIG_CODEC == MAS3587F |
887 | &rec_editable, | 820 | &rec_editable, |
888 | #endif | 821 | #endif |
889 | &timermenu, | 822 | &filesplitoptionsmenu, |
890 | &rec_prerecord_time, | 823 | &rec_prerecord_time, |
891 | &recdirectory, | 824 | &recdirectory, |
892 | #ifdef HAVE_BACKLIGHT | 825 | #ifdef HAVE_BACKLIGHT |