mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-09 01:28:19 +02:00
Fix dialog file filters in various places. Issue #28242, patch from Alexey Torgashin
git-svn-id: trunk@49262 -
This commit is contained in:
parent
cd60cd81ec
commit
a6dbef7f80
@ -159,7 +159,7 @@ begin
|
||||
ExportButton.Caption := lisDlgExport;
|
||||
// File dialogs
|
||||
ImportDialog.Title := lisImport;
|
||||
ImportDialog.Filter := Format('%s|*.xml|%s|*|', [dlgFilterXML, dlgFilterAll]);
|
||||
ImportDialog.Filter := Format('%s|*.xml|%s|%s|', [dlgFilterXML, dlgFilterAll, GetAllFilesMask]);
|
||||
ExportDialog.Title := lisExport;
|
||||
ExportDialog.Filter := ImportDialog.Filter;
|
||||
// Components in one page
|
||||
|
@ -28,7 +28,7 @@ uses
|
||||
EditorOptions, LazarusIDEStrConsts, IDEOptionsIntf, sysutils, StdCtrls,
|
||||
ExtCtrls, Classes, Controls, Grids, ComCtrls, Dialogs,
|
||||
SynEditMouseCmds, Laz2_XMLCfg, MouseActionDialog, math, KeyMapping,
|
||||
IDEImagesIntf, IDEDialogs, LazUTF8;
|
||||
IDEImagesIntf, IDEDialogs, LazUTF8, FileUtil;
|
||||
|
||||
type
|
||||
|
||||
@ -716,7 +716,7 @@ begin
|
||||
OpenDialog1.Title := lisImport;
|
||||
SaveDialog1.Title := lisExport;
|
||||
|
||||
OpenDialog1.Filter := Format('%s|*.xml|%s|*.*|', [dlgFilterXML, dlgFilterAll]);
|
||||
OpenDialog1.Filter := Format('%s|*.xml|%s|%s|', [dlgFilterXML, dlgFilterAll, GetAllFilesMask]);
|
||||
SaveDialog1.Filter := OpenDialog1.Filter;
|
||||
end;
|
||||
|
||||
|
@ -263,12 +263,12 @@ begin
|
||||
+'%s|*.lpi|'
|
||||
+'%s|*.lpk|'
|
||||
+'%s|*.lps|'
|
||||
+'%s|*',
|
||||
+'%s|%s',
|
||||
[dlgFilterXML,
|
||||
dlgFilterLazarusProject,
|
||||
dlgFilterLazarusPackage,
|
||||
dlgFilterLazarusSession,
|
||||
dlgFilterAll]);
|
||||
dlgFilterAll, GetAllFilesMask]);
|
||||
|
||||
FileNameEdit.DialogOptions:=FileNameEdit.DialogOptions+[ofFileMustExist];
|
||||
FileNameEdit.OnChange:=@FileNameEditChangeImport;
|
||||
|
@ -1437,6 +1437,7 @@ resourcestring
|
||||
lisPkgMangThePackageFailedToCompileRemoveItFromTheInstallati = 'The package "%s" '
|
||||
+'failed to compile.%sRemove it from the installation list?';
|
||||
lisEnvOptDlgTestDirNotFoundMsg = 'Test directory "%s" not found.';
|
||||
lisTitleOpenComponentIcon24x24 = 'Choose a component icon 24x24';
|
||||
|
||||
// open-dialog filters
|
||||
dlgFilterAll = 'All files';
|
||||
@ -1463,6 +1464,9 @@ resourcestring
|
||||
dlgFilterDciFile = 'DCI file';
|
||||
dlgFilterFPCMessageFile = 'FPC message file';
|
||||
dlgFilterCodetoolsTemplateFile = 'CodeTools template file';
|
||||
dlgFilterImagesPng = 'PNG images';
|
||||
dlgFilterImagesBitmap = 'Bitmap images';
|
||||
dlgFilterImagesPixmap = 'Pixmap images';
|
||||
|
||||
// editor options
|
||||
dlgEdMisc = 'Misc';
|
||||
|
@ -524,12 +524,14 @@ begin
|
||||
try
|
||||
InputHistories.ApplyFileDialogSettings(Dlg);
|
||||
Dlg.InitialDir:=LazPackage.GetFileDialogInitialDir(ExtractFilePath(ComponentUnitFileEdit.Text));
|
||||
Dlg.Title := 'Choose a component icon 24x24';
|
||||
Dlg.Options := Dlg.Options+[ofPathMustExist];
|
||||
Dlg.Filter:='PNG|*.png'
|
||||
+'|Bitmap, bmp|*.bmp'
|
||||
+'|Pixmap, xpm|*.xpm'
|
||||
+'|'+dlgFilterAll+'|'+GetAllFilesMask;
|
||||
Dlg.Title:=lisTitleOpenComponentIcon24x24;
|
||||
Dlg.Options:=Dlg.Options+[ofPathMustExist];
|
||||
Dlg.Filter:=Format('%s|*.png|%s|*.bmp|%s|*.xpm|%s|%s',
|
||||
[dlgFilterImagesPng,
|
||||
dlgFilterImagesBitmap,
|
||||
dlgFilterImagesPixmap,
|
||||
dlgFilterAll, GetAllFilesMask]);
|
||||
|
||||
if Dlg.Execute then begin
|
||||
LoadComponentIcon(Dlg.FileName);
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user