diff --git a/containmentconfigview.cpp b/containmentconfigview.cpp index 481255e74..edbc8824f 100644 --- a/containmentconfigview.cpp +++ b/containmentconfigview.cpp @@ -99,13 +99,13 @@ void ContainmentConfigView::setCurrentWallpaper(const QString &wallpaper) return; } - if (m_containment->containment()->wallpaper() == wallpaper) { + if (m_containment->wallpaper() == wallpaper) { delete m_currentWallpaperConfig; if (m_containment->wallpaperInterface()) { m_currentWallpaperConfig = m_containment->wallpaperInterface()->configuration(); } } else { - if (m_containment->containment()->wallpaper() != m_currentWallpaper) { + if (m_containment->wallpaper() != m_currentWallpaper) { delete m_currentWallpaperConfig; } @@ -114,7 +114,7 @@ void ContainmentConfigView::setCurrentWallpaper(const QString &wallpaper) pkg.setDefaultPackageRoot("plasma/wallpapers"); pkg.setPath(wallpaper); QFile file(pkg.filePath("config", "main.xml")); - KConfigGroup cfg = m_containment->containment()->config(); + KConfigGroup cfg = m_containment->config(); cfg = KConfigGroup(&cfg, "Wallpaper"); m_currentWallpaperConfig = new ConfigPropertyMap(new Plasma::ConfigLoader(&cfg, &file), this); }*/ @@ -126,9 +126,9 @@ void ContainmentConfigView::setCurrentWallpaper(const QString &wallpaper) void ContainmentConfigView::applyWallpaper() { - /*m_containment->containment()->setWallpaper(m_currentWallpaper); + m_containment->setWallpaper(m_currentWallpaper); - if (m_currentWallpaperConfig != m_containment->wallpaperInterface()->configuration()) { + /*if (m_currentWallpaperConfig != m_containment->wallpaperInterface()->configuration()) { delete m_currentWallpaperConfig; m_currentWallpaperConfig = m_containment->wallpaperInterface()->configuration(); emit wallpaperConfigurationChanged(); diff --git a/desktopcorona.cpp b/desktopcorona.cpp index 6265cd031..6fd727f5e 100644 --- a/desktopcorona.cpp +++ b/desktopcorona.cpp @@ -315,16 +315,14 @@ void DesktopCorona::showConfigurationInterface(Plasma::Applet *applet) return; } - if (!m_configView) { - Plasma::Containment *cont = qobject_cast(applet); + Plasma::Containment *cont = qobject_cast(applet); - if (cont) { - m_configView = new ContainmentConfigView(cont); - } else { - m_configView = new ConfigView(applet); - } - m_configView.data()->init(); + if (cont) { + m_configView = new ContainmentConfigView(cont); + } else { + m_configView = new ConfigView(applet); } + m_configView.data()->init(); m_configView.data()->show(); }