[Panel-devel] Scripted DataEngines

Petri Damstén petri.damsten at dnainternet.net
Thu Nov 29 10:55:21 CET 2007


Hi,

I know that this was discussed earlier and Aaron don't like it. I know I'm 
hardheaded and do things my own way but please at least consider this...

This patch adds support for making script dataEngines. I tried to change 
plasma as little as possible and it's plugin based so default plasma does not 
have to include support for script dataengines. Naming might not be 
consistent yet.

I also have kross dataEngine pretty much working that can run following:

#!/usr/bin/env kross
# -*- coding: utf-8 -*-

import PlasmaDataEngine

def init():
    print 'init'
    print 'Default MinimumUpdateInterval: %d' % \
            PlasmaDataEngine.minimumUpdateInterval()
    PlasmaDataEngine.setMinimumUpdateInterval(500)

def sources():
    print 'sources'
    return ['messages']

def updateSource(name):
    print 'updateSource: ' + name

def sourceRequested(name):
    print 'sourceRequested: ' + name
    PlasmaDataEngine.setData(name, "message1", "Hello")
    PlasmaDataEngine.setData(name, "message2", "World")

print 'Loaded Hello python dataEngine'

Petri

-- 
Hate the sin, love the sinner. 
Mahatma Gandhi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ScriptDataEngine.diff
Type: text/x-diff
Size: 2600 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20071129/58228f1d/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20071129/58228f1d/attachment.pgp 


More information about the Panel-devel mailing list