IDE, Install/Uninstall Packages dialog: unified file type lists in save/load dialogs, made them translatable

This commit is contained in:
Maxim Ganetsky 2023-09-26 18:15:22 +03:00
parent dfb090ce73
commit 41a671281e
2 changed files with 3 additions and 2 deletions

View File

@ -1604,6 +1604,7 @@ resourcestring
dlgFilterImagesPng = 'PNG images';
dlgFilterImagesBitmap = 'Bitmap images';
dlgFilterImagesPixmap = 'Pixmap images';
dlgFilterPackageListFiles = 'Package list files';
// editor options
dlgEdMisc = 'Miscellaneous';

View File

@ -309,7 +309,7 @@ begin
InputHistories.ApplyFileDialogSettings(SaveDialog);
SaveDialog.InitialDir:=GetPrimaryConfigPath;
SaveDialog.Title:=lisExportPackageListXml;
SaveDialog.Filter:='XML-files|*.xml|Plain text|*.txt|All files|*.*';
SaveDialog.Filter:=dlgFilterPackageListFiles+'|*.xml;*.txt|'+dlgFilterAll+'|*.*';
SaveDialog.Options:=SaveDialog.Options+[ofPathMustExist];
if SaveDialog.Execute then begin
AFilename:=CleanAndExpandFilename(SaveDialog.Filename);
@ -338,7 +338,7 @@ begin
InputHistories.ApplyFileDialogSettings(OpenDialog);
OpenDialog.InitialDir:=GetPrimaryConfigPath;
OpenDialog.Title:=lisImportPackageListXml;
OpenDialog.Filter:='Package list files|*.xml;*.txt|All files|*.*';
OpenDialog.Filter:=dlgFilterPackageListFiles+'|*.xml;*.txt|'+dlgFilterAll+'|*.*';
OpenDialog.Options:=OpenDialog.Options+[ofPathMustExist,ofFileMustExist];
if OpenDialog.Execute then begin
AFilename:=CleanAndExpandFilename(OpenDialog.Filename);