[Amarok] Improve dynamic playlist's behaviour on track chan

Dan Meltzer parallelgrapefruit at gmail.com
Mon Nov 16 19:27:28 CET 2009


On Mon, Nov 16, 2009 at 12:21 PM, Lydia Pintscher <lydia at kde.org> wrote:
> Before calling usability I'd like to have our usability people comment
> on this ;-)
> I am not convinced this is the best thing to do atm. If you click a
> song that is not the next song in the playlist it should skip those in
> between imho as it did before.

I'd concur... theres likely a reason those songs were skipped.
Behavior should remain constant in the playlist, rather than having it
do different things depending on seigo-knows-what.
>
>
> Cheers
> Lydia
>
>
> On Fri, Nov 13, 2009 at 06:51, Rick W. Chen <stuffcorpse at archlinux.us> wrote:
>> commit 4beff9b8bbfc4b1a67f26b214aaf0bf12df087da
>> Author:     Rick W. Chen <stuffcorpse at archlinux.us>
>> AuthorDate: Fri Nov 13 18:43:07 2009 +1300
>> Commit:     Rick W. Chen <stuffcorpse at archlinux.us>
>> CommitDate: Fri Nov 13 18:43:07 2009 +1300
>>
>>    Improve dynamic playlist's behaviour on track change
>>
>>    Consider a dynamic playlist with 2 Previous tracks:
>>
>>    track 1
>>    track 2
>>    active track
>>    track 4
>>    track 5
>>    track 6
>>
>>    Previously if you double click on anything after track 4,  every track in
>>    between would be skipped (put behind the active track, as if they have
>>    already been played). Now, the selected track would be moved to the active
>>    position and the rest are kept in place. And similarly for tracks that
>>    before the active position.
>>
>> diff --git a/src/playlist/PlaylistController.cpp b/src/playlist/PlaylistController.cpp
>> index 1cf5c95..0a0a638 100644
>> --- a/src/playlist/PlaylistController.cpp
>> +++ b/src/playlist/PlaylistController.cpp
>> @@ -333,7 +333,7 @@ Playlist::Controller::moveRow( int from, int to )
>>     QList<int> source;
>>     QList<int> target;
>>     source.append( from );
>> -    source.append( to );
>> +    target.append( to );
>>
>>     // shift all the rows between
>>     if ( from < to )
>> diff --git a/src/playlist/navigators/DynamicTrackNavigator.cpp b/src/playlist/navigators/DynamicTrackNavigator.cpp
>> index 0e242b1..eacdc8d 100644
>> --- a/src/playlist/navigators/DynamicTrackNavigator.cpp
>> +++ b/src/playlist/navigators/DynamicTrackNavigator.cpp
>> @@ -98,6 +98,14 @@ Playlist::DynamicTrackNavigator::activePlaylistChanged()
>>  void
>>  Playlist::DynamicTrackNavigator::trackChanged()
>>  {
>> +    const int activeRow = m_model->activeRow();
>> +    const int previousTracks = AmarokConfig::previousTracks();
>> +
>> +    if( activeRow < previousTracks )
>> +        Controller::instance()->moveRow( activeRow, previousTracks );
>> +    else if( activeRow > previousTracks )
>> +        Controller::instance()->moveRow( activeRow, previousTracks + 1 );
>> +
>>     appendUpcoming();
>>     removePlayed();
>>  }
>>
>>
>>
>
>
>
> --
> Lydia Pintscher
> Amarok community manager
> kde.org - amarok.kde.org - kubuntu.org
> claimid.com/nightrose
> _______________________________________________
> Amarok-devel mailing list
> Amarok-devel at kde.org
> https://mail.kde.org/mailman/listinfo/amarok-devel
>


More information about the Amarok-devel mailing list