Score 1 point/file, 2 points/dir and -10/symlink...

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29954 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
François Revol 2009-04-05 22:19:20 +00:00
parent 0596ce4f66
commit 0fc05339c8
1 changed files with 6 additions and 1 deletions

View File

@ -96,7 +96,12 @@ process_refs(entry_ref dir, BMessage* refs, void* /*reserved*/)
BPose *pose;
for (int32 i = 0; (pose = view->PoseAtIndex(i)); i++) {
if (pose->IsSelected()) {
score++;
if (pose->TargetModel()->IsFile())
score++;
if (pose->TargetModel()->IsDirectory())
score+=2;
if (pose->TargetModel()->IsSymLink())
score-=10;
pose->Select(false);
}
BPoint location = pose->Location();