backport of r908612:
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=/branches/KDE/4.2/kdelibs/; revision=908618
This commit is contained in:
parent
faaa5b009c
commit
5fc144ba9a
@ -1942,6 +1942,15 @@ void AppletPrivate::setupScriptSupport()
|
|||||||
if (!package->filePath("mainconfigui").isEmpty()) {
|
if (!package->filePath("mainconfigui").isEmpty()) {
|
||||||
q->setHasConfigurationInterface(true);
|
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
|
QString AppletPrivate::globalName() const
|
||||||
|
@ -59,3 +59,6 @@ Type=QString
|
|||||||
[PropertyDef::X-Plasma-DropMimeTypes]
|
[PropertyDef::X-Plasma-DropMimeTypes]
|
||||||
Type=QStringList
|
Type=QStringList
|
||||||
|
|
||||||
|
[PropertyDef::X-Plasma-DefaultSize]
|
||||||
|
Type=QSize
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user