From ea864be7082cbe2d1a9d4f5b1e809feacb1d1aaf Mon Sep 17 00:00:00 2001 From: Robert Bieber Date: Wed, 2 Jun 2010 06:52:17 +0000 Subject: Fixed another code generation bug with viewports and enabled negative numbers in tag parameters git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26465 a1c6a512-1295-4272-9138-f99709370657 --- utils/themeeditor/parsetreenode.cpp | 5 +++-- utils/themeeditor/skin_parser.c | 4 ++-- utils/themeeditor/skin_scan.c | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) (limited to 'utils') diff --git a/utils/themeeditor/parsetreenode.cpp b/utils/themeeditor/parsetreenode.cpp index 63555ae616..3a5a63dcee 100644 --- a/utils/themeeditor/parsetreenode.cpp +++ b/utils/themeeditor/parsetreenode.cpp @@ -97,9 +97,10 @@ QString ParseTreeNode::genCode() const { case VIEWPORT: + if(children[0]->element->type == TAG) + buffer.append(TAGSYM); buffer.append(children[0]->genCode()); - if(!children[0]->isParam() - && children[0]->getElement()->type == TAG) + if(children[0]->element->type == TAG) buffer.append('\n'); for(int i = 1; i < children.count(); i++) buffer.append(children[i]->genCode()); diff --git a/utils/themeeditor/skin_parser.c b/utils/themeeditor/skin_parser.c index 347d675b55..deb3a21ab2 100644 --- a/utils/themeeditor/skin_parser.c +++ b/utils/themeeditor/skin_parser.c @@ -481,7 +481,7 @@ int skin_parse_tag(struct skin_element* element, char** document) element->params[i].type_code = *tag_args; /* Checking a nullable argument for null */ - if(*cursor == DEFAULTSYM) + if(*cursor == DEFAULTSYM && !isdigit(cursor[1])) { if(islower(*tag_args)) { @@ -497,7 +497,7 @@ int skin_parse_tag(struct skin_element* element, char** document) else if(tolower(*tag_args) == 'i') { /* Scanning an int argument */ - if(!isdigit(*cursor)) + if(!isdigit(*cursor) && *cursor != '-') { skin_error(INT_EXPECTED); return 0; diff --git a/utils/themeeditor/skin_scan.c b/utils/themeeditor/skin_scan.c index 28d097125a..599683db54 100644 --- a/utils/themeeditor/skin_scan.c +++ b/utils/themeeditor/skin_scan.c @@ -107,7 +107,7 @@ int scan_int(char** document) int retval; int i; - while(isdigit(*cursor) || *cursor == COMMENTSYM) + while(isdigit(*cursor) || *cursor == COMMENTSYM || *cursor == '-') { if(*cursor == COMMENTSYM) { -- cgit v1.2.3