From 8e2bc497ff48ed34962b1093021f08bcfa44eeb4 Mon Sep 17 00:00:00 2001 From: mattias Date: Wed, 15 Jun 2011 07:21:21 +0000 Subject: [PATCH] IDE: create project from file: file filter git-svn-id: trunk@31236 - --- ide/main.pp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ide/main.pp b/ide/main.pp index 6c57100ca3..4e38a6f64b 100644 --- a/ide/main.pp +++ b/ide/main.pp @@ -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