File plasma-libs.diff of Package kdelibs4

Index: plasma/corona.cpp
===================================================================
--- plasma/corona.cpp.orig
+++ plasma/corona.cpp
@@ -185,7 +185,9 @@ public:
 
         if (pluginName.isEmpty()) {
             // default to the desktop containment
-            pluginName = "desktop";
+            KSharedConfigPtr defaultconfig = KSharedConfig::openConfig("plasma-desktoprc");
+            KConfigGroup group = KConfigGroup(defaultconfig, "Defaults");
+            pluginName = group.readEntry("containment", "desktop");
         }
 
         if (pluginName != "null") {
Index: plasma/private/containment_p.h
===================================================================
--- plasma/private/containment_p.h.orig
+++ plasma/private/containment_p.h
@@ -48,7 +48,8 @@ public:
           toolBox(0),
           con(0),
           type(Containment::NoContainmentType),
-          drawWallpaper(true)
+          drawWallpaper(true),
+          showToolBox(true)
     {
     }
 
@@ -126,6 +127,7 @@ public:
     Containment::Type type;
     static bool s_positioning;
     bool drawWallpaper;
+    bool showToolBox;
 };
 
 } // Plasma namespace
Index: plasma/containment.h
===================================================================
--- plasma/containment.h.orig
+++ plasma/containment.h
@@ -123,6 +123,8 @@ class PLASMA_EXPORT Containment : public
          */
         Containment(QObject *parent, const QVariantList &args);
 
+        Containment(QObject *parent, const QVariantList &args, bool showToolBox);
+
         ~Containment();
 
         /**
Index: plasma/containment.cpp
===================================================================
--- plasma/containment.cpp.orig
+++ plasma/containment.cpp
@@ -113,6 +113,18 @@ Containment::Containment(QObject *parent
     setHasConfigurationInterface(false);
 }
 
+Containment::Containment(QObject *parent, const QVariantList &args, bool showToolBox)
+    : Applet(parent, args),
+      d(new ContainmentPrivate(this))
+{
+    // WARNING: do not access config() OR globalConfig() in this method!
+    //          that requires a scene, which is not available at this point
+    setPos(0, 0);
+    setBackgroundHints(NoBackground);
+    setHasConfigurationInterface(false);
+    d->showToolBox=showToolBox;
+}
+
 Containment::~Containment()
 {
     delete d;
@@ -409,7 +421,7 @@ void Containment::setContainmentType(Con
         return;
     }
 
-    if (type == DesktopContainment || type == PanelContainment) {
+    if ((type == DesktopContainment || type == PanelContainment) && d->showToolBox) {
         d->createToolBox();
     }
 
--- plasma/theme.cpp	2009/05/19 13:32:15	1.1
+++ plasma/theme.cpp	2009/05/19 13:33:31
@@ -56,7 +56,6 @@
         : q(theme),
           colorScheme(QPalette::Active, KColorScheme::Window, KSharedConfigPtr(0)),
           buttonColorScheme(QPalette::Active, KColorScheme::Button, KSharedConfigPtr(0)),
-          defaultWallpaperTheme(DEFAULT_WALLPAPER_THEME),
           defaultWallpaperSuffix(DEFAULT_WALLPAPER_SUFFIX),
           defaultWallpaperWidth(DEFAULT_WALLPAPER_WIDTH),
           defaultWallpaperHeight(DEFAULT_WALLPAPER_HEIGHT),
@@ -71,6 +70,10 @@
         generalFont = QApplication::font();
         cacheTheme = cacheConfig().readEntry("CacheTheme", true);
 
+        KSharedConfigPtr defaultconfig = KSharedConfig::openConfig("plasma-desktoprc");
+        KConfigGroup group = KConfigGroup(defaultconfig, "Defaults");
+        defaultWallpaperTheme = group.readEntry("wallpaper", DEFAULT_WALLPAPER_THEME);
+
 #ifdef Q_WS_X11
         Display *dpy = QX11Info::display();
         int screen = DefaultScreen(dpy);
@@ -380,7 +383,10 @@
         cg = config();
     }
 
-    defaultWallpaperTheme = cg.readEntry("defaultWallpaperTheme", DEFAULT_WALLPAPER_THEME);
+    KSharedConfigPtr defaultconfig = KSharedConfig::openConfig("plasma-desktoprc");
+    KConfigGroup group = KConfigGroup(defaultconfig, "Defaults");
+    defaultWallpaperTheme = cg.readEntry("defaultWallpaperTheme", group.readEntry("wallpaper", DEFAULT_WALLPAPER_THEME));
+
     defaultWallpaperSuffix = cg.readEntry("defaultFileSuffix", DEFAULT_WALLPAPER_SUFFIX);
     defaultWallpaperWidth = cg.readEntry("defaultWidth", DEFAULT_WALLPAPER_WIDTH);
     defaultWallpaperHeight = cg.readEntry("defaultHeight", DEFAULT_WALLPAPER_HEIGHT);
@@ -515,6 +521,10 @@
         }
     }
 
+    if (!QFile::exists(fullPath)) {
+        fullPath = KStandardDirs::locate("wallpaper", d->defaultWallpaperTheme);
+    }
+
     return fullPath;
 }
openSUSE Build Service is sponsored by