[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-panel-devel
Subject:    Re: Review Request: ScriptEngine's as Containments
From:       "Aaron J. Seigo" <aseigo () kde ! org>
Date:       2008-03-05 20:21:54
Message-ID: 200803051321.55156.aseigo () kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On Wednesday 05 March 2008, Sebastian Sauer wrote:
> On Wednesday 05 March 2008, Sebastian Sauer wrote:
> > 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.
>
> I forgot to also patch the package.cpp. Refreshed patch that also includes
> that part and some codingstyle fixes is attached.

this change to plasma-containment.desktop:

+[PropertyDef::X-Plasma-Language]
+Type=QString

isn't actually needed since that property is defined in another .desktop file 
already. if it's already been registered in one .dekstop file, all of them 
can use it. i wasn't aware of that interesting detail either until shortly 
before 4.0...

also, this:

+        offers = KServiceTypeTrader::self()->query("Plasma/Containment", 
constraint);
+        isContainment = true;
+        if(!offers.isEmpty()) {
+            kDebug() << "offers is empty for " << appletName;
+            return 0;
+        }

in applet.cpp shouldn't be necessary; since all containments also have 
Plasma/Applet in their service types list, it will never get to this branch. 
however, i think this approach is useful anyways for another reason:

with all scripts installed via Package becoming containments as well, it may 
slightly complicate the UI for setting/creating new containments (since the 
list will be *really* long now and full of general plugins versus Containment 
specializations (such as DefaultDesktop and Panel, which dont' particularly 
make any sense as Widgets).

so with the second check for Plasma/Containment, we could change 
their .desktop files to not have 
X-KDE-ServiceType=Plasma/Applet,Plasma/Containment as they do now, but rather 
just X-KDE-ServiceType=Plasma/Containment. this would make it easy to sort 
out the "widgets-that-are-containments-too" from the "just containments" 
entries.

neat; i like that =)

so other than the .desktop file change which isn't necessary, it looks good to 
go. 

it's impressive how little the code needed to be changed ..... coo'

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Trolltech

["signature.asc" (application/pgp-signature)]

_______________________________________________
Panel-devel mailing list
Panel-devel@kde.org
https://mail.kde.org/mailman/listinfo/panel-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic