From 27856879bf962f178d88e79144e37a47e731b122 Mon Sep 17 00:00:00 2001 From: tpearson Date: Fri, 3 Sep 2010 09:14:57 +0000 Subject: * Massive import of OpenSUSE patches, primarily for bugfixes * Added some infrastructure created by OpenSUSE to allow for future addition of the Kickoff menu as an option * Minor Slackware compilation fixes git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1171255 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kcontrol/background/bgdialog.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'kcontrol/background') diff --git a/kcontrol/background/bgdialog.cpp b/kcontrol/background/bgdialog.cpp index ae76b701a..8294f53a3 100644 --- a/kcontrol/background/bgdialog.cpp +++ b/kcontrol/background/bgdialog.cpp @@ -504,14 +504,23 @@ void BGDialog::loadWallpaperFilesList() { //search for .desktop files before searching for images without .desktop files TQStringList lst = m_pDirs->findAllResources("wallpaper", "*desktop", false, true); TQStringList files; + TQStringList hiddenfiles; for (TQStringList::ConstIterator it = lst.begin(); it != lst.end(); ++it) { KSimpleConfig fileConfig(*it); fileConfig.setGroup("Wallpaper"); + int slash = (*it).findRev('/') + 1; + TQString directory = (*it).left(slash); + TQString imageCaption = fileConfig.readEntry("Name"); TQString fileName = fileConfig.readEntry("File"); + if (fileConfig.readBoolEntry("Hidden",false)) { + hiddenfiles.append(directory + fileName); + continue; + } + if (imageCaption.isEmpty()) { imageCaption = fileName; @@ -527,9 +536,8 @@ void BGDialog::loadWallpaperFilesList() { rs = imageCaption + " (" + TQString::number(n) + ')'; lrs = rs.lower(); } - int slash = (*it).findRev('/') + 1; - TQString directory = (*it).left(slash); bool canLoadScaleable = false; + #ifdef HAVE_LIBART canLoadScaleable = true; #endif @@ -543,7 +551,7 @@ void BGDialog::loadWallpaperFilesList() { lst = m_pDirs->findAllResources("wallpaper", "*", false, true); for (TQStringList::ConstIterator it = lst.begin(); it != lst.end(); ++it) { - if ( !(*it).endsWith(".desktop") && files.grep(*it).empty() ) { + if ( !(*it).endsWith(".desktop") && files.grep(*it).empty() && hiddenfiles.grep(*it).empty() ) { // First try to see if we have a comment describing the image. If we do // just use the first line of said comment. KFileMetaInfo metaInfo(*it); -- cgit v1.2.3