* 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:
Aaron J. Seigo 2007-12-19 23:59:59 +00:00
parent 25d2977510
commit 50bd42b0e9
2 changed files with 2 additions and 27 deletions

View File

@ -50,6 +50,7 @@ class Corona::Private
public:
Private()
: immutable(false),
kioskImmutable(false),
mimetype("text/x-plasmoidservicename"),
configName("plasma-appletsrc"),
config(0)
@ -382,17 +383,6 @@ void Corona::destroyContainment(Containment *c)
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)
{
// kDebug() << "Corona::dragEnterEvent(QGraphicsSceneDragDropEvent* event)";
@ -478,11 +468,11 @@ bool Corona::isKioskImmutable() const
void Corona::setImmutable(bool immutable)
{
kDebug() << "setting immutability to" << immutable;
if (d->immutable == immutable) {
return;
}
kDebug() << "setting immutability to" << immutable;
d->immutable = immutable;
foreach (Containment *c, d->containments) {
// we need to tell each containment that immutability has been altered

View File

@ -114,21 +114,6 @@ public Q_SLOTS:
*/
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
*