added filter for open package/project/file

git-svn-id: trunk@6847 -
This commit is contained in:
mattias 2005-02-25 21:55:44 +00:00
parent a86ed822b8
commit 1ba0163183
3 changed files with 13 additions and 3 deletions

View File

@ -281,8 +281,6 @@ resourcestring
lisChooseProgramSourcePpPasLpr = 'Choose program source (*.pp,*.pas,*.lpr)';
lisProgramSourceMustHaveAPascalExtensionLikePasPpOrLp = 'Program source '
+'must have a pascal extension like .pas, .pp or .lpr';
lisLazarusProjectInfoLpiLpiAllFiles = 'Lazarus Project Info (*.lpi)|*.lpi|'
+'All Files|*.*';
lisCompilerOptionsForProject = 'Compiler Options for Project: %s';
lisChooseDelphiUnit = 'Choose Delphi unit (*.pas)';
lisChooseDelphiProject = 'Choose Delphi project (*.dpr)';

View File

@ -1917,6 +1917,12 @@ begin
InputHistories.ApplyFileDialogSettings(OpenDialog);
OpenDialog.Title:=lisOpenFile;
OpenDialog.Options:=OpenDialog.Options+[ofAllowMultiSelect];
OpenDialog.Filter:='Lazarus unit (*.pas;*.pp)|*.pas;*.pp'
+'|Lazarus project (*.lpi)|*.lpi'
+'|Lazarus form (*.lfm)|*.lfm'
+'|Lazarus package (*.lpk)|*.lpk'
+'|Lazarus project source (*.lpr)|*.lpr'
+'|All files ('+GetAllFilesMask+')|'+GetAllFilesMask;
if OpenDialog.Execute and (OpenDialog.Files.Count>0) then begin
OpenFlags:=[ofAddToRecent];
//debugln('TMainIDE.mnuOpenClicked OpenDialog.Files.Count=',dbgs(OpenDialog.Files.Count));
@ -2608,7 +2614,8 @@ begin
try
InputHistories.ApplyFileDialogSettings(OpenDialog);
OpenDialog.Title:=lisOpenProjectFile+' (*.lpi)';
OpenDialog.Filter := lisLazarusProjectInfoLpiLpiAllFiles;
OpenDialog.Filter := 'Lazarus Project Info (*.lpi)|*.lpi|'
+'All Files|'+GetAllFilesMask;
if OpenDialog.Execute then begin
AFilename:=ExpandFilename(OpenDialog.Filename);
DoOpenProjectFile(AFilename,[ofAddToRecent]);
@ -11402,6 +11409,9 @@ end.
{ =============================================================================
$Log$
Revision 1.848 2005/02/25 21:55:44 mattias
added filter for open package/project/file
Revision 1.847 2005/02/25 20:19:46 mattias
added RTTI check for unitname of design components

View File

@ -324,6 +324,8 @@ begin
InputHistories.ApplyFileDialogSettings(OpenDialog);
OpenDialog.Title:=lisOpenPackageFile;
OpenDialog.Options:=OpenDialog.Options+[ofAllowMultiSelect];
OpenDialog.Filter:='Lazarus package (*.lpk)|*.lpk'
+'|All files ('+GetAllFilesMask+')|'+GetAllFilesMask;
if OpenDialog.Execute and (OpenDialog.Files.Count>0) then begin
OpenFlags:=[pofAddToRecent];
For I := 0 to OpenDialog.Files.Count-1 do