summaryrefslogtreecommitdiffstats
path: root/utils/themeeditor/skin_parser.c
diff options
context:
space:
mode:
authorRobert Bieber <robby@bieberphoto.com>2010-06-01 18:31:58 +0000
committerRobert Bieber <robby@bieberphoto.com>2010-06-01 18:31:58 +0000
commit47cd8786ba46a0d0d1c0f931363ca36181e8547e (patch)
treeef56cb497b62ea748eff1c8d5a8fa0e4471aa0cf /utils/themeeditor/skin_parser.c
parent27d529e18691b4a3a32669fe631ce96ff717872f (diff)
downloadrockbox-47cd8786ba46a0d0d1c0f931363ca36181e8547e.tar.gz
rockbox-47cd8786ba46a0d0d1c0f931363ca36181e8547e.zip
Theme Editor: Made the viewport tag a top-level child under VIEWPORT elements in the parse tree
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26450 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'utils/themeeditor/skin_parser.c')
-rw-r--r--utils/themeeditor/skin_parser.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/utils/themeeditor/skin_parser.c b/utils/themeeditor/skin_parser.c
index 4f7acf90fb..9fd9001790 100644
--- a/utils/themeeditor/skin_parser.c
+++ b/utils/themeeditor/skin_parser.c
@@ -98,7 +98,6 @@ struct skin_element* skin_parse_viewport(char** document)
retval = skin_alloc_element();
retval->type = VIEWPORT;
- retval->children = skin_alloc_children(1);
retval->children_count = 1;
retval->line = skin_line;
@@ -109,6 +108,21 @@ struct skin_element* skin_parse_viewport(char** document)
int sublines = 0; /* Flag for parsing sublines */
+ /* Parsing out the viewport tag if there is one */
+ if(check_viewport(cursor))
+ {
+ retval->children_count = 2;
+ retval->children = skin_alloc_children(2);
+ retval->children[0] = skin_alloc_element();
+ skin_parse_tag(retval->children[0], &cursor);
+ }
+ else
+ {
+ retval->children_count = 1;
+ retval->children = skin_alloc_children(1);
+ }
+
+
while(*cursor != '\0' && !(check_viewport(cursor) && cursor != *document))
{
@@ -182,7 +196,7 @@ struct skin_element* skin_parse_viewport(char** document)
*document = cursor;
- retval->children[0] = root;
+ retval->children[retval->children_count - 1] = root;
return retval;
}