move toggleDesktopImmutability() from defaultdesktop to containment
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=781623
This commit is contained in:
parent
92a724abe3
commit
34ae05a9b2
@ -208,6 +208,11 @@ void Containment::setContainmentType(Containment::Type type)
|
|||||||
|
|
||||||
Plasma::Widget *zoomOutTool = addToolBoxTool("zoomOut", "zoom-out", i18n("Zoom Out"));
|
Plasma::Widget *zoomOutTool = addToolBoxTool("zoomOut", "zoom-out", i18n("Zoom Out"));
|
||||||
connect(zoomOutTool, SIGNAL(clicked()), this, SIGNAL(zoomOut()));
|
connect(zoomOutTool, SIGNAL(clicked()), this, SIGNAL(zoomOut()));
|
||||||
|
|
||||||
|
//FIXME how do we access the widget later to change it between lock and unlock?
|
||||||
|
//FIXME only show if user's allowed to toggle
|
||||||
|
//Plasma::Widget *lockTool = addToolBoxTool("lockWidgets", "object-locked", i18n("Lock Widgets"));
|
||||||
|
//connect(lockTool, SIGNAL(clicked()), this, SLOT(toggleDesktopImmutability()));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
delete d->toolbox;
|
delete d->toolbox;
|
||||||
@ -418,6 +423,15 @@ Location Containment::location() const
|
|||||||
return d->location;
|
return d->location;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Containment::toggleDesktopImmutability()
|
||||||
|
{
|
||||||
|
if (corona()) {
|
||||||
|
corona()->setImmutable(!corona()->isImmutable());
|
||||||
|
} else {
|
||||||
|
setImmutable(!isImmutable());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void Containment::clearApplets()
|
void Containment::clearApplets()
|
||||||
{
|
{
|
||||||
qDeleteAll(d->applets);
|
qDeleteAll(d->applets);
|
||||||
@ -705,7 +719,7 @@ void Containment::setScreen(int screen)
|
|||||||
if (screen < -1) {
|
if (screen < -1) {
|
||||||
screen = -1;
|
screen = -1;
|
||||||
}
|
}
|
||||||
|
//FIXME several blatant bugs here
|
||||||
//kDebug() << "setting screen to " << screen << "and type is" << containmentType();
|
//kDebug() << "setting screen to " << screen << "and type is" << containmentType();
|
||||||
if (screen < numScreens && screen > -1) {
|
if (screen < numScreens && screen > -1) {
|
||||||
QRect r = desktop->screenGeometry(screen);
|
QRect r = desktop->screenGeometry(screen);
|
||||||
|
@ -331,6 +331,13 @@ class PLASMA_EXPORT Containment : public Applet
|
|||||||
*/
|
*/
|
||||||
void setFormFactor(Plasma::FormFactor formFactor);
|
void setFormFactor(Plasma::FormFactor formFactor);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Locks or unlocks plasma's applets.
|
||||||
|
* When plasma is locked, applets cannot be transformed, added or deleted
|
||||||
|
* but they can still be configured.
|
||||||
|
*/
|
||||||
|
void toggleDesktopImmutability();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the Corona (if any) that this Containment is hosted by
|
* Returns the Corona (if any) that this Containment is hosted by
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user