MG: added path templates for custom components

git-svn-id: trunk@3622 -
This commit is contained in:
lazarus 2002-11-11 20:56:16 +00:00
parent 2cf41469ac
commit 5e91c393ac
2 changed files with 11 additions and 8 deletions

View File

@ -215,7 +215,9 @@ type
property LCLWidgetType: string read fLCLWidgetType write fLCLWidgetType;
end;
{ Compiler options form }
TfrmCompilerOptions = class(TForm)
nbMain: TNotebook;
//bvlButtonBar: TBevel;
@ -3053,7 +3055,10 @@ begin
OldPath:=edtOtherUnits.Text;
Templates:=SetDirSeparators(
'$(LazarusDir)/lcl/units'
+';$(LazarusDir)/lcl/units/$(LCLWidgetType)');
+';$(LazarusDir)/lcl/units/$(LCLWidgetType)'
+';$(LazarusDir)/components/units'
+';$(LazarusDir)/components/custom'
);
end else
if AButton=IncludeFilesPathEditBtn then begin
OldPath:=edtIncludeFiles.Text;
@ -3080,10 +3085,8 @@ var AButton: TPathEditorButton;
begin
if Sender is TPathEditorButton then begin
AButton:=TPathEditorButton(Sender);
writeln('TfrmCompilerOptions.PathEditBtnExecuted ',TComponent(Sender).Name,':',Sender.ClassName,' ',AButton.CurrentPathEditor.ModalResult);
if AButton.CurrentPathEditor.ModalResult<>mrOk then exit;
NewPath:=AButton.CurrentPathEditor.Path;
writeln('TfrmCompilerOptions.PathEditBtnExecuted ',TComponent(Sender).Name,':',Sender.ClassName,' ',NewPath);
if AButton=OtherUnitsPathEditBtn then begin
edtOtherUnits.Text:=NewPath;
end else

View File

@ -187,7 +187,7 @@ begin
// path groupbox
PathGroupBox.SetBounds(6,6,MaxX-2*6,PathGroupBoxHeight);
PathEdit.SetBounds(2,2,
PathGroupBox.Width-10,Max(0,PathGroupBox.Height-57));
Max(1,PathGroupBox.Width-10),Max(1,PathGroupBox.Height-57));
MoveUpButton.SetBounds(8,PathEdit.Top+PathEdit.Height+8,
120,MoveUpButton.Height);
MoveDownButton.SetBounds(MoveUpButton.Left+MoveUpButton.Width+8,
@ -205,15 +205,15 @@ begin
Left:=PathGroupBox.Left;
Top:=PathGroupBox.Top+PathGroupBox.Height+8;
Width:=PathGroupBox.Width;
Height:=Max(0,MaxY-50-Top);
Height:=Max(1,MaxY-50-Top);
end;
TemplatesListBox.SetBounds(2,2,Max(0,TemplateGroupBox.Width-10),
Max(0,TemplateGroupBox.Height-57));
TemplatesListBox.SetBounds(2,2,Max(1,TemplateGroupBox.Width-10),
Max(1,TemplateGroupBox.Height-57));
AddTemplateButton.SetBounds(8,TemplatesListBox.Top+TemplatesListBox.Height+8,
100,AddTemplateButton.Height);
// buttons at bottom
OkButton.SetBounds(20,Max(0,MaxY-35),100,OkButton.Height);
OkButton.SetBounds(20,Max(1,MaxY-35),100,OkButton.Height);
CancelButton.SetBounds(OkButton.Left+OkButton.Width+10,OkButton.Top,
OkButton.Width,OkButton.Height);