diff options
author | Jonathan Gordon <rockbox@jdgordon.info> | 2009-12-09 07:25:46 +0000 |
---|---|---|
committer | Jonathan Gordon <rockbox@jdgordon.info> | 2009-12-09 07:25:46 +0000 |
commit | b2eb44ce0eb24632a46b0ea8c8c46a8f2ba35e24 (patch) | |
tree | ff3c0e14e9a53c08749ee1f233a5b1e887d3561a /apps/recorder/recording.c | |
parent | 85aad9b3972208b0e34ba0241ebb5314118ae05e (diff) | |
download | rockbox-b2eb44ce0eb24632a46b0ea8c8c46a8f2ba35e24.tar.gz rockbox-b2eb44ce0eb24632a46b0ea8c8c46a8f2ba35e24.zip |
FS#10824 - viewport/statusbar API rework.
Hopefully the only user visible changes are:
- fm and recording screens go by the statusbar setting (sbs or inbuilt)
- plugins go back to using the theme as they should for menus and lists
- splash screens might get cut a bit... entirely theme and splash dependant.. if there is a problematic one we can look at it later.
- hopefully nothing more than very minor screen flickerings... let me know exactly where they are so they can be fixed
New GUI screen rules:
* Screens assume that the theme (sbs+ui viewport+ maybe background image) are always enabled. They may be disabled on a per display basis, but MUST be re-enabled on exit
* Screens must not be coded in a way that requires a statusbar of any type.. the inbuilt bar will be removed shortly.
ALWAYS RESPECT THE USERS SETTINGS unless the screen requires the full display to fit.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23904 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/recorder/recording.c')
-rw-r--r-- | apps/recorder/recording.c | 15 |
1 files changed, 3 insertions, 12 deletions
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 */ |