From a7fb94fb42c89340a351383cbd5c99b9adcd0f21 Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Fri, 27 Jul 2007 21:05:45 +0000 Subject: [PATCH] separate out the concept of kioskImmutability so we can take separate internal actions based on that as needed svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=693391 --- applet.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/applet.cpp b/applet.cpp index de18f3ade..8e2d97218 100644 --- a/applet.cpp +++ b/applet.cpp @@ -63,6 +63,7 @@ public: background(0), failureText(0), scriptEngine(0), + kioskImmutable(false), immutable(false), hasConfigurationInterface(false), failed(false), @@ -88,8 +89,9 @@ public: void init(Applet* applet) { - applet->setImmutable(applet->globalConfig().isImmutable() || - applet->config().isImmutable()); + kioskImmutable = applet->globalConfig().isImmutable() || + applet->config().isImmutable(); + applet->setImmutable(kioskImmutable); if (!appletDescription.isValid()) { applet->setFailedToLaunch(true); @@ -246,6 +248,7 @@ public: Plasma::Svg *background; Plasma::LineEdit *failureText; ScriptEngine* scriptEngine; + bool kioskImmutable : 1; bool immutable : 1; bool hasConfigurationInterface : 1; bool failed : 1; @@ -385,7 +388,7 @@ QString Applet::category(const QString& appletName) bool Applet::isImmutable() const { - return d->immutable; + return d->immutable || d->kioskImmutable; } void Applet::setImmutable(bool immutable) @@ -394,7 +397,7 @@ void Applet::setImmutable(bool immutable) QGraphicsItem::GraphicsItemFlags f = flags(); if (immutable) { f ^= QGraphicsItem::ItemIsMovable; - } else if (!scene() || !static_cast(scene())->isImmutable()) { + } else if (!d->kioskImmutable && (!scene() || !static_cast(scene())->isImmutable())) { f |= QGraphicsItem::ItemIsMovable; } setFlags(f);