IDE: Improve ExportHtml dialog filter. Issue #28234, patch from Alexey Torgashin.

git-svn-id: trunk@49247 -
This commit is contained in:
juha 2015-06-03 09:10:01 +00:00
parent ef64691d68
commit d7bcd7ccda
2 changed files with 6 additions and 7 deletions

View File

@ -1441,6 +1441,7 @@ resourcestring
// open-dialog filters
dlgFilterAll = 'All files';
dlgFilterXML = 'XML files';
dlgFilterHTML = 'HTML files';
dlgFilterPrograms = 'Programs';
dlgFilterExecutable = 'Executable';
dlgFilterLazarusFile = 'Lazarus file';
@ -1457,7 +1458,7 @@ resourcestring
dlgFilterDelphiUnit = 'Delphi unit';
dlgFilterDelphiProject = 'Delphi project';
dlgFilterDelphiPackage = 'Delphi package';
dlgFilterDelphiFormDfm = 'Delphi form file (*.dfm)|*.dfm';
dlgFilterDelphiForm = 'Delphi form';
dlgFilterPascalFile = 'Pascal file';
dlgFilterDciFile = 'DCI file';
dlgFilterFPCMessageFile = 'FPC message file';

View File

@ -3031,13 +3031,11 @@ begin
try
SaveDialog.Title:=lisSaveSpace;
SaveDialog.FileName:=SrcEdit.PageName+'.html';
SaveDialog.Filter := ' (*.html;*.htm)|*.html;*.htm';
SaveDialog.Options := [ofOverwritePrompt, ofPathMustExist{, ofNoReadOnlyReturn}]; // Does not work for desktop
SaveDialog.Filter:=dlgFilterHTML+' (*.html;*.htm)|*.html;*.htm';
SaveDialog.Options:=[ofOverwritePrompt, ofPathMustExist{, ofNoReadOnlyReturn}]; // Does not work for desktop
// show save dialog
if (not SaveDialog.Execute) or (ExtractFileName(SaveDialog.Filename)='')
then begin
exit;
end;
then exit;
Filename:=ExpandFileNameUTF8(SaveDialog.Filename);
finally
SaveDialog.Free;
@ -7616,7 +7614,7 @@ begin
InputHistories.ApplyFileDialogSettings(OpenDialog);
OpenDialog.Title:=lisSelectDFMFiles;
OpenDialog.Options:=OpenDialog.Options+[ofAllowMultiSelect];
OpenDialog.Filter:=dlgFilterDelphiFormDfm+'|'+dlgFilterAll+'|'+GetAllFilesMask;
OpenDialog.Filter:=dlgFilterDelphiForm+' (*.dfm)|*.dfm|'+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]);