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