aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2017-10-31 10:31:56 -0400
committerKen Moore <ken@ixsystems.com>2017-10-31 10:31:56 -0400
commit60de7e7db69e2afcf5269bcba3a96fc61baeb325 (patch)
treeab2dca8651649f3040f0f7a7e11bf1f994d660a5
parentEnsure the mouse cursor "busy" icon is used for 3 seconds when launching an e... (diff)
downloadlumina-60de7e7db69e2afcf5269bcba3a96fc61baeb325.tar.gz
lumina-60de7e7db69e2afcf5269bcba3a96fc61baeb325.tar.bz2
lumina-60de7e7db69e2afcf5269bcba3a96fc61baeb325.zip
Add a quick verify/modify of the directory used for the Lumina wallpapers.
Try to adjust the old path to the new one automatically.
-rw-r--r--src-qt5/core/lumina-desktop/LDesktop.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src-qt5/core/lumina-desktop/LDesktop.cpp b/src-qt5/core/lumina-desktop/LDesktop.cpp
index 1fc6b11b..71b10bd5 100644
--- a/src-qt5/core/lumina-desktop/LDesktop.cpp
+++ b/src-qt5/core/lumina-desktop/LDesktop.cpp
@@ -539,7 +539,16 @@ void LDesktop::UpdateBackground(){
//qDebug() << " - List:" << bgL << CBG;
//Remove any invalid files
for(int i=0; i<bgL.length(); i++){
- if( (!QFile::exists(bgL[i]) && bgL[i]!="default" && !bgL[i].startsWith("rgb(") ) || bgL[i].isEmpty()){ bgL.removeAt(i); i--; }
+ if(bgL[i]=="default" || bgL[i].startsWith("rgb(") ){ continue; } //built-in definitions - treat them as valid
+ if(bgL[i].isEmpty()){ bgL.removeAt(i); i--; }
+ if( !QFile::exists(bgL[i]) ){
+ //Quick Detect/replace for new path for Lumina wallpapers (change in 1.3.4)
+ if(bgL[i].contains("/wallpapers/Lumina-DE/")){
+ bgL[i] = bgL[i].replace("/wallpapers/Lumina-DE/", "/wallpapers/lumina-desktop/"); i--; //modify the path and re-check it
+ }else{
+ bgL.removeAt(i); i--;
+ }
+ }
}
if(bgL.isEmpty()){ bgL << "default"; } //always fall back on the default
//Determine if the background needs to be changed
bgstack15