a default size for scripted applets, because they aren't allowed to do anything themselves before init (and this is the one thing that *must* be done before init)

svn path=/trunk/KDE/kdelibs/; revision=908612
This commit is contained in:
Chani Armitage 2009-01-10 00:33:38 +00:00
parent e3745c680a
commit ebfc550c11
2 changed files with 12 additions and 0 deletions

View File

@ -1946,6 +1946,15 @@ void AppletPrivate::setupScriptSupport()
if (!package->filePath("mainconfigui").isEmpty()) {
q->setHasConfigurationInterface(true);
}
//set a default size before any saved settings are read
QSize size = appletDescription.property("X-Plasma-DefaultSize").toSize();
if (size == QSize()) {
size = QSize(200,200);
}
//kDebug() << "size" << size;
q->resize(size);
}
QString AppletPrivate::globalName() const

View File

@ -59,3 +59,6 @@ Type=QString
[PropertyDef::X-Plasma-DropMimeTypes]
Type=QStringList
[PropertyDef::X-Plasma-DefaultSize]
Type=QSize