LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File plasma-wallpaper-description.diff of Package kdebase4-workspace (Project openSUSE:11.4)

Index: plasma/generic/wallpapers/image/backgroundlistmodel.cpp
===================================================================
--- plasma/generic/wallpapers/image/backgroundlistmodel.cpp.orig	2010-08-19 10:51:52.000000000 +0200
+++ plasma/generic/wallpapers/image/backgroundlistmodel.cpp	2010-11-21 20:47:03.796739854 +0100
@@ -19,6 +19,7 @@
 #include <KIO/PreviewJob>
 #include <KProgressDialog>
 #include <KStandardDirs>
+#include <KDesktopFile>
 
 #include <Plasma/Package>
 #include <Plasma/PackageStructure>
@@ -375,6 +376,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" +
@@ -384,6 +392,7 @@ void BackgroundFinder::start()
                 //kDebug() << "     adding image file" << wp.filePath();
                 ++count;
                 m_papersFound << wp.filePath();
+              }
             }
 
             ++allCount;