IDEIntf: reorganized resource strings of TreeView items OpenDialog filter, made this part less prone to potential typos in translations

This commit is contained in:
Maxim Ganetsky 2025-04-27 18:05:56 +03:00
parent f4755a13f1
commit bf3e2c0813
2 changed files with 5 additions and 3 deletions

View File

@ -118,7 +118,8 @@ resourcestring
sccsTrEdtConfirmationCaption = 'Confirmation';
sccsTrEdtConfirmationImagesLoss = 'Information about node images cannot be stored in the file. Continue anyway?';
sccsTrEdtConfirmationTreeReplace = 'The current tree will be overwritten, continue?';
sccsTrEdtOpenSaveDlgFilter = 'XML files (Node captions and properties)'+'|*.xml|Text files (Node captions only)|*.txt|%s|%s|';
sccsTrEdtOpenSaveDlgFilterXMLFiles = 'XML files (Node captions and properties)';
sccsTrEdtOpenSaveDlgFilterTextFiles = 'Text files (Node captions only)';
// ListView Items Editor
sccsLvEdtCaption = 'ListView Items Editor';
@ -532,7 +533,6 @@ resourcestring
// File types
oisAllFiles = 'All files';
oisFilterXML = 'XML files';
implementation

View File

@ -156,7 +156,9 @@ begin
// dialogs
dlgOpen.Title := sccsTrEdtOpenDialog;
dlgSave.Title := sccsTrEdtSaveDialog;
dlgSave.Filter := Format(sccsTrEdtOpenSaveDlgFilter,[oisAllFiles,GetAllFilesMask]);
dlgSave.Filter := sccsTrEdtOpenSaveDlgFilterXMLFiles + '|*.xml|' +
sccsTrEdtOpenSaveDlgFilterTextFiles + '|*.txt|' +
oisAllFiles + '|' + GetAllFilesMask + '|';
dlgOpen.Filter := dlgSave.Filter;
// button panel