Bug 55956

Summary: JuK should give a hint how far one is scrolling into the file
Product: [Applications] juk Reporter: Frerich Raabe <raabe>
Component: generalAssignee: Scott Wheeler <wheeler>
Status: RESOLVED FIXED    
Severity: wishlist    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: All   
Latest Commit: Version Fixed In:

Description Frerich Raabe 2003-03-14 14:49:00 UTC
Version:            (using KDE 3.1.0)
Installed from:    compiled sources
Compiler:          gcc version 3.2.1 [FreeBSD] 20021119 (release)
OS:          FreeBSD (i386) release 5.0-RELEASE-p1

When holding the mouse cursor pressed to scroll back and forth through the current song (using the slider in the toolbar), there should be some indicator where one is seeking to.

For example, I have a single MP3 file which is 73 minutes long, and I usually take half a minute or so until I managed to seek to the 55th minute. It would be nice if there was a tooltip at the slider or something similar so one can tell when to release the mousebutton.
Comment 1 Scott Wheeler 2003-03-31 00:21:41 UTC
Subject: kdemultimedia/juk

CVS commit by wheeler: 

Patch from Stephan Douglas for #55956.  This updates the status bar while
using the slider to seek to a point in the file.

CCMAIL:55956-done@bugs.kde.org, stephen_douglas@yahoo.com


  M +10 -0     juk.cpp   1.93


--- kdemultimedia/juk/juk.cpp  #1.92:1.93
@@ -657,4 +657,14 @@ void JuK::slotTrackPositionSliderUpdate(
     if(m_player->playing() && !m_trackPositionDragging && !m_noSeek)
         m_player->seekPosition(position);
+
+    // The dragging flag is set, so just update the status label, rather than seeking
+    if(m_player->playing() && m_trackPositionDragging && !m_noSeek) {
+        // position from 0 to 1
+        float positionFraction = float(position) / m_sliderAction->getTrackPositionSlider()->maxValue();
+        float totalTime = float(m_player->totalTime());
+        long seekTime = long(positionFraction * totalTime + 0.5); // "+0.5" for rounding
+
+        m_statusLabel->setItemCurrentTime(seekTime);
+    }
 }