diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-09-03 09:14:57 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-09-03 09:14:57 +0000 |
commit | 27856879bf962f178d88e79144e37a47e731b122 (patch) | |
tree | a3bd3f489b755cd2941e7c53b90d12d6bfd4fbe3 /kcontrol/background/bgdialog.cpp | |
parent | c5228d52f504d6d2c0fefdd625ec08ebb8e91f85 (diff) | |
download | tdebase-27856879bf962f178d88e79144e37a47e731b122.tar.gz tdebase-27856879bf962f178d88e79144e37a47e731b122.zip |
* 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
Diffstat (limited to 'kcontrol/background/bgdialog.cpp')
-rw-r--r-- | kcontrol/background/bgdialog.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
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); |