diff options
author | Ken Moore <ken@ixsystems.com> | 2017-10-27 08:08:39 -0400 |
---|---|---|
committer | Ken Moore <ken@ixsystems.com> | 2017-10-27 08:08:39 -0400 |
commit | 3fd42c40cfda85fa90c19add4e07ec1ca1c312cb (patch) | |
tree | b7de66bba57d00ae210615aaacaedd59de29a97e /src-qt5/core/lumina-desktop/LDesktopPluginSpace.cpp | |
parent | Fix a few places where /net/ files are still checked for existance (pauses/de... (diff) | |
download | lumina-3fd42c40cfda85fa90c19add4e07ec1ca1c312cb.tar.gz lumina-3fd42c40cfda85fa90c19add4e07ec1ca1c312cb.tar.bz2 lumina-3fd42c40cfda85fa90c19add4e07ec1ca1c312cb.zip |
Add the ability to use a "directory" as the target for desktop wallpapers. Will automatically open that directory and randomly pick an image from from within it for the wallpaper.
Diffstat (limited to 'src-qt5/core/lumina-desktop/LDesktopPluginSpace.cpp')
-rw-r--r-- | src-qt5/core/lumina-desktop/LDesktopPluginSpace.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src-qt5/core/lumina-desktop/LDesktopPluginSpace.cpp b/src-qt5/core/lumina-desktop/LDesktopPluginSpace.cpp index 025c067a..9e964f5d 100644 --- a/src-qt5/core/lumina-desktop/LDesktopPluginSpace.cpp +++ b/src-qt5/core/lumina-desktop/LDesktopPluginSpace.cpp @@ -222,7 +222,7 @@ QRect LDesktopPluginSpace::findOpenSpot(int gridwidth, int gridheight, int start //else{ row++; } } if(!found){ col++; row=0; } //go to the next column - } + } }else if(reversed && (startRow>0 || startCol>0) ){ //Arrange Left->Right (work backwards) while(row>=0 && !found){ @@ -242,7 +242,7 @@ QRect LDesktopPluginSpace::findOpenSpot(int gridwidth, int gridheight, int start //else{ col++; } } if(!found){ row--; col=colCount-gridwidth;} //go to the previous row - } + } }else{ //Arrange Left->Right while(row<(rowCount-gridheight) && !found){ @@ -296,8 +296,8 @@ void LDesktopPluginSpace::reloadPlugins(bool ForceIconUpdate ){ QStringList plugs = plugins; QStringList items = deskitems; for(int i=0; i<ITEMS.length(); i++){ - - if( ITEMS[i]->whatsThis().startsWith("applauncher") && ForceIconUpdate){ + + if( ITEMS[i]->whatsThis().startsWith("applauncher") && ForceIconUpdate){ //Change the size of the existing plugin - preserving the location if possible /*QRect geom = ITEMS[i]->loadPluginGeometry(); //pixel coords if(!geom.isNull()){ @@ -306,14 +306,14 @@ void LDesktopPluginSpace::reloadPlugins(bool ForceIconUpdate ){ ITEMS[i]->savePluginGeometry( gridToGeom(geom)); //save it back in pixel coords }*/ //Now remove the plugin for the moment - run it through the re-creation routine below - ITEMS.takeAt(i)->deleteLater(); + ITEMS.takeAt(i)->deleteLater(); i--; } else if(plugs.contains(ITEMS[i]->whatsThis())){ plugs.removeAll(ITEMS[i]->whatsThis()); } else if(items.contains(ITEMS[i]->whatsThis().section("---",0,0).section("::",1,50))){ items.removeAll(ITEMS[i]->whatsThis().section("---",0,0).section("::",1,50)); } else{ ITEMS[i]->removeSettings(true); ITEMS.takeAt(i)->deleteLater(); i--; } //this is considered a permanent removal (cleans settings) } - + //Now create any new items //First load the plugins (almost always have fixed locations) for(int i=0; i<plugs.length(); i++){ |