mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-11 13:28:04 +02:00
IDE: renamed/regrouped/cleaned up resource strings for file filter names, bug #28219, patch from Alexey Torgashin
git-svn-id: trunk@49245 -
This commit is contained in:
parent
e57d6b4ea6
commit
6f4c8353e5
@ -365,7 +365,7 @@ begin
|
||||
OpenDialog1.Title := lisImport;
|
||||
SaveDialog1.Title := lisExport;
|
||||
|
||||
OpenDialog1.Filter := Format('%s|*.xml|%s|*.*|', [lisXMLFiles, lisAllFiles]);
|
||||
OpenDialog1.Filter := Format('%s|*.xml|%s|*.*|', [dlgFilterXML, dlgFilterAll]);
|
||||
SaveDialog1.Filter := OpenDialog1.Filter;
|
||||
end;
|
||||
|
||||
|
@ -381,7 +381,7 @@ begin
|
||||
GlobalMacroList.Add(TTransferMacro.Create('FPC_FULLVERSION','',
|
||||
lisFPCFullVersionEG20701, @MacroFuncFPC_FULLVERSION, []));
|
||||
GlobalMacroList.Add(TTransferMacro.Create('FPCMsgFile','',
|
||||
lisFPCMessageFile, @MacroFuncFPCMsgFile, []));
|
||||
dlgFilterFPCMessageFile, @MacroFuncFPCMsgFile, []));
|
||||
GlobalMacroList.Add(TTransferMacro.Create('Params','',
|
||||
lisCommandLineParamsOfProgram,@MacroFuncParams,[]));
|
||||
GlobalMacroList.Add(TTransferMacro.Create('ProjFile','',
|
||||
@ -469,7 +469,7 @@ begin
|
||||
tr('ProjSrcPath',lisProjectSrcPath);
|
||||
tr('ProjOutDir',lisProjectOutDir);
|
||||
tr('Env',lisEnvironmentVariableNameAsParameter);
|
||||
tr('FPCMsgFile',lisFPCMessageFile);
|
||||
tr('FPCMsgFile',dlgFilterFPCMessageFile);
|
||||
tr('MakeExe',lisMakeExe);
|
||||
tr('MakeLib',lisMakeExe);
|
||||
tr('Make',lisPathOfTheMakeUtility);
|
||||
|
@ -832,7 +832,7 @@ begin
|
||||
|
||||
FilenameEdit.Text:=EditorOpts.CodeTemplateFileName;
|
||||
FilenameEdit.DialogTitle:=dlgChsCodeTempl;
|
||||
FilenameEdit.Filter:=dlgDCIFileDci + '|*.dci|' + dlgAllFiles + '|' + GetAllFilesMask;
|
||||
FilenameEdit.Filter:=dlgFilterDciFile + '|*.dci|' + dlgFilterAll + '|' + GetAllFilesMask;
|
||||
|
||||
// init synedit
|
||||
ColorScheme:=EditorOpts.ReadColorScheme(ASynPasSyn.GetLanguageName);
|
||||
|
@ -356,12 +356,12 @@ begin
|
||||
|
||||
// dialogs
|
||||
dlgOpen.Title:=lisOpenExistingFile;
|
||||
dlgOpen.Filter:=dlgAllFiles+' ('+GetAllFilesMask+')|'+GetAllFilesMask
|
||||
+'|'+lisLazarusUnit+' (*.pas;*.pp)|*.pas;*.pp'
|
||||
+'|'+lisLazarusProject+' (*.lpi)|*.lpi'
|
||||
+'|'+lisLazarusForm+' (*.lfm;*.dfm)|*.lfm;*.dfm'
|
||||
+'|'+lisLazarusPackage+' (*.lpk)|*.lpk'
|
||||
+'|'+lisLazarusProjectSource+' (*.lpr)|*.lpr';
|
||||
dlgOpen.Filter:=dlgFilterAll+' ('+GetAllFilesMask+')|'+GetAllFilesMask
|
||||
+'|'+dlgFilterLazarusUnit+' (*.pas;*.pp)|*.pas;*.pp'
|
||||
+'|'+dlgFilterLazarusProject+' (*.lpi)|*.lpi'
|
||||
+'|'+dlgFilterLazarusForm+' (*.lfm;*.dfm)|*.lfm;*.dfm'
|
||||
+'|'+dlgFilterLazarusPackage+' (*.lpk)|*.lpk'
|
||||
+'|'+dlgFilterLazarusProjectSource+' (*.lpr)|*.lpr';
|
||||
|
||||
// diff
|
||||
EditorOpts.GetSynEditSettings(DiffSynEdit);
|
||||
|
@ -709,8 +709,8 @@ begin
|
||||
FilenameEdit.ButtonHint:=lisClickHereToBrowseTheFileHint;
|
||||
|
||||
FilenameEdit.DialogTitle:=lisSelectFile;
|
||||
FilenameEdit.Filter:=dlgAllFiles+' ('+GetAllFilesMask+')|'+GetAllFilesMask
|
||||
+'|'+lisExePrograms+' (*.exe)|*.exe';
|
||||
FilenameEdit.Filter:=dlgFilterAll+' ('+GetAllFilesMask+')|'+GetAllFilesMask
|
||||
+'|'+dlgFilterPrograms+' (*.exe)|*.exe';
|
||||
|
||||
ParametersLabel.Caption:=lisEdtExtToolParameters;
|
||||
WorkingDirLabel.Caption:=lisEdtExtToolWorkingDirectory;
|
||||
|
@ -1578,7 +1578,7 @@ begin
|
||||
if Doc=nil then exit;
|
||||
InitIDEFileDialog(OpenDialog);
|
||||
OpenDialog.Title:=lisChooseAnExampleFile;
|
||||
OpenDialog.Filter:=lisPascalFile+'|*.pas;*.pp;*.p|'+dlgAllFiles+'|'+FileMask;
|
||||
OpenDialog.Filter:=dlgFilterPascalFile+'|*.pas;*.pp;*.p|'+dlgFilterAll+'|'+FileMask;
|
||||
OpenDialog.InitialDir:=ExtractFilePath(DocFile.Filename);
|
||||
if OpenDialog.Execute then begin
|
||||
ExampleEdit.Text := ExtractRelativepath(
|
||||
|
@ -68,7 +68,7 @@ begin
|
||||
InitIDEFileDialog(OpenDialog);
|
||||
OpenDialog.Title:=lisChooseAFileWithCodeToolsTemplates;
|
||||
OpenDialog.Options:=OpenDialog.Options+[ofFileMustExist];
|
||||
OpenDialog.Filter:=lisCodetoolsTemplateFile+' (*.xml)|*.xml|'+dlgAllFiles+
|
||||
OpenDialog.Filter:=dlgFilterCodetoolsTemplateFile+' (*.xml)|*.xml|'+dlgFilterAll+
|
||||
'|'+GetAllFilesMask;
|
||||
if OpenDialog.Execute then
|
||||
TemplateFileEdit.Text:=OpenDialog.FileName;
|
||||
|
@ -80,7 +80,7 @@ begin
|
||||
InitIDEFileDialog(OpenDialog);
|
||||
OpenDialog.Title:=lisChooseAnFPCMessageFile;
|
||||
OpenDialog.Options:=OpenDialog.Options+[ofFileMustExist];
|
||||
OpenDialog.Filter:=lisFPCMessageFile+' (*.msg)|*.msg|'+dlgAllFiles+'|'+
|
||||
OpenDialog.Filter:=dlgFilterFPCMessageFile+' (*.msg)|*.msg|'+dlgFilterAll+'|'+
|
||||
GetAllFilesMask;
|
||||
if OpenDialog.Execute then
|
||||
MsgFileEdit.Text:=OpenDialog.FileName;
|
||||
|
@ -159,7 +159,7 @@ begin
|
||||
ExportButton.Caption := lisDlgExport;
|
||||
// File dialogs
|
||||
ImportDialog.Title := lisImport;
|
||||
ImportDialog.Filter := Format('%s|*.xml|%s|*|', [lisXMLFiles, lisAllFiles]);
|
||||
ImportDialog.Filter := Format('%s|*.xml|%s|*|', [dlgFilterXML, dlgFilterAll]);
|
||||
ExportDialog.Title := lisExport;
|
||||
ExportDialog.Filter := ImportDialog.Filter;
|
||||
// Components in one page
|
||||
|
@ -240,9 +240,9 @@ begin
|
||||
try
|
||||
try
|
||||
InputHistories.ApplyFileDialogSettings(SaveDialog);
|
||||
SaveDialog.Filter:=lisLazarusDesktopSettings+' (*.lds)|*.lds'
|
||||
+'|'+lisXMLFiles+' (*.xml)|*.xml'
|
||||
+'|'+dlgAllFiles+' ('+GetAllFilesMask+')|' + GetAllFilesMask;
|
||||
SaveDialog.Filter:=dlgFilterLazarusDesktopSettings+' (*.lds)|*.lds'
|
||||
+'|'+dlgFilterXML+' (*.xml)|*.xml'
|
||||
+'|'+dlgFilterAll+' ('+GetAllFilesMask+')|' + GetAllFilesMask;
|
||||
if SaveDialog.Execute then
|
||||
begin
|
||||
AFilename:=SaveDialog.Filename;
|
||||
@ -280,9 +280,9 @@ begin
|
||||
try
|
||||
try
|
||||
InputHistories.ApplyFileDialogSettings(OpenDialog);
|
||||
OpenDialog.Filter:=lisLazarusDesktopSettings+' (*.lds)|*.lds'
|
||||
+'|'+lisXMLFiles+' (*.xml)|*.xml'
|
||||
+'|'+dlgAllFiles+' ('+GetAllFilesMask+')|' + GetAllFilesMask;
|
||||
OpenDialog.Filter:=dlgFilterLazarusDesktopSettings+' (*.lds)|*.lds'
|
||||
+'|'+dlgFilterXML+' (*.xml)|*.xml'
|
||||
+'|'+dlgFilterAll+' ('+GetAllFilesMask+')|' + GetAllFilesMask;
|
||||
if OpenDialog.Execute then
|
||||
begin
|
||||
AnEnvironmentOptions := TEnvironmentOptions.Create;
|
||||
|
@ -1347,7 +1347,7 @@ begin
|
||||
FTempColorSchemeSettings := TColorSchemeFactory.Create;
|
||||
|
||||
ExportSaveDialog.Title := lisExport;
|
||||
ExportSaveDialog.Filter := Format('%s|*.xml|', [lisXMLFiles]);
|
||||
ExportSaveDialog.Filter := Format('%s|*.xml|', [dlgFilterXML]);
|
||||
end;
|
||||
|
||||
destructor TEditorColorOptionsFrame.Destroy;
|
||||
|
@ -716,7 +716,7 @@ begin
|
||||
OpenDialog1.Title := lisImport;
|
||||
SaveDialog1.Title := lisExport;
|
||||
|
||||
OpenDialog1.Filter := Format('%s|*.xml|%s|*.*|', [lisXMLFiles, lisAllFiles]);
|
||||
OpenDialog1.Filter := Format('%s|*.xml|%s|*.*|', [dlgFilterXML, dlgFilterAll]);
|
||||
SaveDialog1.Filter := OpenDialog1.Filter;
|
||||
end;
|
||||
|
||||
|
@ -146,12 +146,12 @@ end;
|
||||
|
||||
function GetDefaultFileDialogFilter: string;
|
||||
begin
|
||||
Result := lisLazarusUnit + ' (*.pas;*.pp)|*.pas;*.pp'
|
||||
+ '|' + lisLazarusProject + ' (*.lpi)|*.lpi'
|
||||
+ '|' + lisLazarusForm + ' (*.lfm;*.dfm)|*.lfm;*.dfm'
|
||||
+ '|' + lisLazarusPackage + ' (*.lpk)|*.lpk'
|
||||
+ '|' + lisLazarusProjectSource + ' (*.lpr)|*.lpr'
|
||||
+ '|' + lisLazarusOtherFile + ' (*.inc;*.lrs;*.lpl)|*.inc;*.lrs;*.lpl';
|
||||
Result := dlgFilterLazarusUnit + ' (*.pas;*.pp)|*.pas;*.pp'
|
||||
+ '|' + dlgFilterLazarusProject + ' (*.lpi)|*.lpi'
|
||||
+ '|' + dlgFilterLazarusForm + ' (*.lfm;*.dfm)|*.lfm;*.dfm'
|
||||
+ '|' + dlgFilterLazarusPackage + ' (*.lpk)|*.lpk'
|
||||
+ '|' + dlgFilterLazarusProjectSource + ' (*.lpr)|*.lpr'
|
||||
+ '|' + dlgFilterLazarusOtherFile + ' (*.inc;*.lrs;*.lpl)|*.inc;*.lrs;*.lpl';
|
||||
end;
|
||||
|
||||
function GetFileDialogFilterFromGrid(Grid: TStringGrid): string;
|
||||
|
@ -156,7 +156,7 @@ begin
|
||||
InputHistories.ApplyFileDialogSettings(OpenDialog);
|
||||
OpenDialog.Options:=OpenDialog.Options+[ofPathMustExist];
|
||||
OpenDialog.Title:=lisChooseCompilerMessages;
|
||||
OpenDialog.Filter:=lisFPCMessageFile+' (*.msg)|*.msg|'+dlgAllFiles+'|'+
|
||||
OpenDialog.Filter:=dlgFilterFPCMessageFile+' (*.msg)|*.msg|'+dlgFilterAll+'|'+
|
||||
GetAllFilesMask;
|
||||
if OpenDialog.Execute then begin
|
||||
AFilename:=CleanAndExpandFilename(OpenDialog.Filename);
|
||||
|
@ -264,11 +264,11 @@ begin
|
||||
+'%s|*.lpk|'
|
||||
+'%s|*.lps|'
|
||||
+'%s|*',
|
||||
[lisXmlFiles,
|
||||
lisProjectFilesFilter,
|
||||
lisPackageFilesFilter,
|
||||
lisSessionFilesFilter,
|
||||
dlgAllFiles]);
|
||||
[dlgFilterXML,
|
||||
dlgFilterLazarusProject,
|
||||
dlgFilterLazarusPackage,
|
||||
dlgFilterLazarusSession,
|
||||
dlgFilterAll]);
|
||||
|
||||
FileNameEdit.DialogOptions:=FileNameEdit.DialogOptions+[ofFileMustExist];
|
||||
FileNameEdit.OnChange:=@FileNameEditChangeImport;
|
||||
|
@ -508,9 +508,9 @@ begin
|
||||
Filename:='gdb'+GetExecutableExt;
|
||||
Dlg.Title:=SimpleFormat(lisSelectPathTo, [Filename]);
|
||||
Dlg.Options:=Dlg.Options+[ofFileMustExist];
|
||||
Filter:=dlgAllFiles+'|'+GetAllFilesMask;
|
||||
Filter:=dlgFilterAll+'|'+GetAllFilesMask;
|
||||
if ExtractFileExt(Filename)<>'' then
|
||||
Filter:=lisExecutable+'|*'+ExtractFileExt(Filename)+'|'+Filter;
|
||||
Filter:=dlgFilterExecutable+'|*'+ExtractFileExt(Filename)+'|'+Filter;
|
||||
Dlg.Filter:=Filter;
|
||||
if not Dlg.Execute then exit;
|
||||
Filename:=Dlg.FileName;
|
||||
@ -537,9 +537,9 @@ begin
|
||||
Filename:='fpc'+GetExecutableExt;
|
||||
Dlg.Title:=SimpleFormat(lisSelectPathTo, [Filename]);
|
||||
Dlg.Options:=Dlg.Options+[ofFileMustExist];
|
||||
Filter:=dlgAllFiles+'|'+GetAllFilesMask;
|
||||
Filter:=dlgFilterAll+'|'+GetAllFilesMask;
|
||||
if ExtractFileExt(Filename)<>'' then
|
||||
Filter:=lisExecutable+'|*'+ExtractFileExt(Filename)+'|'+Filter;
|
||||
Filter:=dlgFilterExecutable+'|*'+ExtractFileExt(Filename)+'|'+Filter;
|
||||
Dlg.Filter:=Filter;
|
||||
if not Dlg.Execute then exit;
|
||||
Filename:=Dlg.FileName;
|
||||
@ -605,9 +605,9 @@ begin
|
||||
Filename:='make'+GetExecutableExt;
|
||||
Dlg.Title:=SimpleFormat(lisSelectPathTo, [Filename]);
|
||||
Dlg.Options:=Dlg.Options+[ofFileMustExist];
|
||||
Filter:=dlgAllFiles+'|'+GetAllFilesMask;
|
||||
Filter:=dlgFilterAll+'|'+GetAllFilesMask;
|
||||
if ExtractFileExt(Filename)<>'' then
|
||||
Filter:=lisExecutable+'|*'+ExtractFileExt(Filename)+'|'+Filter;
|
||||
Filter:=dlgFilterExecutable+'|*'+ExtractFileExt(Filename)+'|'+Filter;
|
||||
Dlg.Filter:=Filter;
|
||||
if not Dlg.Execute then exit;
|
||||
Filename:=Dlg.FileName;
|
||||
|
@ -600,9 +600,6 @@ resourcestring
|
||||
lisChooseDelphiUnit = 'Choose Delphi unit (*.pas)';
|
||||
lisChooseDelphiProject = 'Choose Delphi project (*.dpr)';
|
||||
lisChooseDelphiPackage = 'Choose Delphi package (*.dpk)';
|
||||
lisDelphiUnit = 'Delphi unit';
|
||||
lisDelphiProject = 'Delphi project';
|
||||
lisDelphiPackage = 'Delphi package';
|
||||
lisFormatError = 'Format error';
|
||||
lisLFMFileCorrupt = 'LFM file corrupt';
|
||||
lisUnableToFindAValidClassnameIn = 'Unable to find a valid classname in "%s"';
|
||||
@ -976,13 +973,9 @@ resourcestring
|
||||
lisIECORecentFiles = 'Recent files';
|
||||
lisIECOSaveToFile = 'Save to file';
|
||||
lisIECOLoadFromFile = 'Load from file';
|
||||
lisLazarusFile = 'Lazarus file';
|
||||
lisDebugUnableToLoadFile = 'Unable to load file';
|
||||
lisDebugUnableToLoadFile2 = 'Unable to load file "%s".';
|
||||
lisOpenProjectFile = 'Open Project File';
|
||||
lisLazarusProjectInfoFile = 'Lazarus Project Info file';
|
||||
lisAllFiles = 'All Files';
|
||||
lisExePrograms = 'Programs';
|
||||
lisSelectFile = 'Select the file';
|
||||
lisClickHereToBrowseTheFileHint = 'Click here to browse the file';
|
||||
lisOpenPackageFile = 'Open Package File';
|
||||
@ -998,11 +991,6 @@ resourcestring
|
||||
lisChooseMakeExecutable = 'Choose "make" executable';
|
||||
lisChooseDebuggerExecutable = 'Choose debugger executable';
|
||||
lisChooseTestBuildDir = 'Choose the directory for tests';
|
||||
lisLazarusDesktopSettings = 'Lazarus Desktop Settings';
|
||||
lisXMLFiles = 'XML files';
|
||||
lisPackageFilesFilter = 'Package files';
|
||||
lisProjectFilesFilter = 'Project files';
|
||||
lisSessionFilesFilter = 'Session files';
|
||||
|
||||
// dialogs
|
||||
lisProjectChanged = 'Project changed';
|
||||
@ -1450,6 +1438,31 @@ resourcestring
|
||||
+'failed to compile.%sRemove it from the installation list?';
|
||||
lisEnvOptDlgTestDirNotFoundMsg = 'Test directory "%s" not found.';
|
||||
|
||||
// open-dialog filters
|
||||
dlgFilterAll = 'All files';
|
||||
dlgFilterXML = 'XML files';
|
||||
dlgFilterPrograms = 'Programs';
|
||||
dlgFilterExecutable = 'Executable';
|
||||
dlgFilterLazarusFile = 'Lazarus file';
|
||||
dlgFilterLazarusEditorFile = 'Editor file types';
|
||||
dlgFilterLazarusUnit = 'Lazarus unit';
|
||||
dlgFilterLazarusInclude = 'Lazarus include file';
|
||||
dlgFilterLazarusProject = 'Lazarus project';
|
||||
dlgFilterLazarusForm = 'Lazarus form';
|
||||
dlgFilterLazarusPackage = 'Lazarus package';
|
||||
dlgFilterLazarusProjectSource = 'Lazarus project source';
|
||||
dlgFilterLazarusOtherFile = 'Lazarus other file';
|
||||
dlgFilterLazarusSession = 'Lazarus session';
|
||||
dlgFilterLazarusDesktopSettings = 'Lazarus Desktop Settings';
|
||||
dlgFilterDelphiUnit = 'Delphi unit';
|
||||
dlgFilterDelphiProject = 'Delphi project';
|
||||
dlgFilterDelphiPackage = 'Delphi package';
|
||||
dlgFilterDelphiFormDfm = 'Delphi form file (*.dfm)|*.dfm';
|
||||
dlgFilterPascalFile = 'Pascal file';
|
||||
dlgFilterDciFile = 'DCI file';
|
||||
dlgFilterFPCMessageFile = 'FPC message file';
|
||||
dlgFilterCodetoolsTemplateFile = 'CodeTools template file';
|
||||
|
||||
// editor options
|
||||
dlgEdMisc = 'Misc';
|
||||
dlgEdTabIndent = 'Tab and Indent';
|
||||
@ -1460,11 +1473,6 @@ resourcestring
|
||||
dlgReport = 'Report';
|
||||
dlgDelTemplate = 'Delete template ';
|
||||
dlgChsCodeTempl = 'Choose code template file (*.dci)';
|
||||
dlgAllFiles = 'All files';
|
||||
dlgDCIFileDci = 'DCI file (*.dci)';
|
||||
lisCodetoolsTemplateFile = 'CodeTools template file';
|
||||
lisExecutable = 'Executable';
|
||||
lisEditorFileTypes = 'Editor file types';
|
||||
lisPkgMgrNew = 'new';
|
||||
lisPkgMgrRemove = 'remove';
|
||||
lisPkgMgrKeep = 'keep';
|
||||
@ -1474,13 +1482,6 @@ resourcestring
|
||||
lisConfirmPackageAction = 'Action';
|
||||
lisSaveFileAs = 'Save file as';
|
||||
lisOpenExistingFile = 'Open existing file';
|
||||
lisLazarusUnit = 'Lazarus unit';
|
||||
lisLazarusInclude = 'Lazarus include file';
|
||||
lisLazarusProject = 'Lazarus project';
|
||||
lisLazarusForm = 'Lazarus form';
|
||||
lisLazarusPackage = 'Lazarus package';
|
||||
lisLazarusProjectSource = 'Lazarus project source';
|
||||
lisLazarusOtherFile = 'Lazarus other file';
|
||||
|
||||
dlgUndoGroupOptions = 'Undo / Redo';
|
||||
dlgScrollGroupOptions = 'Scrolling';
|
||||
@ -2111,7 +2112,6 @@ resourcestring
|
||||
dlgCOVerbosity = 'Verbosity';
|
||||
dlgCOCfgCmpMessages = 'Messages';
|
||||
lisChooseAnFPCMessageFile = 'Choose an FPC message file';
|
||||
lisFPCMessageFile = 'FPC message file';
|
||||
lisChooseAFileWithCodeToolsTemplates = 'Choose a file with CodeTools templates';
|
||||
dlgCOOther = 'Other';
|
||||
dlgCOCompilerCommands = 'Compiler Commands';
|
||||
@ -3373,7 +3373,6 @@ resourcestring
|
||||
lisFPDocThereIsASyntaxErrorInTheFpdocElement = 'There is a syntax error in '
|
||||
+'the fpdoc element "%s":%s%s';
|
||||
lisChooseAnExampleFile = 'Choose an example file';
|
||||
lisPascalFile = 'Pascal file';
|
||||
lisUnableToWriteTheProjectInfoFileError = 'Unable to write the project info '
|
||||
+'file%s"%s".%sError: %s';
|
||||
lisUnableToWriteTheProjectSessionFileError = 'Unable to write the project session '
|
||||
@ -4930,7 +4929,6 @@ resourcestring
|
||||
lisInheritedParameters = 'Inherited parameters';
|
||||
lisShowRelativePaths = 'Show relative paths';
|
||||
lisCommandLineParameters = 'Command line parameters';
|
||||
rsFormDataFileDfm = 'Form data file (*.dfm)|*.dfm';
|
||||
liswlWatchList = 'Watch List';
|
||||
liswlExpression = 'Expression';
|
||||
lisKMChooseKeymappingScheme = 'Choose Keymapping scheme';
|
||||
|
22
ide/main.pp
22
ide/main.pp
@ -2897,15 +2897,15 @@ begin
|
||||
// append a filter for all file types of the open files in the source editor
|
||||
CreateFileDialogFilterForSourceEditorFiles(Filter,AllEditorMask,AllMask);
|
||||
if (AllEditorMask<>'') then
|
||||
Filter:=Filter+ '|' + lisEditorFileTypes + ' (' + AllEditorMask + ')|' +
|
||||
Filter:=Filter+ '|' + dlgFilterLazarusEditorFile + ' (' + AllEditorMask + ')|' +
|
||||
AllEditorMask;
|
||||
|
||||
// prepend an all normal files filter
|
||||
Filter:=lisLazarusFile + ' ('+AllMask+')|' + AllMask + '|' + Filter;
|
||||
Filter:=dlgFilterLazarusFile + ' ('+AllMask+')|' + AllMask + '|' + Filter;
|
||||
|
||||
// append an any files filter
|
||||
if TFileDialog.FindMaskInFilter(Filter,GetAllFilesMask)<1 then
|
||||
Filter:=Filter+ '|' + dlgAllFiles + ' (' + GetAllFilesMask + ')|' + GetAllFilesMask;
|
||||
Filter:=Filter+ '|' + dlgFilterAll + ' (' + GetAllFilesMask + ')|' + GetAllFilesMask;
|
||||
|
||||
OpenDialog.Filter := Filter;
|
||||
|
||||
@ -4458,8 +4458,8 @@ begin
|
||||
InputHistories.ApplyFileDialogSettings(OpenDialog);
|
||||
OpenDialog.Title:=lisChooseDelphiUnit;
|
||||
OpenDialog.Options:=OpenDialog.Options+[ofPathMustExist,ofFileMustExist,ofAllowMultiSelect];
|
||||
OpenDialog.Filter:=lisDelphiUnit+' (*.pas)|*.pas|'+
|
||||
dlgAllFiles+' ('+GetAllFilesMask+')|' + GetAllFilesMask;
|
||||
OpenDialog.Filter:=dlgFilterDelphiUnit+' (*.pas)|*.pas|'+
|
||||
dlgFilterAll+' ('+GetAllFilesMask+')|' + GetAllFilesMask;
|
||||
if InputHistories.LastConvertDelphiUnit<>'' then begin
|
||||
OpenDialog.InitialDir:=ExtractFilePath(InputHistories.LastConvertDelphiUnit);
|
||||
OpenDialog.Filename :=ExtractFileName(InputHistories.LastConvertDelphiUnit);
|
||||
@ -4495,9 +4495,9 @@ begin
|
||||
InputHistories.ApplyFileDialogSettings(OpenDialog);
|
||||
OpenDialog.Title:=lisChooseDelphiProject;
|
||||
OpenDialog.Options:=OpenDialog.Options+[ofPathMustExist,ofFileMustExist];
|
||||
OpenDialog.Filter:=lisDelphiProject+' (*.dpr)|*.dpr|'+
|
||||
lisLazarusProject+' (*.lpr)|*.lpr|'+
|
||||
dlgAllFiles+' ('+GetAllFilesMask+')|' + GetAllFilesMask;
|
||||
OpenDialog.Filter:=dlgFilterDelphiProject+' (*.dpr)|*.dpr|'+
|
||||
dlgFilterLazarusProject+' (*.lpr)|*.lpr|'+
|
||||
dlgFilterAll+' ('+GetAllFilesMask+')|' + GetAllFilesMask;
|
||||
if InputHistories.LastConvertDelphiProject<>'' then begin
|
||||
OpenDialog.InitialDir:=ExtractFilePath(InputHistories.LastConvertDelphiProject);
|
||||
OpenDialog.Filename :=ExtractFileName(InputHistories.LastConvertDelphiProject);
|
||||
@ -4525,8 +4525,8 @@ begin
|
||||
InputHistories.ApplyFileDialogSettings(OpenDialog);
|
||||
OpenDialog.Title:=lisChooseDelphiPackage;
|
||||
OpenDialog.Options:=OpenDialog.Options+[ofPathMustExist,ofFileMustExist];
|
||||
OpenDialog.Filter:=lisDelphiPackage+' (*.dpk)|*.dpk|'+
|
||||
dlgAllFiles+' ('+GetAllFilesMask+')|' + GetAllFilesMask;
|
||||
OpenDialog.Filter:=dlgFilterDelphiPackage+' (*.dpk)|*.dpk|'+
|
||||
dlgFilterAll+' ('+GetAllFilesMask+')|' + GetAllFilesMask;
|
||||
if InputHistories.LastConvertDelphiPackage<>'' then begin
|
||||
OpenDialog.InitialDir:=ExtractFilePath(InputHistories.LastConvertDelphiPackage);
|
||||
OpenDialog.Filename :=ExtractFileName(InputHistories.LastConvertDelphiPackage);
|
||||
@ -7616,7 +7616,7 @@ begin
|
||||
InputHistories.ApplyFileDialogSettings(OpenDialog);
|
||||
OpenDialog.Title:=lisSelectDFMFiles;
|
||||
OpenDialog.Options:=OpenDialog.Options+[ofAllowMultiSelect];
|
||||
OpenDialog.Filter:=rsFormDataFileDfm+'|'+dlgAllFiles+'|'+GetAllFilesMask;
|
||||
OpenDialog.Filter:=dlgFilterDelphiFormDfm+'|'+dlgFilterAll+'|'+GetAllFilesMask;
|
||||
if OpenDialog.Execute and (OpenDialog.Files.Count>0) then begin
|
||||
For I := 0 to OpenDialog.Files.Count-1 do begin
|
||||
AFilename:=ExpandFileNameUTF8(OpenDialog.Files.Strings[i]);
|
||||
|
@ -438,10 +438,10 @@ begin
|
||||
OpenDialog.Title:=lisOpenFile;
|
||||
OpenDialog.Options:=OpenDialog.Options
|
||||
+[ofFileMustExist,ofPathMustExist,ofAllowMultiSelect];
|
||||
OpenDialog.Filter:=dlgAllFiles+' ('+GetAllFilesMask+')|'+GetAllFilesMask
|
||||
+'|'+lisLazarusUnit+' (*.pas;*.pp)|*.pas;*.pp'
|
||||
+'|'+lisLazarusInclude+' (*.inc)|*.inc'
|
||||
+'|'+lisLazarusForm+' (*.lfm;*.dfm)|*.lfm;*.dfm';
|
||||
OpenDialog.Filter:=dlgFilterAll+' ('+GetAllFilesMask+')|'+GetAllFilesMask
|
||||
+'|'+dlgFilterLazarusUnit+' (*.pas;*.pp)|*.pas;*.pp'
|
||||
+'|'+dlgFilterLazarusInclude+' (*.inc)|*.inc'
|
||||
+'|'+dlgFilterLazarusForm+' (*.lfm;*.dfm)|*.lfm;*.dfm';
|
||||
if OpenDialog.Execute then begin
|
||||
for i:=0 to OpenDialog.Files.Count-1 do
|
||||
if not (AddOneFile(OpenDialog.Files[i]) in [mrOk, mrIgnore]) then break;
|
||||
|
@ -3519,9 +3519,9 @@ Begin
|
||||
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;
|
||||
Filter := dlgFilterLazarusUnit + ' (*.pas;*.pp;*.p)|*.pas;*.pp;*.p'
|
||||
+ '|' + dlgFilterLazarusProjectSource + ' (*.lpr)|*.lpr';
|
||||
Filter:=Filter+ '|' + dlgFilterAll + ' (' + GetAllFilesMask + ')|' + GetAllFilesMask;
|
||||
OpenDialog.Filter := Filter;
|
||||
if OpenDialog.Execute then begin
|
||||
AFilename:=ExpandFileNameUTF8(OpenDialog.Filename);
|
||||
@ -3793,8 +3793,8 @@ begin
|
||||
try
|
||||
InputHistories.ApplyFileDialogSettings(OpenDialog);
|
||||
OpenDialog.Title:=lisOpenProjectFile+' (*.lpi)';
|
||||
OpenDialog.Filter := lisLazarusProjectInfoFile+' (*.lpi)|*.lpi|'
|
||||
+lisAllFiles+'|'+GetAllFilesMask;
|
||||
OpenDialog.Filter := dlgFilterLazarusProject+' (*.lpi)|*.lpi|'
|
||||
+dlgFilterAll+'|'+GetAllFilesMask;
|
||||
if OpenDialog.Execute then begin
|
||||
AFilename:=GetPhysicalFilenameCached(ExpandFileNameUTF8(OpenDialog.Filename),false);
|
||||
if FileUtil.CompareFileExt(AFilename,'.lpi')<>0 then begin
|
||||
@ -4391,25 +4391,25 @@ begin
|
||||
SaveDialog.Title:=lisSaveSpace+SaveAsFilename+' (*'+SaveAsFileExt+')';
|
||||
SaveDialog.FileName:=SaveAsFilename+SaveAsFileExt;
|
||||
|
||||
Filter := lisLazarusUnit + ' (*.pas;*.pp)|*.pas;*.pp';
|
||||
Filter := dlgFilterLazarusUnit + ' (*.pas;*.pp)|*.pas;*.pp';
|
||||
if (SaveAsFileExt='.lpi') then
|
||||
Filter:=Filter+ '|' + lisLazarusProject + ' (*.lpi)|*.lpi';
|
||||
Filter:=Filter+ '|' + dlgFilterLazarusProject + ' (*.lpi)|*.lpi';
|
||||
if (SaveAsFileExt='.lfm') or (SaveAsFileExt='.dfm') then
|
||||
Filter:=Filter+ '|' + lisLazarusForm + ' (*.lfm;*.dfm)|*.lfm;*.dfm';
|
||||
Filter:=Filter+ '|' + dlgFilterLazarusForm + ' (*.lfm;*.dfm)|*.lfm;*.dfm';
|
||||
if (SaveAsFileExt='.lpk') then
|
||||
Filter:=Filter+ '|' + lisLazarusPackage + ' (*.lpk)|*.lpk';
|
||||
Filter:=Filter+ '|' + dlgFilterLazarusPackage + ' (*.lpk)|*.lpk';
|
||||
if (SaveAsFileExt='.lpr') then
|
||||
Filter:=Filter+ '|' + lisLazarusProjectSource + ' (*.lpr)|*.lpr';
|
||||
Filter:=Filter+ '|' + dlgFilterLazarusProjectSource + ' (*.lpr)|*.lpr';
|
||||
// append a filter for all editor files
|
||||
CreateFileDialogFilterForSourceEditorFiles(Filter,AllEditorExt,AllFilter);
|
||||
if AllEditorExt<>'' then
|
||||
Filter:=Filter+ '|' + lisEditorFileTypes + ' (' + AllEditorExt + ')|' + AllEditorExt;
|
||||
Filter:=Filter+ '|' + dlgFilterLazarusEditorFile + ' (' + AllEditorExt + ')|' + AllEditorExt;
|
||||
|
||||
// append an any file filter *.*
|
||||
Filter:=Filter+ '|' + dlgAllFiles + ' (' + GetAllFilesMask + ')|' + GetAllFilesMask;
|
||||
Filter:=Filter+ '|' + dlgFilterAll + ' (' + GetAllFilesMask + ')|' + GetAllFilesMask;
|
||||
|
||||
// prepend an all filter
|
||||
Filter:= lisLazarusFile + ' ('+AllFilter+')|' + AllFilter + '|' + Filter;
|
||||
Filter:= dlgFilterLazarusFile + ' ('+AllFilter+')|' + AllFilter + '|' + Filter;
|
||||
SaveDialog.Filter := Filter;
|
||||
|
||||
// if this is a project file, start in project directory
|
||||
|
@ -529,7 +529,7 @@ begin
|
||||
Dlg.Filter:='PNG|*.png'
|
||||
+'|Bitmap, bmp|*.bmp'
|
||||
+'|Pixmap, xpm|*.xpm'
|
||||
+'|'+lisAllFiles+'|'+GetAllFilesMask;
|
||||
+'|'+dlgFilterAll+'|'+GetAllFilesMask;
|
||||
if Dlg.Execute then begin
|
||||
LoadComponentIcon(Dlg.FileName);
|
||||
end;
|
||||
|
@ -1577,12 +1577,13 @@ begin
|
||||
OpenDialog.Title:=lisOpenFile;
|
||||
OpenDialog.Options:=OpenDialog.Options
|
||||
+[ofFileMustExist,ofPathMustExist,ofAllowMultiSelect];
|
||||
OpenDialog.Filter:=dlgAllFiles+' ('+GetAllFilesMask+')|'+GetAllFilesMask
|
||||
+'|'+lisLazarusUnit+' (*.pas;*.pp)|*.pas;*.pp'
|
||||
+'|'+lisLazarusProject+' (*.lpi)|*.lpi'
|
||||
+'|'+lisLazarusForm+' (*.lfm;*.dfm)|*.lfm;*.dfm'
|
||||
+'|'+lisLazarusPackage+' (*.lpk)|*.lpk'
|
||||
+'|'+lisLazarusProjectSource+' (*.lpr)|*.lpr';
|
||||
OpenDialog.Filter:=
|
||||
dlgFilterAll+' ('+GetAllFilesMask+')|'+GetAllFilesMask
|
||||
+'|'+dlgFilterLazarusUnit+' (*.pas;*.pp)|*.pas;*.pp'
|
||||
+'|'+dlgFilterLazarusProject+' (*.lpi)|*.lpi'
|
||||
+'|'+dlgFilterLazarusForm+' (*.lfm;*.dfm)|*.lfm;*.dfm'
|
||||
+'|'+dlgFilterLazarusPackage+' (*.lpk)|*.lpk'
|
||||
+'|'+dlgFilterLazarusProjectSource+' (*.lpr)|*.lpr';
|
||||
if OpenDialog.Execute then begin
|
||||
NewUnitPaths:='';
|
||||
NewIncPaths:='';
|
||||
|
@ -414,8 +414,8 @@ begin
|
||||
InputHistories.ApplyFileDialogSettings(OpenDialog);
|
||||
OpenDialog.Title:=lisOpenPackageFile;
|
||||
OpenDialog.Options:=OpenDialog.Options+[ofAllowMultiSelect];
|
||||
OpenDialog.Filter:=lisLazarusPackage+' (*.lpk)|*.lpk'
|
||||
+'|'+dlgAllFiles+' ('+FileMask+')|'+FileMask;
|
||||
OpenDialog.Filter:=dlgFilterLazarusPackage+' (*.lpk)|*.lpk'
|
||||
+'|'+dlgFilterAll+' ('+FileMask+')|'+FileMask;
|
||||
if OpenDialog.Execute and (OpenDialog.Files.Count>0) then begin
|
||||
OpenFlags:=[pofAddToRecent];
|
||||
For I := 0 to OpenDialog.Files.Count-1 do
|
||||
@ -1132,8 +1132,8 @@ begin
|
||||
try
|
||||
InputHistories.ApplyFileDialogSettings(SaveDialog);
|
||||
SaveDialog.Title:=Format(lisPkgMangSavePackageLpk, [APackage.IDAsString]);
|
||||
SaveDialog.Filter:=lisLazarusPackage+' (*.lpk)|*.lpk'
|
||||
+'|'+dlgAllFiles+' ('+FileMask+')|'+FileMask;
|
||||
SaveDialog.Filter:=dlgFilterLazarusPackage+' (*.lpk)|*.lpk'
|
||||
+'|'+dlgFilterAll+' ('+FileMask+')|'+FileMask;
|
||||
if APackage.HasDirectory then
|
||||
SaveDialog.InitialDir:=APackage.Directory;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user