diff options
author | Jonathan Gordon <rockbox@jdgordon.info> | 2011-03-27 07:23:38 +0000 |
---|---|---|
committer | Jonathan Gordon <rockbox@jdgordon.info> | 2011-03-27 07:23:38 +0000 |
commit | 443b1349830912add7211e07557029b9c185d948 (patch) | |
tree | bffa8efdf04b0eb8d3502e0af4691c9a257f1c8f /apps/gui/skin_engine/skin_parser.c | |
parent | 86c4ec7277ac1c2a130a9ac1a3500c8360af5c7e (diff) | |
download | rockbox-443b1349830912add7211e07557029b9c185d948.tar.gz rockbox-443b1349830912add7211e07557029b9c185d948.zip |
Fix touchregions muting volume, and change &<action> to mean 'needs long press but only fire once'. Use *<action> for 'long press and allow repeats'
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29653 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/skin_engine/skin_parser.c')
-rw-r--r-- | apps/gui/skin_engine/skin_parser.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/apps/gui/skin_engine/skin_parser.c b/apps/gui/skin_engine/skin_parser.c index 236c6feea1..468f6808c4 100644 --- a/apps/gui/skin_engine/skin_parser.c +++ b/apps/gui/skin_engine/skin_parser.c | |||
@@ -1030,6 +1030,7 @@ static int parse_touchregion(struct skin_element *element, | |||
1030 | region->reverse_bar = false; | 1030 | region->reverse_bar = false; |
1031 | region->value = 0; | 1031 | region->value = 0; |
1032 | region->last_press = 0xffff; | 1032 | region->last_press = 0xffff; |
1033 | region->press_length = PRESS; | ||
1033 | action = element->params[p++].data.text; | 1034 | action = element->params[p++].data.text; |
1034 | 1035 | ||
1035 | strcpy(temp, action); | 1036 | strcpy(temp, action); |
@@ -1042,20 +1043,23 @@ static int parse_touchregion(struct skin_element *element, | |||
1042 | } | 1043 | } |
1043 | 1044 | ||
1044 | if(!strcmp(pb_string, action)) | 1045 | if(!strcmp(pb_string, action)) |
1045 | region->type = WPS_TOUCHREGION_SCROLLBAR; | 1046 | region->action = ACTION_TOUCH_SCROLLBAR; |
1046 | else if(!strcmp(vol_string, action)) | 1047 | else if(!strcmp(vol_string, action)) |
1047 | region->type = WPS_TOUCHREGION_VOLUME; | 1048 | region->action = ACTION_TOUCH_VOLUME; |
1048 | else | 1049 | else |
1049 | { | 1050 | { |
1050 | region->type = WPS_TOUCHREGION_ACTION; | ||
1051 | |||
1052 | if (*action == '&') | 1051 | if (*action == '&') |
1053 | { | 1052 | { |
1054 | action++; | 1053 | action++; |
1055 | region->repeat = true; | 1054 | region->press_length = LONG_PRESS; |
1055 | } | ||
1056 | else if(*action == '*') | ||
1057 | { | ||
1058 | action++; | ||
1059 | region->press_length = REPEAT; | ||
1056 | } | 1060 | } |
1057 | else | 1061 | else |
1058 | region->repeat = false; | 1062 | region->press_length = PRESS; |
1059 | 1063 | ||
1060 | imax = ARRAYLEN(touchactions); | 1064 | imax = ARRAYLEN(touchactions); |
1061 | for (i = 0; i < imax; i++) | 1065 | for (i = 0; i < imax; i++) |