THIS IS A DEMO PATCH; DON'T PUSH IT TO THE DEVELOPER REPO! This implements MQ patch moving, for unapplied patches, using arrow keys: shift + arrow up/down and shift + page up/down
Some notes: - It feels kinda low-level to use key-press-event, but are there other ways? - If an error occurs while saving the series file, nothing happens. The error is shown on exit, as usual. - Should be easy to put drag&drop code and context menu code on top of this; although DND is really crappy to implement in pygtk :-/. - The semantics of move_patch is quite weird, in that it moves from oldidx to newidx in an "away from oldidx" fashion, i.e. it inserts after when moving down, and before when moving up. This fits the keyboard movement well, and removes some degenerate cases... but is a bit weird. Anyway, try it out, and we can always refine the code after :-) /Sune ------------------------------------------------------------------------------ Join us December 9, 2009 for the Red Hat Virtual Experience, a free event focused on virtualization and cloud computing. Attend in-depth sessions from your desk. Your couch. Anywhere. http://p.sf.net/sfu/redhat-sfdev2dev _______________________________________________ Tortoisehg-develop mailing list Tortoisehg-develop@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop