From da34471e1360f802fa9d6fd7b1c5ee55481ac8cf Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Sun, 6 Jan 2008 20:38:35 +0000 Subject: [PATCH] add a way for Containments to get notified that startup is indeed complete svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=758066 --- corona.cpp | 4 +++- plasma.h | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/corona.cpp b/corona.cpp index 87d33c2a6..6580ab3ec 100644 --- a/corona.cpp +++ b/corona.cpp @@ -236,7 +236,7 @@ void Corona::loadApplets(const QString& configName) } Applet *applet = c->addApplet(plugin, QVariantList(), appId, appletConfig.readEntry("geometry", QRectF()), true); - + QList m = appletConfig.readEntry("transform", QList()); if (m.count() == 9) { QTransform t(m[0], m[1], m[2], m[3], m[4], m[5], m[6], m[7], m[8]); @@ -257,6 +257,7 @@ void Corona::loadApplets(const QString& configName) applet->init(); } + containment->updateConstraints(Plasma::StartupCompletedConstraint); containment->flushUpdatedConstraints(); } @@ -406,6 +407,7 @@ Containment* Corona::addContainment(const QString& name, const QVariantList& arg if (!delayedInit) { addItem(containment); containment->init(); + containment->updateConstraints(Plasma::StartupCompletedConstraint); } d->containments.append(containment); diff --git a/plasma.h b/plasma.h index 4f4f8e8c8..9ebd781f3 100644 --- a/plasma.h +++ b/plasma.h @@ -42,6 +42,7 @@ enum Constraint { NoConstraint = 0, ScreenConstraint = 4 /** Which screen an object is on */, SizeConstraint = 8 /** the size of the applet was changed */, ImmutableConstraint = 16 /** the immutability (locked) nature of the applet changed */, + StartupCompletedConstraint = 32 /** application startup has completed */, AllConstraints = FormFactorConstraint | LocationConstraint | ScreenConstraint | SizeConstraint | ImmutableConstraint }; Q_DECLARE_FLAGS(Constraints, Constraint)