summaryrefslogtreecommitdiffstats
path: root/kitchensync/src/configguifile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kitchensync/src/configguifile.cpp')
-rw-r--r--kitchensync/src/configguifile.cpp40
1 files changed, 14 insertions, 26 deletions
diff --git a/kitchensync/src/configguifile.cpp b/kitchensync/src/configguifile.cpp
index a0c6a596d..6a8b0402c 100644
--- a/kitchensync/src/configguifile.cpp
+++ b/kitchensync/src/configguifile.cpp
@@ -55,20 +55,13 @@ void ConfigGuiFile::load( const TQString &xml )
TQDomDocument doc;
doc.setContent( xml );
TQDomElement docElement = doc.documentElement();
-
- TQDomNode node;
- for ( node = docElement.firstChild(); !node.isNull(); node = node.nextSibling() ) {
- TQDomElement e = node.toElement();
- if ( e.tagName() == "directory" ) {
- TQDomNode subNode;
- for ( subNode = e.firstChild(); !subNode.isNull(); subNode = subNode.nextSibling() ) {
- TQDomElement subElement = subNode.toElement();
- if ( subElement.tagName() == "path" ) {
- mFilename->setURL( subElement.text() );
- } else if ( subElement.tagName() == "recursive" ) {
- mRecursive->setChecked( subElement.text() == "TRUE" );
- }
- }
+ TQDomNode n;
+ for( n = docElement.firstChild(); !n.isNull(); n = n.nextSibling() ) {
+ TQDomElement e = n.toElement();
+ if ( e.tagName() == "path" ) {
+ mFilename->setURL( e.text() );
+ } else if ( e.tagName() == "recursive" ) {
+ mRecursive->setChecked( e.text() == "TRUE" );
}
}
}
@@ -76,18 +69,13 @@ void ConfigGuiFile::load( const TQString &xml )
TQString ConfigGuiFile::save() const
{
TQString xml;
- xml = "<config>\n";
- xml += " <directory>\n";
- xml += " <path>" + mFilename->url() + "</path>\n";
- xml += " <objtype>data</objtype>\n";
- xml += " <recursive>";
- if ( mRecursive->isChecked() )
- xml += "TRUE";
- else
- xml += "FALSE";
- xml += "</recursive>\n";
- xml += " </directory>\n";
- xml += "</config>\n";
+ xml = "<config>";
+ xml += "<path>" + mFilename->url() + "</path>";
+ xml += "<recursive>";
+ if ( mRecursive->isChecked() ) xml += "TRUE";
+ else xml += "FALSE";
+ xml += "</recursive>";
+ xml += "</config>";
return xml;
}