mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-27 08:20:21 +02:00
IDE: fpdoc editor: example browse button
git-svn-id: trunk@35012 -
This commit is contained in:
parent
558c1e6374
commit
891c0030b3
@ -47,7 +47,7 @@ uses
|
||||
{$ENDIF}
|
||||
// IDEIntf
|
||||
IDEWindowIntf, ProjectIntf, LazIDEIntf, IDEHelpIntf, LazHelpIntf, Menus,
|
||||
SrcEditorIntf,
|
||||
SrcEditorIntf, IDEDialogs,
|
||||
// IDE
|
||||
IDEOptionDefs, EnvironmentOpts, PackageSystem, IDEProcs, LazarusIDEStrConsts,
|
||||
FPDocSelectInherited, FPDocSelectLink, CodeHelp;
|
||||
@ -1521,9 +1521,17 @@ end;
|
||||
procedure TFPDocEditor.BrowseExampleButtonClick(Sender: TObject);
|
||||
begin
|
||||
if Doc=nil then exit;
|
||||
if OpenDialog.Execute then
|
||||
InitIDEFileDialog(OpenDialog);
|
||||
OpenDialog.Title:=lisChooseAnExampleFile;
|
||||
OpenDialog.Filter:=lisPascalFile+'|*.pas;*.pp;*.p|'+dlgAllFiles+'|'+FileMask;
|
||||
OpenDialog.InitialDir:=ExtractFilePath(DocFile.Filename);
|
||||
if OpenDialog.Execute then begin
|
||||
ExampleEdit.Text := SetDirSeparators(ExtractRelativepath(
|
||||
ExtractFilePath(DocFile.Filename), OpenDialog.FileName));
|
||||
if ExampleEdit.Text<>FOldVisualValues[fpdiExample] then
|
||||
Modified:=true;
|
||||
end;
|
||||
StoreIDEFileDialog(OpenDialog);
|
||||
end;
|
||||
|
||||
procedure TFPDocEditor.CopyFromInheritedButtonClick(Sender: TObject);
|
||||
|
@ -3018,6 +3018,8 @@ resourcestring
|
||||
lisFPDocFPDocSyntaxError = 'FPDoc syntax error';
|
||||
lisFPDocThereIsASyntaxErrorInTheFpdocElement = 'There is a syntax error in '
|
||||
+'the fpdoc element "%s":%s%s';
|
||||
lisChooseAnExampleFile = 'Choose an example file';
|
||||
lisPascalFile = 'Pascal file';
|
||||
lisUnableToWriteToFile2 = 'Unable to write to file "%s".';
|
||||
lisUnableToWriteTheProjectSessionFileError = 'Unable to write the project '
|
||||
+'session file%s"%s".%sError: %s';
|
||||
|
Loading…
Reference in New Issue
Block a user