a stop button, fake for now
svn path=/trunk/KDE/kdebase/workspace/plasma/scriptengines/javascript/; revision=906028
This commit is contained in:
parent
a78c297a30
commit
617a0b0707
@ -1,14 +1,23 @@
|
||||
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);
|
||||
}
|
||||
|
||||
plasmoid.stop = function()
|
||||
{
|
||||
print("stopping");
|
||||
}
|
||||
|
||||
layout = new LinearLayout(plasmoid);
|
||||
layout.orientation = Vertical;
|
||||
label = new Label();
|
||||
layout.addItem(label);
|
||||
|
||||
stop = new PushButton();
|
||||
stop.text = "Stop";
|
||||
layout.addItem(stop);
|
||||
|
||||
stop["clicked()"].connect(plasmoid.stop);
|
||||
|
||||
plasmoid.dataEngine("nowplaying").connectSource("org.mpris.amarok", plasmoid, 500);
|
Loading…
Reference in New Issue
Block a user