mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-19 05:19:25 +02:00
IDE: create project from file: file filter
git-svn-id: trunk@31236 -
This commit is contained in:
parent
8bf43e981a
commit
8e2bc497ff
@ -4030,12 +4030,17 @@ var
|
||||
OpenDialog:TOpenDialog;
|
||||
AFilename: string;
|
||||
PreReadBuf: TCodeBuffer;
|
||||
Filter: String;
|
||||
Begin
|
||||
OpenDialog:=TOpenDialog.Create(nil);
|
||||
try
|
||||
InputHistories.ApplyFileDialogSettings(OpenDialog);
|
||||
OpenDialog.Title:=lisChooseProgramSourcePpPasLpr;
|
||||
OpenDialog.Options:=OpenDialog.Options+[ofPathMustExist,ofFileMustExist];
|
||||
Filter := lisLazarusUnit + ' (*.pas;*.pp;*.p)|*.pas;*.pp;*.p'
|
||||
+ '|' + lisLazarusProjectSource + ' (*.lpr)|*.lpr';
|
||||
Filter:=Filter+ '|' + dlgAllFiles + ' (' + GetAllFilesMask + ')|' + GetAllFilesMask;
|
||||
OpenDialog.Filter := Filter;
|
||||
if OpenDialog.Execute then begin
|
||||
AFilename:=ExpandFileNameUTF8(OpenDialog.Filename);
|
||||
if not FilenameIsPascalSource(AFilename) then begin
|
||||
|
Loading…
Reference in New Issue
Block a user