cody: identifier db: replaced speedbuttons with checkboxes, so that tabstop works

git-svn-id: trunk@56387 -
This commit is contained in:
mattias 2017-11-13 12:39:50 +00:00
parent d539582687
commit 98be7f19c0
2 changed files with 60 additions and 59 deletions

View File

@ -1,7 +1,7 @@
object CodyIdentifiersDlg: TCodyIdentifiersDlg
Left = 250
Left = 622
Height = 404
Top = 250
Top = 204
Width = 555
ActiveControl = FilterEdit
Caption = 'CodyIdentifiersDlg'
@ -11,11 +11,11 @@ object CodyIdentifiersDlg: TCodyIdentifiersDlg
OnCreate = FormCreate
OnDestroy = FormDestroy
Position = poScreenCenter
LCLVersion = '1.5'
LCLVersion = '1.9.0.0'
object ButtonPanel1: TButtonPanel
Left = 6
Height = 34
Top = 364
Height = 36
Top = 362
Width = 543
OKButton.Name = 'OKButton'
OKButton.DefaultCaption = True
@ -25,14 +25,14 @@ object CodyIdentifiersDlg: TCodyIdentifiersDlg
CloseButton.DefaultCaption = True
CancelButton.Name = 'CancelButton'
CancelButton.DefaultCaption = True
TabOrder = 4
TabOrder = 6
ShowButtons = [pbOK, pbCancel, pbHelp]
end
object InfoLabel: TLabel
Left = 8
Height = 15
Height = 13
Top = 8
Width = 49
Width = 51
Caption = 'InfoLabel'
ParentColor = False
WordWrap = True
@ -41,11 +41,11 @@ object CodyIdentifiersDlg: TCodyIdentifiersDlg
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = HideOtherProjectsCheckBox
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = StartsSpeedButton
AnchorSideRight.Control = StartsCheckBox
Left = 6
Height = 23
Top = 58
Width = 433
Top = 61
Width = 373
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 6
BorderSpacing.Top = 10
@ -61,8 +61,8 @@ object CodyIdentifiersDlg: TCodyIdentifiersDlg
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = UnitLabel
Left = 6
Height = 223
Top = 81
Height = 217
Top = 84
Width = 543
Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Left = 6
@ -72,16 +72,17 @@ object CodyIdentifiersDlg: TCodyIdentifiersDlg
OnClick = ItemsListBoxClick
OnSelectionChange = ItemsListBoxSelectionChange
PopupMenu = PopupMenu1
ScrollWidth = 538
TabOrder = 2
ScrollWidth = 541
TabOrder = 4
TopIndex = -1
end
object UnitLabel: TLabel
AnchorSideLeft.Control = InfoLabel
AnchorSideBottom.Control = PackageLabel
Left = 8
Height = 15
Top = 305
Width = 50
Height = 13
Top = 302
Width = 52
Anchors = [akLeft, akBottom]
BorderSpacing.Bottom = 1
Caption = 'UnitLabel'
@ -91,9 +92,9 @@ object CodyIdentifiersDlg: TCodyIdentifiersDlg
AnchorSideLeft.Control = InfoLabel
AnchorSideBottom.Control = AddToImplementationUsesCheckBox
Left = 8
Height = 15
Top = 321
Width = 72
Height = 13
Top = 316
Width = 74
Anchors = [akLeft, akBottom]
BorderSpacing.Bottom = 1
Caption = 'PackageLabel'
@ -104,9 +105,9 @@ object CodyIdentifiersDlg: TCodyIdentifiersDlg
AnchorSideTop.Control = InfoLabel
AnchorSideTop.Side = asrBottom
Left = 8
Height = 19
Top = 29
Width = 169
Height = 24
Top = 27
Width = 183
BorderSpacing.Top = 6
Caption = 'HideOtherProjectsCheckBox'
OnChange = HideOtherProjectsCheckBoxChange
@ -116,52 +117,52 @@ object CodyIdentifiersDlg: TCodyIdentifiersDlg
AnchorSideLeft.Control = PackageLabel
AnchorSideBottom.Control = ButtonPanel1
Left = 8
Height = 19
Top = 339
Width = 217
Height = 24
Top = 332
Width = 227
Anchors = [akLeft, akBottom]
BorderSpacing.Top = 3
BorderSpacing.Bottom = 3
Caption = 'AddToImplementationUsesCheckBox'
ParentShowHint = False
ShowHint = True
TabOrder = 3
TabOrder = 5
end
object StartsSpeedButton: TSpeedButton
object StartsCheckBox: TCheckBox
AnchorSideTop.Control = FilterEdit
AnchorSideRight.Control = ContainsSpeedButton
AnchorSideRight.Control = ContainsCheckBox
AnchorSideBottom.Control = FilterEdit
AnchorSideBottom.Side = asrBottom
Left = 439
Left = 385
Height = 23
Top = 58
Width = 59
Top = 61
Width = 85
Anchors = [akTop, akRight, akBottom]
AutoSize = True
BorderSpacing.Left = 6
Caption = 'Starts with'
GroupIndex = 1
OnClick = StartsSpeedButtonClick
ShowHint = True
OnClick = StartsCheckBoxClick
ParentShowHint = False
ShowHint = True
TabOrder = 2
end
object ContainsSpeedButton: TSpeedButton
object ContainsCheckBox: TCheckBox
AnchorSideTop.Control = FilterEdit
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = FilterEdit
AnchorSideBottom.Side = asrBottom
Left = 498
Left = 476
Height = 23
Top = 58
Width = 51
Top = 61
Width = 73
Anchors = [akTop, akRight, akBottom]
AutoSize = True
BorderSpacing.Left = 6
BorderSpacing.Right = 6
Caption = 'Contains'
GroupIndex = 1
OnClick = ContainsSpeedButtonClick
ShowHint = True
OnClick = ContainsCheckBoxClick
ParentShowHint = False
ShowHint = True
TabOrder = 3
end
object PopupMenu1: TPopupMenu
OnPopup = PopupMenu1Popup

