LogoopenSUSE Build Service > Projects
Sign Up | Log In

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

Index: plasma/wallpapers/image/backgroundlistmodel.cpp
===================================================================
--- plasma/wallpapers/image/backgroundlistmodel.cpp	(revision 1024127)
+++ plasma/wallpapers/image/backgroundlistmodel.cpp	(working copy)
@@ -20,6 +20,7 @@
 #include <KIO/PreviewJob>
 #include <KProgressDialog>
 #include <KStandardDirs>
+#include <KDesktopFile>
 
 #include <Plasma/Package>
 #include <Plasma/PackageStructure>
@@ -349,6 +350,13 @@
                     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" +
@@ -358,6 +366,7 @@
                 //kDebug() << "     adding image file" << wp.filePath();
                 ++count;
                 m_papersFound << wp.filePath();
+              }
             }
 
             ++allCount;