From 5e91c393ac358b5cd68f58454a97fbdbb0742055 Mon Sep 17 00:00:00 2001 From: lazarus Date: Mon, 11 Nov 2002 20:56:16 +0000 Subject: [PATCH] MG: added path templates for custom components git-svn-id: trunk@3622 - --- ide/compileroptions.pp | 9 ++++++--- ide/patheditordlg.pas | 10 +++++----- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/ide/compileroptions.pp b/ide/compileroptions.pp index d4f28b4f72..fcf895edb7 100644 --- a/ide/compileroptions.pp +++ b/ide/compileroptions.pp @@ -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 diff --git a/ide/patheditordlg.pas b/ide/patheditordlg.pas index 98fba959f6..c29909f1c5 100644 --- a/ide/patheditordlg.pas +++ b/ide/patheditordlg.pas @@ -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);