summaryrefslogtreecommitdiff
path: root/apps/tree.c
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2007-04-09 13:39:37 +0000
committerJens Arnold <amiconn@rockbox.org>2007-04-09 13:39:37 +0000
commit178c565beb521230ec5434f59e36c2592f32a281 (patch)
treefcc205085b783b2458a95429019ae42ae1754c97 /apps/tree.c
parentdcb4aa242b5180214b899004c3860364c4466a1e (diff)
downloadrockbox-178c565beb521230ec5434f59e36c2592f32a281.zip
rockbox-178c565beb521230ec5434f59e36c2592f32a281.tar.gz
rockbox-178c565beb521230ec5434f59e36c2592f32a281.tar.bz2
rockbox-178c565beb521230ec5434f59e36c2592f32a281.tar.xz
Stop/shutdown logic rework in browsers and menus. Recorder V1: Double-Off shutdown is now possible from menus and sub-browsers as well. Player, other targets which are always powered during charging: Attempted shutdown from menu with charger plugged now displays the charging splash.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13079 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/tree.c')
-rw-r--r--apps/tree.c41
1 files changed, 4 insertions, 37 deletions
diff --git a/apps/tree.c b/apps/tree.c
index 5f5cb11..723c003 100644
--- a/apps/tree.c
+++ b/apps/tree.c
@@ -665,43 +665,10 @@ static int dirbrowse()
break;
case ACTION_TREE_STOP:
- if (*tc.dirfilter < NUM_FILTER_MODES)
- {
- /* Stop the music if it is playing */
- if(audio_status()) {
- if (!global_settings.party_mode) {
- if (global_settings.fade_on_stop)
- fade(0);
- bookmark_autobookmark();
- audio_stop();
- }
- }
-#if CONFIG_CHARGING && \
- (CONFIG_KEYPAD == RECORDER_PAD) && !defined(HAVE_SW_POWEROFF)
- else {
- if (!charger_inserted()) {
- if(shutdown_screen())
- reload_dir = true;
- } else {
- charging_splash();
- }
- restore = true;
- }
-#endif
- }
-#if CONFIG_CHARGING && !defined(HAVE_POWEROFF_WHILE_CHARGING)
-{
- static int last_off = 0;
- if (current_tick - last_off < 50) {
- if (charger_inserted()) {
- charging_splash();
- restore = true;
- }
- }
- last_off = current_tick;
-}
-#endif
- break; /* case ACTION_TREE_STOP: */
+ if (list_stop_handler())
+ restore = true;
+ break;
+
case ACTION_STD_MENU:
return GO_TO_ROOT;
break;