[pyddr-devel] Level an Difficulty sorting in songselect

Pavel N. Krivitsky pavel at krivitsky.name
Sun Feb 11 01:06:43 EST 2007


Hi, Frank,

> > Agreed. I think that we can do this gradually. I'll try to get
> > SongItemDisplay/DanceItemDisplay into the right shape in the next few
> > days. (That is, to allow it to display only a subset of difficulties in
> > a particular entry, without causing any regressions.) We'll see where to
> > go from there.
> Looking forward for the result. If you'd like me to sketch a framework
> for the virtual folders, please tell me.

I attached a patch against the SVN trunk. It's essentially your patch,
but with some further modifications. In a nutshell, SongItemDisplay has
been split into SongItemDisplay and DanceItemDisplay, both inheriting
from AbstractItemDisplay. SongItemDisplay displays a list of
difficulties (and has a dictionary mapping difficulties to corresponding
DanceItemDisplay objects), while DanceItemDisplay displays just one
difficulty (and has a reference to the corresponding SongItemDisplay
object). This is necessary, because we want to stay on the same
song-difficulty combination when cycling through sorting modes.

Also, sorting uses keys rather than custom comparison functions now.
That means that the next release requires 2.4, but I think everybody has
it by now. The code could probably use some cleanup, but I'd be curious
to see if it works for everyone else first.

                     Thanks,
                     Pavel


-------------- next part --------------
A non-text attachment was scrubbed...
Name: sort_patch.diff
Type: text/x-patch
Size: 23025 bytes
Desc: not available
URL: <http://icculus.org/pipermail/pyddr-devel/attachments/20070210/f7965da1/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://icculus.org/pipermail/pyddr-devel/attachments/20070210/f7965da1/attachment.pgp>


More information about the pyddr-devel mailing list