--Boundary-00=_TpvzH+j0df0BLRg Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline inspired by http://aseigo.blogspot.com/2008/03/power-of-containments.html :) The attached patch does enable Containments (tested with panels) written using a ScriptEngine like SuperKaramba. p.s. sorry for not using the review-board, I keep to get 'UploadDiffForm' object has no attribute 'cleaned_data' erros on the try to create a new review request :-/ --Boundary-00=_TpvzH+j0df0BLRg Content-Type: text/x-diff; charset="us-ascii"; name="ScriptEngineContainment.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="ScriptEngineContainment.patch" Index: servicetypes/plasma-containment.desktop =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =2D-- servicetypes/plasma-containment.desktop (revision 782420) +++ servicetypes/plasma-containment.desktop (working copy) @@ -44,3 +44,5 @@ Comment[zh_CN]=3DPlasma =E5=B0=8F=E7=A8=8B=E5=BA=8F=E5=AE=B9=E5=99=A8=E5= =92=8C=E8=83=8C=E6=99=AF=E7=BB=98=E5=88=B6=E7=A8=8B=E5=BA=8F Comment[zh_TW]=3DPlasma =E5=B0=8F=E7=A8=8B=E5=BC=8F=E5=AE=B9=E5=99=A8=E8= =88=87=E8=83=8C=E6=99=AF=E7=95=AB=E5=AE=B6 =20 +[PropertyDef::X-Plasma-Language] +Type=3DQString Index: applet.cpp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =2D-- applet.cpp (revision 782420) +++ applet.cpp (working copy) @@ -1359,11 +1359,14 @@ QString constraint =3D QString("[X-KDE-PluginInfo-Name] =3D=3D '%1'").= arg(appletName); KService::List offers =3D KServiceTypeTrader::self()->query("Plasma/Ap= plet", constraint); =20 +bool isContainment =3D false; if (offers.isEmpty()) { //TODO: what would be -really- cool is offer to try and download t= he applet // from the network at this point kDebug() << "offers is empty for " << appletName; =2D return 0; + offers =3D KServiceTypeTrader::self()->query("Plasma/Containment",= constraint); + isContainment =3D true; + if(!offers.isEmpty()) return 0; } /* else if (offers.count() > 1) { kDebug() << "hey! we got more than one! let's blindly take the fir= st one"; } */ @@ -1376,6 +1379,8 @@ =20 if (!offer->property("X-Plasma-Language").toString().isEmpty()) { kDebug() << "we have a script in the language of" << offer->proper= ty("X-Plasma-Language").toString(); + if (isContainment) + return new Containment(0, offer->storageId(), appletId); Applet *applet =3D new Applet(0, offer->storageId(), appletId); return applet; } Index: CMakeLists.txt =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =2D-- CMakeLists.txt (revision 782420) +++ CMakeLists.txt (working copy) @@ -222,6 +222,7 @@ install(FILES servicetypes/plasma-animator.desktop servicetypes/plasma-applet.desktop + servicetypes/plasma-containment.desktop servicetypes/plasma-dataengine.desktop servicetypes/plasma-packagestructure.desktop servicetypes/plasma-runner.desktop --Boundary-00=_TpvzH+j0df0BLRg Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Panel-devel mailing list Panel-devel@kde.org https://mail.kde.org/mailman/listinfo/panel-devel --Boundary-00=_TpvzH+j0df0BLRg--