FS#9019 - Tidied up WPS context menu. Moved playlist to the top, added Playback Settings optiona and removed duplicate options.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17603 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Steve Bavin 2008-05-22 08:02:48 +00:00
parent 32db049a2a
commit 5f8bd63cba
6 changed files with 13 additions and 61 deletions

View file

@ -1494,13 +1494,13 @@
desc: in settings_menu() desc: in settings_menu()
user: user:
<source> <source>
*: "Playback" *: "Playback Settings"
</source> </source>
<dest> <dest>
*: "Playback" *: "Playback Settings"
</dest> </dest>
<voice> <voice>
*: "Playback" *: "Playback Settings"
</voice> </voice>
</phrase> </phrase>
<phrase> <phrase>
@ -11645,7 +11645,7 @@
</phrase> </phrase>
<phrase> <phrase>
id: LANG_ENABLE_STUDY_MODE id: LANG_ENABLE_STUDY_MODE
desc: WPS context menu desc: playback settings menu
user: user:
<source> <source>
*: "Enable Study Mode" *: "Enable Study Mode"
@ -11659,16 +11659,16 @@
</phrase> </phrase>
<phrase> <phrase>
id: LANG_DISABLE_STUDY_MODE id: LANG_DISABLE_STUDY_MODE
desc: WPS context menu desc: DEPRECATED
user: user:
<source> <source>
*: "Disable Study Mode" *: ""
</source> </source>
<dest> <dest>
*: "Disable Study Mode" *: ""
</dest> </dest>
<voice> <voice>
*: "Disable Study Mode" *: ""
</voice> </voice>
</phrase> </phrase>
<phrase> <phrase>

View file

@ -26,7 +26,7 @@
extern const struct menu_item_ex extern const struct menu_item_ex
main_menu_, /* main_menu.c */ main_menu_, /* main_menu.c */
display_menu, /* display_menu.c */ display_menu, /* display_menu.c */
playback_menu_item, /* playback_menu.c */ playback_settings, /* playback_menu.c */
#ifdef HAVE_RECORDING #ifdef HAVE_RECORDING
recording_settings, /* recording_menu.c */ recording_settings, /* recording_menu.c */
#endif #endif

View file

