diff options
| author | Jonathan Gordon <rockbox@jdgordon.info> | 2007-03-01 11:14:46 +0000 |
|---|---|---|
| committer | Jonathan Gordon <rockbox@jdgordon.info> | 2007-03-01 11:14:46 +0000 |
| commit | 91cb68a1fb5b019aaebf77fae6506bb807059b65 (patch) | |
| tree | ea3e56a915479ecad597cc0769ca24c2e2bcf686 /apps/gui | |
| parent | d94c7d3f7679789cce916d213b39f3b54dc0216b (diff) | |
| download | rockbox-91cb68a1fb5b019aaebf77fae6506bb807059b65.zip rockbox-91cb68a1fb5b019aaebf77fae6506bb807059b65.tar.gz rockbox-91cb68a1fb5b019aaebf77fae6506bb807059b65.tar.bz2 rockbox-91cb68a1fb5b019aaebf77fae6506bb807059b65.tar.xz | |
Introducing the root menu!
Blind users: get a new voice file as there are lots of lang changes and new strings.
FS#6630 or RootMenu on the wiki for more info. complaints to /dev/null :)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12528 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui')
| -rw-r--r-- | apps/gui/gwps.c | 53 |
1 files changed, 10 insertions, 43 deletions
diff --git a/apps/gui/gwps.c b/apps/gui/gwps.c index 00290a8..a5e1e26 100644 --- a/apps/gui/gwps.c +++ b/apps/gui/gwps.c @@ -59,6 +59,7 @@ #include "backdrop.h" #endif #include "ata_idle_notify.h" +#include "root_menu.h" #define WPS_DEFAULTCFG WPS_DIR "/rockbox_default.wps" #define RWPS_DEFAULTCFG WPS_DIR "/rockbox_default.rwps" @@ -238,7 +239,9 @@ long gui_wps_show(void) show_main_backdrop(); #endif action_signalscreenchange(); - onplay(wps_state.id3->path, TREE_ATTR_MPA, CONTEXT_WPS); + if (onplay(wps_state.id3->path, TREE_ATTR_MPA, CONTEXT_WPS) + == ONPLAY_MAINMENU) + return GO_TO_ROOT; #if LCD_DEPTH > 1 show_wps_backdrop(); #endif @@ -258,13 +261,8 @@ long gui_wps_show(void) #endif FOR_NB_SCREENS(i) gui_wps[i].display->stop_scroll(); - - /* set dir browser to current playing song */ - if (global_settings.browse_current && - wps_state.current_track_path[0] != '\0') - set_current_file(wps_state.current_track_path); action_signalscreenchange(); - return 0; + return GO_TO_PREVIOUS_BROWSER; break; /* play/pause */ @@ -497,23 +495,7 @@ long gui_wps_show(void) case ACTION_WPS_MENU: FOR_NB_SCREENS(i) gui_wps[i].display->stop_scroll(); - -#if LCD_DEPTH > 1 - show_main_backdrop(); -#endif - action_signalscreenchange(); - if (main_menu()) - return true; -#if LCD_DEPTH > 1 - show_wps_backdrop(); -#endif -#ifdef HAVE_LCD_BITMAP - FOR_NB_SCREENS(i) - { - gui_wps_set_margin(&gui_wps[i]); - } -#endif - restore = true; + return GO_TO_ROOT; break; @@ -639,12 +621,7 @@ long gui_wps_show(void) } if (update_failed) { - /* set dir browser to current playing song */ - if (global_settings.browse_current && - wps_state.current_track_path[0] != '\0') - set_current_file(wps_state.current_track_path); - - return 0; + return GO_TO_ROOT; } update_track = false; } @@ -666,12 +643,7 @@ long gui_wps_show(void) ab_reset_markers(); #endif - /* set dir browser to current playing song */ - if (global_settings.browse_current && - wps_state.current_track_path[0] != '\0') - set_current_file(wps_state.current_track_path); - - return 0; + return GO_TO_PREVIOUS; } if ( button ) @@ -685,12 +657,7 @@ long gui_wps_show(void) restoretimer = 0; if (gui_wps_display()) { - /* set dir browser to current playing song */ - if (global_settings.browse_current && - wps_state.current_track_path[0] != '\0') - set_current_file(wps_state.current_track_path); - - return 0; + return GO_TO_ROOT; } if (wps_state.id3){ @@ -699,7 +666,7 @@ long gui_wps_show(void) } } } - return 0; /* unreachable - just to reduce compiler warnings */ + return GO_TO_ROOT; /* unreachable - just to reduce compiler warnings */ } /* needs checking if needed end*/ |