# HG changeset patch # User insilmaril # Date 1193046603 0 # Node ID f2aab2a9b6cb92774677b34dcfe6e8095354128f # Parent c73bb30448dbca600acd7348fcbf2c72bf40ea61 Various patches: Better windows support, branch sorting, Freedesktop support diff -r c73bb30448db -r f2aab2a9b6cb branchobj.cpp --- a/branchobj.cpp Tue Oct 16 11:42:21 2007 +0000 +++ b/branchobj.cpp Mon Oct 22 09:50:03 2007 +0000 @@ -1238,6 +1238,27 @@ return NULL; } +void BranchObj::sortChildren() +{ + int childCount=branch.count(); + int curChildIndex; + bool madeChanges=false; + do + { + madeChanges=false; + for(curChildIndex=1;curChildIndexheading->text().compare(curChild->heading->text())>0) + { + this->moveBranchUp(curChild); + madeChanges=true; + } + } + }while(madeChanges); +} + + BranchObj* BranchObj::linkTo (BranchObj* dst, int pos) { // Find current parent and diff -r c73bb30448db -r f2aab2a9b6cb branchobj.h --- a/branchobj.h Tue Oct 16 11:42:21 2007 +0000 +++ b/branchobj.h Mon Oct 22 09:50:03 2007 +0000 @@ -112,6 +112,7 @@ virtual BranchObj* moveBranchUp(BranchObj*); virtual bool canMoveBranchDown(); virtual BranchObj* moveBranchDown(BranchObj*); + virtual void sortChildren(); virtual BranchObj* linkTo (BranchObj*, int); virtual void alignRelativeTo(const QPointF ); virtual void reposition();