diff options
author | Peter D'Hoye <peter.dhoye@gmail.com> | 2008-08-06 20:12:44 +0000 |
---|---|---|
committer | Peter D'Hoye <peter.dhoye@gmail.com> | 2008-08-06 20:12:44 +0000 |
commit | 496e1f7e85f929c487eb89f85ff0fc7edfcf3a27 (patch) | |
tree | 6c1ebac920b55979d6ac56972ffaee0747403e25 /apps/menus/recording_menu.c | |
parent | 729d259388f0f418bcf285698a6c751335457ac0 (diff) | |
download | rockbox-496e1f7e85f929c487eb89f85ff0fc7edfcf3a27.tar.gz rockbox-496e1f7e85f929c487eb89f85ff0fc7edfcf3a27.zip |
First step of the recording screen redesign. The screen is split into a fixed top part containing essential data and the peakmeters/triggerbar, and a bottom part that is in fact a list. The list contains the items that can be changed, and also some stuff that isn't important enough to be on the top part, like the filename. That filename is now shown completely. If the font is too big to have 6 lines on the display, sysfont is used.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18202 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/menus/recording_menu.c')
-rw-r--r-- | apps/menus/recording_menu.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/apps/menus/recording_menu.c b/apps/menus/recording_menu.c index b3b33b7f52..277f8d93b7 100644 --- a/apps/menus/recording_menu.c +++ b/apps/menus/recording_menu.c | |||
@@ -344,11 +344,11 @@ static int agc_preset_func(void) | |||
344 | { STR(LANG_AGC_VOICE) }, | 344 | { STR(LANG_AGC_VOICE) }, |
345 | }; | 345 | }; |
346 | if (global_settings.rec_source) | 346 | if (global_settings.rec_source) |
347 | return set_option(str(LANG_RECORD_AGC_PRESET), | 347 | return set_option(str(LANG_RECORDING_AGC_PRESET), |
348 | &global_settings.rec_agc_preset_line, | 348 | &global_settings.rec_agc_preset_line, |
349 | INT, names, 6, NULL ); | 349 | INT, names, 6, NULL ); |
350 | else | 350 | else |
351 | return set_option(str(LANG_RECORD_AGC_PRESET), | 351 | return set_option(str(LANG_RECORDING_AGC_PRESET), |
352 | &global_settings.rec_agc_preset_mic, | 352 | &global_settings.rec_agc_preset_mic, |
353 | INT, names, 6, NULL ); | 353 | INT, names, 6, NULL ); |
354 | } | 354 | } |
@@ -362,13 +362,13 @@ static int agc_cliptime_func(void) | |||
362 | { "800ms", TALK_ID(800, UNIT_MS) }, | 362 | { "800ms", TALK_ID(800, UNIT_MS) }, |
363 | { "1s", TALK_ID(1, UNIT_SEC) } | 363 | { "1s", TALK_ID(1, UNIT_SEC) } |
364 | }; | 364 | }; |
365 | return set_option(str(LANG_RECORD_AGC_CLIPTIME), | 365 | return set_option(str(LANG_RECORDING_AGC_CLIPTIME), |
366 | &global_settings.rec_agc_cliptime, | 366 | &global_settings.rec_agc_cliptime, |
367 | INT, names, 5, NULL ); | 367 | INT, names, 5, NULL ); |
368 | } | 368 | } |
369 | MENUITEM_FUNCTION(agc_preset, 0, ID2P(LANG_RECORD_AGC_PRESET), | 369 | MENUITEM_FUNCTION(agc_preset, 0, ID2P(LANG_RECORDING_AGC_PRESET), |
370 | agc_preset_func, NULL, NULL, Icon_Menu_setting); | 370 | agc_preset_func, NULL, NULL, Icon_Menu_setting); |
371 | MENUITEM_FUNCTION(agc_cliptime, 0, ID2P(LANG_RECORD_AGC_CLIPTIME), | 371 | MENUITEM_FUNCTION(agc_cliptime, 0, ID2P(LANG_RECORDING_AGC_CLIPTIME), |
372 | agc_cliptime_func, NULL, NULL, Icon_Menu_setting); | 372 | agc_cliptime_func, NULL, NULL, Icon_Menu_setting); |
373 | #endif /* HAVE_AGC */ | 373 | #endif /* HAVE_AGC */ |
374 | 374 | ||
@@ -441,12 +441,14 @@ int rectrigger(void) | |||
441 | int i, action = ACTION_REDRAW; | 441 | int i, action = ACTION_REDRAW; |
442 | bool done = false, changed = true; | 442 | bool done = false, changed = true; |
443 | const struct settings_list *settings[TRIG_OPTION_COUNT]; | 443 | const struct settings_list *settings[TRIG_OPTION_COUNT]; |
444 | 444 | ||
445 | int pm_x[NB_SCREENS]; | ||
445 | int pm_y[NB_SCREENS]; | 446 | int pm_y[NB_SCREENS]; |
447 | int pm_h[NB_SCREENS]; | ||
446 | int trig_xpos[NB_SCREENS]; | 448 | int trig_xpos[NB_SCREENS]; |
447 | int trig_ypos[NB_SCREENS]; | 449 | int trig_ypos[NB_SCREENS]; |
448 | int trig_width[NB_SCREENS]; | 450 | int trig_width[NB_SCREENS]; |
449 | 451 | ||
450 | int old_start_thres_db = global_settings.rec_start_thres_db; | 452 | int old_start_thres_db = global_settings.rec_start_thres_db; |
451 | int old_start_thres_linear = global_settings.rec_start_thres_linear; | 453 | int old_start_thres_linear = global_settings.rec_start_thres_linear; |
452 | int old_start_duration = global_settings.rec_start_duration; | 454 | int old_start_duration = global_settings.rec_start_duration; |
@@ -466,7 +468,9 @@ int rectrigger(void) | |||
466 | vp[i].height -= SYSFONT_HEIGHT*2; | 468 | vp[i].height -= SYSFONT_HEIGHT*2; |
467 | trig_xpos[i] = 0; | 469 | trig_xpos[i] = 0; |
468 | trig_ypos[i] = vp[i].y + vp[i].height; | 470 | trig_ypos[i] = vp[i].y + vp[i].height; |
471 | pm_x[i] = 0; | ||
469 | pm_y[i] = screens[i].getheight() - SYSFONT_HEIGHT; | 472 | pm_y[i] = screens[i].getheight() - SYSFONT_HEIGHT; |
473 | pm_h[i] = SYSFONT_HEIGHT; | ||
470 | trig_width[i] = screens[i].getwidth(); | 474 | trig_width[i] = screens[i].getwidth(); |
471 | } | 475 | } |
472 | /* TODO: what to do if there is < 4 lines on the screen? */ | 476 | /* TODO: what to do if there is < 4 lines on the screen? */ |
@@ -518,8 +522,8 @@ int rectrigger(void) | |||
518 | } | 522 | } |
519 | 523 | ||
520 | peak_meter_draw_trig(trig_xpos, trig_ypos, trig_width, NB_SCREENS); | 524 | peak_meter_draw_trig(trig_xpos, trig_ypos, trig_width, NB_SCREENS); |
521 | action = peak_meter_draw_get_btn(CONTEXT_SETTINGS_RECTRIGGER, 0, pm_y, | 525 | action = peak_meter_draw_get_btn(CONTEXT_SETTINGS_RECTRIGGER, |
522 | SYSFONT_HEIGHT, NB_SCREENS); | 526 | pm_x, pm_y, pm_h, NB_SCREENS); |
523 | FOR_NB_SCREENS(i) | 527 | FOR_NB_SCREENS(i) |
524 | screens[i].update(); | 528 | screens[i].update(); |
525 | i = gui_synclist_get_sel_pos(&lists); | 529 | i = gui_synclist_get_sel_pos(&lists); |