don't duplicate this over and over again

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=858359
This commit is contained in:
Aaron J. Seigo 2008-09-07 21:07:30 +00:00
parent f9c49d0488
commit 8ef4eaa1d4

View File

@ -59,6 +59,9 @@
namespace Plasma namespace Plasma
{ {
static const char *defaultWallpaper = "image";
static const char *defaultWallpaperMode = "SingleImage";
Containment::StyleOption::StyleOption() Containment::StyleOption::StyleOption()
: QStyleOptionGraphicsItem(), : QStyleOptionGraphicsItem(),
view(0) view(0)
@ -253,8 +256,8 @@ void Containment::restore(KConfigGroup &group)
restoreContents(group); restoreContents(group);
setImmutability((ImmutabilityType)group.readEntry("immutability", (int)Mutable)); setImmutability((ImmutabilityType)group.readEntry("immutability", (int)Mutable));
setWallpaper(group.readEntry("wallpaperplugin", "image"), setWallpaper(group.readEntry("wallpaperplugin", defaultWallpaper),
group.readEntry("wallpaperpluginmode", "SingleImage")); group.readEntry("wallpaperpluginmode", defaultWallpaperMode));
/* /*
kDebug() << "Containment" << id() << kDebug() << "Containment" << id() <<
"screen" << screen() << "screen" << screen() <<
@ -1175,8 +1178,8 @@ void Containment::setDrawWallpaper(bool drawWallpaper)
d->drawWallpaper = drawWallpaper; d->drawWallpaper = drawWallpaper;
if (d->drawWallpaper) { if (d->drawWallpaper) {
KConfigGroup cfg = config(); KConfigGroup cfg = config();
setWallpaper(cfg.readEntry("wallpaperplugin", "image"), setWallpaper(cfg.readEntry("wallpaperplugin", defaultWallpaper),
cfg.readEntry("wallpaperpluginmode", "SingleImage")); cfg.readEntry("wallpaperpluginmode", defaultWallpaperMode));
} else if (!d->drawWallpaper && d->wallpaper) { } else if (!d->drawWallpaper && d->wallpaper) {
delete d->wallpaper; delete d->wallpaper;
d->wallpaper = 0; d->wallpaper = 0;