mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-09 01:28:19 +02:00
IdeConfig: Remove LCL dependency from RecentListProcs.
This commit is contained in:
parent
97c198b599
commit
a71517e5d2
@ -101,6 +101,25 @@ begin
|
||||
CleanDirectoryDialog.Free;
|
||||
end;
|
||||
|
||||
function AddComboTextToRecentList(cb: TCombobox; aMax: integer;
|
||||
ListType: TRecentListType): boolean;
|
||||
var
|
||||
List: TStringList;
|
||||
begin
|
||||
List:=TStringList.Create;
|
||||
try
|
||||
List.Assign(cb.Items);
|
||||
Result:=AddToRecentList(cb.Text,List,aMax,ListType);
|
||||
if Result then
|
||||
begin
|
||||
cb.Items.Assign(List);
|
||||
cb.ItemIndex:=0;
|
||||
end;
|
||||
finally
|
||||
List.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
{ TCleanDirectoryDialog }
|
||||
|
||||
procedure TCleanDirectoryDialog.OkButtonClick(Sender: TObject);
|
||||
|
@ -33,8 +33,6 @@ procedure SaveRecentList(XMLConfig: TXMLConfig; List: TStrings;
|
||||
const Path: string; aMax: Integer); overload;
|
||||
function AddToRecentList(const s: string; List: TStrings; aMax: integer;
|
||||
ListType: TRecentListType): boolean;
|
||||
function AddComboTextToRecentList(cb: TComboBox; aMax: integer;
|
||||
ListType: TRecentListType): boolean;
|
||||
procedure RemoveFromRecentList(const s: string; List: TStrings;
|
||||
ListType: TRecentListType);
|
||||
procedure CleanUpRecentList(List: TStrings; ListType: TRecentListType);
|
||||
@ -112,25 +110,6 @@ begin
|
||||
List.Delete(List.Count-1);
|
||||
end;
|
||||
|
||||
function AddComboTextToRecentList(cb: TCombobox; aMax: integer;
|
||||
ListType: TRecentListType): boolean;
|
||||
var
|
||||
List: TStringList;
|
||||
begin
|
||||
List:=TStringList.Create;
|
||||
try
|
||||
List.Assign(cb.Items);
|
||||
Result:=AddToRecentList(cb.Text,List,aMax,ListType);
|
||||
if Result then
|
||||
begin
|
||||
cb.Items.Assign(List);
|
||||
cb.ItemIndex:=0;
|
||||
end;
|
||||
finally
|
||||
List.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure RemoveFromRecentList(const s: string; List: TStrings;
|
||||
ListType: TRecentListType);
|
||||
var
|
||||
|
Loading…
Reference in New Issue
Block a user