mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-11 18:59:19 +02:00
Merged revision(s) 43612-43613 #372e399987-#372e399987, 43615 #6180212a33 from trunk:
IDE: Make Project Inspector remember its settings for dir hierarchy and sorting. Issues #22448, #22609 ........ IDE: Make Package Editor remember its settings for dir hierarchy and sorting. Issues #18804, #22448 ........ IDE: Fix button order in FindReplaceDialog dialog using ButtonPanel. Issue #13561 ........ git-svn-id: branches/fixes_1_2@43620 -
This commit is contained in:
parent
feaa088314
commit
7367bd3ea4
@ -281,7 +281,15 @@ type
|
||||
|
||||
// object inspector
|
||||
FObjectInspectorOptions: TOIOptions;
|
||||
|
||||
|
||||
// project inspector
|
||||
FProjInspSortAlphabetically: boolean;
|
||||
FProjInspShowDirHierarchy: boolean;
|
||||
|
||||
// package editor
|
||||
FPackageEditorSortAlphabetically: boolean;
|
||||
FPackageEditorShowDirHierarchy: boolean;
|
||||
|
||||
// hints
|
||||
FCheckDiskChangesWithLoading: boolean;
|
||||
FShowHintsForComponentPalette: boolean;
|
||||
@ -514,6 +522,18 @@ type
|
||||
property ObjectInspectorOptions: TOIOptions read FObjectInspectorOptions
|
||||
write FObjectInspectorOptions;
|
||||
|
||||
// project inspector
|
||||
property ProjInspSortAlphabetically: boolean read FProjInspSortAlphabetically
|
||||
write FProjInspSortAlphabetically;
|
||||
property ProjInspShowDirHierarchy: boolean read FProjInspShowDirHierarchy
|
||||
write FProjInspShowDirHierarchy;
|
||||
|
||||
// package editor
|
||||
property PackageEditorSortAlphabetically: boolean read FPackageEditorSortAlphabetically
|
||||
write FPackageEditorSortAlphabetically;
|
||||
property PackageEditorShowDirHierarchy: boolean read FPackageEditorShowDirHierarchy
|
||||
write FPackageEditorShowDirHierarchy;
|
||||
|
||||
// hints
|
||||
property CheckDiskChangesWithLoading: boolean read FCheckDiskChangesWithLoading
|
||||
write FCheckDiskChangesWithLoading;
|
||||
@ -868,6 +888,14 @@ begin
|
||||
// object inspector
|
||||
FObjectInspectorOptions:=TOIOptions.Create;
|
||||
|
||||
// project inspector
|
||||
FProjInspSortAlphabetically:=false;
|
||||
FProjInspShowDirHierarchy:=false;
|
||||
|
||||
// package editor
|
||||
FPackageEditorSortAlphabetically:=false;
|
||||
FPackageEditorShowDirHierarchy:=false;
|
||||
|
||||
// hints
|
||||
FCheckDiskChangesWithLoading:=false;
|
||||
FShowHintsForComponentPalette:=true;
|
||||
@ -1294,6 +1322,18 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
// project inspector
|
||||
FProjInspSortAlphabetically:=XMLConfig.GetValue(
|
||||
Path+'ProjInspSortAlphabetically/Value',false);
|
||||
FProjInspShowDirHierarchy:=XMLConfig.GetValue(
|
||||
Path+'ProjInspShowDirHierarchy/Value',false);
|
||||
|
||||
// package editor
|
||||
FPackageEditorSortAlphabetically:=XMLConfig.GetValue(
|
||||
Path+'PackageEditorSortAlphabetically/Value',false);
|
||||
FPackageEditorShowDirHierarchy:=XMLConfig.GetValue(
|
||||
Path+'PackageEditorShowDirHierarchy/Value',false);
|
||||
|
||||
// hints
|
||||
FCheckDiskChangesWithLoading:=XMLConfig.GetValue(
|
||||
Path+'CheckDiskChangesWithLoading/Value',false);
|
||||
@ -1650,6 +1690,18 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
// project inspector
|
||||
XMLConfig.SetDeleteValue(Path+'ProjInspSortAlphabetically/Value',
|
||||
FProjInspSortAlphabetically,false);
|
||||
XMLConfig.SetDeleteValue(Path+'ProjInspShowDirHierarchy/Value',
|
||||
FProjInspShowDirHierarchy,false);
|
||||
|
||||
// package editor
|
||||
XMLConfig.SetDeleteValue(Path+'PackageEditorSortAlphabetically/Value',
|
||||
FPackageEditorSortAlphabetically,false);
|
||||
XMLConfig.SetDeleteValue(Path+'PackageEditorShowDirHierarchy/Value',
|
||||
FPackageEditorShowDirHierarchy,false);
|
||||
|
||||
// hints
|
||||
XMLConfig.SetDeleteValue(Path+'CheckDiskChangesWithLoading/Value',
|
||||
FCheckDiskChangesWithLoading,false);
|
||||
|
@ -1,7 +1,7 @@
|
||||
object LazFindReplaceDialog: TLazFindReplaceDialog
|
||||
Left = 308
|
||||
Left = 409
|
||||
Height = 322
|
||||
Top = 229
|
||||
Top = 607
|
||||
Width = 441
|
||||
ActiveControl = TextToFindComboBox
|
||||
BorderIcons = [biSystemMenu]
|
||||
@ -13,14 +13,14 @@ object LazFindReplaceDialog: TLazFindReplaceDialog
|
||||
KeyPreview = True
|
||||
OnChangeBounds = FormChangeBounds
|
||||
OnClose = FormClose
|
||||
LCLVersion = '1.1'
|
||||
LCLVersion = '1.3'
|
||||
object TextToFindLabel: TLabel
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = TextToFindComboBox
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 6
|
||||
Height = 15
|
||||
Top = 18
|
||||
Top = 17
|
||||
Width = 95
|
||||
Alignment = taRightJustify
|
||||
BorderSpacing.Left = 6
|
||||
@ -35,7 +35,7 @@ object LazFindReplaceDialog: TLazFindReplaceDialog
|
||||
AnchorSideBottom.Control = TextToFindComboBox
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 410
|
||||
Height = 27
|
||||
Height = 25
|
||||
Top = 12
|
||||
Width = 25
|
||||
AllowAllUp = True
|
||||
@ -51,9 +51,9 @@ object LazFindReplaceDialog: TLazFindReplaceDialog
|
||||
AnchorSideTop.Control = ReplaceTextComboBox
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 6
|
||||
Height = 20
|
||||
Top = 48
|
||||
Width = 163
|
||||
Height = 21
|
||||
Top = 45
|
||||
Width = 160
|
||||
BorderSpacing.Left = 6
|
||||
Caption = 'ReplaceWithCheckbox'
|
||||
OnChange = ReplaceWithCheckboxChange
|
||||
@ -64,7 +64,7 @@ object LazFindReplaceDialog: TLazFindReplaceDialog
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideRight.Control = EnableAutoCompleteSpeedButton
|
||||
Left = 107
|
||||
Height = 27
|
||||
Height = 25
|
||||
Top = 12
|
||||
Width = 303
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
@ -83,10 +83,10 @@ object LazFindReplaceDialog: TLazFindReplaceDialog
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 181
|
||||
Height = 27
|
||||
Top = 45
|
||||
Width = 254
|
||||
Left = 178
|
||||
Height = 25
|
||||
Top = 43
|
||||
Width = 257
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
AutoComplete = True
|
||||
AutoCompleteText = [cbactEnabled, cbactEndOfLineComplete, cbactRetainPrefixCase, cbactSearchAscending]
|
||||
@ -101,26 +101,25 @@ object LazFindReplaceDialog: TLazFindReplaceDialog
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = ReplaceTextComboBox
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideBottom.Control = BtnPanel
|
||||
Left = 6
|
||||
Height = 193
|
||||
Top = 78
|
||||
Width = 229
|
||||
Height = 197
|
||||
Top = 74
|
||||
Width = 222
|
||||
Anchors = [akTop, akLeft, akBottom]
|
||||
AutoSize = True
|
||||
BorderSpacing.Left = 6
|
||||
BorderSpacing.Top = 6
|
||||
BorderSpacing.Bottom = 6
|
||||
Caption = 'OptionsGroupBox'
|
||||
ClientHeight = 174
|
||||
ClientWidth = 221
|
||||
ClientHeight = 178
|
||||
ClientWidth = 218
|
||||
TabOrder = 3
|
||||
OnResize = OptionsGroupBoxResize
|
||||
object PromptOnReplaceCheckBox: TCheckBox
|
||||
Left = 6
|
||||
Height = 20
|
||||
Top = 140
|
||||
Width = 209
|
||||
Height = 21
|
||||
Top = 144
|
||||
Width = 206
|
||||
Align = alTop
|
||||
BorderSpacing.Top = 6
|
||||
BorderSpacing.Around = 6
|
||||
@ -133,9 +132,9 @@ object LazFindReplaceDialog: TLazFindReplaceDialog
|
||||
end
|
||||
object MultiLineCheckBox: TCheckBox
|
||||
Left = 6
|
||||
Height = 20
|
||||
Top = 108
|
||||
Width = 209
|
||||
Height = 21
|
||||
Top = 111
|
||||
Width = 206
|
||||
Align = alTop
|
||||
BorderSpacing.Top = 6
|
||||
BorderSpacing.Around = 6
|
||||
@ -146,9 +145,9 @@ object LazFindReplaceDialog: TLazFindReplaceDialog
|
||||
end
|
||||
object RegularExpressionsCheckBox: TCheckBox
|
||||
Left = 6
|
||||
Height = 20
|
||||
Top = 76
|
||||
Width = 209
|
||||
Height = 21
|
||||
Top = 78
|
||||
Width = 206
|
||||
Align = alTop
|
||||
BorderSpacing.Top = 6
|
||||
BorderSpacing.Around = 6
|
||||
@ -159,9 +158,9 @@ object LazFindReplaceDialog: TLazFindReplaceDialog
|
||||
end
|
||||
object WholeWordsOnlyCheckBox: TCheckBox
|
||||
Left = 6
|
||||
Height = 20
|
||||
Top = 44
|
||||
Width = 209
|
||||
Height = 21
|
||||
Top = 45
|
||||
Width = 206
|
||||
Align = alTop
|
||||
BorderSpacing.Top = 6
|
||||
BorderSpacing.Around = 6
|
||||
@ -172,9 +171,9 @@ object LazFindReplaceDialog: TLazFindReplaceDialog
|
||||
end
|
||||
object CaseSensitiveCheckBox: TCheckBox
|
||||
Left = 6
|
||||
Height = 20
|
||||
Height = 21
|
||||
Top = 12
|
||||
Width = 209
|
||||
Width = 206
|
||||
Align = alTop
|
||||
BorderSpacing.Top = 6
|
||||
BorderSpacing.Around = 6
|
||||
@ -191,10 +190,10 @@ object LazFindReplaceDialog: TLazFindReplaceDialog
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 241
|
||||
Height = 59
|
||||
Top = 143
|
||||
Width = 194
|
||||
Left = 234
|
||||
Height = 61
|
||||
Top = 141
|
||||
Width = 201
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
AutoSize = True
|
||||
BorderSpacing.Around = 6
|
||||
@ -206,22 +205,22 @@ object LazFindReplaceDialog: TLazFindReplaceDialog
|
||||
ChildSizing.ShrinkVertical = crsHomogenousSpaceResize
|
||||
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
||||
ChildSizing.ControlsPerLine = 1
|
||||
ClientHeight = 40
|
||||
ClientWidth = 186
|
||||
ClientHeight = 42
|
||||
ClientWidth = 197
|
||||
TabOrder = 5
|
||||
object SelectedRadioButton: TRadioButton
|
||||
Left = 6
|
||||
Height = 20
|
||||
Height = 21
|
||||
Top = 0
|
||||
Width = 174
|
||||
Width = 185
|
||||
Caption = 'SelectedRadioButton'
|
||||
TabOrder = 0
|
||||
end
|
||||
object GlobalRadioButton: TRadioButton
|
||||
Left = 6
|
||||
Height = 20
|
||||
Top = 20
|
||||
Width = 174
|
||||
Height = 21
|
||||
Top = 21
|
||||
Width = 185
|
||||
Caption = 'GlobalRadioButton'
|
||||
Checked = True
|
||||
TabOrder = 1
|
||||
@ -235,10 +234,10 @@ object LazFindReplaceDialog: TLazFindReplaceDialog
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 241
|
||||
Height = 59
|
||||
Left = 234
|
||||
Height = 61
|
||||
Top = 208
|
||||
Width = 194
|
||||
Width = 201
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
AutoSize = True
|
||||
BorderSpacing.Around = 6
|
||||
@ -250,22 +249,22 @@ object LazFindReplaceDialog: TLazFindReplaceDialog
|
||||
ChildSizing.ShrinkVertical = crsHomogenousSpaceResize
|
||||
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
||||
ChildSizing.ControlsPerLine = 1
|
||||
ClientHeight = 40
|
||||
ClientWidth = 186
|
||||
ClientHeight = 42
|
||||
ClientWidth = 197
|
||||
TabOrder = 6
|
||||
object BackwardRadioButton: TRadioButton
|
||||
Left = 6
|
||||
Height = 20
|
||||
Height = 21
|
||||
Top = 0
|
||||
Width = 174
|
||||
Width = 185
|
||||
Caption = 'BackwardRadioButton'
|
||||
TabOrder = 0
|
||||
end
|
||||
object ForwardRadioButton: TRadioButton
|
||||
Left = 6
|
||||
Height = 20
|
||||
Top = 20
|
||||
Width = 174
|
||||
Height = 21
|
||||
Top = 21
|
||||
Width = 185
|
||||
Caption = 'ForwardRadioButton'
|
||||
Checked = True
|
||||
TabOrder = 1
|
||||
@ -279,10 +278,10 @@ object LazFindReplaceDialog: TLazFindReplaceDialog
|
||||
AnchorSideTop.Side = asrBottom
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 241
|
||||
Height = 59
|
||||
Top = 78
|
||||
Width = 194
|
||||
Left = 234
|
||||
Height = 61
|
||||
Top = 74
|
||||
Width = 201
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
AutoSize = True
|
||||
BorderSpacing.Around = 6
|
||||
@ -294,14 +293,14 @@ object LazFindReplaceDialog: TLazFindReplaceDialog
|
||||
ChildSizing.ShrinkVertical = crsHomogenousSpaceResize
|
||||
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
||||
ChildSizing.ControlsPerLine = 1
|
||||
ClientHeight = 40
|
||||
ClientWidth = 186
|
||||
ClientHeight = 42
|
||||
ClientWidth = 197
|
||||
TabOrder = 4
|
||||
object FromCursorRadioButton: TRadioButton
|
||||
Left = 0
|
||||
Height = 20
|
||||
Left = 6
|
||||
Height = 21
|
||||
Top = 0
|
||||
Width = 180
|
||||
Width = 185
|
||||
AutoSize = False
|
||||
Caption = 'FromCursorRadioButton'
|
||||
Checked = True
|
||||
@ -309,86 +308,32 @@ object LazFindReplaceDialog: TLazFindReplaceDialog
|
||||
TabStop = True
|
||||
end
|
||||
object EntireScopeRadioButton: TRadioButton
|
||||
Left = 0
|
||||
Height = 20
|
||||
Top = 20
|
||||
Width = 180
|
||||
Left = 6
|
||||
Height = 21
|
||||
Top = 21
|
||||
Width = 185
|
||||
AutoSize = False
|
||||
Caption = 'EntireScopeRadioButton'
|
||||
TabOrder = 1
|
||||
end
|
||||
end
|
||||
object BtnPanel: TPanel
|
||||
Left = 0
|
||||
Height = 45
|
||||
Top = 277
|
||||
Width = 441
|
||||
Align = alBottom
|
||||
AutoSize = True
|
||||
BevelOuter = bvNone
|
||||
ClientHeight = 45
|
||||
ClientWidth = 441
|
||||
object BtnPanel: TButtonPanel
|
||||
Left = 6
|
||||
Height = 41
|
||||
Top = 275
|
||||
Width = 429
|
||||
OKButton.Name = 'OKButton'
|
||||
OKButton.DefaultCaption = True
|
||||
OKButton.OnClick = OkButtonClick
|
||||
HelpButton.Name = 'HelpButton'
|
||||
HelpButton.DefaultCaption = True
|
||||
HelpButton.OnClick = HelpButtonClick
|
||||
CloseButton.Name = 'CloseButton'
|
||||
CloseButton.DefaultCaption = True
|
||||
CloseButton.OnClick = ReplaceAllButtonClick
|
||||
CancelButton.Name = 'CancelButton'
|
||||
CancelButton.DefaultCaption = True
|
||||
CancelButton.OnClick = CancelButtonClick
|
||||
TabOrder = 7
|
||||
object ReplaceAllButton: TBitBtn
|
||||
Left = 185
|
||||
Height = 33
|
||||
Top = 6
|
||||
Width = 75
|
||||
Align = alRight
|
||||
AutoSize = True
|
||||
BorderSpacing.Around = 6
|
||||
Caption = '&All'
|
||||
Constraints.MinWidth = 75
|
||||
Kind = bkAll
|
||||
OnClick = ReplaceAllButtonClick
|
||||
TabOrder = 0
|
||||
end
|
||||
object OKButton: TBitBtn
|
||||
Left = 266
|
||||
Height = 33
|
||||
Top = 6
|
||||
Width = 75
|
||||
Align = alRight
|
||||
AutoSize = True
|
||||
BorderSpacing.Around = 6
|
||||
Caption = '&OK'
|
||||
Constraints.MinWidth = 75
|
||||
Default = True
|
||||
Kind = bkOK
|
||||
OnClick = OkButtonClick
|
||||
TabOrder = 1
|
||||
end
|
||||
object CancelButton: TBitBtn
|
||||
Left = 347
|
||||
Height = 33
|
||||
Top = 6
|
||||
Width = 88
|
||||
Align = alRight
|
||||
AutoSize = True
|
||||
BorderSpacing.Around = 6
|
||||
Cancel = True
|
||||
Caption = 'Cancel'
|
||||
Constraints.MinWidth = 75
|
||||
Kind = bkCancel
|
||||
ModalResult = 2
|
||||
OnClick = CancelButtonClick
|
||||
TabOrder = 2
|
||||
end
|
||||
object HelpButton: TBitBtn
|
||||
AnchorSideLeft.Control = BtnPanel
|
||||
AnchorSideBottom.Control = BtnPanel
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 33
|
||||
Top = 6
|
||||
Width = 76
|
||||
Anchors = [akLeft, akBottom]
|
||||
AutoSize = True
|
||||
BorderSpacing.Around = 6
|
||||
Caption = '&Help'
|
||||
Kind = bkHelp
|
||||
OnClick = HelpButtonClick
|
||||
TabOrder = 3
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -33,7 +33,7 @@ interface
|
||||
|
||||
uses
|
||||
Classes, Math, SysUtils, LCLProc, LCLType, Controls, StdCtrls, Forms, Buttons,
|
||||
ExtCtrls, Dialogs, Graphics,
|
||||
ExtCtrls, Dialogs, Graphics, ButtonPanel,
|
||||
SynEditTypes, SynRegExpr, SynEdit,
|
||||
IDEHelpIntf, IDEImagesIntf, IDEWindowIntf, IDEDialogs,
|
||||
LazarusIdeStrConsts, InputHistory;
|
||||
@ -47,9 +47,7 @@ type
|
||||
|
||||
TLazFindReplaceDialog = class(TForm)
|
||||
BackwardRadioButton: TRadioButton;
|
||||
HelpButton: TBitBtn;
|
||||
BtnPanel: TPanel;
|
||||
CancelButton: TBitBtn;
|
||||
BtnPanel: TButtonPanel;
|
||||
CaseSensitiveCheckBox: TCheckBox;
|
||||
DirectionGroupBox: TGroupBox;
|
||||
EntireScopeRadioButton: TRadioButton;
|
||||
@ -57,12 +55,10 @@ type
|
||||
FromCursorRadioButton: TRadioButton;
|
||||
GlobalRadioButton: TRadioButton;
|
||||
MultiLineCheckBox: TCheckBox;
|
||||
OKButton: TBitBtn;
|
||||
OptionsGroupBox: TGroupBox;
|
||||
OriginGroupBox: TGroupBox;
|
||||
PromptOnReplaceCheckBox: TCheckBox;
|
||||
RegularExpressionsCheckBox: TCheckBox;
|
||||
ReplaceAllButton: TBitBtn;
|
||||
ReplaceTextComboBox: TComboBox;
|
||||
ReplaceWithCheckbox: TCheckBox;
|
||||
ScopeGroupBox: TGroupBox;
|
||||
@ -163,22 +159,21 @@ begin
|
||||
Hint:=lisAskBeforeReplacingEachFoundText;
|
||||
end;
|
||||
|
||||
OriginGroupBox.Caption:=dlgSROrigin;
|
||||
OriginGroupBox.Caption := dlgSROrigin;
|
||||
FromCursorRadioButton.Caption := dlgFromCursor;
|
||||
EntireScopeRadioButton.Caption := dlgFromBeginning;
|
||||
|
||||
ScopeGroupBox.Caption:=dlgScope;
|
||||
ScopeGroupBox.Caption := dlgScope;
|
||||
GlobalRadioButton.Caption := dlgGlobal;
|
||||
SelectedRadioButton.Caption := dlgSelectedText;
|
||||
|
||||
DirectionGroupBox.Caption:=dlgDirection;
|
||||
DirectionGroupBox.Caption := dlgDirection;
|
||||
ForwardRadioButton.Caption := lisFRForwardSearch;
|
||||
BackwardRadioButton.Caption := lisFRBackwardSearch;
|
||||
|
||||
HelpButton.Caption:=lisMenuHelp;
|
||||
ReplaceAllButton.Caption:=dlgReplaceAll;
|
||||
OKButton.Caption:=lisMenuOk;
|
||||
CancelButton.Caption:=lisCancel;
|
||||
// CloseButton works now as ReplaceAllButton
|
||||
BtnPanel.CloseButton.Caption := dlgReplaceAll;
|
||||
BtnPanel.CloseButton.LoadGlyphFromLazarusResource('btn_all');
|
||||
|
||||
fReplaceAllClickedLast:=false;
|
||||
UpdateHints;
|
||||
@ -306,17 +301,20 @@ end;
|
||||
|
||||
procedure TLazFindReplaceDialog.ReplaceWithCheckboxChange(Sender: TObject);
|
||||
begin
|
||||
ReplaceAllButton.Visible:=ReplaceWithCheckbox.Checked;
|
||||
ReplaceTextComboBox.Enabled:=ReplaceAllButton.Visible;
|
||||
PromptOnReplaceCheckBox.Enabled:=ReplaceAllButton.Visible;
|
||||
if ReplaceAllButton.Visible then
|
||||
if ReplaceWithCheckbox.Checked then
|
||||
BtnPanel.ShowButtons := BtnPanel.ShowButtons + [pbClose]
|
||||
else
|
||||
BtnPanel.ShowButtons := BtnPanel.ShowButtons - [pbClose];
|
||||
ReplaceTextComboBox.Enabled:=ReplaceWithCheckbox.Checked;
|
||||
PromptOnReplaceCheckBox.Enabled:=ReplaceWithCheckbox.Checked;
|
||||
if ReplaceWithCheckbox.Checked then
|
||||
begin
|
||||
Caption := lisReplace;
|
||||
OkButton.Caption := lisBtnReplace;
|
||||
BtnPanel.OKButton.Caption := lisBtnReplace;
|
||||
end else
|
||||
begin
|
||||
Caption := lisMenuFind;
|
||||
OkButton.Caption := lisBtnFind;
|
||||
BtnPanel.OKButton.Caption := lisBtnFind;
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -447,19 +445,22 @@ begin
|
||||
then BackwardRadioButton.Checked:=True
|
||||
else ForwardRadioButton.Checked:=True;
|
||||
|
||||
ReplaceAllButton.Visible:=ssoReplace in NewOptions;
|
||||
ReplaceWithCheckbox.Checked:=ssoReplace in NewOptions;
|
||||
ReplaceTextComboBox.Enabled:=ReplaceAllButton.Visible;
|
||||
PromptOnReplaceCheckBox.Enabled:=ReplaceAllButton.Visible;
|
||||
if ssoReplace in NewOptions then
|
||||
BtnPanel.ShowButtons := BtnPanel.ShowButtons + [pbClose]
|
||||
else
|
||||
BtnPanel.ShowButtons := BtnPanel.ShowButtons - [pbClose];
|
||||
ReplaceWithCheckbox.Checked := ssoReplace in NewOptions;
|
||||
ReplaceTextComboBox.Enabled := ssoReplace in NewOptions;
|
||||
PromptOnReplaceCheckBox.Enabled := ssoReplace in NewOptions;
|
||||
|
||||
if ssoReplace in NewOptions then
|
||||
begin
|
||||
Caption := lisReplace;
|
||||
OkButton.Caption := lisBtnReplace;
|
||||
BtnPanel.OKButton.Caption := lisBtnReplace;
|
||||
end else
|
||||
begin
|
||||
Caption := lisMenuFind;
|
||||
OkButton.Caption := lisBtnFind;
|
||||
BtnPanel.OKButton.Caption := lisBtnFind;
|
||||
end;
|
||||
//DebugLn(['TLazFindReplaceDialog.SetOptions END ssoSelectedOnly=',ssoSelectedOnly in NewOptions,' SelectedRadioButton.Checked=',SelectedRadioButton.Checked]);
|
||||
end;
|
||||
@ -476,7 +477,7 @@ begin
|
||||
if EntireScopeRadioButton.Checked then Include(Result,ssoEntireScope);
|
||||
if SelectedRadioButton.Checked then include(Result,ssoSelectedOnly);
|
||||
if BackwardRadioButton.Checked then include(Result,ssoBackwards);
|
||||
if ReplaceAllButton.Visible then include(Result,ssoReplace);
|
||||
if pbClose in BtnPanel.ShowButtons then include(Result,ssoReplace);
|
||||
if fReplaceAllClickedLast then include(Result,ssoReplaceAll);
|
||||
end;
|
||||
|
||||
|
@ -8,7 +8,7 @@ object ProjectInspectorForm: TProjectInspectorForm
|
||||
ClientHeight = 474
|
||||
ClientWidth = 425
|
||||
OnShow = ProjectInspectorFormShow
|
||||
LCLVersion = '1.1'
|
||||
LCLVersion = '1.3'
|
||||
object ItemsTreeView: TTreeView
|
||||
Left = 0
|
||||
Height = 396
|
||||
|
@ -57,10 +57,10 @@ unit ProjectInspector;
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, LCLProc, LCLType, Forms, Controls, Buttons,
|
||||
ComCtrls, Menus, Dialogs, FileUtil, ExtCtrls, IDEHelpIntf, IDECommands, IDEDialogs, ProjectIntf,
|
||||
LazarusIDEStrConsts, IDEProcs, IDEOptionDefs,
|
||||
Project, AddToProjectDlg, PackageDefs, TreeFilterEdit;
|
||||
Classes, SysUtils, LCLProc, LCLType, Forms, Controls, Buttons, ComCtrls, Menus,
|
||||
Dialogs, FileUtil, ExtCtrls, IDEHelpIntf, IDECommands, IDEDialogs, IDEImagesIntf,
|
||||
LazIDEIntf, ProjectIntf, Project, LazarusIDEStrConsts, IDEProcs, IDEOptionDefs,
|
||||
AddToProjectDlg, PackageDefs, TreeFilterEdit, EnvironmentOpts;
|
||||
|
||||
type
|
||||
TOnAddUnitToProject =
|
||||
@ -172,6 +172,7 @@ type
|
||||
procedure UpdateRequiredPackages;
|
||||
procedure OnProjectBeginUpdate(Sender: TObject);
|
||||
procedure OnProjectEndUpdate(Sender: TObject; ProjectChanged: boolean);
|
||||
procedure OnCloseIDE(Sender: TObject);
|
||||
protected
|
||||
procedure KeyUp(var Key: Word; Shift: TShiftState); override;
|
||||
procedure IdleHandler(Sender: TObject; var Done: Boolean);
|
||||
@ -215,10 +216,6 @@ implementation
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
uses
|
||||
IDEImagesIntf;
|
||||
|
||||
|
||||
{ TProjectInspectorForm }
|
||||
|
||||
procedure TProjectInspectorForm.ItemsTreeViewDblClick(Sender: TObject);
|
||||
@ -537,8 +534,8 @@ procedure TProjectInspectorForm.SetSortAlphabetically(const AValue: boolean);
|
||||
begin
|
||||
if FSortAlphabetically=AValue then exit;
|
||||
FSortAlphabetically:=AValue;
|
||||
SortAlphabeticallyButton.Down:=SortAlphabetically;
|
||||
FilterEdit.SortData:=SortAlphabetically;
|
||||
SortAlphabeticallyButton.Down:=FSortAlphabetically;
|
||||
FilterEdit.SortData:=FSortAlphabetically;
|
||||
FilterEdit.InvalidateFilter;
|
||||
end;
|
||||
|
||||
@ -774,6 +771,12 @@ begin
|
||||
EndUpdate;
|
||||
end;
|
||||
|
||||
procedure TProjectInspectorForm.OnCloseIDE(Sender: TObject);
|
||||
begin
|
||||
EnvironmentOptions.ProjInspSortAlphabetically := SortAlphabetically;
|
||||
EnvironmentOptions.ProjInspShowDirHierarchy := ShowDirectoryHierarchy;
|
||||
end;
|
||||
|
||||
procedure TProjectInspectorForm.KeyUp(var Key: Word; Shift: TShiftState);
|
||||
begin
|
||||
inherited KeyDown(Key, Shift);
|
||||
@ -841,11 +844,12 @@ begin
|
||||
inherited Create(TheOwner);
|
||||
Name:=NonModalIDEWindowNames[nmiwProjectInspector];
|
||||
Caption:=lisMenuProjectInspector;
|
||||
FSortAlphabetically := True;
|
||||
SortAlphabeticallyButton.Down := FSortAlphabetically;
|
||||
KeyPreview:=true;
|
||||
SetupComponents;
|
||||
KeyPreview:=true;
|
||||
SortAlphabetically := EnvironmentOptions.ProjInspSortAlphabetically;
|
||||
ShowDirectoryHierarchy := EnvironmentOptions.ProjInspShowDirHierarchy;
|
||||
LazarusIDE.AddHandlerOnIDEClose(@OnCloseIDE);
|
||||
end;
|
||||
|
||||
destructor TProjectInspectorForm.Destroy;
|
||||
|
@ -12,7 +12,7 @@ object PackageEditorForm: TPackageEditorForm
|
||||
OnClose = PackageEditorFormClose
|
||||
OnCloseQuery = PackageEditorFormCloseQuery
|
||||
Position = poScreenCenter
|
||||
LCLVersion = '1.1'
|
||||
LCLVersion = '1.3'
|
||||
object ToolBar: TToolBar
|
||||
Left = 0
|
||||
Height = 48
|
||||
|
@ -38,7 +38,7 @@ uses
|
||||
IDEImagesIntf, MenuIntf, ExtCtrls, LazIDEIntf, ProjectIntf,
|
||||
CodeToolsStructs, FormEditingIntf, TreeFilterEdit, PackageIntf,
|
||||
IDEDialogs, IDEHelpIntf, IDEOptionsIntf, IDEProcs, LazarusIDEStrConsts,
|
||||
IDEDefs, CompilerOptions, ComponentReg,
|
||||
IDEDefs, CompilerOptions, ComponentReg, EnvironmentOpts,
|
||||
PackageDefs, AddToPackageDlg, PkgVirtualUnitEditor,
|
||||
MissingPkgFilesDlg, PackageSystem, CleanPkgDeps;
|
||||
|
||||
@ -2404,12 +2404,16 @@ begin
|
||||
inherited Create(TheOwner);
|
||||
FPlugins:=TStringList.Create;
|
||||
SetupComponents;
|
||||
SortAlphabetically := EnvironmentOptions.PackageEditorSortAlphabetically;
|
||||
ShowDirectoryHierarchy := EnvironmentOptions.PackageEditorShowDirHierarchy;
|
||||
end;
|
||||
|
||||
destructor TPackageEditorForm.Destroy;
|
||||
var
|
||||
nt: TPENodeType;
|
||||
begin
|
||||
EnvironmentOptions.PackageEditorSortAlphabetically := SortAlphabetically;
|
||||
EnvironmentOptions.PackageEditorShowDirHierarchy := ShowDirectoryHierarchy;
|
||||
FilterEdit.ForceFilter;
|
||||
for nt:=Low(TPENodeType) to High(TPENodeType) do
|
||||
FreeNodeData(nt);
|
||||
|
Loading…
Reference in New Issue
Block a user