1
0
mirror of git://projects.qi-hardware.com/gmenu2x.git synced 2024-07-02 18:32:20 +03:00

The function SurfaceCollection::getSkinPath() will return the path of a skin directory from its name given as a parameter.

This commit is contained in:
Ayla 2011-03-29 21:22:32 +02:00
parent 02b54d38a3
commit 3db5844f3c
2 changed files with 16 additions and 0 deletions

View File

@ -38,6 +38,21 @@ void SurfaceCollection::setSkin(const string &skin) {
this->skin = skin;
}
/* Returns the location of a skin directory,
* from its name given as a parameter. */
string SurfaceCollection::getSkinPath(const string &skin)
{
string path = GMenu2X::getHome() + "/skins/" + skin;
if (fileExists(path))
return path;
path = GMENU2X_SYSTEM_DIR "/skins/" + skin;
if (fileExists(path))
return path;
return "";
}
string SurfaceCollection::getSkinFilePath(const string &file)
{
return SurfaceCollection::getSkinFilePath(skin, file);

View File

@ -45,6 +45,7 @@ public:
void setSkin(const std::string &skin);
std::string getSkinFilePath(const std::string &file);
static std::string getSkinFilePath(const std::string &skin, const std::string &file);
static std::string getSkinPath(const std::string &skin);
bool defaultAlpha;
void debug();