diff options
| author | Jonathan Gordon <rockbox@jdgordon.info> | 2007-04-08 01:33:01 +0000 |
|---|---|---|
| committer | Jonathan Gordon <rockbox@jdgordon.info> | 2007-04-08 01:33:01 +0000 |
| commit | a053e58894292e1f12e4af578b9948da9cbdf76c (patch) | |
| tree | d33f0888cb551dff27088c872065f338f3648f04 /apps/gui | |
| parent | eef96946e1e962473e9049005eec2b2d0b2f8463 (diff) | |
| download | rockbox-a053e58894292e1f12e4af578b9948da9cbdf76c.zip rockbox-a053e58894292e1f12e4af578b9948da9cbdf76c.tar.gz rockbox-a053e58894292e1f12e4af578b9948da9cbdf76c.tar.bz2 rockbox-a053e58894292e1f12e4af578b9948da9cbdf76c.tar.xz | |
minor actions cleanup:
- CONTEXT_MAINMENU is not actually needed, use CONTEXT_TREE which does the same actions
- (gigabeat) use vol+/- in the lists to control volume (every list!) (FS#6982 in a better way)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13062 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui')
| -rw-r--r-- | apps/gui/list.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/apps/gui/list.c b/apps/gui/list.c index 7f25903..52cbee2 100644 --- a/apps/gui/list.c +++ b/apps/gui/list.c @@ -33,6 +33,7 @@ #include "statusbar.h" #include "textarea.h" #include "lang.h" +#include "sound.h" #ifdef HAVE_LCD_CHARCELLS #define SCROLL_LIMIT 1 @@ -924,6 +925,21 @@ unsigned gui_synclist_do_button(struct gui_synclist * lists, switch(button) { +#ifdef HAVE_VOLUME_IN_LIST + case ACTION_LIST_VOLUP: + global_settings.volume += 2; + /* up two because the falthrough brings it down one */ + case ACTION_LIST_VOLDOWN: + global_settings.volume--; + + if (global_settings.volume < sound_min(SOUND_VOLUME)) + global_settings.volume = sound_min(SOUND_VOLUME); + if (global_settings.volume > sound_max(SOUND_VOLUME)) + global_settings.volume = sound_max(SOUND_VOLUME); + sound_set_volume(global_settings.volume); + settings_save(); + return button; +#endif case ACTION_STD_PREV: case ACTION_STD_PREVREPEAT: gui_synclist_select_previous(lists); |