summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--utils/themeeditor/editorwindow.cpp8
-rw-r--r--utils/themeeditor/skin_debug.c6
-rw-r--r--utils/themeeditor/skin_debug.h1
-rw-r--r--utils/themeeditor/skin_parser.c2
-rw-r--r--utils/themeeditor/skindocument.cpp1
5 files changed, 14 insertions, 4 deletions
diff --git a/utils/themeeditor/editorwindow.cpp b/utils/themeeditor/editorwindow.cpp
index ca5f8bfa73..23724ee1ad 100644
--- a/utils/themeeditor/editorwindow.cpp
+++ b/utils/themeeditor/editorwindow.cpp
@@ -166,10 +166,10 @@ void EditorWindow::shiftTab(int index)
166 else 166 else
167 { 167 {
168 /* Syncing the tree view and the status bar */ 168 /* Syncing the tree view and the status bar */
169 ui->parseTree->setModel(dynamic_cast<SkinDocument*> 169 SkinDocument* doc = dynamic_cast<SkinDocument*>
170 (ui->editorTabs->currentWidget())->getModel()); 170 (ui->editorTabs->currentWidget());
171 parseStatus->setText(dynamic_cast<SkinDocument*> 171 ui->parseTree->setModel(doc->getModel());
172 (ui->editorTabs->currentWidget())->getStatus()); 172 parseStatus->setText(doc->getStatus());
173 173
174 ui->actionSave_Document->setEnabled(true); 174 ui->actionSave_Document->setEnabled(true);
175 ui->actionSave_Document_As->setEnabled(true); 175 ui->actionSave_Document_As->setEnabled(true);
diff --git a/utils/themeeditor/skin_debug.c b/utils/themeeditor/skin_debug.c
index 4a2ef32206..eb132a3320 100644
--- a/utils/themeeditor/skin_debug.c
+++ b/utils/themeeditor/skin_debug.c
@@ -93,6 +93,12 @@ char* skin_error_message()
93 return error_message; 93 return error_message;
94} 94}
95 95
96void skin_clear_errors()
97{
98 error_line = 0;
99 error_message = NULL;
100}
101
96void skin_debug_tree(struct skin_element* root) 102void skin_debug_tree(struct skin_element* root)
97{ 103{
98 int i; 104 int i;
diff --git a/utils/themeeditor/skin_debug.h b/utils/themeeditor/skin_debug.h
index 24c66e6671..a550dc4c7b 100644
--- a/utils/themeeditor/skin_debug.h
+++ b/utils/themeeditor/skin_debug.h
@@ -34,6 +34,7 @@ extern "C"
34void skin_error(enum skin_errorcode error); 34void skin_error(enum skin_errorcode error);
35int skin_error_line(); 35int skin_error_line();
36char* skin_error_message(); 36char* skin_error_message();
37void skin_clear_errors();
37void skin_debug_tree(struct skin_element* root); 38void skin_debug_tree(struct skin_element* root);
38 39
39/* Auxiliary debug functions */ 40/* Auxiliary debug functions */
diff --git a/utils/themeeditor/skin_parser.c b/utils/themeeditor/skin_parser.c
index c046dc66ad..58acafb56a 100644
--- a/utils/themeeditor/skin_parser.c
+++ b/utils/themeeditor/skin_parser.c
@@ -64,6 +64,8 @@ struct skin_element* skin_parse(const char* document)
64 64
65 skin_line = 1; 65 skin_line = 1;
66 66
67 skin_clear_errors();
68
67 while(*cursor != '\0') 69 while(*cursor != '\0')
68 { 70 {
69 71
diff --git a/utils/themeeditor/skindocument.cpp b/utils/themeeditor/skindocument.cpp
index c7b69688f6..3ce70ad5be 100644
--- a/utils/themeeditor/skindocument.cpp
+++ b/utils/themeeditor/skindocument.cpp
@@ -35,6 +35,7 @@ SkinDocument::SkinDocument(QLabel* statusLabel, QWidget *parent) :
35 title = "Untitled"; 35 title = "Untitled";
36 fileName = ""; 36 fileName = "";
37 saved = ""; 37 saved = "";
38 parseStatus = tr("Empty Document");
38} 39}
39 40
40SkinDocument::SkinDocument(QLabel* statusLabel, QString file, QWidget *parent): 41SkinDocument::SkinDocument(QLabel* statusLabel, QString file, QWidget *parent):