mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2024-11-26 03:06:15 +02:00
Define a default wallpaper path, that will be chosen if no wallpaper is defined on the config.
This commit is contained in:
parent
fe25cf341d
commit
301e16e8ee
@ -317,15 +317,8 @@ GMenu2X::GMenu2X() {
|
||||
initMenu();
|
||||
|
||||
if (!fileExists(confStr["wallpaper"])) {
|
||||
DEBUG("Searching wallpaper\n");
|
||||
|
||||
FileLister fl("skins/"+confStr["skin"]+"/wallpapers",false,true);
|
||||
fl.setFilter(".png,.jpg,.jpeg,.bmp");
|
||||
fl.browse();
|
||||
if (fl.getFiles().size()<=0 && confStr["skin"] != "Default")
|
||||
fl.setPath("skins/Default/wallpapers",true);
|
||||
if (fl.getFiles().size()>0)
|
||||
confStr["wallpaper"] = fl.getPath()+fl.getFiles()[0];
|
||||
DEBUG("No wallpaper defined; we will take the default one.\n");
|
||||
confStr["wallpaper"] = DEFAULT_WALLPAPER_PATH;
|
||||
}
|
||||
|
||||
initBG();
|
||||
|
@ -40,6 +40,11 @@
|
||||
#define GMENU2X_SYSTEM_DIR "/usr/share/gmenu2x"
|
||||
#endif
|
||||
|
||||
#ifndef DEFAULT_WALLPAPER_PATH
|
||||
#define DEFAULT_WALLPAPER_PATH \
|
||||
GMENU2X_SYSTEM_DIR "/skins/Default/wallpapers/default.png"
|
||||
#endif
|
||||
|
||||
const int MAX_VOLUME_SCALE_FACTOR = 200;
|
||||
// Default values - going to add settings adjustment, saving, loading and such
|
||||
const int VOLUME_SCALER_MUTE = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user