call setupScriptSupport in the Applet's init()

svn path=/trunk/KDE/kdelibs/; revision=980825
This commit is contained in:
Aaron J. Seigo 2009-06-12 15:20:54 +00:00
parent a5f83c0e2b
commit f8a69d0b45

View File

@ -197,8 +197,13 @@ PackageStructure::Ptr Applet::packageStructure()
void Applet::init()
{
if (d->script && !d->script->init()) {
setFailedToLaunch(true, i18n("Script initialization failed"));
if (d->script) {
if (d->package) {
d->setupScriptSupport();
}
if (!d->script->init()) {
setFailedToLaunch(true, i18n("Script initialization failed"));
}
}
}
@ -2264,10 +2269,6 @@ void AppletPrivate::init(const QString &packagePath)
delete package;
package = 0;
}
if (package) {
setupScriptSupport();
}
}
}