--- a/QTfrontend/main.cpp Sat Oct 22 18:24:36 2011 +0200
+++ b/QTfrontend/main.cpp Sat Oct 22 19:37:39 2011 +0200
@@ -165,6 +165,27 @@
return 1;
}
+ // copy data/default css files to cfgdir as templates
+ QString userCssDir = cfgdir->absolutePath() + "/Data/css";
+ if (checkForDir(userCssDir))
+ {
+ QString defaultCssDir = ":res/css";
+ QStringList cssFiles = QDir(defaultCssDir).entryList(QDir::Files);
+ foreach (const QString & cssFile, cssFiles)
+ {
+ QString srcName = datadir->absolutePath()+"/css/"+cssFile;
+
+ if (!QFile::exists(srcName))
+ srcName = defaultCssDir+"/"+cssFile;
+
+ QString tmpName = userCssDir + "/template_" + cssFile;
+ if (QFile::exists(tmpName))
+ QFile::remove(tmpName);
+
+ QFile(srcName).copy(tmpName);
+ }
+ }
+
{
QStringList themes;