[Patch] Fix some minor annoyances with TagDialogs

Aneurin Price aneurin.price at gmail.com
Fri Feb 29 21:42:52 CET 2008


Currently when editing tracks on a per-track basis in the TagDialog, 
clicking next at the beginning of the playlist doesn't advance the track 
on the first click, and similarly with previous at the end of the 
playlist. The same thing happens if you change the traversal direction 
(eg. next, next, previous - you need to click previous again before it 
will go back).
This is because the track list is accessed using a Java-style iterator. 
 From Qt docs:
"Unlike STL-style iterators, Java-style iterators point *between* items 
rather than directly *at* items."

This patch modifies the behaviour of previousTrack() and nextTrack() to 
skip past the current track.
Additionally, the display of next/previous/per-track controls is 
simplified, hiding them if only one track is being edited.


One remaining regression vs. 1.4.x is the behaviour when selecting a 
track in the playlist to edit. In 1.4.x the dialog acts as if editing 
one track, but the next/previous buttons are enabled and allow traversal 
through the playlist. One way to duplicate this behaviour would be by 
detecting if the parent widget is the playlist view, building a 
tracklist based on the playlist, and using the given track as an index 
into that tracklist (possibly hiding the per-track checkbox, as in 
1.4.x). This would be fairly inelegant though, and should perhaps wait 
for the playlist view code to mature.

Comments welcome.

- Nye
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tagdialog-cleanup.diff
Type: text/x-diff
Size: 2020 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/amarok-devel/attachments/20080229/bdc06037/attachment.bin 


More information about the Amarok-devel mailing list