[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdebase/workspace/plasma/generic/wallpapers/image
From: Marco Martin <notmart () gmail ! com>
Date: 2010-08-10 19:53:15
Message-ID: 20100810195315.1A396AC7E8 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1161781 by mart:
if the wallpaper name is not an absolute path, check if it's a name in the standard wallapapers folder
M +15 -0 image.cpp
--- trunk/KDE/kdebase/workspace/plasma/generic/wallpapers/image/image.cpp #1161780:1161781
@@ -357,6 +357,8 @@
}
QString img;
+
+ if (QDir::isAbsolutePath(m_wallpaper)) {
Plasma::Package b(m_wallpaper, packageStructure(this));
img = b.filePath("preferred");
kDebug() << img << m_wallpaper;
@@ -364,7 +366,20 @@
if (img.isEmpty()) {
img = m_wallpaper;
}
+ //if it's not an absolute path, check if it's just a wallpaper name
+ } else {
+ const QString path = KStandardDirs::locate("wallpaper", m_wallpaper + "/metadata.desktop");
+ if (!path.isEmpty()) {
+ QDir dir(path);
+ dir.cdUp();
+
+ Plasma::Package b(dir.path(), packageStructure(this));
+ img = b.filePath("preferred");
+ }
+ }
+
+
if (!m_size.isEmpty()) {
renderWallpaper(img);
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic