mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2025-04-21 12:27:27 +03:00
The FileLister won't list a file if a previous one has the same file name (without path).
This is useful when the files/directories lists are not cleared; then it is possible to define priorities between the files. For instance, the skin "Default" will be shown only once, even if the directory "Default" exists both in the system and the user directories. As the skin and translation loading functions does check both directories, there is no problem in doing that.
This commit is contained in:
@@ -38,12 +38,12 @@ bool WallpaperDialog::exec()
|
||||
FileLister fl;
|
||||
fl.setFilter(".png,.jpg,.jpeg,.bmp");
|
||||
|
||||
string filepath = GMENU2X_SYSTEM_DIR "/skins/"
|
||||
string filepath = GMenu2X::getHome() + "/skins/"
|
||||
+ gmenu2x->confStr["skin"] + "/wallpapers";
|
||||
if (fileExists(filepath))
|
||||
fl.setPath(filepath, true);
|
||||
|
||||
filepath = GMenu2X::getHome() + "/skins/"
|
||||
filepath = GMENU2X_SYSTEM_DIR "/skins/"
|
||||
+ gmenu2x->confStr["skin"] + "/wallpapers";
|
||||
if (fileExists(filepath)) {
|
||||
fl.setPath(filepath, false);
|
||||
@@ -51,13 +51,13 @@ bool WallpaperDialog::exec()
|
||||
}
|
||||
|
||||
if (gmenu2x->confStr["skin"] != "Default") {
|
||||
filepath = GMENU2X_SYSTEM_DIR "/skins/Default/wallpapers";
|
||||
filepath = GMenu2X::getHome() + "/skins/Default/wallpapers";
|
||||
if (fileExists(filepath)) {
|
||||
fl.setPath(filepath, false);
|
||||
fl.browse(false);
|
||||
}
|
||||
|
||||
filepath = GMenu2X::getHome() + "/skins/Default/wallpapers";
|
||||
filepath = GMENU2X_SYSTEM_DIR "/skins/Default/wallpapers";
|
||||
if (fileExists(filepath)) {
|
||||
fl.setPath(filepath, false);
|
||||
fl.browse(false);
|
||||
|
||||
Reference in New Issue
Block a user