@ -179,7 +179,7 @@ MENUITEM_SETTING(study_hop_step, &global_settings.study_hop_step, NULL);
MAKE_MENU(study_mode_menu, ID2P(LANG_STUDY_MODE), 0, Icon_NOICON, MAKE_MENU(study_mode_menu, ID2P(LANG_STUDY_MODE), 0, Icon_NOICON,
&study_mode, &study_hop_step); &study_mode, &study_hop_step);
MAKE_MENU(playback_menu_item,ID2P(LANG_PLAYBACK),0, MAKE_MENU(playback_settings,ID2P(LANG_PLAYBACK),0,
Icon_Playback_menu, Icon_Playback_menu,
&shuffle_item, &repeat_mode, &play_selected, &shuffle_item, &repeat_mode, &play_selected,
&ff_rewind_settings_menu, &ff_rewind_settings_menu,

View file

@ -490,7 +490,7 @@ MENUITEM_FUNCTION(browse_langs, 0, ID2P(LANG_LANGUAGE), language_browse,
MAKE_MENU(settings_menu_item, ID2P(LANG_GENERAL_SETTINGS), 0, MAKE_MENU(settings_menu_item, ID2P(LANG_GENERAL_SETTINGS), 0,
Icon_General_settings_menu, Icon_General_settings_menu,
&playback_menu_item, &playlist_settings, &file_menu, &playback_settings, &playlist_settings, &file_menu,
#ifdef HAVE_TAGCACHE #ifdef HAVE_TAGCACHE
&tagcache_menu, &tagcache_menu,
#endif #endif

View file

@ -55,9 +55,6 @@
#include "icons.h" #include "icons.h"
#endif #endif
#include "sound_menu.h" #include "sound_menu.h"
#if CONFIG_CODEC == SWCODEC
#include "menus/eq_menu.h"
#endif
#include "playlist_menu.h" #include "playlist_menu.h"
#include "playlist_catalog.h" #include "playlist_catalog.h"
#ifdef HAVE_TAGCACHE #ifdef HAVE_TAGCACHE
@ -1007,47 +1004,6 @@ MENUITEM_FUNCTION(browse_id3_item, 0, ID2P(LANG_MENU_SHOW_ID3_INFO),
MENUITEM_FUNCTION(pitch_screen_item, 0, ID2P(LANG_PITCH), MENUITEM_FUNCTION(pitch_screen_item, 0, ID2P(LANG_PITCH),
pitch_screen, NULL, NULL, Icon_Audio); pitch_screen, NULL, NULL, Icon_Audio);
#endif #endif
#if CONFIG_CODEC == SWCODEC
MENUITEM_FUNCTION(eq_menu_graphical_item, 0, ID2P(LANG_EQUALIZER_GRAPHICAL),
eq_menu_graphical, NULL, NULL, Icon_Audio);
MENUITEM_FUNCTION(eq_browse_presets_item, 0, ID2P(LANG_EQUALIZER_BROWSE),
eq_browse_presets, NULL, NULL, Icon_Audio);
#endif
/* study mode setting toggling */
static char* study_mode_toggle_get_name(int selected_item, void * data,
char *buffer)
{
(void)selected_item;
(void)data;
snprintf(buffer, MAX_PATH,
global_settings.study_mode ? str(LANG_DISABLE_STUDY_MODE)
: str(LANG_ENABLE_STUDY_MODE));
return buffer;
}
static int study_mode_toggle_speak_item(int selected_item, void * data)
{
(void)selected_item;
(void)data;
talk_id(global_settings.study_mode ? LANG_DISABLE_STUDY_MODE
: LANG_ENABLE_STUDY_MODE, false);
return 0;
}
static int toggle_study_mode(void * param)
{
(void)param;
global_settings.study_mode ^= 1;
return 0;
}
MENUITEM_FUNCTION_DYNTEXT(study_mode_toggle, 0,
toggle_study_mode, NULL,
study_mode_toggle_get_name,
study_mode_toggle_speak_item,
NULL, NULL, Icon_NOICON);
/* CONTEXT_[TREE|ID3DB] items */ /* CONTEXT_[TREE|ID3DB] items */
static int clipboard_callback(int action,const struct menu_item_ex *this_item); static int clipboard_callback(int action,const struct menu_item_ex *this_item);
@ -1179,7 +1135,7 @@ static int clipboard_callback(int action,const struct menu_item_ex *this_item)
MAKE_ONPLAYMENU( wps_onplay_menu, ID2P(LANG_ONPLAY_MENU_TITLE), MAKE_ONPLAYMENU( wps_onplay_menu, ID2P(LANG_ONPLAY_MENU_TITLE),
onplaymenu_callback, Icon_Audio, onplaymenu_callback, Icon_Audio,
&sound_settings, &wps_playlist_menu, &cat_playlist_menu, &wps_playlist_menu, &cat_playlist_menu, &sound_settings, &playback_settings,
#ifdef HAVE_TAGCACHE #ifdef HAVE_TAGCACHE
&rating_item, &rating_item,
#endif #endif
@ -1187,10 +1143,6 @@ MAKE_ONPLAYMENU( wps_onplay_menu, ID2P(LANG_ONPLAY_MENU_TITLE),
#ifdef HAVE_PITCHSCREEN #ifdef HAVE_PITCHSCREEN
&pitch_screen_item, &pitch_screen_item,
#endif #endif
#if CONFIG_CODEC == SWCODEC
&eq_menu_graphical_item, &eq_browse_presets_item,
#endif
&study_mode_toggle,
); );
/* used when onplay() is not called in the CONTEXT_WPS context */ /* used when onplay() is not called in the CONTEXT_WPS context */
MAKE_ONPLAYMENU( tree_onplay_menu, ID2P(LANG_ONPLAY_MENU_TITLE), MAKE_ONPLAYMENU( tree_onplay_menu, ID2P(LANG_ONPLAY_MENU_TITLE),

View file

@ -326,7 +326,7 @@ static const struct root_items items[] = {
#ifdef HAVE_TAGCACHE #ifdef HAVE_TAGCACHE
[GO_TO_DBBROWSER] = { browser, (void*)GO_TO_DBBROWSER, &tagcache_menu }, [GO_TO_DBBROWSER] = { browser, (void*)GO_TO_DBBROWSER, &tagcache_menu },
#endif #endif
[GO_TO_WPS] = { wpsscrn, NULL, &playback_menu_item }, [GO_TO_WPS] = { wpsscrn, NULL, &playback_settings },
[GO_TO_MAINMENU] = { menu, NULL, &manage_settings }, [GO_TO_MAINMENU] = { menu, NULL, &manage_settings },
#ifdef HAVE_RECORDING #ifdef HAVE_RECORDING