diff options
Diffstat (limited to 'apps/recorder')
-rw-r--r-- | apps/recorder/keyboard.c | 8 | ||||
-rw-r--r-- | apps/recorder/radio.c | 24 | ||||
-rw-r--r-- | apps/recorder/recording.c | 15 |
3 files changed, 15 insertions, 32 deletions
diff --git a/apps/recorder/keyboard.c b/apps/recorder/keyboard.c index e6d31cb450..4d59a85bb1 100644 --- a/apps/recorder/keyboard.c +++ b/apps/recorder/keyboard.c | |||
@@ -291,10 +291,10 @@ int kbd_input(char* text, int buflen) | |||
291 | unsigned char morse_code = 0; | 291 | unsigned char morse_code = 0; |
292 | int morse_tick = 0; | 292 | int morse_tick = 0; |
293 | #endif | 293 | #endif |
294 | int oldbars = viewportmanager_set_statusbar(VP_SB_HIDE_ALL); | ||
295 | FOR_NB_SCREENS(l) | 294 | FOR_NB_SCREENS(l) |
296 | { | 295 | { |
297 | struct keyboard_parameters *pm = ¶m[l]; | 296 | struct keyboard_parameters *pm = ¶m[l]; |
297 | viewportmanager_theme_enable(l, false, NULL); | ||
298 | #if LCD_WIDTH >= 160 && LCD_HEIGHT >= 96 | 298 | #if LCD_WIDTH >= 160 && LCD_HEIGHT >= 96 |
299 | struct screen *sc = &screens[l]; | 299 | struct screen *sc = &screens[l]; |
300 | 300 | ||
@@ -1126,9 +1126,9 @@ int kbd_input(char* text, int buflen) | |||
1126 | #endif /* HAVE_MORSE_INPUT && KBD_TOGGLE_INPUT */ | 1126 | #endif /* HAVE_MORSE_INPUT && KBD_TOGGLE_INPUT */ |
1127 | 1127 | ||
1128 | FOR_NB_SCREENS(l) | 1128 | FOR_NB_SCREENS(l) |
1129 | { | ||
1129 | screens[l].setfont(FONT_UI); | 1130 | screens[l].setfont(FONT_UI); |
1130 | viewportmanager_set_statusbar(oldbars); | 1131 | viewportmanager_theme_undo(l); |
1131 | send_event(GUI_EVENT_REFRESH, NULL); | 1132 | } |
1132 | |||
1133 | return ret; | 1133 | return ret; |
1134 | } | 1134 | } |
diff --git a/apps/recorder/radio.c b/apps/recorder/radio.c index 87614aec15..d49b94d434 100644 --- a/apps/recorder/radio.c +++ b/apps/recorder/radio.c | |||
@@ -494,7 +494,6 @@ int radio_screen(void) | |||
494 | int button_timeout = current_tick + (2*HZ); | 494 | int button_timeout = current_tick + (2*HZ); |
495 | #endif | 495 | #endif |
496 | struct viewport vp[NB_SCREENS]; | 496 | struct viewport vp[NB_SCREENS]; |
497 | int oldbars = 0, fmbars = VP_SB_ALLSCREENS; | ||
498 | #ifdef HAVE_BUTTONBAR | 497 | #ifdef HAVE_BUTTONBAR |
499 | struct gui_buttonbar buttonbar; | 498 | struct gui_buttonbar buttonbar; |
500 | gui_buttonbar_init(&buttonbar); | 499 | gui_buttonbar_init(&buttonbar); |
@@ -506,9 +505,6 @@ int radio_screen(void) | |||
506 | 505 | ||
507 | /* always display status bar in radio screen for now */ | 506 | /* always display status bar in radio screen for now */ |
508 | FOR_NB_SCREENS(i) | 507 | FOR_NB_SCREENS(i) |
509 | fmbars |= VP_SB_IGNORE_SETTING(i); | ||
510 | oldbars = viewportmanager_set_statusbar(fmbars); | ||
511 | FOR_NB_SCREENS(i) | ||
512 | { | 508 | { |
513 | viewport_set_defaults(&vp[i], i); | 509 | viewport_set_defaults(&vp[i], i); |
514 | #ifdef HAVE_BUTTONBAR | 510 | #ifdef HAVE_BUTTONBAR |
@@ -761,14 +757,14 @@ int radio_screen(void) | |||
761 | break; | 757 | break; |
762 | 758 | ||
763 | case ACTION_FM_MENU: | 759 | case ACTION_FM_MENU: |
764 | viewportmanager_set_statusbar(oldbars); | ||
765 | FOR_NB_SCREENS(i) | 760 | FOR_NB_SCREENS(i) |
761 | { | ||
766 | screens[i].scroll_stop(&vp[i]); | 762 | screens[i].scroll_stop(&vp[i]); |
763 | } | ||
767 | radio_menu(); | 764 | radio_menu(); |
768 | curr_preset = find_preset(curr_freq); | 765 | curr_preset = find_preset(curr_freq); |
769 | viewportmanager_set_statusbar(fmbars); | ||
770 | FOR_NB_SCREENS(i) | 766 | FOR_NB_SCREENS(i) |
771 | { | 767 | { |
772 | screens[i].set_viewport(&vp[i]); | 768 | screens[i].set_viewport(&vp[i]); |
773 | screens[i].clear_viewport(); | 769 | screens[i].clear_viewport(); |
774 | screens[i].update_viewport(); | 770 | screens[i].update_viewport(); |
@@ -798,9 +794,7 @@ int radio_screen(void) | |||
798 | 794 | ||
799 | break; | 795 | break; |
800 | } | 796 | } |
801 | viewportmanager_set_statusbar(oldbars); | ||
802 | handle_radio_presets(); | 797 | handle_radio_presets(); |
803 | viewportmanager_set_statusbar(fmbars); | ||
804 | FOR_NB_SCREENS(i) | 798 | FOR_NB_SCREENS(i) |
805 | { | 799 | { |
806 | screens[i].set_viewport(&vp[i]); | 800 | screens[i].set_viewport(&vp[i]); |
@@ -932,12 +926,9 @@ int radio_screen(void) | |||
932 | FOR_NB_SCREENS(i) | 926 | FOR_NB_SCREENS(i) |
933 | { | 927 | { |
934 | screens[i].set_viewport(&vp[i]); | 928 | screens[i].set_viewport(&vp[i]); |
935 | peak_meter_screen(&screens[i],0, | 929 | peak_meter_screen(&screens[i],0, fh*(top_of_screen + 4),fh); |
936 | STATUSBAR_HEIGHT + fh*(top_of_screen + 4), | 930 | screens[i].update_rect(0, fh*(top_of_screen + 4), |
937 | fh); | 931 | screens[i].getwidth(), fh); |
938 | screens[i].update_rect(0, | ||
939 | STATUSBAR_HEIGHT + fh*(top_of_screen + 4), | ||
940 | screens[i].getwidth(), fh); | ||
941 | screens[i].set_viewport(NULL); | 932 | screens[i].set_viewport(NULL); |
942 | } | 933 | } |
943 | } | 934 | } |
@@ -1134,8 +1125,9 @@ int radio_screen(void) | |||
1134 | cpu_idle_mode(false); | 1125 | cpu_idle_mode(false); |
1135 | #endif | 1126 | #endif |
1136 | FOR_NB_SCREENS(i) | 1127 | FOR_NB_SCREENS(i) |
1128 | { | ||
1137 | screens[i].scroll_stop(&vp[i]); | 1129 | screens[i].scroll_stop(&vp[i]); |
1138 | viewportmanager_set_statusbar(oldbars); | 1130 | } |
1139 | in_screen = false; | 1131 | in_screen = false; |
1140 | #if CONFIG_CODEC != SWCODEC | 1132 | #if CONFIG_CODEC != SWCODEC |
1141 | return have_recorded; | 1133 | return have_recorded; |
diff --git a/apps/recorder/recording.c b/apps/recorder/recording.c index 17c10f7328..0d1ada73f6 100644 --- a/apps/recorder/recording.c +++ b/apps/recorder/recording.c | |||
@@ -1019,7 +1019,6 @@ bool recording_screen(bool no_source) | |||
1019 | int peak_l, peak_r; | 1019 | int peak_l, peak_r; |
1020 | int balance = 0; | 1020 | int balance = 0; |
1021 | #endif | 1021 | #endif |
1022 | int oldbars, recbars = VP_SB_ALLSCREENS; | ||
1023 | int i; | 1022 | int i; |
1024 | int pm_x[NB_SCREENS]; /* peakmeter (and trigger bar) x pos */ | 1023 | int pm_x[NB_SCREENS]; /* peakmeter (and trigger bar) x pos */ |
1025 | int pm_y[NB_SCREENS]; /* peakmeter y pos */ | 1024 | int pm_y[NB_SCREENS]; /* peakmeter y pos */ |
@@ -1082,9 +1081,6 @@ bool recording_screen(bool no_source) | |||
1082 | 1081 | ||
1083 | /* viewport init and calculations that only needs to be done once */ | 1082 | /* viewport init and calculations that only needs to be done once */ |
1084 | FOR_NB_SCREENS(i) | 1083 | FOR_NB_SCREENS(i) |
1085 | recbars |= VP_SB_IGNORE_SETTING(i); | ||
1086 | oldbars = viewportmanager_set_statusbar(recbars); | ||
1087 | FOR_NB_SCREENS(i) | ||
1088 | { | 1084 | { |
1089 | struct viewport *v; | 1085 | struct viewport *v; |
1090 | /* top vp, 4 lines, force sys font if total screen < 6 lines | 1086 | /* top vp, 4 lines, force sys font if total screen < 6 lines |
@@ -1122,6 +1118,9 @@ bool recording_screen(bool no_source) | |||
1122 | /* init the bottom list */ | 1118 | /* init the bottom list */ |
1123 | gui_synclist_init(&lists, reclist_get_name, NULL, false, 1, vp_list); | 1119 | gui_synclist_init(&lists, reclist_get_name, NULL, false, 1, vp_list); |
1124 | gui_synclist_set_title(&lists, NULL, Icon_NOICON); | 1120 | gui_synclist_set_title(&lists, NULL, Icon_NOICON); |
1121 | |||
1122 | |||
1123 | send_event(GUI_EVENT_ACTIONUPDATE, (void*)1); /* force a redraw */ | ||
1125 | 1124 | ||
1126 | /* start of the loop: we stay in this loop until user quits recscreen */ | 1125 | /* start of the loop: we stay in this loop until user quits recscreen */ |
1127 | while(done <= 0) | 1126 | while(done <= 0) |
@@ -1576,7 +1575,6 @@ bool recording_screen(bool no_source) | |||
1576 | /* led is restored at begin of loop / end of function */ | 1575 | /* led is restored at begin of loop / end of function */ |
1577 | led(false); | 1576 | led(false); |
1578 | #endif | 1577 | #endif |
1579 | viewportmanager_set_statusbar(oldbars); | ||
1580 | if (recording_menu(no_source)) | 1578 | if (recording_menu(no_source)) |
1581 | { | 1579 | { |
1582 | done = 1; | 1580 | done = 1; |
@@ -1590,7 +1588,6 @@ bool recording_screen(bool no_source) | |||
1590 | done = -1; | 1588 | done = -1; |
1591 | /* the init is now done at the beginning of the loop */ | 1589 | /* the init is now done at the beginning of the loop */ |
1592 | } | 1590 | } |
1593 | viewportmanager_set_statusbar(recbars); | ||
1594 | } | 1591 | } |
1595 | break; | 1592 | break; |
1596 | 1593 | ||
@@ -1602,7 +1599,6 @@ bool recording_screen(bool no_source) | |||
1602 | /* led is restored at begin of loop / end of function */ | 1599 | /* led is restored at begin of loop / end of function */ |
1603 | led(false); | 1600 | led(false); |
1604 | #endif | 1601 | #endif |
1605 | viewportmanager_set_statusbar(oldbars); | ||
1606 | if (f2_rec_screen()) | 1602 | if (f2_rec_screen()) |
1607 | { | 1603 | { |
1608 | rec_status |= RCSTAT_HAVE_RECORDED; | 1604 | rec_status |= RCSTAT_HAVE_RECORDED; |
@@ -1610,7 +1606,6 @@ bool recording_screen(bool no_source) | |||
1610 | } | 1606 | } |
1611 | else | 1607 | else |
1612 | update_countdown = 0; /* Update immediately */ | 1608 | update_countdown = 0; /* Update immediately */ |
1613 | viewportmanager_set_statusbar(recbars); | ||
1614 | } | 1609 | } |
1615 | break; | 1610 | break; |
1616 | 1611 | ||
@@ -1626,7 +1621,6 @@ bool recording_screen(bool no_source) | |||
1626 | /* led is restored at begin of loop / end of function */ | 1621 | /* led is restored at begin of loop / end of function */ |
1627 | led(false); | 1622 | led(false); |
1628 | #endif | 1623 | #endif |
1629 | viewportmanager_set_statusbar(oldbars); | ||
1630 | if (f3_rec_screen()) | 1624 | if (f3_rec_screen()) |
1631 | { | 1625 | { |
1632 | rec_status |= RCSTAT_HAVE_RECORDED; | 1626 | rec_status |= RCSTAT_HAVE_RECORDED; |
@@ -1634,7 +1628,6 @@ bool recording_screen(bool no_source) | |||
1634 | } | 1628 | } |
1635 | else | 1629 | else |
1636 | update_countdown = 0; /* Update immediately */ | 1630 | update_countdown = 0; /* Update immediately */ |
1637 | viewportmanager_set_statusbar(recbars); | ||
1638 | } | 1631 | } |
1639 | break; | 1632 | break; |
1640 | #endif /* CONFIG_KEYPAD == RECORDER_PAD */ | 1633 | #endif /* CONFIG_KEYPAD == RECORDER_PAD */ |
@@ -1920,8 +1913,6 @@ rec_abort: | |||
1920 | FOR_NB_SCREENS(i) | 1913 | FOR_NB_SCREENS(i) |
1921 | screens[i].setfont(FONT_UI); | 1914 | screens[i].setfont(FONT_UI); |
1922 | 1915 | ||
1923 | viewportmanager_set_statusbar(oldbars); | ||
1924 | send_event(GUI_EVENT_REFRESH, NULL); | ||
1925 | 1916 | ||
1926 | /* if the directory was created or recording happened, make sure the | 1917 | /* if the directory was created or recording happened, make sure the |
1927 | browser is updated */ | 1918 | browser is updated */ |