Do X-Plasma-DefaultSize resize in AppletPrivate::init

svn path=/trunk/KDE/kdelibs/; revision=984355
This commit is contained in:
Petri Damstén 2009-06-20 15:58:59 +00:00
parent eb7b8827e1
commit 414b22f26b

View File

@ -2278,6 +2278,14 @@ void AppletPrivate::init(const QString &packagePath)
}
}
//set a default size before any saved settings are read
QSize size = appletDescription.property("X-Plasma-DefaultSize").toSize();
if (size.isEmpty()) {
size = QSize(200, 200);
}
//kDebug() << "size" << size;
q->resize(size);
q->setBackgroundHints(Applet::DefaultBackground);
q->setHasConfigurationInterface(true); //FIXME why not default it to true in the constructor?
@ -2318,15 +2326,6 @@ 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.isEmpty()) {
size = QSize(200,200);
}
//kDebug() << "size" << size;
q->resize(size);
}
QString AppletPrivate::globalName() const