diff -r 4543cc2049af -r d99f46b676b5 QTfrontend/model/ThemeModel.cpp --- a/QTfrontend/model/ThemeModel.cpp Mon Jan 21 13:04:57 2013 -0500 +++ b/QTfrontend/model/ThemeModel.cpp Mon Jan 21 14:07:39 2013 -0500 @@ -21,6 +21,7 @@ * @brief ThemeModel class implementation */ +#include "physfs.h" #include "ThemeModel.h" ThemeModel::ThemeModel(QObject *parent) : @@ -49,9 +50,10 @@ void ThemeModel::loadThemes() { + const QString appDir = QString(PHYSFS_getBaseDir()); + beginResetModel(); - DataManager & datamgr = DataManager::instance(); QStringList themes = @@ -73,6 +75,10 @@ QMap dataset; + // detect if theme is dlc + QString themeDir = PHYSFS_getRealDir(QString("Themes/%1/icon.png").arg(theme).toLocal8Bit().data()); + dataset.insert(Qt::UserRole + 2, !themeDir.startsWith(appDir)); + // set icon path dataset.insert(Qt::UserRole + 1, iconpath); @@ -95,8 +101,4 @@ endResetModel(); -} - - - - +} \ No newline at end of file