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

List:       kde-panel-devel
Subject:    Creating Plasma::Containments or Plasma::PopupApplets via the
From:       Richard Dale <richard.j.dale () gmail ! com>
Date:       2009-04-22 13:15:25
Message-ID: 491684420904220615s97e42b2wcc253632f1e107ab () mail ! gmail ! com
[Download RAW message or body]

We've just been discussing scripting applets on #plasma irc channel,
and I said that I didn't think it was possible to create types of
applets other than Plasma::Applet. Then I went and had a look at the
code in plasma/applet.cpp to confirm, and found this:

    if (!offer->property("X-Plasma-API").toString().isEmpty()) {
        kDebug() << "we have a script using the"
                 << offer->property("X-Plasma-API").toString() << "API";
        if (isContainment) {
            return new Containment(0, offer->storageId(), appletId);
        }
        return new Applet(0, offer->storageId(),  appletId, allArgs);
    }

Does it mean what I think it means - in that if you have a line in
your scripting metadata.desktop file:

ServiceTypes=Plasma/Containment

instead of

ServiceTypes=Plasma/Applet

then a Plasma::Containment is created for the scripting applet.

We were actually discussing Plasma::PopupApplet, and I wondered if a
similar addition to the Applet::load() code, along with a
'Plasma/PopupApplet' ServiceTypes, could be added to handle those?

-- Richard
_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

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