From a794f4b1ffca9578840542291e4328c9932940e0 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Mon, 5 Jan 2009 22:44:21 +0000 Subject: [PATCH] prettier svn path=/trunk/KDE/kdebase/workspace/plasma/scriptengines/javascript/; revision=906321 --- .../tests/script-nowplaying/contents/code/main.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scriptengines/javascript/tests/script-nowplaying/contents/code/main.js b/scriptengines/javascript/tests/script-nowplaying/contents/code/main.js index 946dee5b2..6f66c53a0 100644 --- a/scriptengines/javascript/tests/script-nowplaying/contents/code/main.js +++ b/scriptengines/javascript/tests/script-nowplaying/contents/code/main.js @@ -6,8 +6,8 @@ controller = service("nowplaying", watchingPlayer); plasmoid.dataUpdate = function(a, b) { label.text = "Playing " + b.Title + " by " + b.Artist + ". time: " + - parseInt(parseInt(b.Position)/60) + ":" + (parseInt(b.Position)%60); - progress.value = b.Position; + Math.floor(b.Position/60) + ":" + (parseInt(b.Position)%60); + progress.value = 100*b.Position/b.Length; } plasmoid.stop = function() @@ -52,6 +52,6 @@ progress.orientation = QtHorizontal; layout.addItem(progress); controller.associateWidget(progress, "progress"); -progress["valueChanged(int)"].connect(plasmoid.setProgress); +progress["sliderMoved(int)"].connect(plasmoid.setProgress); engine.connectSource(watchingPlayer, plasmoid, 500);