97 std::string filename = *i;
98 const std::string name = filename;
106 size_t separator = filename.rfind(
'_');
107 filename = filename.substr(0, separator);
110 separator = filename.find(
'%');
111 if (separator == std::string::npos)
114 filename.append(
"_%10dx%10d.png");
118 if (sscanf(name.c_str(),
148 wallPaperVector.push_back(wp.
filename);
152 if (!wallPaperVector.empty())
157 return wallPaperVector[
CAST_S32(
static_cast<double>(
158 wallPaperVector.size()) * rand() / (RAND_MAX + 1.0))];
166 return std::string();
std::string getValue(const std::string &key, const std::string &deflt) const
std::string getStringValue(const std::string &key) const
static void loadWallpapers()
static std::string getWallpaper(const int width, const int height)
#define FOR_EACH(type, iter, array)
void freeList(List *const handle)
bool isDirectory(std::string name)
List * enumerateFiles(std::string dirName)
std::string pathJoin(std::string str1, const std::string &str2)
StringVect::const_iterator StringVectCIter
std::vector< std::string > StringVect
static std::vector< WallpaperData > wallpaperData
static bool wallpaperCompare(const WallpaperData &a, const WallpaperData &b)
static std::string wallpaperFile
static void initDefaultWallpaperPaths()
static std::string wallpaperPath