View File

@ -28,7 +28,7 @@
-use identifier: check package version
-check for conflict: other unit with same name already in search path
-check for conflict: other identifier in scope, use unitname.identifier
-gzip? lot of cpu, may be faster on first load
-use gzip? lot of cpu, may be faster on first load
}
unit CodyIdentifiersDlg;
@ -144,7 +144,7 @@ type
TCodyIdentifiersDlg = class(TForm)
AddToImplementationUsesCheckBox: TCheckBox;
ButtonPanel1: TButtonPanel;
ContainsSpeedButton: TSpeedButton;
ContainsCheckBox: TCheckBox;
FilterEdit: TEdit;
HideOtherProjectsCheckBox: TCheckBox;
InfoLabel: TLabel;
@ -153,16 +153,16 @@ type
DeleteSeparatorMenuItem: TMenuItem;
DeleteUnitMenuItem: TMenuItem;
DeletePackageMenuItem: TMenuItem;
StartsCheckBox: TCheckBox;
UseMenuItem: TMenuItem;
PackageLabel: TLabel;
PopupMenu1: TPopupMenu;
StartsSpeedButton: TSpeedButton;
UnitLabel: TLabel;
procedure ButtonPanel1HelpButtonClick(Sender: TObject);
procedure DeletePackageClick(Sender: TObject);
procedure DeleteUnitClick(Sender: TObject);
procedure UseIdentifierClick(Sender: TObject);
procedure ContainsSpeedButtonClick(Sender: TObject);
procedure ContainsCheckBoxClick(Sender: TObject);
procedure FilterEditChange(Sender: TObject);
procedure FilterEditKeyDown(Sender: TObject; var Key: Word;
{%H-}Shift: TShiftState);
@ -175,7 +175,7 @@ type
procedure ItemsListBoxSelectionChange(Sender: TObject; {%H-}User: boolean);
procedure OnIdle(Sender: TObject; var {%H-}Done: Boolean);
procedure PopupMenu1Popup(Sender: TObject);
procedure StartsSpeedButtonClick(Sender: TObject);
procedure StartsCheckBoxClick(Sender: TObject);
private
FDlgAction: TCodyIdentifierDlgAction;
FJumpButton: TBitBtn;
@ -879,7 +879,7 @@ begin
UpdateItemsList;
end;
procedure TCodyIdentifiersDlg.ContainsSpeedButtonClick(Sender: TObject);
procedure TCodyIdentifiersDlg.ContainsCheckBoxClick(Sender: TObject);
begin
UpdateItemsList;
end;
@ -944,12 +944,12 @@ begin
FJumpButton.OnClick:=@JumpButtonClick;
FJumpButton.Caption:= crsJumpTo;
StartsSpeedButton.Down:=true;
StartsSpeedButton.Caption:=crsStarts;
StartsSpeedButton.Hint:=crsShowOnlyIdentifiersStartingWithFilterText;
ContainsSpeedButton.Down:=false;
ContainsSpeedButton.Caption:=crsContains;
ContainsSpeedButton.Hint:=crsShowOnlyIdentifiersContainingFilterText;
StartsCheckBox.Checked:=true;
StartsCheckBox.Caption:=crsStarts;
StartsCheckBox.Hint:=crsShowOnlyIdentifiersStartingWithFilterText;
ContainsCheckBox.Checked:=false;
ContainsCheckBox.Caption:=crsContains;
ContainsCheckBox.Hint:=crsShowOnlyIdentifiersContainingFilterText;
end;
procedure TCodyIdentifiersDlg.HideOtherProjectsCheckBoxChange(Sender: TObject);
@ -1010,7 +1010,7 @@ begin
end;
end;
procedure TCodyIdentifiersDlg.StartsSpeedButtonClick(Sender: TObject);
procedure TCodyIdentifiersDlg.StartsCheckBoxClick(Sender: TObject);
begin
UpdateItemsList;
end;
@ -1646,7 +1646,7 @@ end;
function TCodyIdentifiersDlg.GetFilterType: TCodyIdentifierFilter;
begin
if ContainsSpeedButton.Down then
if ContainsCheckBox.Checked then
exit(cifContains)
else
exit(cifStartsWith);