config ui of applets should work again

wilder-5.14
Marco Martin 13 years ago
parent 0034c7da79
commit 421870aedf
  1. 10
      containmentconfigview.cpp
  2. 14
      desktopcorona.cpp

@ -99,13 +99,13 @@ void ContainmentConfigView::setCurrentWallpaper(const QString &wallpaper)
return; return;
} }
if (m_containment->containment()->wallpaper() == wallpaper) { if (m_containment->wallpaper() == wallpaper) {
delete m_currentWallpaperConfig; delete m_currentWallpaperConfig;
if (m_containment->wallpaperInterface()) { if (m_containment->wallpaperInterface()) {
m_currentWallpaperConfig = m_containment->wallpaperInterface()->configuration(); m_currentWallpaperConfig = m_containment->wallpaperInterface()->configuration();
} }
} else { } else {
if (m_containment->containment()->wallpaper() != m_currentWallpaper) { if (m_containment->wallpaper() != m_currentWallpaper) {
delete m_currentWallpaperConfig; delete m_currentWallpaperConfig;
} }
@ -114,7 +114,7 @@ void ContainmentConfigView::setCurrentWallpaper(const QString &wallpaper)
pkg.setDefaultPackageRoot("plasma/wallpapers"); pkg.setDefaultPackageRoot("plasma/wallpapers");
pkg.setPath(wallpaper); pkg.setPath(wallpaper);
QFile file(pkg.filePath("config", "main.xml")); QFile file(pkg.filePath("config", "main.xml"));
KConfigGroup cfg = m_containment->containment()->config(); KConfigGroup cfg = m_containment->config();
cfg = KConfigGroup(&cfg, "Wallpaper"); cfg = KConfigGroup(&cfg, "Wallpaper");
m_currentWallpaperConfig = new ConfigPropertyMap(new Plasma::ConfigLoader(&cfg, &file), this); m_currentWallpaperConfig = new ConfigPropertyMap(new Plasma::ConfigLoader(&cfg, &file), this);
}*/ }*/
@ -126,9 +126,9 @@ void ContainmentConfigView::setCurrentWallpaper(const QString &wallpaper)
void ContainmentConfigView::applyWallpaper() 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; delete m_currentWallpaperConfig;
m_currentWallpaperConfig = m_containment->wallpaperInterface()->configuration(); m_currentWallpaperConfig = m_containment->wallpaperInterface()->configuration();
emit wallpaperConfigurationChanged(); emit wallpaperConfigurationChanged();

@ -315,16 +315,14 @@ void DesktopCorona::showConfigurationInterface(Plasma::Applet *applet)
return; return;
} }
if (!m_configView) { Plasma::Containment *cont = qobject_cast<Plasma::Containment *>(applet);
Plasma::Containment *cont = qobject_cast<Plasma::Containment *>(applet);
if (cont) { if (cont) {
m_configView = new ContainmentConfigView(cont); m_configView = new ContainmentConfigView(cont);
} else { } else {
m_configView = new ConfigView(applet); m_configView = new ConfigView(applet);
}
m_configView.data()->init();
} }
m_configView.data()->init();
m_configView.data()->show(); m_configView.data()->show();
} }

Loading…
Cancel
Save