make the Wallpaper section of metadata.desktop actually work

svn path=/trunk/KDE/kdelibs/; revision=904433
This commit is contained in:
Marco Martin 2009-01-02 10:52:14 +00:00
parent 47c511c86c
commit 7031c9a7c4

View File

@ -351,7 +351,7 @@ void Theme::setThemeName(const QString &themeName)
d->colorScheme = KColorScheme(QPalette::Active, KColorScheme::Window, d->colors); d->colorScheme = KColorScheme(QPalette::Active, KColorScheme::Window, d->colors);
d->buttonColorScheme = KColorScheme(QPalette::Active, KColorScheme::Button, d->colors); d->buttonColorScheme = KColorScheme(QPalette::Active, KColorScheme::Button, d->colors);
d->hasWallpapers = d->hasWallpapers =
!KStandardDirs::locate("data", "desktoptheme/" + theme + "/wallpapers").isEmpty(); KStandardDirs::exists(KStandardDirs::locateLocal("data", "desktoptheme/" + theme + "/wallpapers/"));
if (d->isDefault) { if (d->isDefault) {
// we're the default theme, let's save our state // we're the default theme, let's save our state
@ -439,10 +439,10 @@ QString Theme::wallpaperPath(const QSize &size) const
// to override the theme? // to override the theme?
if (d->hasWallpapers) { if (d->hasWallpapers) {
// check in the theme first // check in the theme first
fullPath = d->findInTheme("wallpaper/" + image, d->themeName); fullPath = d->findInTheme("wallpapers/" + image, d->themeName);
if (fullPath.isEmpty()) { if (fullPath.isEmpty()) {
fullPath = d->findInTheme("wallpaper/" + defaultImage, d->themeName); fullPath = d->findInTheme("wallpapers/" + defaultImage, d->themeName);
} }
} }