From a053e58894292e1f12e4af578b9948da9cbdf76c Mon Sep 17 00:00:00 2001 From: Jonathan Gordon Date: Sun, 8 Apr 2007 01:33:01 +0000 Subject: 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 --- apps/gui/list.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'apps/gui') 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 @@ #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); -- cgit v1.2.3