diff options
author | Robert Bieber <robby@bieberphoto.com> | 2010-06-01 20:19:51 +0000 |
---|---|---|
committer | Robert Bieber <robby@bieberphoto.com> | 2010-06-01 20:19:51 +0000 |
commit | 279969618d28e23ac83b6e81c7b7bbf1adaf5b74 (patch) | |
tree | b875450c631cdae21c7c6befbb1ea4bde232423c /utils/themeeditor/skin_parser.c | |
parent | 5943f4c5e239475a32ac2b341a6df8189c8f1768 (diff) | |
download | rockbox-279969618d28e23ac83b6e81c7b7bbf1adaf5b74.tar.gz rockbox-279969618d28e23ac83b6e81c7b7bbf1adaf5b74.zip |
Theme Editor: Made text and comments editable from a treeview
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26453 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'utils/themeeditor/skin_parser.c')
-rw-r--r-- | utils/themeeditor/skin_parser.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/utils/themeeditor/skin_parser.c b/utils/themeeditor/skin_parser.c index d118e9b97b..c0f1849523 100644 --- a/utils/themeeditor/skin_parser.c +++ b/utils/themeeditor/skin_parser.c | |||
@@ -738,6 +738,7 @@ int skin_parse_comment(struct skin_element* element, char** document) | |||
738 | */ | 738 | */ |
739 | for(length = 0; cursor[length] != '\n' && cursor[length] != '\0'; length++); | 739 | for(length = 0; cursor[length] != '\n' && cursor[length] != '\0'; length++); |
740 | 740 | ||
741 | length--; | ||
741 | element->type = COMMENT; | 742 | element->type = COMMENT; |
742 | element->line = skin_line; | 743 | element->line = skin_line; |
743 | element->text = skin_alloc_string(length); | 744 | element->text = skin_alloc_string(length); |
@@ -745,10 +746,10 @@ int skin_parse_comment(struct skin_element* element, char** document) | |||
745 | memcpy((void*)(element->text), (void*)(cursor + 1), sizeof(char) * length); | 746 | memcpy((void*)(element->text), (void*)(cursor + 1), sizeof(char) * length); |
746 | element->text[length] = '\0'; | 747 | element->text[length] = '\0'; |
747 | 748 | ||
748 | if(cursor[length] == '\n') | 749 | if(cursor[length + 1] == '\n') |
749 | skin_line++; | 750 | skin_line++; |
750 | 751 | ||
751 | *document += (length + 1); /* Move cursor up past # and all text */ | 752 | *document += (length + 2); /* Move cursor up past # and all text */ |
752 | 753 | ||
753 | return 1; | 754 | return 1; |
754 | } | 755 | } |