summaryrefslogtreecommitdiff
path: root/apps/gui/skin_engine/skin_parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/gui/skin_engine/skin_parser.c')
-rw-r--r--apps/gui/skin_engine/skin_parser.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/apps/gui/skin_engine/skin_parser.c b/apps/gui/skin_engine/skin_parser.c
index 39029f79c6..ac68b0dcba 100644
--- a/apps/gui/skin_engine/skin_parser.c
+++ b/apps/gui/skin_engine/skin_parser.c
@@ -960,6 +960,7 @@ static int parse_progressbar_tag(struct skin_element* element,
960 struct viewport *vp = &curr_vp->vp; 960 struct viewport *vp = &curr_vp->vp;
961 struct skin_tag_parameter *param = get_param(element, 0); 961 struct skin_tag_parameter *param = get_param(element, 0);
962 int curr_param = 0; 962 int curr_param = 0;
963 int setting_offset = 0;
963 char *image_filename = NULL; 964 char *image_filename = NULL;
964#ifdef HAVE_TOUCHSCREEN 965#ifdef HAVE_TOUCHSCREEN
965 bool suppress_touchregion = false; 966 bool suppress_touchregion = false;
@@ -1082,7 +1083,7 @@ static int parse_progressbar_tag(struct skin_element* element,
1082 enum 1083 enum
1083 { 1084 {
1084 eINVERT = 0, eNOFILL, eNOBORDER, eNOBAR, eSLIDER, eIMAGE, 1085 eINVERT = 0, eNOFILL, eNOBORDER, eNOBAR, eSLIDER, eIMAGE,
1085 eBACKDROP, eVERTICAL, eHORIZONTAL, eNOTOUCH, eSETTING, 1086 eBACKDROP, eVERTICAL, eHORIZONTAL, eNOTOUCH, eSETTING, eSETTING_OFFSET,
1086 e_PB_TAG_COUNT 1087 e_PB_TAG_COUNT
1087 }; 1088 };
1088 1089
@@ -1090,7 +1091,7 @@ static int parse_progressbar_tag(struct skin_element* element,
1090 [eNOFILL] = "nofill", [eNOBORDER] = "noborder", [eNOBAR] = "nobar", 1091 [eNOFILL] = "nofill", [eNOBORDER] = "noborder", [eNOBAR] = "nobar",
1091 [eSLIDER] = "slider", [eIMAGE] = "image", [eBACKDROP] = "backdrop", 1092 [eSLIDER] = "slider", [eIMAGE] = "image", [eBACKDROP] = "backdrop",
1092 [eVERTICAL] = "vertical", [eHORIZONTAL] = "horizontal", 1093 [eVERTICAL] = "vertical", [eHORIZONTAL] = "horizontal",
1093 [eNOTOUCH] = "notouch", [eSETTING] = "setting", [e_PB_TAG_COUNT] = NULL}; 1094 [eNOTOUCH] = "notouch", [eSETTING] = "setting", [eSETTING_OFFSET] = "soffset", [e_PB_TAG_COUNT] = NULL};
1094 int pb_op; 1095 int pb_op;
1095 1096
1096 while (curr_param < element->params_count) 1097 while (curr_param < element->params_count)
@@ -1158,6 +1159,15 @@ static int parse_progressbar_tag(struct skin_element* element,
1158 else if (pb_op == eNOTOUCH) 1159 else if (pb_op == eNOTOUCH)
1159 suppress_touchregion = true; 1160 suppress_touchregion = true;
1160#endif 1161#endif
1162 else if (token->type == SKIN_TOKEN_SETTING && pb_op == eSETTING_OFFSET)
1163 {
1164 if (curr_param+1 < element->params_count)
1165 {
1166 curr_param++;
1167 param++;
1168 setting_offset = param->data.number;
1169 }
1170 }
1161 else if (token->type == SKIN_TOKEN_SETTING && pb_op == eSETTING) 1171 else if (token->type == SKIN_TOKEN_SETTING && pb_op == eSETTING)
1162 { 1172 {
1163 if (curr_param+1 < element->params_count) 1173 if (curr_param+1 < element->params_count)
@@ -1169,6 +1179,7 @@ static int parse_progressbar_tag(struct skin_element* element,
1169 pb->setting = find_setting_by_cfgname(text); 1179 pb->setting = find_setting_by_cfgname(text);
1170 if (!pb->setting) 1180 if (!pb->setting)
1171 return WPS_ERROR_INVALID_PARAM; 1181 return WPS_ERROR_INVALID_PARAM;
1182 pb->setting_offset = setting_offset;
1172#endif 1183#endif
1173 } 1184 }
1174 } 1185 }
@@ -1223,7 +1234,7 @@ static int parse_progressbar_tag(struct skin_element* element,
1223 else if (token->type == SKIN_TOKEN_LIST_NEEDS_SCROLLBAR) 1234 else if (token->type == SKIN_TOKEN_LIST_NEEDS_SCROLLBAR)
1224 token->type = SKIN_TOKEN_LIST_SCROLLBAR; 1235 token->type = SKIN_TOKEN_LIST_SCROLLBAR;
1225 else if (token->type == SKIN_TOKEN_SETTING) 1236 else if (token->type == SKIN_TOKEN_SETTING)
1226 token->type = SKIN_TOKEN_SETTINGBAR; 1237 token->type = SKIN_TOKEN_SETTINGBAR;
1227 pb->type = token->type; 1238 pb->type = token->type;
1228 1239
1229#ifdef HAVE_TOUCHSCREEN 1240#ifdef HAVE_TOUCHSCREEN