summaryrefslogtreecommitdiffstats
path: root/apps/gui/statusbar-skinned.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/gui/statusbar-skinned.c')
-rw-r--r--apps/gui/statusbar-skinned.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/apps/gui/statusbar-skinned.c b/apps/gui/statusbar-skinned.c
index a5c751b804..ad89f7a6cb 100644
--- a/apps/gui/statusbar-skinned.c
+++ b/apps/gui/statusbar-skinned.c
@@ -39,6 +39,10 @@
#include "font.h"
#include "icon.h"
#include "option_select.h"
+#ifdef HAVE_TOUCHSCREEN
+#include "sound.h"
+#include "misc.h"
+#endif
/* initial setup of wps_data */
static int update_delay = DEFAULT_UPDATE_DELAY;
@@ -296,10 +300,23 @@ int sb_touch_to_button(int context)
case ACTION_SETTINGS_INC:
case ACTION_SETTINGS_DEC:
{
- const struct settings_list *setting = region->extradata;
+ const struct settings_list *setting = region->data;
option_select_next_val(setting, button == ACTION_SETTINGS_DEC, true);
}
return ACTION_REDRAW;
+ case ACTION_TOUCH_MUTE:
+ {
+ const int min_vol = sound_min(SOUND_VOLUME);
+ if (global_settings.volume == min_vol)
+ global_settings.volume = region->value;
+ else
+ {
+ region->value = global_settings.volume;
+ global_settings.volume = min_vol;
+ }
+ setvol();
+ }
+ return ACTION_REDRAW;
/* TODO */
}
return button;