mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-07 05:18:00 +02:00
IDE: fixed package options FPDoc search path basedirectory, issue #35222
git-svn-id: trunk@60668 -
This commit is contained in:
parent
36c7ef29ed
commit
637906ce75
@ -26,7 +26,7 @@ uses
|
||||
LCLType, LCLProc, Forms, Controls, Buttons, StdCtrls, Dialogs, Menus, Graphics,
|
||||
ButtonPanel, Clipbrd,
|
||||
// LazUtils
|
||||
FileUtil, LazFileUtils, LazStringUtils,
|
||||
FileUtil, LazFileUtils, LazStringUtils, LazFileCache,
|
||||
// LazControls
|
||||
ShortPathEdit,
|
||||
// IdeIntf
|
||||
@ -226,7 +226,7 @@ begin
|
||||
Result:=TObject(0);
|
||||
if (FEffectiveBaseDirectory<>'') and FilenameIsAbsolute(FEffectiveBaseDirectory) then
|
||||
APath:=CreateAbsolutePath(APath, FEffectiveBaseDirectory);
|
||||
if DirectoryExists(APath) then
|
||||
if DirPathExistsCached(APath) then
|
||||
Result:=TObject(1);
|
||||
end;
|
||||
|
||||
|
@ -10,8 +10,8 @@ object PackageIntegrationOptionsFrame: TPackageIntegrationOptionsFrame
|
||||
DesignTop = 267
|
||||
object UpdateRadioGroup: TRadioGroup
|
||||
Left = 0
|
||||
Height = 89
|
||||
Top = 114
|
||||
Height = 101
|
||||
Top = 131
|
||||
Width = 461
|
||||
Align = alTop
|
||||
AutoFill = True
|
||||
@ -26,7 +26,7 @@ object PackageIntegrationOptionsFrame: TPackageIntegrationOptionsFrame
|
||||
ChildSizing.ShrinkVertical = crsScaleChilds
|
||||
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
||||
ChildSizing.ControlsPerLine = 1
|
||||
ClientHeight = 69
|
||||
ClientHeight = 84
|
||||
ClientWidth = 457
|
||||
ItemIndex = 0
|
||||
Items.Strings = (
|
||||
@ -38,14 +38,14 @@ object PackageIntegrationOptionsFrame: TPackageIntegrationOptionsFrame
|
||||
end
|
||||
object DocGroupBox: TGroupBox
|
||||
Left = 0
|
||||
Height = 96
|
||||
Top = 209
|
||||
Height = 85
|
||||
Top = 238
|
||||
Width = 461
|
||||
Align = alTop
|
||||
AutoSize = True
|
||||
BorderSpacing.Top = 6
|
||||
Caption = 'FPDoc settings'
|
||||
ClientHeight = 76
|
||||
ClientHeight = 68
|
||||
ClientWidth = 457
|
||||
TabOrder = 1
|
||||
object FPDocSearchPathsEdit: TEdit
|
||||
@ -54,10 +54,10 @@ object PackageIntegrationOptionsFrame: TPackageIntegrationOptionsFrame
|
||||
AnchorSideTop.Control = DocGroupBox
|
||||
AnchorSideRight.Control = DocGroupBox
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 138
|
||||
Height = 23
|
||||
Left = 143
|
||||
Height = 25
|
||||
Top = 6
|
||||
Width = 319
|
||||
Width = 314
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 6
|
||||
@ -73,8 +73,8 @@ object PackageIntegrationOptionsFrame: TPackageIntegrationOptionsFrame
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 6
|
||||
Height = 15
|
||||
Top = 10
|
||||
Width = 126
|
||||
Top = 11
|
||||
Width = 131
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 6
|
||||
Caption = 'FPDocSearchPathsLabel'
|
||||
@ -86,8 +86,8 @@ object PackageIntegrationOptionsFrame: TPackageIntegrationOptionsFrame
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 6
|
||||
Height = 15
|
||||
Top = 39
|
||||
Width = 138
|
||||
Top = 42
|
||||
Width = 141
|
||||
BorderSpacing.Left = 6
|
||||
Caption = 'FPDocPackageNameLabel'
|
||||
ParentColor = False
|
||||
@ -97,9 +97,9 @@ object PackageIntegrationOptionsFrame: TPackageIntegrationOptionsFrame
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = FPDocSearchPathsEdit
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 150
|
||||
Height = 23
|
||||
Top = 35
|
||||
Left = 153
|
||||
Height = 25
|
||||
Top = 37
|
||||
Width = 116
|
||||
BorderSpacing.Around = 6
|
||||
ParentShowHint = False
|
||||
@ -109,7 +109,7 @@ object PackageIntegrationOptionsFrame: TPackageIntegrationOptionsFrame
|
||||
end
|
||||
object PkgTypeGroupBox: TGroupBox
|
||||
Left = 0
|
||||
Height = 108
|
||||
Height = 125
|
||||
Top = 0
|
||||
Width = 461
|
||||
Align = alTop
|
||||
@ -123,14 +123,14 @@ object PackageIntegrationOptionsFrame: TPackageIntegrationOptionsFrame
|
||||
ChildSizing.ShrinkVertical = crsScaleChilds
|
||||
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
||||
ChildSizing.ControlsPerLine = 1
|
||||
ClientHeight = 88
|
||||
ClientHeight = 108
|
||||
ClientWidth = 457
|
||||
Constraints.MinHeight = 30
|
||||
TabOrder = 2
|
||||
OnClick = PkgTypeGroupBoxClick
|
||||
object RunAndDesignTimeRadioButton: TRadioButton
|
||||
Left = 6
|
||||
Height = 19
|
||||
Height = 24
|
||||
Top = 6
|
||||
Width = 445
|
||||
Caption = 'RunAndDesignTimeRadioButton'
|
||||
@ -142,8 +142,8 @@ object PackageIntegrationOptionsFrame: TPackageIntegrationOptionsFrame
|
||||
end
|
||||
object DesignTimeRadioButton: TRadioButton
|
||||
Left = 6
|
||||
Height = 19
|
||||
Top = 25
|
||||
Height = 24
|
||||
Top = 30
|
||||
Width = 445
|
||||
Caption = 'DesignTimeRadioButton'
|
||||
ParentShowHint = False
|
||||
@ -152,8 +152,8 @@ object PackageIntegrationOptionsFrame: TPackageIntegrationOptionsFrame
|
||||
end
|
||||
object RunTimeRadioButton: TRadioButton
|
||||
Left = 6
|
||||
Height = 19
|
||||
Top = 44
|
||||
Height = 24
|
||||
Top = 54
|
||||
Width = 445
|
||||
Caption = 'RunTimeRadioButton'
|
||||
ParentShowHint = False
|
||||
@ -162,8 +162,8 @@ object PackageIntegrationOptionsFrame: TPackageIntegrationOptionsFrame
|
||||
end
|
||||
object RunTimeOnlyRadioButton: TRadioButton
|
||||
Left = 6
|
||||
Height = 19
|
||||
Top = 63
|
||||
Height = 24
|
||||
Top = 78
|
||||
Width = 445
|
||||
Caption = 'RunTimeOnlyRadioButton'
|
||||
ParentShowHint = False
|
||||
|
@ -21,11 +21,11 @@ type
|
||||
|
||||
TPackageIntegrationOptionsFrame = class(TAbstractIDEOptionsEditor)
|
||||
DesignTimeRadioButton: TRadioButton;
|
||||
DocGroupBox: TGroupBox;
|
||||
FPDocPackageNameEdit: TEdit;
|
||||
FPDocPackageNameLabel: TLabel;
|
||||
FPDocSearchPathsLabel: TLabel;
|
||||
DocGroupBox: TGroupBox;
|
||||
FPDocSearchPathsEdit: TEdit;
|
||||
FPDocSearchPathsLabel: TLabel;
|
||||
PkgTypeGroupBox: TGroupBox;
|
||||
RunAndDesignTimeRadioButton: TRadioButton;
|
||||
RunTimeOnlyRadioButton: TRadioButton;
|
||||
@ -36,6 +36,7 @@ type
|
||||
FLazPackage: TLazPackage;
|
||||
FPDocPathButton: TPathEditorButton;
|
||||
FStoredPkgType: TLazPackageType;
|
||||
procedure FPDocPathButtonClick(Sender: TObject);
|
||||
function GetSelectedPkgType: TLazPackageType;
|
||||
function PathEditBtnExecuted(Context: String; var NewPath: String): Boolean;
|
||||
procedure SetSelectedPkgType(PkgType: TLazPackageType);
|
||||
@ -84,6 +85,11 @@ begin
|
||||
Result:=lptRunAndDesignTime;
|
||||
end;
|
||||
|
||||
procedure TPackageIntegrationOptionsFrame.FPDocPathButtonClick(Sender: TObject);
|
||||
begin
|
||||
FPDocPathButton.CurrentPathEditor.BaseDirectory:=FLazPackage.Directory;
|
||||
end;
|
||||
|
||||
function TPackageIntegrationOptionsFrame.PathEditBtnExecuted(Context: String;
|
||||
var NewPath: String): Boolean;
|
||||
var
|
||||
@ -177,6 +183,7 @@ begin
|
||||
AnchorParallel(akTop, 0, FPDocSearchPathsEdit);
|
||||
AnchorParallel(akBottom, 0, FPDocSearchPathsEdit);
|
||||
AssociatedEdit := FPDocSearchPathsEdit;
|
||||
OnClick:=@FPDocPathButtonClick;
|
||||
OnExecuted := @PathEditBtnExecuted;
|
||||
Parent := DocGroupBox;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user