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

View File

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