* initialize kioskImmutable so if loadApplets isn't used, we still get a sane value here
* remove addApplet, as it breaks the corona->containment->applet concept and leads to easily to subtle bugs (c.f. r750746) svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=750747
This commit is contained in:
parent
25d2977510
commit
50bd42b0e9
14
corona.cpp
14
corona.cpp
@ -50,6 +50,7 @@ class Corona::Private
|
|||||||
public:
|
public:
|
||||||
Private()
|
Private()
|
||||||
: immutable(false),
|
: immutable(false),
|
||||||
|
kioskImmutable(false),
|
||||||
mimetype("text/x-plasmoidservicename"),
|
mimetype("text/x-plasmoidservicename"),
|
||||||
configName("plasma-appletsrc"),
|
configName("plasma-appletsrc"),
|
||||||
config(0)
|
config(0)
|
||||||
@ -382,17 +383,6 @@ void Corona::destroyContainment(Containment *c)
|
|||||||
c->deleteLater();
|
c->deleteLater();
|
||||||
}
|
}
|
||||||
|
|
||||||
Applet* Corona::addApplet(const QString& name, const QVariantList& args, uint id, const QRectF& geometry)
|
|
||||||
{
|
|
||||||
if (d->containments.size() < 1) {
|
|
||||||
kDebug() << "No containments to add an applet to!" << endl;
|
|
||||||
//FIXME create a containment if one doesn't exist ... ?
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
return d->containments[0]->addApplet(name, args, id, geometry);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Corona::dragEnterEvent( QGraphicsSceneDragDropEvent *event)
|
void Corona::dragEnterEvent( QGraphicsSceneDragDropEvent *event)
|
||||||
{
|
{
|
||||||
// kDebug() << "Corona::dragEnterEvent(QGraphicsSceneDragDropEvent* event)";
|
// kDebug() << "Corona::dragEnterEvent(QGraphicsSceneDragDropEvent* event)";
|
||||||
@ -478,11 +468,11 @@ bool Corona::isKioskImmutable() const
|
|||||||
|
|
||||||
void Corona::setImmutable(bool immutable)
|
void Corona::setImmutable(bool immutable)
|
||||||
{
|
{
|
||||||
kDebug() << "setting immutability to" << immutable;
|
|
||||||
if (d->immutable == immutable) {
|
if (d->immutable == immutable) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
kDebug() << "setting immutability to" << immutable;
|
||||||
d->immutable = immutable;
|
d->immutable = immutable;
|
||||||
foreach (Containment *c, d->containments) {
|
foreach (Containment *c, d->containments) {
|
||||||
// we need to tell each containment that immutability has been altered
|
// we need to tell each containment that immutability has been altered
|
||||||
|
15
corona.h
15
corona.h
@ -114,21 +114,6 @@ public Q_SLOTS:
|
|||||||
*/
|
*/
|
||||||
void saveApplets() const;
|
void saveApplets() const;
|
||||||
|
|
||||||
/**
|
|
||||||
* Adds an applet to the default Containment
|
|
||||||
*
|
|
||||||
* @param name the plugin name for the applet, as given by
|
|
||||||
* KPluginInfo::pluginName()
|
|
||||||
* @param args argument list to pass to the plasmoid
|
|
||||||
* @param id to assign to this applet, or 0 to auto-assign it a new id
|
|
||||||
* @param geometry where to place the applet, or to auto-place it if an invalid
|
|
||||||
* is provided
|
|
||||||
*
|
|
||||||
* @return a pointer to the applet on success, or 0 on failure
|
|
||||||
*/
|
|
||||||
Applet* addApplet(const QString& name, const QVariantList& args = QVariantList(),
|
|
||||||
uint id = 0, const QRectF &geometry = QRectF(-1, -1, -1, -1));
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds a Containment to the Corona
|
* Adds a Containment to the Corona
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user