summaryrefslogtreecommitdiff
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)
98 98
99 retval = skin_alloc_element(); 99 retval = skin_alloc_element();
100 retval->type = VIEWPORT; 100 retval->type = VIEWPORT;
101 retval->children = skin_alloc_children(1);
102 retval->children_count = 1; 101 retval->children_count = 1;
103 retval->line = skin_line; 102 retval->line = skin_line;
104 103
@@ -109,6 +108,21 @@ struct skin_element* skin_parse_viewport(char** document)
109 108
110 int sublines = 0; /* Flag for parsing sublines */ 109 int sublines = 0; /* Flag for parsing sublines */
111 110
111 /* Parsing out the viewport tag if there is one */
112 if(check_viewport(cursor))
113 {
114 retval->children_count = 2;
115 retval->children = skin_alloc_children(2);
116 retval->children[0] = skin_alloc_element();
117 skin_parse_tag(retval->children[0], &cursor);
118 }
119 else
120 {
121 retval->children_count = 1;
122 retval->children = skin_alloc_children(1);
123 }
124
125
112 while(*cursor != '\0' && !(check_viewport(cursor) && cursor != *document)) 126 while(*cursor != '\0' && !(check_viewport(cursor) && cursor != *document))
113 { 127 {
114 128
@@ -182,7 +196,7 @@ struct skin_element* skin_parse_viewport(char** document)
182 196
183 *document = cursor; 197 *document = cursor;
184 198
185 retval->children[0] = root; 199 retval->children[retval->children_count - 1] = root;
186 return retval; 200 return retval;
187 201
188} 202}