get rid of m_wallpaperConfigDirty

wallpaper changes are handled at runtime now and this had become a bunch
of noops and setting of variables for no particular reason
wilder-5.14
Aaron Seigo 12 years ago
parent 992f1693e1
commit 8e8751859e
  1. 13
      shell/scripting/applet.cpp
  2. 2
      shell/scripting/applet.h
  3. 5
      shell/scripting/containment.cpp

@ -38,8 +38,7 @@ class Applet::Private
public:
Private()
: configDirty(false),
inWallpaperConfig(false),
wallpaperConfigDirty(false)
inWallpaperConfig(false)
{
}
@ -49,7 +48,6 @@ public:
QStringList globalConfigGroupPath;
bool configDirty : 1;
bool inWallpaperConfig : 1;
bool wallpaperConfigDirty : 1;
};
Applet::Applet(QObject *parent)
@ -118,16 +116,14 @@ void Applet::writeConfig(const QString &key, const QVariant &value)
{
if (d->configGroup.isValid()) {
if (d->inWallpaperConfig) {
d->wallpaperConfigDirty = true;
//hacky, but only way to make the wallpaper react immediately
QObject *wallpaperGraphicsObject = applet()->property("wallpaperGraphicsObject").value<QObject *>();
if (wallpaperGraphicsObject) {
KDeclarative::ConfigPropertyMap *config = static_cast<KDeclarative::ConfigPropertyMap *>(wallpaperGraphicsObject->property("configuration").value<QObject *>());
config->setProperty(key.toLatin1(), value);
}
//check if it can be written in the applets' configScheme
} else if (applet()->configScheme()) {
//check if it can be written in the applets' configScheme
KConfigSkeletonItem *item = applet()->configScheme()->findItemByName(key);
if (item) {
item->setProperty(value);
@ -275,11 +271,6 @@ bool Applet::locked() const
return app->immutability() != Plasma::Types::Mutable;
}
bool Applet::wallpaperConfigDirty() const
{
return d->wallpaperConfigDirty;
}
Plasma::Applet *Applet::applet() const
{
return 0;

@ -60,8 +60,6 @@ public:
void setLocked(bool locked);
bool locked() const;
bool wallpaperConfigDirty() const;
virtual Plasma::Applet *applet() const;
protected:

@ -63,14 +63,11 @@ Containment::~Containment()
if (d->oldWallpaperPlugin != d->wallpaperPlugin ||
d->oldWallpaperMode != d->wallpaperMode) {
containment->setWallpaper(d->wallpaperPlugin);
} else if (wallpaperConfigDirty()) {
KConfigGroup cg(containment->config());
cg = KConfigGroup(&cg, "Wallpaper");
cg = KConfigGroup(&cg, containment->wallpaper());
}
}
reloadConfigIfNeeded();
delete d;
}

Loading…
Cancel
Save