mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-27 19:53:42 +02:00
ide: add an option to skip packages check on form creation for designer
git-svn-id: trunk@23592 -
This commit is contained in:
parent
77a6f454ed
commit
f5da4dfcbc
@ -188,6 +188,7 @@ type
|
||||
FRubberbandSelectionColor: TColor;
|
||||
FRubberbandCreationColor: TColor;
|
||||
FRubberbandSelectsGrandChilds: boolean;
|
||||
FCheckPackagesOnFormCreate: boolean;
|
||||
|
||||
// object inspector
|
||||
FObjectInspectorOptions: TOIOptions;
|
||||
@ -355,6 +356,8 @@ type
|
||||
write FShowEditorHints;
|
||||
property AutoCreateFormsOnOpen: boolean read FAutoCreateFormsOnOpen
|
||||
write FAutoCreateFormsOnOpen;
|
||||
property CheckPackagesOnFormCreate: boolean read FCheckPackagesOnFormCreate
|
||||
write FCheckPackagesOnFormCreate;
|
||||
property RightClickSelects: boolean read FRightClickSelects
|
||||
write FRightClickSelects;
|
||||
property GrabberColor: TColor read FGrabberColor write FGrabberColor;
|
||||
@ -660,6 +663,7 @@ begin
|
||||
FShowComponentCaptions:=false;
|
||||
FShowEditorHints:=true;
|
||||
FAutoCreateFormsOnOpen:=true;
|
||||
FCheckPackagesOnFormCreate:=true;
|
||||
FRightClickSelects:=true;
|
||||
FGrabberColor:=clBlack;
|
||||
FMarkerColor:=clDkGray;
|
||||
@ -920,6 +924,8 @@ begin
|
||||
Path+'FormEditor/ShowEditorHints',true);
|
||||
FAutoCreateFormsOnOpen:=XMLConfig.GetValue(
|
||||
Path+'FormEditor/AutoCreateFormsOnOpen',true);
|
||||
FCheckPackagesOnFormCreate:=XMLConfig.GetValue(
|
||||
Path+'FormEditor/CheckPackagesOnFormCreate',true);
|
||||
FRightClickSelects:=XMLConfig.GetValue(
|
||||
Path+'FormEditor/RightClickSelects',true);
|
||||
FGrabberColor:=XMLConfig.GetValue(
|
||||
@ -1179,6 +1185,8 @@ begin
|
||||
Path+'FormEditor/ShowEditorHints',FShowEditorHints,true);
|
||||
XMLConfig.SetDeleteValue(
|
||||
Path+'FormEditor/AutoCreateFormsOnOpen',FAutoCreateFormsOnOpen,true);
|
||||
XMLConfig.SetDeleteValue(
|
||||
Path+'FormEditor/CheckPackagesOnFormCreate',FCheckPackagesOnFormCreate,true);
|
||||
XMLConfig.SetDeleteValue(
|
||||
Path+'FormEditor/RightClickSelects',FRightClickSelects,true);
|
||||
XMLConfig.SetDeleteValue(
|
||||
|
@ -15,14 +15,14 @@ inherited FormEditorOptionsFrame: TFormEditorOptionsFrame
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 232
|
||||
Height = 169
|
||||
Height = 141
|
||||
Top = 0
|
||||
Width = 537
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
AutoSize = True
|
||||
BorderSpacing.Left = 6
|
||||
Caption = 'GridGroupBox'
|
||||
ClientHeight = 150
|
||||
ClientHeight = 123
|
||||
ClientWidth = 533
|
||||
TabOrder = 0
|
||||
object GridSizeXLabel: TLabel
|
||||
@ -30,9 +30,9 @@ inherited FormEditorOptionsFrame: TFormEditorOptionsFrame
|
||||
AnchorSideTop.Control = GridSizeXSpinEdit
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 6
|
||||
Height = 18
|
||||
Top = 88
|
||||
Width = 96
|
||||
Height = 14
|
||||
Top = 72
|
||||
Width = 70
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'GridSizeXLabel'
|
||||
ParentColor = False
|
||||
@ -42,9 +42,9 @@ inherited FormEditorOptionsFrame: TFormEditorOptionsFrame
|
||||
AnchorSideTop.Control = GridSizeYSpinEdit
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 6
|
||||
Height = 18
|
||||
Top = 121
|
||||
Width = 95
|
||||
Height = 14
|
||||
Top = 99
|
||||
Width = 70
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'GridSizeYLabel'
|
||||
ParentColor = False
|
||||
@ -56,9 +56,9 @@ inherited FormEditorOptionsFrame: TFormEditorOptionsFrame
|
||||
AnchorSideRight.Control = GridGroupBox
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 22
|
||||
Top = 56
|
||||
Width = 159
|
||||
Height = 17
|
||||
Top = 46
|
||||
Width = 120
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 3
|
||||
BorderSpacing.Right = 6
|
||||
@ -69,9 +69,9 @@ inherited FormEditorOptionsFrame: TFormEditorOptionsFrame
|
||||
AnchorSideLeft.Control = GridGroupBox
|
||||
AnchorSideTop.Control = GridGroupBox
|
||||
Left = 6
|
||||
Height = 22
|
||||
Height = 17
|
||||
Top = 6
|
||||
Width = 147
|
||||
Width = 110
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 6
|
||||
Caption = 'ShowGridCheckBox'
|
||||
@ -82,9 +82,9 @@ inherited FormEditorOptionsFrame: TFormEditorOptionsFrame
|
||||
AnchorSideTop.Control = ShowGridCheckBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 22
|
||||
Top = 31
|
||||
Width = 204
|
||||
Height = 17
|
||||
Top = 26
|
||||
Width = 152
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 3
|
||||
Caption = 'ShowBorderSpaceCheckBox'
|
||||
@ -95,9 +95,9 @@ inherited FormEditorOptionsFrame: TFormEditorOptionsFrame
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = SnapToGridCheckBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 108
|
||||
Height = 27
|
||||
Top = 84
|
||||
Left = 82
|
||||
Height = 21
|
||||
Top = 69
|
||||
Width = 64
|
||||
BorderSpacing.Around = 6
|
||||
MaxValue = 128
|
||||
@ -112,9 +112,9 @@ inherited FormEditorOptionsFrame: TFormEditorOptionsFrame
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = GridSizeXSpinEdit
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 107
|
||||
Height = 27
|
||||
Top = 117
|
||||
Left = 82
|
||||
Height = 21
|
||||
Top = 96
|
||||
Width = 64
|
||||
BorderSpacing.Around = 6
|
||||
MaxValue = 128
|
||||
@ -134,14 +134,14 @@ inherited FormEditorOptionsFrame: TFormEditorOptionsFrame
|
||||
AnchorSideBottom.Control = Owner
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 203
|
||||
Top = 253
|
||||
Height = 187
|
||||
Top = 214
|
||||
Width = 769
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
AutoSize = True
|
||||
BorderSpacing.Top = 6
|
||||
Caption = 'FormEditMiscGroupBox'
|
||||
ClientHeight = 184
|
||||
ClientHeight = 169
|
||||
ClientWidth = 765
|
||||
TabOrder = 1
|
||||
object ShowComponentCaptionsCheckBox: TCheckBox
|
||||
@ -151,9 +151,9 @@ inherited FormEditorOptionsFrame: TFormEditorOptionsFrame
|
||||
AnchorSideRight.Control = FormEditMiscGroupBox
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 22
|
||||
Top = 31
|
||||
Width = 252
|
||||
Height = 17
|
||||
Top = 26
|
||||
Width = 188
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 3
|
||||
BorderSpacing.Right = 6
|
||||
@ -167,9 +167,9 @@ inherited FormEditorOptionsFrame: TFormEditorOptionsFrame
|
||||
AnchorSideRight.Control = FormEditMiscGroupBox
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 22
|
||||
Top = 56
|
||||
Width = 191
|
||||
Height = 17
|
||||
Top = 46
|
||||
Width = 143
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 3
|
||||
BorderSpacing.Right = 6
|
||||
@ -183,9 +183,9 @@ inherited FormEditorOptionsFrame: TFormEditorOptionsFrame
|
||||
AnchorSideRight.Control = FormEditMiscGroupBox
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 22
|
||||
Top = 81
|
||||
Width = 256
|
||||
Height = 17
|
||||
Top = 66
|
||||
Width = 192
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 3
|
||||
BorderSpacing.Right = 6
|
||||
@ -199,9 +199,9 @@ inherited FormEditorOptionsFrame: TFormEditorOptionsFrame
|
||||
AnchorSideRight.Control = FormEditMiscGroupBox
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 22
|
||||
Top = 106
|
||||
Width = 195
|
||||
Height = 17
|
||||
Top = 86
|
||||
Width = 145
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 3
|
||||
Caption = 'RightClickSelectsCheckBox'
|
||||
@ -214,9 +214,9 @@ inherited FormEditorOptionsFrame: TFormEditorOptionsFrame
|
||||
AnchorSideRight.Control = FormEditMiscGroupBox
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 22
|
||||
Top = 131
|
||||
Width = 204
|
||||
Height = 17
|
||||
Top = 106
|
||||
Width = 153
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 3
|
||||
Caption = 'DesignerPaintLazyCheckBox'
|
||||
@ -229,12 +229,12 @@ inherited FormEditorOptionsFrame: TFormEditorOptionsFrame
|
||||
AnchorSideTop.Control = DesignerPaintLazyCheckBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 22
|
||||
Top = 156
|
||||
Width = 244
|
||||
Height = 17
|
||||
Top = 126
|
||||
Width = 180
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 3
|
||||
BorderSpacing.Bottom = 6
|
||||
BorderSpacing.Bottom = 3
|
||||
Caption = 'CreateCompFocusNameCheckBox'
|
||||
ParentShowHint = False
|
||||
ShowHint = True
|
||||
@ -246,7 +246,7 @@ inherited FormEditorOptionsFrame: TFormEditorOptionsFrame
|
||||
AnchorSideRight.Control = FormEditMiscGroupBox
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 22
|
||||
Height = 17
|
||||
Top = 6
|
||||
Width = 759
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
@ -255,6 +255,20 @@ inherited FormEditorOptionsFrame: TFormEditorOptionsFrame
|
||||
Caption = 'RubberbandSelectsGrandChildsCheckBox'
|
||||
TabOrder = 6
|
||||
end
|
||||
object CheckPackagesOnFormCreateCheckBox: TCheckBox
|
||||
AnchorSideLeft.Control = FormEditMiscGroupBox
|
||||
AnchorSideTop.Control = CreateCompFocusNameCheckBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 17
|
||||
Top = 146
|
||||
Width = 210
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 3
|
||||
BorderSpacing.Bottom = 6
|
||||
Caption = 'CheckPackagesOnFormCreateCheckBox'
|
||||
TabOrder = 7
|
||||
end
|
||||
end
|
||||
object GuideLinesGroupBox: TGroupBox[2]
|
||||
AnchorSideLeft.Control = DesignerColorsGroupBox
|
||||
@ -265,15 +279,15 @@ inherited FormEditorOptionsFrame: TFormEditorOptionsFrame
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 232
|
||||
Height = 72
|
||||
Top = 175
|
||||
Height = 61
|
||||
Top = 147
|
||||
Width = 537
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
AutoSize = True
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 6
|
||||
Caption = 'GuideLinesGroupBox'
|
||||
ClientHeight = 53
|
||||
ClientHeight = 43
|
||||
ClientWidth = 533
|
||||
TabOrder = 2
|
||||
object ShowGuideLinesCheckBox: TCheckBox
|
||||
@ -281,7 +295,7 @@ inherited FormEditorOptionsFrame: TFormEditorOptionsFrame
|
||||
AnchorSideRight.Control = GuideLinesGroupBox
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 22
|
||||
Height = 17
|
||||
Top = 0
|
||||
Width = 521
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
@ -298,8 +312,8 @@ inherited FormEditorOptionsFrame: TFormEditorOptionsFrame
|
||||
AnchorSideRight.Control = GuideLinesGroupBox
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 22
|
||||
Top = 25
|
||||
Height = 17
|
||||
Top = 20
|
||||
Width = 521
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Left = 6
|
||||
@ -318,12 +332,12 @@ inherited FormEditorOptionsFrame: TFormEditorOptionsFrame
|
||||
AnchorSideBottom.Control = GuideLinesGroupBox
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 247
|
||||
Height = 208
|
||||
Top = 0
|
||||
Width = 226
|
||||
Anchors = [akTop, akLeft, akBottom]
|
||||
Caption = 'DesignerColorsGroupBox'
|
||||
ClientHeight = 228
|
||||
ClientHeight = 190
|
||||
ClientWidth = 222
|
||||
TabOrder = 3
|
||||
object ColorsListBox: TColorListBox
|
||||
@ -331,7 +345,7 @@ inherited FormEditorOptionsFrame: TFormEditorOptionsFrame
|
||||
AnchorSideTop.Control = DesignerColorsGroupBox
|
||||
AnchorSideBottom.Control = ColorBox
|
||||
Left = 6
|
||||
Height = 179
|
||||
Height = 150
|
||||
Top = 6
|
||||
Width = 210
|
||||
Style = [cbCustomColors]
|
||||
@ -341,7 +355,6 @@ inherited FormEditorOptionsFrame: TFormEditorOptionsFrame
|
||||
ItemHeight = 0
|
||||
OnSelectionChange = ColorsListBoxSelectionChange
|
||||
TabOrder = 0
|
||||
TopIndex = -1
|
||||
end
|
||||
object ColorBox: TColorBox
|
||||
AnchorSideLeft.Control = DesignerColorsGroupBox
|
||||
@ -352,8 +365,8 @@ inherited FormEditorOptionsFrame: TFormEditorOptionsFrame
|
||||
AnchorSideBottom.Control = DesignerColorsGroupBox
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 31
|
||||
Top = 191
|
||||
Height = 22
|
||||
Top = 162
|
||||
Width = 210
|
||||
Style = [cbStandardColors, cbExtendedColors, cbSystemColors, cbCustomColor, cbPrettyNames]
|
||||
Anchors = [akLeft, akBottom]
|
||||
|
@ -42,6 +42,7 @@ type
|
||||
{ TFormEditorOptionsFrame }
|
||||
|
||||
TFormEditorOptionsFrame = class(TAbstractIDEOptionsEditor)
|
||||
CheckPackagesOnFormCreateCheckBox: TCheckBox;
|
||||
OpenDesignerOnOpenUnitCheckBox: TCheckBox;
|
||||
ColorBox: TColorBox;
|
||||
ColorsListBox: TColorListBox;
|
||||
@ -115,6 +116,7 @@ procedure TFormEditorOptionsFrame.Setup(ADialog: TAbstractOptionsEditorDialog);
|
||||
ShowEditorHintsCheckBox.Caption:=dlgShowEdrHints;
|
||||
OpenDesignerOnOpenUnitCheckBox.Caption:=lisOpenDesignerOnOpenUnit;
|
||||
RightClickSelectsCheckBox.Caption:=dlgRightClickSelects;
|
||||
CheckPackagesOnFormCreateCheckBox.Caption:=dlgCheckPackagesOnFormCreate;
|
||||
|
||||
with DesignerPaintLazyCheckBox do
|
||||
begin
|
||||
@ -162,6 +164,7 @@ begin
|
||||
ShowComponentCaptionsCheckBox.Checked := ShowComponentCaptions;
|
||||
ShowEditorHintsCheckBox.Checked := ShowEditorHints;
|
||||
OpenDesignerOnOpenUnitCheckBox.Checked := AutoCreateFormsOnOpen;
|
||||
CheckPackagesOnFormCreateCheckBox.Checked := CheckPackagesOnFormCreate;
|
||||
RightClickSelectsCheckBox.Checked := RightClickSelects;
|
||||
RubberbandSelectsGrandChildsCheckBox.Checked := RubberbandSelectsGrandChilds;
|
||||
DesignerPaintLazyCheckBox.Checked := DesignerPaintLazy;
|
||||
@ -193,6 +196,7 @@ begin
|
||||
ShowComponentCaptions := ShowComponentCaptionsCheckBox.Checked;
|
||||
ShowEditorHints := ShowEditorHintsCheckBox.Checked;
|
||||
AutoCreateFormsOnOpen := OpenDesignerOnOpenUnitCheckBox.Checked;
|
||||
CheckPackagesOnFormCreate := CheckPackagesOnFormCreateCheckBox.Checked;
|
||||
RightClickSelects := RightClickSelectsCheckBox.Checked;
|
||||
RubberbandSelectsGrandChilds := RubberbandSelectsGrandChildsCheckBox.Checked;
|
||||
DesignerPaintLazy := DesignerPaintLazyCheckBox.Checked;
|
||||
|
@ -1046,6 +1046,7 @@ resourcestring
|
||||
dlgShowEdrHints = 'Show editor hints';
|
||||
dlgrightClickSelects = 'Right Click selects';
|
||||
lisOpenDesignerOnOpenUnit = 'Open designer on open unit';
|
||||
dlgCheckPackagesOnFormCreate = 'Check packages on form create';
|
||||
dlgGrabberColor = 'Grabber color';
|
||||
dlgMarkerColor = 'Marker color';
|
||||
lisFEPaintDesignerItemsOnIdle = 'Reduce designer painting';
|
||||
|
14
ide/main.pp
14
ide/main.pp
@ -5888,12 +5888,16 @@ begin
|
||||
end;
|
||||
|
||||
// check installed packages
|
||||
if (AnUnitInfo.Component=nil) and AnUnitInfo.IsPartOfProject
|
||||
and (not (ofProjectLoading in OpenFlags)) then begin
|
||||
if EnvironmentOptions.CheckPackagesOnFormCreate and
|
||||
(AnUnitInfo.Component = nil) and
|
||||
AnUnitInfo.IsPartOfProject and
|
||||
(not (ofProjectLoading in OpenFlags)) then
|
||||
begin
|
||||
// opening a form of the project -> check installed packages
|
||||
Result:=PkgBoss.CheckProjectHasInstalledPackages(Project1,
|
||||
OpenFlags*[ofProjectLoading,ofQuiet]=[]);
|
||||
if not (Result in [mrOk,mrIgnore]) then begin
|
||||
Result := PkgBoss.CheckProjectHasInstalledPackages(Project1,
|
||||
OpenFlags * [ofProjectLoading, ofQuiet] = []);
|
||||
if not (Result in [mrOk, mrIgnore]) then
|
||||
begin
|
||||
DebugLn(['TMainIDE.DoLoadLFM PkgBoss.CheckProjectHasInstalledPackages failed']);
|
||||
exit;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user