IDE: code templates: renamed Edit to Rename, bug #18212

git-svn-id: trunk@28898 -
This commit is contained in:
mattias 2011-01-07 19:00:29 +00:00
parent 1b48dc89de
commit 5e9003e17e
2 changed files with 40 additions and 43 deletions

View File

@ -20,15 +20,15 @@ object CodeTemplateDialog: TCodeTemplateDialog
Align = alTop Align = alTop
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'FilenameGroupBox' Caption = 'FilenameGroupBox'
ClientHeight = 33 ClientHeight = 30
ClientWidth = 481 ClientWidth = 477
TabOrder = 0 TabOrder = 0
object FilenameEdit: TEdit object FilenameEdit: TEdit
AnchorSideRight.Control = FilenameButton AnchorSideRight.Control = FilenameButton
Left = 9 Left = 9
Height = 21 Height = 27
Top = 4 Top = 4
Width = 435 Width = 431
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
BorderSpacing.Right = 5 BorderSpacing.Right = 5
TabOrder = 0 TabOrder = 0
@ -39,9 +39,9 @@ object CodeTemplateDialog: TCodeTemplateDialog
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = FilenameEdit AnchorSideBottom.Control = FilenameEdit
AnchorSideBottom.Side = asrBottom AnchorSideBottom.Side = asrBottom
Left = 449 Left = 445
Height = 23 Height = 23
Top = 2 Top = 8
Width = 26 Width = 26
Anchors = [akRight, akBottom] Anchors = [akRight, akBottom]
BorderSpacing.Right = 6 BorderSpacing.Right = 6
@ -58,8 +58,8 @@ object CodeTemplateDialog: TCodeTemplateDialog
Align = alTop Align = alTop
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'TemplatesGroupBox' Caption = 'TemplatesGroupBox'
ClientHeight = 149 ClientHeight = 146
ClientWidth = 481 ClientWidth = 477
TabOrder = 1 TabOrder = 1
object TemplateListBox: TListBox object TemplateListBox: TListBox
AnchorSideLeft.Control = TemplatesGroupBox AnchorSideLeft.Control = TemplatesGroupBox
@ -68,9 +68,9 @@ object CodeTemplateDialog: TCodeTemplateDialog
AnchorSideBottom.Control = TemplatesGroupBox AnchorSideBottom.Control = TemplatesGroupBox
AnchorSideBottom.Side = asrBottom AnchorSideBottom.Side = asrBottom
Left = 6 Left = 6
Height = 137 Height = 134
Top = 6 Top = 6
Width = 315 Width = 311
Anchors = [akTop, akLeft, akRight, akBottom] Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Left = 6 BorderSpacing.Left = 6
BorderSpacing.Top = 6 BorderSpacing.Top = 6
@ -84,7 +84,7 @@ object CodeTemplateDialog: TCodeTemplateDialog
AnchorSideTop.Control = TemplateListBox AnchorSideTop.Control = TemplateListBox
AnchorSideRight.Control = TemplatesGroupBox AnchorSideRight.Control = TemplatesGroupBox
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
Left = 327 Left = 323
Height = 30 Height = 30
Top = 6 Top = 6
Width = 148 Width = 148
@ -100,7 +100,7 @@ object CodeTemplateDialog: TCodeTemplateDialog
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = AddButton AnchorSideRight.Control = AddButton
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
Left = 327 Left = 323
Height = 30 Height = 30
Top = 42 Top = 42
Width = 148 Width = 148
@ -110,20 +110,20 @@ object CodeTemplateDialog: TCodeTemplateDialog
OnClick = DeleteButtonClick OnClick = DeleteButtonClick
TabOrder = 3 TabOrder = 3
end end
object EditButton: TButton object RenameButton: TButton
AnchorSideLeft.Control = AddButton AnchorSideLeft.Control = AddButton
AnchorSideTop.Control = DeleteButton AnchorSideTop.Control = DeleteButton
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = DeleteButton AnchorSideRight.Control = DeleteButton
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
Left = 327 Left = 323
Height = 30 Height = 30
Top = 78 Top = 78
Width = 148 Width = 148
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 6 BorderSpacing.Top = 6
Caption = 'EditButton' Caption = 'RenameButton'
OnClick = EditButtonClick OnClick = RenameButtonClick
TabOrder = 2 TabOrder = 2
end end
end end
@ -132,20 +132,20 @@ object CodeTemplateDialog: TCodeTemplateDialog
AnchorSideRight.Control = Owner AnchorSideRight.Control = Owner
AnchorSideBottom.Control = FilenameGroupBox AnchorSideBottom.Control = FilenameGroupBox
Left = 6 Left = 6
Height = 268 Height = 260
Top = 236 Top = 236
Width = 485 Width = 485
Align = alClient Align = alClient
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'EditTemplateGroupBox' Caption = 'EditTemplateGroupBox'
ClientHeight = 250 ClientHeight = 239
ClientWidth = 481 ClientWidth = 477
TabOrder = 2 TabOrder = 2
object UseMacrosCheckBox: TCheckBox object UseMacrosCheckBox: TCheckBox
Left = 6 Left = 6
Height = 17 Height = 22
Top = 6 Top = 6
Width = 117 Width = 171
BorderSpacing.Bottom = 7 BorderSpacing.Bottom = 7
Caption = 'UseMacrosCheckBox' Caption = 'UseMacrosCheckBox'
ParentShowHint = False ParentShowHint = False
@ -158,10 +158,10 @@ object CodeTemplateDialog: TCodeTemplateDialog
AnchorSideTop.Control = UseMacrosCheckBox AnchorSideTop.Control = UseMacrosCheckBox
AnchorSideTop.Side = asrCenter AnchorSideTop.Side = asrCenter
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
Left = 149 Left = 203
Height = 23 Height = 27
Top = 3 Top = 4
Width = 116 Width = 148
AutoSize = True AutoSize = True
BorderSpacing.Left = 20 BorderSpacing.Left = 20
BorderSpacing.Around = 6 BorderSpacing.Around = 6
@ -177,9 +177,9 @@ object CodeTemplateDialog: TCodeTemplateDialog
AnchorSideBottom.Control = EditTemplateGroupBox AnchorSideBottom.Control = EditTemplateGroupBox
AnchorSideBottom.Side = asrBottom AnchorSideBottom.Side = asrBottom
Left = 6 Left = 6
Height = 155 Height = 125
Top = 89 Top = 108
Width = 469 Width = 465
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Anchors = [akTop, akLeft, akRight, akBottom] Anchors = [akTop, akLeft, akRight, akBottom]
Font.Height = -14 Font.Height = -14
@ -800,9 +800,9 @@ object CodeTemplateDialog: TCodeTemplateDialog
AnchorSideRight.Control = EditTemplateGroupBox AnchorSideRight.Control = EditTemplateGroupBox
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
Left = 6 Left = 6
Height = 30 Height = 39
Top = 53 Top = 63
Width = 469 Width = 465
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
AutoFill = True AutoFill = True
AutoSize = True AutoSize = True
@ -825,9 +825,9 @@ object CodeTemplateDialog: TCodeTemplateDialog
AnchorSideTop.Control = UseMacrosCheckBox AnchorSideTop.Control = UseMacrosCheckBox
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 6 Left = 6
Height = 17 Height = 22
Top = 30 Top = 35
Width = 139 Width = 198
BorderSpacing.Top = 6 BorderSpacing.Top = 6
Caption = 'KeepSubIndentCheckBox' Caption = 'KeepSubIndentCheckBox'
ParentShowHint = False ParentShowHint = False
@ -837,8 +837,8 @@ object CodeTemplateDialog: TCodeTemplateDialog
end end
object ButtonPanel: TButtonPanel object ButtonPanel: TButtonPanel
Left = 6 Left = 6
Height = 26 Height = 34
Top = 510 Top = 502
Width = 485 Width = 485
OKButton.Name = 'OKButton' OKButton.Name = 'OKButton'
OKButton.Caption = '&OK' OKButton.Caption = '&OK'

