Seek step runtime config

Seb Ruiz ruiz at kde.org
Sun May 10 03:53:58 CEST 2009


2009/5/9 Kevin ALLIX <kallix at kallix.net>:
> Hi folks,
>
> Attached to this mail is a patch against svn that allows to configure the seek
> step* thanks to AmarokConfig.
> (*: Is there a more relevant name I could use for that ? Actually, I don't
> even know how to say that in my own language...)
>
> With this patch, Configure->Playback->Misc section has a spin box for selecting
> the seek step. This seek step (default: 10s) is applied for both keyboard's
> left/right keys and for shift+wheel on systray icon.
> Without this patch, Keyboards's left/rigth keys result in a 10s step (default
> value hardcoded in EngineController.h) and shift+wheel on systray icon leads
> to a 5s (hardcoded in Systray.cpp).
>
> !WARNING! Noob patch ahead. Comments welcome

Hi Kevin,
Thanks for the patch. We can't get this into Amarok 2.1 because we are
currently in a string freeze, however we will consider it for a later
release.

Some patch feedback:
-    void seekForward( int ms = 10000 );
-    void seekBackward( int ms = 10000 );

+    void seekForward( int ms );
+    void seekForward();
+    void seekBackward( int ms );
+    void seekBackward();

It would probably be clearer to have seekForward( int ms = -1 ), and
then if ( ms < 0 ); ms = AmarokConfig::seekstep();

+    <entry key="Seek Step" type="Int">
+        <label>Length of Seek Step, in milliseconds</label>
+        <whatsthis>The length of the Seek Step in milliseconds.</whatsthis>
+        <default>10000</default>
+        <min>500</min>
+    </entry>

It's always a better policy to ask users to input time in seconds. If
they wanted a 1500ms seek step, then they could just enter 1.5s. Going
to ms granularity is likely to confuse users and is unnecessarily
granular in this case.

+        <property name="toolTip">
+         <string>Seek step, in milliseconds.</string>
+        </property>

Probably a good idea to explain what the seek step is. Such as; "The
number of seconds to skip when seeking through a track".

Other than that, good work and thanks for the patch. You're welcome to
submit patches anytime you like!

-- 
Seb Ruiz

http://www.sebruiz.net/
http://amarok.kde.org/


More information about the Amarok-devel mailing list