mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-30 20:30:41 +02:00
IDE: enable/disable clear key map button
git-svn-id: trunk@22188 -
This commit is contained in:
parent
5037e54148
commit
f9b7074d20
@ -11,9 +11,9 @@ inherited EditorKeymappingOptionsFrame: TEditorKeymappingOptionsFrame
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = Owner
|
||||
Left = 0
|
||||
Height = 14
|
||||
Height = 18
|
||||
Top = 0
|
||||
Width = 105
|
||||
Width = 140
|
||||
Caption = 'KeyMappingHelpLabel'
|
||||
ParentColor = False
|
||||
end
|
||||
@ -24,8 +24,8 @@ inherited EditorKeymappingOptionsFrame: TEditorKeymappingOptionsFrame
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 21
|
||||
Top = 20
|
||||
Height = 27
|
||||
Top = 24
|
||||
Width = 461
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
BorderSpacing.Top = 6
|
||||
@ -43,18 +43,19 @@ inherited EditorKeymappingOptionsFrame: TEditorKeymappingOptionsFrame
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = KeyMappingFindKeyButton
|
||||
Left = 0
|
||||
Height = 405
|
||||
Top = 47
|
||||
Height = 383
|
||||
Top = 57
|
||||
Width = 461
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
BorderSpacing.Top = 6
|
||||
BorderSpacing.Bottom = 6
|
||||
DefaultItemHeight = 15
|
||||
DefaultItemHeight = 19
|
||||
ReadOnly = True
|
||||
RowSelect = True
|
||||
ScrollBars = ssAutoBoth
|
||||
TabOrder = 1
|
||||
OnDblClick = KeyMappingTreeViewDblClick
|
||||
OnSelectionChanged = KeyMappingTreeViewSelectionChanged
|
||||
Options = [tvoAutoItemHeight, tvoHideSelection, tvoKeepCollapsedNodes, tvoReadOnly, tvoRowSelect, tvoShowButtons, tvoShowLines, tvoShowRoot, tvoToolTips]
|
||||
end
|
||||
object KeyMappingFindKeyButton: TButton[3]
|
||||
@ -62,9 +63,9 @@ inherited EditorKeymappingOptionsFrame: TEditorKeymappingOptionsFrame
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = KeyMappingChooseSchemeButton
|
||||
Left = 0
|
||||
Height = 23
|
||||
Top = 458
|
||||
Width = 154
|
||||
Height = 29
|
||||
Top = 446
|
||||
Width = 178
|
||||
Anchors = [akLeft, akBottom]
|
||||
AutoSize = True
|
||||
BorderSpacing.Bottom = 6
|
||||
@ -77,9 +78,9 @@ inherited EditorKeymappingOptionsFrame: TEditorKeymappingOptionsFrame
|
||||
AnchorSideBottom.Control = Owner
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 23
|
||||
Top = 487
|
||||
Width = 189
|
||||
Height = 29
|
||||
Top = 481
|
||||
Width = 232
|
||||
Anchors = [akLeft, akBottom]
|
||||
AutoSize = True
|
||||
Caption = 'KeyMappingChooseSchemeButton'
|
||||
@ -91,10 +92,10 @@ inherited EditorKeymappingOptionsFrame: TEditorKeymappingOptionsFrame
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = Owner
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 258
|
||||
Height = 23
|
||||
Top = 487
|
||||
Width = 203
|
||||
Left = 214
|
||||
Height = 29
|
||||
Top = 481
|
||||
Width = 247
|
||||
Anchors = [akRight, akBottom]
|
||||
AutoSize = True
|
||||
Caption = 'KeyMappingConsistencyCheckButton'
|
||||
@ -105,10 +106,10 @@ inherited EditorKeymappingOptionsFrame: TEditorKeymappingOptionsFrame
|
||||
AnchorSideTop.Control = KeyMappingFindKeyButton
|
||||
AnchorSideRight.Control = KeyMappingConsistencyCheckButton
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 320
|
||||
Height = 23
|
||||
Top = 458
|
||||
Width = 141
|
||||
Left = 297
|
||||
Height = 29
|
||||
Top = 446
|
||||
Width = 164
|
||||
Anchors = [akTop, akRight]
|
||||
AutoSize = True
|
||||
Caption = 'KeyMappingClearButton'
|
||||
|
@ -5,48 +5,48 @@ LazarusResources.Add('TEditorKeymappingOptionsFrame','FORMDATA',[
|
||||
+#6'Height'#3#254#1#5'Width'#3#205#1#12'ClientHeight'#3#254#1#11'ClientWidth'
|
||||
+#3#205#1#8'TabOrder'#2#0#7'Visible'#8#10'DesignLeft'#3'/'#1#9'DesignTop'#2'c'
|
||||
+#0#242#2#0#6'TLabel'#19'KeyMappingHelpLabel'#22'AnchorSideLeft.Control'#7#5
|
||||
+'Owner'#21'AnchorSideTop.Control'#7#5'Owner'#4'Left'#2#0#6'Height'#2#14#3'To'
|
||||
+'p'#2#0#5'Width'#2'i'#7'Caption'#6#19'KeyMappingHelpLabel'#11'ParentColor'#8
|
||||
+#0#0#242#2#1#5'TEdit'#20'KeyMappingFilterEdit'#22'AnchorSideLeft.Control'#7#5
|
||||
+'Owner'#21'AnchorSideTop.Control'#7#19'KeyMappingHelpLabel'#18'AnchorSideTop'
|
||||
+'.Side'#7#9'asrBottom'#23'AnchorSideRight.Control'#7#5'Owner'#20'AnchorSideR'
|
||||
+'ight.Side'#7#9'asrBottom'#4'Left'#2#0#6'Height'#2#21#3'Top'#2#20#5'Width'#3
|
||||
+#205#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#17'BorderSpacing.Top'#2
|
||||
+#6#8'OnChange'#7#26'KeyMappingFilterEditChange'#7'OnEnter'#7#25'KeyMappingFi'
|
||||
+'lterEditEnter'#6'OnExit'#7#24'KeyMappingFilterEditExit'#8'TabOrder'#2#0#4'T'
|
||||
+'ext'#6#20'KeyMappingFilterEdit'#0#0#242#2#2#9'TTreeView'#18'KeyMappingTreeV'
|
||||
+'iew'#22'AnchorSideLeft.Control'#7#5'Owner'#21'AnchorSideTop.Control'#7#20'K'
|
||||
+'eyMappingFilterEdit'#18'AnchorSideTop.Side'#7#9'asrBottom'#23'AnchorSideRig'
|
||||
+'ht.Control'#7#5'Owner'#20'AnchorSideRight.Side'#7#9'asrBottom'#24'AnchorSid'
|
||||
+'eBottom.Control'#7#23'KeyMappingFindKeyButton'#4'Left'#2#0#6'Height'#3#149#1
|
||||
+#3'Top'#2'/'#5'Width'#3#205#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8
|
||||
+'Owner'#21'AnchorSideTop.Control'#7#5'Owner'#4'Left'#2#0#6'Height'#2#18#3'To'
|
||||
+'p'#2#0#5'Width'#3#140#0#7'Caption'#6#19'KeyMappingHelpLabel'#11'ParentColor'
|
||||
+#8#0#0#242#2#1#5'TEdit'#20'KeyMappingFilterEdit'#22'AnchorSideLeft.Control'#7
|
||||
+#5'Owner'#21'AnchorSideTop.Control'#7#19'KeyMappingHelpLabel'#18'AnchorSideT'
|
||||
+'op.Side'#7#9'asrBottom'#23'AnchorSideRight.Control'#7#5'Owner'#20'AnchorSid'
|
||||
+'eRight.Side'#7#9'asrBottom'#4'Left'#2#0#6'Height'#2#27#3'Top'#2#24#5'Width'
|
||||
+#3#205#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#17'BorderSpacing.Top'
|
||||
+#2#6#8'OnChange'#7#26'KeyMappingFilterEditChange'#7'OnEnter'#7#25'KeyMapping'
|
||||
+'FilterEditEnter'#6'OnExit'#7#24'KeyMappingFilterEditExit'#8'TabOrder'#2#0#4
|
||||
+'Text'#6#20'KeyMappingFilterEdit'#0#0#242#2#2#9'TTreeView'#18'KeyMappingTree'
|
||||
+'View'#22'AnchorSideLeft.Control'#7#5'Owner'#21'AnchorSideTop.Control'#7#20
|
||||
+'KeyMappingFilterEdit'#18'AnchorSideTop.Side'#7#9'asrBottom'#23'AnchorSideRi'
|
||||
+'ght.Control'#7#5'Owner'#20'AnchorSideRight.Side'#7#9'asrBottom'#24'AnchorSi'
|
||||
+'deBottom.Control'#7#23'KeyMappingFindKeyButton'#4'Left'#2#0#6'Height'#3#127
|
||||
+#1#3'Top'#2'9'#5'Width'#3#205#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8
|
||||
+'akBottom'#0#17'BorderSpacing.Top'#2#6#20'BorderSpacing.Bottom'#2#6#17'Defau'
|
||||
+'ltItemHeight'#2#15#8'ReadOnly'#9#9'RowSelect'#9#10'ScrollBars'#7#10'ssAutoB'
|
||||
+'oth'#8'TabOrder'#2#1#10'OnDblClick'#7#26'KeyMappingTreeViewDblClick'#7'Opti'
|
||||
+'ons'#11#17'tvoAutoItemHeight'#16'tvoHideSelection'#21'tvoKeepCollapsedNodes'
|
||||
+#11'tvoReadOnly'#12'tvoRowSelect'#14'tvoShowButtons'#12'tvoShowLines'#11'tvo'
|
||||
+'ShowRoot'#11'tvoToolTips'#0#0#0#242#2#3#7'TButton'#23'KeyMappingFindKeyButt'
|
||||
+'on'#22'AnchorSideLeft.Control'#7#5'Owner'#20'AnchorSideRight.Side'#7#9'asrB'
|
||||
+'ottom'#24'AnchorSideBottom.Control'#7#28'KeyMappingChooseSchemeButton'#4'Le'
|
||||
+'ft'#2#0#6'Height'#2#23#3'Top'#3#202#1#5'Width'#3#154#0#7'Anchors'#11#6'akLe'
|
||||
+'ft'#8'akBottom'#0#8'AutoSize'#9#20'BorderSpacing.Bottom'#2#6#7'Caption'#6#23
|
||||
+'KeyMappingFindKeyButton'#7'OnClick'#7#28'KeyMappingFindKeyButtonClick'#8'Ta'
|
||||
+'bOrder'#2#2#0#0#242#2#4#7'TButton'#28'KeyMappingChooseSchemeButton'#22'Anch'
|
||||
+'orSideLeft.Control'#7#5'Owner'#24'AnchorSideBottom.Control'#7#5'Owner'#21'A'
|
||||
+'nchorSideBottom.Side'#7#9'asrBottom'#4'Left'#2#0#6'Height'#2#23#3'Top'#3#231
|
||||
+#1#5'Width'#3#189#0#7'Anchors'#11#6'akLeft'#8'akBottom'#0#8'AutoSize'#9#7'Ca'
|
||||
+'ption'#6#28'KeyMappingChooseSchemeButton'#7'OnClick'#7'!KeyMappingChooseSch'
|
||||
+'emeButtonClick'#8'TabOrder'#2#3#0#0#242#2#5#7'TButton KeyMappingConsistency'
|
||||
+'CheckButton'#23'AnchorSideRight.Control'#7#5'Owner'#20'AnchorSideRight.Side'
|
||||
+#7#9'asrBottom'#24'AnchorSideBottom.Control'#7#5'Owner'#21'AnchorSideBottom.'
|
||||
+'Side'#7#9'asrBottom'#4'Left'#3#2#1#6'Height'#2#23#3'Top'#3#231#1#5'Width'#3
|
||||
+#203#0#7'Anchors'#11#7'akRight'#8'akBottom'#0#8'AutoSize'#9#7'Caption'#6' Ke'
|
||||
+'yMappingConsistencyCheckButton'#7'OnClick'#7'%KeyMappingConsistencyCheckBut'
|
||||
+'tonClick'#8'TabOrder'#2#4#0#0#242#2#6#7'TButton'#21'KeyMappingClearButton'
|
||||
+#21'AnchorSideTop.Control'#7#23'KeyMappingFindKeyButton'#23'AnchorSideRight.'
|
||||
+'Control'#7' KeyMappingConsistencyCheckButton'#20'AnchorSideRight.Side'#7#9
|
||||
+'asrBottom'#4'Left'#3'@'#1#6'Height'#2#23#3'Top'#3#202#1#5'Width'#3#141#0#7
|
||||
+'Anchors'#11#5'akTop'#7'akRight'#0#8'AutoSize'#9#7'Caption'#6#21'KeyMappingC'
|
||||
+'learButton'#7'OnClick'#7#26'KeyMappingClearButtonClick'#8'TabOrder'#2#5#0#0
|
||||
+#0
|
||||
+'ltItemHeight'#2#19#8'ReadOnly'#9#9'RowSelect'#9#10'ScrollBars'#7#10'ssAutoB'
|
||||
+'oth'#8'TabOrder'#2#1#10'OnDblClick'#7#26'KeyMappingTreeViewDblClick'#18'OnS'
|
||||
+'electionChanged'#7'"KeyMappingTreeViewSelectionChanged'#7'Options'#11#17'tv'
|
||||
+'oAutoItemHeight'#16'tvoHideSelection'#21'tvoKeepCollapsedNodes'#11'tvoReadO'
|
||||
+'nly'#12'tvoRowSelect'#14'tvoShowButtons'#12'tvoShowLines'#11'tvoShowRoot'#11
|
||||
+'tvoToolTips'#0#0#0#242#2#3#7'TButton'#23'KeyMappingFindKeyButton'#22'Anchor'
|
||||
+'SideLeft.Control'#7#5'Owner'#20'AnchorSideRight.Side'#7#9'asrBottom'#24'Anc'
|
||||
+'horSideBottom.Control'#7#28'KeyMappingChooseSchemeButton'#4'Left'#2#0#6'Hei'
|
||||
+'ght'#2#29#3'Top'#3#190#1#5'Width'#3#178#0#7'Anchors'#11#6'akLeft'#8'akBotto'
|
||||
+'m'#0#8'AutoSize'#9#20'BorderSpacing.Bottom'#2#6#7'Caption'#6#23'KeyMappingF'
|
||||
+'indKeyButton'#7'OnClick'#7#28'KeyMappingFindKeyButtonClick'#8'TabOrder'#2#2
|
||||
+#0#0#242#2#4#7'TButton'#28'KeyMappingChooseSchemeButton'#22'AnchorSideLeft.C'
|
||||
+'ontrol'#7#5'Owner'#24'AnchorSideBottom.Control'#7#5'Owner'#21'AnchorSideBot'
|
||||
+'tom.Side'#7#9'asrBottom'#4'Left'#2#0#6'Height'#2#29#3'Top'#3#225#1#5'Width'
|
||||
+#3#232#0#7'Anchors'#11#6'akLeft'#8'akBottom'#0#8'AutoSize'#9#7'Caption'#6#28
|
||||
+'KeyMappingChooseSchemeButton'#7'OnClick'#7'!KeyMappingChooseSchemeButtonCli'
|
||||
+'ck'#8'TabOrder'#2#3#0#0#242#2#5#7'TButton KeyMappingConsistencyCheckButton'
|
||||
+#23'AnchorSideRight.Control'#7#5'Owner'#20'AnchorSideRight.Side'#7#9'asrBott'
|
||||
+'om'#24'AnchorSideBottom.Control'#7#5'Owner'#21'AnchorSideBottom.Side'#7#9'a'
|
||||
+'srBottom'#4'Left'#3#214#0#6'Height'#2#29#3'Top'#3#225#1#5'Width'#3#247#0#7
|
||||
+'Anchors'#11#7'akRight'#8'akBottom'#0#8'AutoSize'#9#7'Caption'#6' KeyMapping'
|
||||
+'ConsistencyCheckButton'#7'OnClick'#7'%KeyMappingConsistencyCheckButtonClick'
|
||||
+#8'TabOrder'#2#4#0#0#242#2#6#7'TButton'#21'KeyMappingClearButton'#21'AnchorS'
|
||||
+'ideTop.Control'#7#23'KeyMappingFindKeyButton'#23'AnchorSideRight.Control'#7
|
||||
+' KeyMappingConsistencyCheckButton'#20'AnchorSideRight.Side'#7#9'asrBottom'#4
|
||||
+'Left'#3')'#1#6'Height'#2#29#3'Top'#3#190#1#5'Width'#3#164#0#7'Anchors'#11#5
|
||||
+'akTop'#7'akRight'#0#8'AutoSize'#9#7'Caption'#6#21'KeyMappingClearButton'#7
|
||||
+'OnClick'#7#26'KeyMappingClearButtonClick'#8'TabOrder'#2#5#0#0#0
|
||||
]);
|
||||
|
@ -51,6 +51,7 @@ type
|
||||
procedure KeyMappingFilterEditExit(Sender: TObject);
|
||||
procedure KeyMappingFindKeyButtonClick(Sender: TObject);
|
||||
procedure KeyMappingTreeViewDblClick(Sender: TObject);
|
||||
procedure KeyMappingTreeViewSelectionChanged(Sender: TObject);
|
||||
private
|
||||
FDialog: TAbstractOptionsEditorDialog;
|
||||
KeyMapNameFilter: string;
|
||||
@ -257,6 +258,16 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TEditorKeymappingOptionsFrame.KeyMappingTreeViewSelectionChanged(
|
||||
Sender: TObject);
|
||||
var
|
||||
ANode: TTreeNode;
|
||||
begin
|
||||
ANode := KeyMappingTreeView.Selected;
|
||||
KeyMappingClearButton.Enabled:=(ANode <> nil) and (ANode.Data <> nil)
|
||||
and (TObject(ANode.Data) is TKeyCommandRelation);
|
||||
end;
|
||||
|
||||
function TEditorKeymappingOptionsFrame.GeneralPage: TEditorGeneralOptionsFrame; inline;
|
||||
begin
|
||||
Result := TEditorGeneralOptionsFrame(FDialog.FindEditor(TEditorGeneralOptionsFrame));
|
||||
@ -416,6 +427,7 @@ constructor TEditorKeymappingOptionsFrame.Create(AOwner: TComponent);
|
||||
begin
|
||||
inherited Create(AOwner);
|
||||
EditingKeyMap := TKeyCommandRelationList.Create;
|
||||
KeyMappingClearButton.Enabled:=false;
|
||||
end;
|
||||
|
||||
destructor TEditorKeymappingOptionsFrame.Destroy;
|
||||
|
@ -1430,7 +1430,7 @@ resourcestring
|
||||
dlgAddHiAttrGroupSyncroEdit = 'Syncron Edit';
|
||||
dlgAddHiAttrGroupTemplateEdit = 'Template Edit';
|
||||
|
||||
lisClearKeyMapping = 'Clear Key Mapping';
|
||||
lisClearKeyShortMapping = 'Clear Key Mapping';
|
||||
|
||||
// CodeTools dialog
|
||||
dlgCodeToolsOpts = 'CodeTools Options';
|
||||
|
Loading…
Reference in New Issue
Block a user