* Fri Dec 19 2008 Kevin Kofler <Kevin@tigcc.ticalc.org> 4.1.85-6

- add plasma-default-wallpaper libplasma patch from kdebase-workspace-4.1
This commit is contained in:
Kevin Kofler 2008-12-19 01:31:10 +00:00
parent 5c52395864
commit 60df8bdbde
2 changed files with 52 additions and 1 deletions

View File

@ -0,0 +1,45 @@
diff -ur kdelibs-4.1.85/plasma/theme.cpp kdelibs-4.1.85-plasma-default-wallpaper/plasma/theme.cpp
--- kdelibs-4.1.85/plasma/theme.cpp 2008-12-10 17:12:25.000000000 +0100
+++ kdelibs-4.1.85-plasma-default-wallpaper/plasma/theme.cpp 2008-12-19 02:26:06.000000000 +0100
@@ -111,6 +111,7 @@
KColorScheme buttonColorScheme;
KConfigGroup cfg;
QFont generalFont;
+ QString globalDefaultWallpaper;
QString defaultWallpaperTheme;
QString defaultWallpaperSuffix;
int defaultWallpaperWidth;
@@ -293,6 +294,10 @@
//kDebug() << "we're going for..." << colorsFile << "*******************";
// load the wallpaper settings, if any
+ KSharedConfigPtr config = KSharedConfig::openConfig("plasmarc");
+ KConfigGroup group = KConfigGroup(config, "Defaults");
+ d->globalDefaultWallpaper = group.readEntry("wallpaper", (const char *) 0);
+
QString metadataPath(KStandardDirs::locate("data", "desktoptheme/" + theme + "/metadata.desktop"));
KConfig metadata(metadataPath);
KConfigGroup cg;
@@ -306,8 +311,8 @@
cg = d->config();
}
- d->defaultWallpaperTheme = cg.readEntry("defaultWallpaperTheme", DEFAULT_WALLPAPER_THEME);
- d->defaultWallpaperSuffix = cg.readEntry("defaultFileSuffix", DEFAULT_WALLPAPER_SUFFIX);
+ d->defaultWallpaperTheme = cg.readEntry("defaultWallpaperTheme", d->globalDefaultWallpaper.isEmpty() ? DEFAULT_WALLPAPER_THEME : (const char *) 0);
+ d->defaultWallpaperSuffix = cg.readEntry("defaultFileSuffix", d->globalDefaultWallpaper.isEmpty() ? DEFAULT_WALLPAPER_SUFFIX : (const char *) 0);
d->defaultWallpaperWidth = cg.readEntry("defaultWidth", DEFAULT_WALLPAPER_WIDTH);
d->defaultWallpaperHeight = cg.readEntry("defaultHeight", DEFAULT_WALLPAPER_HEIGHT);
@@ -399,7 +404,10 @@
QString fullPath;
QString image = d->defaultWallpaperTheme;
- image.append("/contents/images/%1x%2").append(d->defaultWallpaperSuffix);
+ if (image.isEmpty() && !d->globalDefaultWallpaper.isEmpty())
+ image = d->globalDefaultWallpaper;
+ else
+ image.append("/contents/images/%1x%2").append(d->defaultWallpaperSuffix);
QString defaultImage = image.arg(d->defaultWallpaperWidth).arg(d->defaultWallpaperHeight);
if (size.isValid()) {

View File

@ -1,6 +1,6 @@
Summary: K Desktop Environment 4 - Libraries
Version: 4.1.85
Release: 5%{?dist}
Release: 6%{?dist}
%if 0%{?fedora} > 8
Name: kdelibs
@ -71,6 +71,8 @@ Patch14: kdelibs-4.0.85-libexecdir.patch
# kstandarddirs changes: search /etc/kde, find /usr/libexec/kde4
Patch18: kdelibs-4.1.72-kstandarddirs.patch
Patch20: kdelibs-4.1.70-cmake.patch
# allows to define a default wallpaper via plasmarc:wallpaper
Patch21: kdelibs-4.1.85-plasma-default-wallpaper.patch
BuildRequires: qt4-devel >= 4.4.0
Requires: qt4 >= %{_qt4_version}
@ -194,6 +196,7 @@ sed -i -e "s|@@VERSION_RELEASE@@|%{version}-%{release}|" kio/kio/kprotocolmanage
%patch14 -p1 -b .libexecdir
%patch18 -p1 -b .kstandarddirs
%patch20 -p1 -b .xxcmake
%patch21 -p1 -b .plasma-default-wallpaper
%build
@ -355,6 +358,9 @@ rm -rf %{buildroot}
%changelog
* Fri Dec 19 2008 Kevin Kofler <Kevin@tigcc.ticalc.org> 4.1.85-6
- add plasma-default-wallpaper libplasma patch from kdebase-workspace-4.1
* Tue Dec 16 2008 Rex Dieter <rdieter@fedoraproject.org> 4.1.85-5
- respun tarball, integrates kde-l10n-systemsettings patch