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.tar.gz rockbox-a053e58894292e1f12e4af578b9948da9cbdf76c.zip |
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 7f25903cae..52cbee2128 100644 --- a/apps/gui/list.c +++ b/apps/gui/list.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include "statusbar.h" | 33 | #include "statusbar.h" |
34 | #include "textarea.h" | 34 | #include "textarea.h" |
35 | #include "lang.h" | 35 | #include "lang.h" |
36 | #include "sound.h" | ||
36 | 37 | ||
37 | #ifdef HAVE_LCD_CHARCELLS | 38 | #ifdef HAVE_LCD_CHARCELLS |
38 | #define SCROLL_LIMIT 1 | 39 | #define SCROLL_LIMIT 1 |
@@ -924,6 +925,21 @@ unsigned gui_synclist_do_button(struct gui_synclist * lists, | |||
924 | 925 | ||
925 | switch(button) | 926 | switch(button) |
926 | { | 927 | { |
928 | #ifdef HAVE_VOLUME_IN_LIST | ||
929 | case ACTION_LIST_VOLUP: | ||
930 | global_settings.volume += 2; | ||
931 | /* up two because the falthrough brings it down one */ | ||
932 | case ACTION_LIST_VOLDOWN: | ||
933 | global_settings.volume--; | ||
934 | |||
935 | if (global_settings.volume < sound_min(SOUND_VOLUME)) | ||
936 | global_settings.volume = sound_min(SOUND_VOLUME); | ||
937 | if (global_settings.volume > sound_max(SOUND_VOLUME)) | ||
938 | global_settings.volume = sound_max(SOUND_VOLUME); | ||
939 | sound_set_volume(global_settings.volume); | ||
940 | settings_save(); | ||
941 | return button; | ||
942 | #endif | ||
927 | case ACTION_STD_PREV: | 943 | case ACTION_STD_PREV: |
928 | case ACTION_STD_PREVREPEAT: | 944 | case ACTION_STD_PREVREPEAT: |
929 | gui_synclist_select_previous(lists); | 945 | gui_synclist_select_previous(lists); |