Marco Martin a78c297a30 added a now playing applet, will be the simplest way to test services
svn path=/trunk/KDE/kdebase/workspace/plasma/scriptengines/javascript/; revision=906016
2009-01-05 12:53:01 +00:00

14 lines
416 B
JavaScript

plasmoid.dataUpdate = function(a, b)
{
for ( var i in b ) {
print(i + ' -> ' + b[i] );
}
label.text = "Playing " + b.Title + " by " + b.Artist + ". time: " +
parseInt(b.Position/60) + ":" + (parseInt(b.Position)%60);
}
layout = new LinearLayout(plasmoid);
label = new Label();
layout.addItem(label);
plasmoid.dataEngine("nowplaying").connectSource("org.mpris.amarok", plasmoid, 500);