File plasma-wallpaper-description.diff of Package kdebase4-workspace

--- plasma/generic/wallpapers/image/backgroundlistmodel.cpp.sav	2009-09-16 13:40:55.000000000 +0200
+++ plasma/generic/wallpapers/image/backgroundlistmodel.cpp	2010-05-11 14:21:34.442041261 +0200
@@ -18,6 +18,7 @@
 #include <KIO/PreviewJob>
 #include <KProgressDialog>
 #include <KStandardDirs>
+#include <KDesktopFile>
 
 #include <Plasma/Package>
 #include <Plasma/PackageStructure>
@@ -347,6 +348,13 @@ void BackgroundFinder::start()
                     m_paths.append(wp.filePath());
                 }
             } else if (suffixes.contains(wp.suffix().toLower()) && (!m_container || !m_container->contains(wp.filePath()))) {
+              bool hidden = false;
+              if (QFile::exists(wp.filePath()+".desktop")) {
+                KDesktopFile config(wp.filePath()+".desktop");
+                KConfigGroup cg = config.group("Wallpaper");
+                hidden = cg.readEntry("Hidden", false);
+              }
+              if (!hidden) {
                 //kDebug() << "adding" << wp.filePath() << setLabel;
                 if (setLabel) {
                     progress->setLabelText(i18n("Finding images for the wallpaper slideshow.") + "\n\n" +
@@ -356,6 +364,7 @@ void BackgroundFinder::start()
                 //kDebug() << "     adding image file" << wp.filePath();
                 ++count;
                 m_papersFound << wp.filePath();
+              }
             }
 
             ++allCount;
openSUSE Build Service is sponsored by