forked from len0rd/rockbox
Theme Editor: Added a clear erros function to the parser
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26673 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
0e44ce9bed
commit
594d734143
5 changed files with 14 additions and 4 deletions
|
@ -166,10 +166,10 @@ void EditorWindow::shiftTab(int index)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Syncing the tree view and the status bar */
|
/* Syncing the tree view and the status bar */
|
||||||
ui->parseTree->setModel(dynamic_cast<SkinDocument*>
|
SkinDocument* doc = dynamic_cast<SkinDocument*>
|
||||||
(ui->editorTabs->currentWidget())->getModel());
|
(ui->editorTabs->currentWidget());
|
||||||
parseStatus->setText(dynamic_cast<SkinDocument*>
|
ui->parseTree->setModel(doc->getModel());
|
||||||
(ui->editorTabs->currentWidget())->getStatus());
|
parseStatus->setText(doc->getStatus());
|
||||||
|
|
||||||
ui->actionSave_Document->setEnabled(true);
|
ui->actionSave_Document->setEnabled(true);
|
||||||
ui->actionSave_Document_As->setEnabled(true);
|
ui->actionSave_Document_As->setEnabled(true);
|
||||||
|
|
|
@ -93,6 +93,12 @@ char* skin_error_message()
|
||||||
return error_message;
|
return error_message;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void skin_clear_errors()
|
||||||
|
{
|
||||||
|
error_line = 0;
|
||||||
|
error_message = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
void skin_debug_tree(struct skin_element* root)
|
void skin_debug_tree(struct skin_element* root)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
|
@ -34,6 +34,7 @@ extern "C"
|
||||||
void skin_error(enum skin_errorcode error);
|
void skin_error(enum skin_errorcode error);
|
||||||
int skin_error_line();
|
int skin_error_line();
|
||||||
char* skin_error_message();
|
char* skin_error_message();
|
||||||
|
void skin_clear_errors();
|
||||||
void skin_debug_tree(struct skin_element* root);
|
void skin_debug_tree(struct skin_element* root);
|
||||||
|
|
||||||
/* Auxiliary debug functions */
|
/* Auxiliary debug functions */
|
||||||
|
|
|
@ -64,6 +64,8 @@ struct skin_element* skin_parse(const char* document)
|
||||||
|
|
||||||
skin_line = 1;
|
skin_line = 1;
|
||||||
|
|
||||||
|
skin_clear_errors();
|
||||||
|
|
||||||
while(*cursor != '\0')
|
while(*cursor != '\0')
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
|
@ -35,6 +35,7 @@ SkinDocument::SkinDocument(QLabel* statusLabel, QWidget *parent) :
|
||||||
title = "Untitled";
|
title = "Untitled";
|
||||||
fileName = "";
|
fileName = "";
|
||||||
saved = "";
|
saved = "";
|
||||||
|
parseStatus = tr("Empty Document");
|
||||||
}
|
}
|
||||||
|
|
||||||
SkinDocument::SkinDocument(QLabel* statusLabel, QString file, QWidget *parent):
|
SkinDocument::SkinDocument(QLabel* statusLabel, QString file, QWidget *parent):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue