1
0
mirror of git://projects.qi-hardware.com/gmenu2x.git synced 2024-11-26 12:53:43 +02:00

Removed a bug where the Default skin was chosen even if another (working) skin was defined on the config file.

This commit is contained in:
Ayla 2011-07-11 12:39:31 +02:00
parent 0993a48eca
commit 00d8a04e00

View File

@ -642,9 +642,14 @@ void GMenu2X::readConfig() {
inf.close(); inf.close();
} }
} }
if (!confStr["lang"].empty()) tr.setLang(confStr["lang"]); if (!confStr["lang"].empty())
if (!confStr["wallpaper"].empty() && !fileExists(confStr["wallpaper"])) confStr["wallpaper"] = ""; tr.setLang(confStr["lang"]);
if (confStr["skin"].empty() || !fileExists("skins/"+confStr["skin"])) confStr["skin"] = "Default";
if (!confStr["wallpaper"].empty() && !fileExists(confStr["wallpaper"]))
confStr["wallpaper"] = "";
if (confStr["skin"].empty() || SurfaceCollection::getSkinPath(confStr["skin"]).empty())
confStr["skin"] = "Default";
evalIntConf( &confInt["outputLogs"], 0, 0,1 ); evalIntConf( &confInt["outputLogs"], 0, 0,1 );
evalIntConf( &confInt["maxClock"], 430, 30, 500 ); evalIntConf( &confInt["maxClock"], 430, 30, 500 );
@ -1314,6 +1319,8 @@ void GMenu2X::setSkin(const string &skin, bool setWallpaper) {
skinConfStr.clear(); skinConfStr.clear();
skinConfInt.clear(); skinConfInt.clear();
DEBUG("GMenu2X: setting new skin %s.\n", skin.c_str());
//clear collection and change the skin path //clear collection and change the skin path
sc.clear(); sc.clear();
sc.setSkin(skin); sc.setSkin(skin);