mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-24 03:10:30 +02:00
IdeConfig: Remove LCL dependency from RecentListProcs.
This commit is contained in:
parent
97c198b599
commit
a71517e5d2
@ -101,6 +101,25 @@ begin
|
|||||||
CleanDirectoryDialog.Free;
|
CleanDirectoryDialog.Free;
|
||||||
end;
|
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 }
|
{ TCleanDirectoryDialog }
|
||||||
|
|
||||||
procedure TCleanDirectoryDialog.OkButtonClick(Sender: TObject);
|
procedure TCleanDirectoryDialog.OkButtonClick(Sender: TObject);
|
||||||
|
@ -33,8 +33,6 @@ procedure SaveRecentList(XMLConfig: TXMLConfig; List: TStrings;
|
|||||||
const Path: string; aMax: Integer); overload;
|
const Path: string; aMax: Integer); overload;
|
||||||
function AddToRecentList(const s: string; List: TStrings; aMax: integer;
|
function AddToRecentList(const s: string; List: TStrings; aMax: integer;
|
||||||
ListType: TRecentListType): boolean;
|
ListType: TRecentListType): boolean;
|
||||||
function AddComboTextToRecentList(cb: TComboBox; aMax: integer;
|
|
||||||
ListType: TRecentListType): boolean;
|
|
||||||
procedure RemoveFromRecentList(const s: string; List: TStrings;
|
procedure RemoveFromRecentList(const s: string; List: TStrings;
|
||||||
ListType: TRecentListType);
|
ListType: TRecentListType);
|
||||||
procedure CleanUpRecentList(List: TStrings; ListType: TRecentListType);
|
procedure CleanUpRecentList(List: TStrings; ListType: TRecentListType);
|
||||||
@ -112,25 +110,6 @@ begin
|
|||||||
List.Delete(List.Count-1);
|
List.Delete(List.Count-1);
|
||||||
end;
|
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;
|
procedure RemoveFromRecentList(const s: string; List: TStrings;
|
||||||
ListType: TRecentListType);
|
ListType: TRecentListType);
|
||||||
var
|
var
|
||||||
|
Loading…
Reference in New Issue
Block a user