1
0
Fork 0
forked from len0rd/rockbox

s/SUBLINES/LINE_ALTERNATOR/

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27271 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jonathan Gordon 2010-07-04 02:04:14 +00:00
parent 7cfb56484e
commit dc34785b18
4 changed files with 10 additions and 10 deletions

View file

@ -157,7 +157,7 @@ void skin_debug_tree(struct skin_element* root)
break; break;
case SUBLINES: case LINE_ALTERNATOR:
printf("[ Alternator on line %d with %d sublines \n", current->line, printf("[ Alternator on line %d with %d sublines \n", current->line,
current->children_count); current->children_count);
debug_indent_level++; debug_indent_level++;

View file

@ -325,7 +325,7 @@ static struct skin_element* skin_parse_sublines_optional(char** document,
int i; int i;
retval = skin_alloc_element(); retval = skin_alloc_element();
retval->type = SUBLINES; retval->type = LINE_ALTERNATOR;
retval->next = NULL; retval->next = NULL;
retval->line = skin_line; retval->line = skin_line;

View file

@ -38,7 +38,7 @@ enum skin_element_type
UNKNOWN = -1, UNKNOWN = -1,
VIEWPORT, VIEWPORT,
LINE, LINE,
SUBLINES, LINE_ALTERNATOR,
CONDITIONAL, CONDITIONAL,
TAG, TAG,
TEXT, TEXT,

View file

@ -69,7 +69,7 @@ ParseTreeNode::ParseTreeNode(struct skin_element* data, ParseTreeNode* parent)
children.append(new ParseTreeNode(data->children[i], this)); children.append(new ParseTreeNode(data->children[i], this));
break; break;
case SUBLINES: case LINE_ALTERNATOR:
for(int i = 0; i < element->children_count; i++) for(int i = 0; i < element->children_count; i++)
{ {
children.append(new ParseTreeNode(data->children[i], this)); children.append(new ParseTreeNode(data->children[i], this));
@ -147,13 +147,13 @@ QString ParseTreeNode::genCode() const
buffer.append(children[i]->genCode()); buffer.append(children[i]->genCode());
} }
if(openConditionals == 0 if(openConditionals == 0
&& !(parent && parent->element->type == SUBLINES)) && !(parent && parent->element->type == LINE_ALTERNATOR))
{ {
buffer.append('\n'); buffer.append('\n');
} }
break; break;
case SUBLINES: case LINE_ALTERNATOR:
for(int i = 0; i < children.count(); i++) for(int i = 0; i < children.count(); i++)
{ {
buffer.append(children[i]->genCode()); buffer.append(children[i]->genCode());
@ -282,7 +282,7 @@ int ParseTreeNode::genHash() const
break; break;
case VIEWPORT: case VIEWPORT:
case LINE: case LINE:
case SUBLINES: case LINE_ALTERNATOR:
case CONDITIONAL: case CONDITIONAL:
hash += element->children_count; hash += element->children_count;
break; break;
@ -371,7 +371,7 @@ QVariant ParseTreeNode::data(int column) const
case LINE: case LINE:
return QObject::tr("Logical Line"); return QObject::tr("Logical Line");
case SUBLINES: case LINE_ALTERNATOR:
return QObject::tr("Alternator"); return QObject::tr("Alternator");
case COMMENT: case COMMENT:
@ -419,7 +419,7 @@ QVariant ParseTreeNode::data(int column) const
case UNKNOWN: case UNKNOWN:
case VIEWPORT: case VIEWPORT:
case LINE: case LINE:
case SUBLINES: case LINE_ALTERNATOR:
return QString(); return QString();
case CONDITIONAL: case CONDITIONAL:
@ -543,7 +543,7 @@ void ParseTreeNode::render(const RBRenderInfo &info, RBViewport* viewport,
int child = evalTag(info, true, element->children_count).toInt(); int child = evalTag(info, true, element->children_count).toInt();
children[element->params_count + child]->render(info, viewport, true); children[element->params_count + child]->render(info, viewport, true);
} }
else if(element->type == SUBLINES) else if(element->type == LINE_ALTERNATOR)
{ {
/* First we build a list of the times for each branch */ /* First we build a list of the times for each branch */
QList<double> times; QList<double> times;