mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-30 17:11:59 +02:00
Opkman: Extend category list.
git-svn-id: trunk@54208 -
This commit is contained in:
parent
970dc3e689
commit
fefe00702a
@ -80,6 +80,7 @@ type
|
||||
TData = record
|
||||
FName: string[100];
|
||||
FImageIndex: Integer;
|
||||
FType: Integer;
|
||||
end;
|
||||
|
||||
{ TCategoriesFrm }
|
||||
@ -208,7 +209,14 @@ begin
|
||||
Data1 := Sender.GetNodeData(Node1);
|
||||
Data2 := Sender.GetNodeData(Node2);
|
||||
if Column = 0 then
|
||||
Result := CompareText(Data1^.FName, Data2^.FName);
|
||||
begin
|
||||
if Data1^.FType = Data2^.FType then
|
||||
Result := CompareText(Data1^.FName, Data2^.FName)
|
||||
else if Data1^.FType > Data2^.FType then
|
||||
Result := 1
|
||||
else if Data1^.FType < Data2^.FType then
|
||||
Result := -1
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TCategoriesFrm.VSTFreeNode(Sender: TBaseVirtualTree;
|
||||
@ -267,7 +275,12 @@ begin
|
||||
Data := FVST.GetNodeData(Node);
|
||||
Data^.FName := Categories[I];
|
||||
Data^.FImageIndex := -1;
|
||||
if UpperCase(CategoriesEng[I]) = 'OTHER' then
|
||||
Data^.FType := 1
|
||||
else
|
||||
Data^.FType := 0;
|
||||
end;
|
||||
FVST.SortTree(0, opkman_VirtualTrees.sdAscending);
|
||||
|
||||
SL := TStringList.Create;
|
||||
try
|
||||
|
@ -43,7 +43,7 @@ type
|
||||
end;
|
||||
|
||||
const
|
||||
MaxCategories = 27;
|
||||
MaxCategories = 28;
|
||||
Categories: array[0..MaxCategories - 1] of String = (
|
||||
rsMainFrm_VSTText_PackageCategory0,
|
||||
rsMainFrm_VSTText_PackageCategory1,
|
||||
@ -71,8 +71,8 @@ const
|
||||
rsMainFrm_VSTText_PackageCategory23,
|
||||
rsMainFrm_VSTText_PackageCategory24,
|
||||
rsMainFrm_VSTText_PackageCategory25,
|
||||
rsMainFrm_VSTText_PackageCategory26);
|
||||
|
||||
rsMainFrm_VSTText_PackageCategory26,
|
||||
rsMainFrm_VSTText_PackageCategory27);
|
||||
//needed for localized filter, since the JSON contains only english text
|
||||
CategoriesEng: array[0..MaxCategories - 1] of String = (
|
||||
'Charts and Graphs',
|
||||
@ -101,7 +101,8 @@ const
|
||||
'Sizers and Scrollers',
|
||||
'System',
|
||||
'Tabbed Components',
|
||||
'Other');
|
||||
'Other',
|
||||
'Games and Game Engines');
|
||||
|
||||
var
|
||||
LocalRepositoryConfigFile: String;
|
||||
|
@ -133,6 +133,7 @@ resourcestring
|
||||
rsMainFrm_VSTText_PackageCategory24 = 'System';
|
||||
rsMainFrm_VSTText_PackageCategory25 = 'Tabbed Components';
|
||||
rsMainFrm_VSTText_PackageCategory26 = 'Other';
|
||||
rsMainFrm_VSTText_PackageCategory27 = 'Games and Game Engines';
|
||||
rsMainFrm_VSTText_Desc = 'Description for package';
|
||||
rsMainFrm_VSTText_Lic = 'License info for package';
|
||||
rsMainFrm_cbAll_Caption = 'All/None';
|
||||
|
Loading…
Reference in New Issue
Block a user