:%s/NotImmutable/Mutable/g
because double negatives hurt my brain. svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=805296
This commit is contained in:
parent
57cf4099c8
commit
2a6a5fa6db
@ -175,7 +175,7 @@ void Applet::restore(KConfigGroup *c)
|
||||
|
||||
setZValue(z);
|
||||
|
||||
setImmutability((ImmutabilityType)c->readEntry("immutability", (int)NotImmutable));
|
||||
setImmutability((ImmutabilityType)c->readEntry("immutability", (int)Mutable));
|
||||
}
|
||||
|
||||
void Applet::setFailedToLaunch(bool failed, const QString& reason)
|
||||
@ -462,7 +462,7 @@ QString Applet::category(const QString& appletName)
|
||||
ImmutabilityType Applet::immutability() const
|
||||
{
|
||||
//Returning the more strict immutability between the applet immutability and Corona one
|
||||
ImmutabilityType coronaImmutability = NotImmutable;
|
||||
ImmutabilityType coronaImmutability = Mutable;
|
||||
|
||||
if (dynamic_cast<Corona*>(scene())) {
|
||||
coronaImmutability = static_cast<Corona*>(scene())->immutability();
|
||||
@ -833,7 +833,7 @@ bool Applet::sceneEventFilter( QGraphicsItem * watched, QEvent * event )
|
||||
|
||||
void Applet::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
|
||||
{
|
||||
if (d->immutability == NotImmutable && formFactor() == Plasma::Planar) {
|
||||
if (d->immutability == Mutable && formFactor() == Plasma::Planar) {
|
||||
QGraphicsItem *parent = parentItem();
|
||||
Plasma::Applet *applet = qgraphicsitem_cast<Plasma::Applet*>(parent);
|
||||
|
||||
@ -1180,7 +1180,7 @@ Applet::Private::Private(KService::Ptr service, int uniqueID, Applet *applet)
|
||||
mainConfig(0),
|
||||
pendingConstraints(NoConstraint),
|
||||
aspectRatioMode(Plasma::KeepAspectRatio),
|
||||
immutability(NotImmutable),
|
||||
immutability(Mutable),
|
||||
hasConfigurationInterface(false),
|
||||
failed(false),
|
||||
isContainment(false),
|
||||
|
@ -302,7 +302,7 @@ void Containment::contextMenuEvent(QGraphicsSceneContextMenuEvent* event)
|
||||
}
|
||||
}
|
||||
|
||||
if (scene() && !static_cast<Corona*>(scene())->immutability() != NotImmutable) {
|
||||
if (scene() && !static_cast<Corona*>(scene())->immutability() != Mutable) {
|
||||
if (hasEntries) {
|
||||
desktopMenu.addSeparator();
|
||||
}
|
||||
@ -323,7 +323,7 @@ void Containment::contextMenuEvent(QGraphicsSceneContextMenuEvent* event)
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
if (!scene() || (static_cast<Corona*>(scene())->immutability() != NotImmutable && !KAuthorized::authorizeKAction("unlock_desktop"))) {
|
||||
if (!scene() || (static_cast<Corona*>(scene())->immutability() != Mutable && !KAuthorized::authorizeKAction("unlock_desktop"))) {
|
||||
//kDebug() << "immutability";
|
||||
Applet::contextMenuEvent(event);
|
||||
return;
|
||||
@ -421,7 +421,7 @@ Applet* Containment::addApplet(const QString& name, const QVariantList& args, co
|
||||
//there.
|
||||
void Containment::addApplet(Applet *applet, const QPointF &pos, bool delayInit)
|
||||
{
|
||||
if (!delayInit && immutability() != NotImmutable) {
|
||||
if (!delayInit && immutability() != Mutable) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -685,7 +685,7 @@ bool Containment::sceneEventFilter(QGraphicsItem *watched, QEvent *event)
|
||||
switch (event->type()) {
|
||||
case QEvent::GraphicsSceneHoverEnter:
|
||||
//kDebug() << "got hoverenterEvent" << immutability() << " " << applet->immutability();
|
||||
if (immutability() == NotImmutable && applet->immutability() == NotImmutable) {
|
||||
if (immutability() == Mutable && applet->immutability() == Mutable) {
|
||||
if (d->handles.contains(applet)) {
|
||||
d->handles[applet]->startFading(AppletHandle::FadeIn);
|
||||
} else {
|
||||
@ -798,16 +798,16 @@ void Containment::closeToolBox()
|
||||
void Containment::Private::toggleDesktopImmutability()
|
||||
{
|
||||
if (q->corona()) {
|
||||
if (q->corona()->immutability() == NotImmutable) {
|
||||
if (q->corona()->immutability() == Mutable) {
|
||||
q->corona()->setImmutability(UserImmutable);
|
||||
} else if (q->corona()->immutability() == UserImmutable) {
|
||||
q->corona()->setImmutability(NotImmutable);
|
||||
q->corona()->setImmutability(Mutable);
|
||||
}
|
||||
} else {
|
||||
if (q->immutability() == NotImmutable) {
|
||||
if (q->immutability() == Mutable) {
|
||||
q->setImmutability(UserImmutable);
|
||||
} else if (q->immutability() == UserImmutable) {
|
||||
q->setImmutability(NotImmutable);
|
||||
q->setImmutability(Mutable);
|
||||
}
|
||||
}
|
||||
|
||||
@ -881,7 +881,7 @@ void Containment::Private::setLockToolText()
|
||||
Icon *icon = dynamic_cast<Plasma::Icon*>(toolBox->tool("lockWidgets"));
|
||||
if (icon) {
|
||||
// we know it's an icon becase we made it
|
||||
icon->setText(q->immutability() != NotImmutable ? i18n("Unlock Widgets") :
|
||||
icon->setText(q->immutability() != Mutable ? i18n("Unlock Widgets") :
|
||||
i18n("Lock Widgets"));
|
||||
QSizeF iconSize = icon->sizeFromIconSize(22);
|
||||
icon->setMinimumSize(iconSize);
|
||||
@ -921,7 +921,7 @@ void Containment::Private::containmentConstraintsEvent(Plasma::Constraints const
|
||||
} else {
|
||||
toolBox->setPos(q->geometry().right() - qAbs(toolBox->boundingRect().width()), 0);
|
||||
}
|
||||
toolBox->enableTool("addwidgets", q->immutability() == NotImmutable);
|
||||
toolBox->enableTool("addwidgets", q->immutability() == Mutable);
|
||||
}
|
||||
|
||||
if (constraints & Plasma::FormFactorConstraint) {
|
||||
@ -966,7 +966,7 @@ void Containment::Private::destroyApplet()
|
||||
Applet* Containment::Private::addApplet(const QString& name, const QVariantList& args,
|
||||
const QRectF& appletGeometry, uint id, bool delayInit)
|
||||
{
|
||||
if (!delayInit && q->immutability() != NotImmutable) {
|
||||
if (!delayInit && q->immutability() != Mutable) {
|
||||
kDebug() << "addApplet for" << name << "requested, but we're currently immutable!";
|
||||
return 0;
|
||||
}
|
||||
|
@ -49,7 +49,7 @@ class Corona::Private
|
||||
public:
|
||||
Private(Corona *corona)
|
||||
: q(corona),
|
||||
immutability(NotImmutable),
|
||||
immutability(Mutable),
|
||||
mimetype("text/x-plasmoidservicename"),
|
||||
config(0)
|
||||
{
|
||||
@ -304,7 +304,7 @@ void Corona::loadLayout(const QString& configName)
|
||||
}
|
||||
|
||||
KConfigGroup coronaConfig(config(), "General");
|
||||
setImmutability((ImmutabilityType)coronaConfig.readEntry("immutability", (int)NotImmutable));
|
||||
setImmutability((ImmutabilityType)coronaConfig.readEntry("immutability", (int)Mutable));
|
||||
}
|
||||
|
||||
Containment* Corona::containmentForScreen(int screen) const
|
||||
|
2
plasma.h
2
plasma.h
@ -146,7 +146,7 @@ enum ItemTypes { AppletType = QGraphicsItem::UserType + 1,
|
||||
* Defines the immutability of items like applets, corona and containments
|
||||
* they can be free to modify, locked down by the user or locked down by the system (e.g. kiosk setups)
|
||||
*/
|
||||
enum ImmutabilityType { NotImmutable = 1 /**< The item can be modified in any way **/,
|
||||
enum ImmutabilityType { Mutable = 1 /**< The item can be modified in any way **/,
|
||||
UserImmutable = 2 /**< The user has requested a lock down, and can undo the lock down at any time **/,
|
||||
SystemImmutable = 4 /**< the item is locked down by the system, the user can't unlock it **/
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user