mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-16 02:40:36 +01:00
cody: sort for package
git-svn-id: trunk@29540 -
This commit is contained in:
parent
7d563e06c6
commit
38d6797573
@ -48,7 +48,8 @@ type
|
||||
plsOSize,
|
||||
plsPPUSize,
|
||||
plsUsesCount,
|
||||
plsUsedByCount
|
||||
plsUsedByCount,
|
||||
plsPackage
|
||||
);
|
||||
TPPUListSortRec = record
|
||||
Category: TPPUListSort;
|
||||
@ -273,6 +274,7 @@ begin
|
||||
2: s:=plsOSize;
|
||||
3: s:=plsUsesCount;
|
||||
4: s:=plsUsedByCount;
|
||||
5: s:=plsPackage;
|
||||
else exit;
|
||||
end;
|
||||
l:=low(FSort);
|
||||
@ -637,7 +639,7 @@ begin
|
||||
plsName:
|
||||
begin
|
||||
Result:=SysUtils.CompareText(Item1.TheUnitName,Item2.TheUnitName);
|
||||
if not FSort[i].Reverse then
|
||||
if FSort[i].Reverse then
|
||||
Result:=-Result;
|
||||
if Result<>0 then exit;
|
||||
end;
|
||||
@ -663,6 +665,13 @@ begin
|
||||
Result:=CompareInt(Item1.UsedByCount,Item2.UsedByCount,FSort[i].Reverse);
|
||||
if Result<>0 then exit;
|
||||
end;
|
||||
plsPackage:
|
||||
begin
|
||||
Result:=SysUtils.CompareText(Item1.PackageName,Item2.PackageName);
|
||||
if FSort[i].Reverse then
|
||||
Result:=-Result;
|
||||
if Result<>0 then exit;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user