diff options
author | William Wilgus <wilgus.william@gmail.com> | 2022-12-14 03:06:04 -0500 |
---|---|---|
committer | William Wilgus <wilgus.william@gmail.com> | 2022-12-14 22:35:33 -0500 |
commit | 6b87bfadfff6c44722f8ffe5227c05c41b1b47c8 (patch) | |
tree | a0f346c8cde95c33d0561977a064cc438841923e /apps/misc.c | |
parent | eaf717744d425e0bb8905f451e7443b07b67f97b (diff) | |
download | rockbox-6b87bfadfff6c44722f8ffe5227c05c41b1b47c8.tar.gz rockbox-6b87bfadfff6c44722f8ffe5227c05c41b1b47c8.zip |
wps.c cleanup gui_show_wps
remove some old cruft move a few things around clean-up flow
Change-Id: I138c6cd9e2d58ef526eb686333da413819df725d
Diffstat (limited to 'apps/misc.c')
-rw-r--r-- | apps/misc.c | 35 |
1 files changed, 30 insertions, 5 deletions
diff --git a/apps/misc.c b/apps/misc.c index aa79ec632d..71ab913139 100644 --- a/apps/misc.c +++ b/apps/misc.c | |||
@@ -1569,25 +1569,43 @@ int clamp_value_wrap(int value, int max, int min) | |||
1569 | static enum current_activity | 1569 | static enum current_activity |
1570 | current_activity[MAX_ACTIVITY_DEPTH] = {ACTIVITY_UNKNOWN}; | 1570 | current_activity[MAX_ACTIVITY_DEPTH] = {ACTIVITY_UNKNOWN}; |
1571 | static int current_activity_top = 0; | 1571 | static int current_activity_top = 0; |
1572 | void push_current_activity(enum current_activity screen) | 1572 | |
1573 | static void push_current_activity_refresh(enum current_activity screen, bool refresh) | ||
1573 | { | 1574 | { |
1574 | current_activity[current_activity_top++] = screen; | 1575 | current_activity[current_activity_top++] = screen; |
1575 | FOR_NB_SCREENS(i) | 1576 | FOR_NB_SCREENS(i) |
1576 | { | 1577 | { |
1577 | skinlist_set_cfg(i, NULL); | 1578 | skinlist_set_cfg(i, NULL); |
1578 | skin_update(CUSTOM_STATUSBAR, i, SKIN_REFRESH_ALL); | 1579 | if (refresh) |
1580 | skin_update(CUSTOM_STATUSBAR, i, SKIN_REFRESH_ALL); | ||
1579 | } | 1581 | } |
1580 | } | 1582 | } |
1581 | 1583 | ||
1582 | void push_activity_without_refresh(enum current_activity screen) | 1584 | static void pop_current_activity_refresh(bool refresh) |
1583 | { | 1585 | { |
1584 | current_activity[current_activity_top++] = screen; | 1586 | current_activity_top--; |
1585 | FOR_NB_SCREENS(i) | 1587 | FOR_NB_SCREENS(i) |
1588 | { | ||
1586 | skinlist_set_cfg(i, NULL); | 1589 | skinlist_set_cfg(i, NULL); |
1590 | if (refresh) | ||
1591 | skin_update(CUSTOM_STATUSBAR, i, SKIN_REFRESH_ALL); | ||
1592 | } | ||
1593 | } | ||
1594 | |||
1595 | void push_current_activity(enum current_activity screen) | ||
1596 | { | ||
1597 | push_current_activity_refresh(screen, true); | ||
1598 | } | ||
1599 | |||
1600 | void push_activity_without_refresh(enum current_activity screen) | ||
1601 | { | ||
1602 | push_current_activity_refresh(screen, false); | ||
1587 | } | 1603 | } |
1588 | 1604 | ||
1589 | void pop_current_activity(enum activity_refresh refresh) | 1605 | void pop_current_activity(void) |
1590 | { | 1606 | { |
1607 | pop_current_activity_refresh(true); | ||
1608 | #if 0 | ||
1591 | current_activity_top--; | 1609 | current_activity_top--; |
1592 | FOR_NB_SCREENS(i) | 1610 | FOR_NB_SCREENS(i) |
1593 | { | 1611 | { |
@@ -1595,7 +1613,14 @@ void pop_current_activity(enum activity_refresh refresh) | |||
1595 | if (ACTIVITY_REFRESH_NOW == refresh) | 1613 | if (ACTIVITY_REFRESH_NOW == refresh) |
1596 | skin_update(CUSTOM_STATUSBAR, i, SKIN_REFRESH_ALL); | 1614 | skin_update(CUSTOM_STATUSBAR, i, SKIN_REFRESH_ALL); |
1597 | } | 1615 | } |
1616 | #endif | ||
1598 | } | 1617 | } |
1618 | |||
1619 | void pop_current_activity_without_refresh(void) | ||
1620 | { | ||
1621 | pop_current_activity_refresh(false); | ||
1622 | } | ||
1623 | |||
1599 | enum current_activity get_current_activity(void) | 1624 | enum current_activity get_current_activity(void) |
1600 | { | 1625 | { |
1601 | return current_activity[current_activity_top?current_activity_top-1:0]; | 1626 | return current_activity[current_activity_top?current_activity_top-1:0]; |