Message sort by position/status



    As we speak, I am committing message sorting into the tree. The
first thing to say about this is that it isn't complete. It shouldn't
break anything but there are still a few things missing from it to make
it a full implementation. Additionally, it was a good deal more invasive
than I would have liked but I'm committing it in the hope that you guys
will help me either trim it down or work out some of why it was so invasive.

    First, what's missing: if you sort by status, the table won't resort
when you change a message. I'd like to behave like PoEdit here and
update when we save. This may require a bit of thinking about how to go
about it. Honestly, I haven't really looked at it yet. Additionally,
it'd be nice if we could keep track of the currently selected message
and jump to it when the user sorts the table. This should be pretty
simple, I just haven't taken the time yet. Finally, we should be saving
the user's sort preference. This should probably go in GConf and, again,
should be pretty simple. I think we need to have our preferences
discussion before we add anything there, though.

    Now for the invasive stuff that I'm not so happy about. First,
avoiding crashing means needing to add the new messages list into the
GtranslatorPo. This seems a bit bleh, but okay. Worse, though, avoiding
crashing means not freeing the old list. I'm not stoked about this but
I'm not entirely sure why it's happening. I'd really appreciate some
extra eyes there. I've also had to add a variable (and getter/setter) to
GtranslatorMsg to keep track of its position in the file so that
repopulating the message table doesn't wipe that information out.

    Finally, the sorting stuff seems a bit heavy. It works quickly
enough but it seems like there are a lot of variables being passed
around and I'd appreciate some help trimming this down. Especially icky
is sorting the GList and then reversing it. For the time being, I'm not
sure any of this is a big deal. I'll keep thinking about it and trying
to figure out ways to cut things down a bit. In the meantime, ideas
would be most welcome. Thank you.


Seán de Búrca


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]