View File

@ -73,7 +73,7 @@ type
InsertMacroButton: TButton; InsertMacroButton: TButton;
KeepSubIndentCheckBox: TCheckBox; KeepSubIndentCheckBox: TCheckBox;
UseMacrosCheckBox: TCheckBox; UseMacrosCheckBox: TCheckBox;
EditButton: TButton; RenameButton: TButton;
DeleteButton: TButton; DeleteButton: TButton;
TemplateListBox: TListBox; TemplateListBox: TListBox;
TemplateSynEdit: TSynEdit; TemplateSynEdit: TSynEdit;
@ -84,7 +84,7 @@ type
MainPopupMenu: TPopupMenu; MainPopupMenu: TPopupMenu;
procedure AddButtonClick(Sender: TObject); procedure AddButtonClick(Sender: TObject);
procedure DeleteButtonClick(Sender: TObject); procedure DeleteButtonClick(Sender: TObject);
procedure EditButtonClick(Sender: TObject); procedure RenameButtonClick(Sender: TObject);
procedure FilenameButtonClick(Sender: TObject); procedure FilenameButtonClick(Sender: TObject);
procedure FormClose(Sender: TObject; var CloseAction: TCloseAction); procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
procedure FormCreate(Sender: TObject); procedure FormCreate(Sender: TObject);
@ -913,10 +913,7 @@ begin
else begin else begin
AText:=Format(lisCodeTemplATokenAlreadyExists, ['"', TokenEdit.Text, '"']); AText:=Format(lisCodeTemplATokenAlreadyExists, ['"', TokenEdit.Text, '"']);
ACaption:=lisCodeTemplError; ACaption:=lisCodeTemplError;
// Application.MessageBox(PChar(AText),PChar(ACaption),0);
MessageDlg(ACaption,AText,mterror,[mbok],0); MessageDlg(ACaption,AText,mterror,[mbok],0);
end; end;
end; end;
@ -935,7 +932,7 @@ begin
// init captions // init captions
Caption:=dlgEdCodeTempl; Caption:=dlgEdCodeTempl;
AddButton.Caption:=lisCodeTemplAdd; AddButton.Caption:=lisCodeTemplAdd;
EditButton.Caption:=lisCodeToolsDefsEdit; RenameButton.Caption:=lisLazBuildRename;
DeleteButton.Caption:=dlgEdDelete; DeleteButton.Caption:=dlgEdDelete;
TemplatesGroupBox.Caption:=lisCTDTemplates; TemplatesGroupBox.Caption:=lisCTDTemplates;
@ -1097,7 +1094,7 @@ begin
end; end;
end; end;
procedure TCodeTemplateDialog.EditButtonClick(Sender: TObject); procedure TCodeTemplateDialog.RenameButtonClick(Sender: TObject);
var var
a, idx: LongInt; a, idx: LongInt;
begin begin