[Patch] "No grouping" checkbox in playlist layout

Nikolaj Hald Nielsen nhnfreespirit at gmail.com
Sun Aug 30 09:19:31 UTC 2009


So...

I committed your patch and it works great. however, it started a bit
of a discussion among the regular Amarok devs about whether grouping
really should be integrated into the playlist layouts instead of
something completely separate. So if you are up for it, I have an idea
of how you can expand on the patch you already did simply the user
experience even more, and likely deal with the remaining issues of
your patch (the inline editing stuff) as a side effect.

The idea is that instead of your new checkbox, we would actually have
a drop down list for selecting the grouping mode to use for each
layout. One of these options would be "no grouping" which would work
much like your checkbox does now (disabling editing of header and body
items). This makes sense, as a grouping mode is really mostly
worthless unless there is a playlist layout that matches. (for
instance, it makes little sense to use a layout that shows album info
in the header if you are grouping by composer... )

However, instead of having the rendering code use the single items
layout config for both body and single tracks, you would integrate it
with the sorting proxy so that if the sorting mode is set to "no
sorting" it will simply return the "single" group status for each and
every track, meaning that they will all get painted using the "single"
layout config anyway. This would remove some of the code you have
added to the delegate and make sure that you don't have to special
case anything for the inline editor either.

I think this would really tie everything together in a very nice way
and simplify the code a bit as well. If you are interested in this,
let me know. If not We will likely try to do it ourselves asap as we
have a freeze coming up soon. You can go to irc channel #amarok on
irc.freenode.net and poke either me (nhn) or Teo (Teo`) for help, or
you can of course ask questions here.

- Nikolaj



More information about the Amarok mailing list