Theme Editor: Removed some old hash code that caused viewer not to update due to hash collisions. Made Vf and Vb tags attached to viewport definition eat newline at end of line'

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27238 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Robert Bieber 2010-07-02 08:05:03 +00:00
parent 3f4dfe5c03
commit 4429fb02b7
2 changed files with 10 additions and 5 deletions

View file

@ -33,6 +33,7 @@
/* Global variables for the parser */
int skin_line = 0;
int viewport_line = 0;
/* Auxiliary parsing functions (not visible at global scope) */
static struct skin_element* skin_parse_viewport(char** document);
@ -64,6 +65,7 @@ struct skin_element* skin_parse(const char* document)
char* cursor = (char*)document; /*Keeps track of location in the document*/
skin_line = 1;
viewport_line = 0;
skin_clear_errors();
@ -105,6 +107,7 @@ static struct skin_element* skin_parse_viewport(char** document)
retval->type = VIEWPORT;
retval->children_count = 1;
retval->line = skin_line;
viewport_line = skin_line;
struct skin_element** to_write = 0;
@ -632,6 +635,13 @@ static int skin_parse_tag(struct skin_element* element, char** document)
skin_line++;
}
if((strcmp(tag->name, "Vf") == 0 || strcmp(tag->name, "Vb") == 0)
&& *cursor == '\n' && skin_line == viewport_line)
{
*cursor++;
skin_line++;
}
*document = cursor;
return 1;

View file

@ -77,11 +77,6 @@ QString ParseTreeModel::changeTree(const char *document)
}
ParseTreeNode* temp = new ParseTreeNode(test);
if(root && temp->genHash() == root->genHash())
{
delete temp;
return tr("Document Parses Successfully");
}
if(root)
{