IDE: Remove a Checkbox for creating Debug and Release modes in Build Modes manager. Can be done by setting compiler options as default.

git-svn-id: trunk@51163 -
This commit is contained in:
juha 2016-01-03 14:53:21 +00:00
parent 1c326b667f
commit afa4f54991
3 changed files with 22 additions and 63 deletions

View File

@ -12,36 +12,34 @@ object BuildModesForm: TBuildModesForm
OnDestroy = FormDestroy
OnShow = FormShow
Position = poScreenCenter
LCLVersion = '1.5'
LCLVersion = '1.7'
object ButtonPanel1: TButtonPanel
Left = 6
Height = 29
Top = 319
Height = 32
Top = 316
Width = 600
OKButton.Name = 'OKButton'
OKButton.DefaultCaption = True
OKButton.OnClick = OKButtonClick
HelpButton.Name = 'HelpButton'
HelpButton.DefaultCaption = True
CloseButton.Name = 'CloseButton'
CloseButton.DefaultCaption = True
CancelButton.Name = 'CancelButton'
CancelButton.DefaultCaption = True
CancelButton.OnClick = CancelButtonClick
TabOrder = 2
ShowButtons = [pbOK, pbCancel, pbHelp]
ShowBevel = False
end
object ToolBar1: TToolBar
AnchorSideLeft.Control = cbDebugReleaseProject
AnchorSideTop.Control = cbDebugReleaseProject
AnchorSideLeft.Control = btnCreateDefaultModes
AnchorSideTop.Control = btnCreateDefaultModes
AnchorSideTop.Side = asrBottom
Left = 6
Height = 28
Top = 37
Top = 39
Width = 154
Align = alNone
BorderSpacing.Top = 9
BorderSpacing.Top = 6
ButtonHeight = 26
ButtonWidth = 26
Caption = 'ToolBar1'
@ -106,8 +104,8 @@ object BuildModesForm: TBuildModesForm
AnchorSideTop.Side = asrCenter
Left = 166
Height = 17
Top = 43
Width = 56
Top = 45
Width = 66
BorderSpacing.Left = 6
Caption = 'NoteLabel'
Font.Color = clMaroon
@ -120,8 +118,8 @@ object BuildModesForm: TBuildModesForm
AnchorSideTop.Control = ToolBar1
AnchorSideTop.Side = asrBottom
Left = 6
Height = 244
Top = 71
Height = 242
Top = 73
Width = 602
Anchors = [akTop, akLeft, akRight, akBottom]
AutoFillColumns = True
@ -132,13 +130,13 @@ object BuildModesForm: TBuildModesForm
ButtonStyle = cbsCheckboxColumn
MaxSize = 50
Title.Caption = 'Active'
Width = 199
Width = 200
end
item
ButtonStyle = cbsCheckboxColumn
MaxSize = 50
Title.Caption = 'InSession'
Width = 199
Width = 200
end
item
MaxSize = 500
@ -154,42 +152,26 @@ object BuildModesForm: TBuildModesForm
OnSelection = BuildModesStringGridSelection
OnValidateEntry = BuildModesStringGridValidateEntry
ColWidths = (
199
199
200
200
200
)
end
object cbDebugReleaseProject: TCheckBox
object btnCreateDefaultModes: TButton
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = Owner
Left = 6
Height = 22
Height = 27
Top = 6
Width = 310
BorderSpacing.Left = 6
BorderSpacing.Top = 6
Caption = 'Create Debug and Release modes for new projects'
OnClick = cbDebugReleaseProjectClick
ParentShowHint = False
ShowHint = True
TabOrder = 3
end
object btnCreateDefaultModes: TButton
AnchorSideLeft.Control = cbDebugReleaseProject
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = cbDebugReleaseProject
AnchorSideTop.Side = asrCenter
Left = 322
Height = 29
Top = 3
Width = 162
Width = 183
AutoSize = True
BorderSpacing.Left = 6
BorderSpacing.Top = 6
Caption = 'Create now for this project'
OnClick = btnCreateDefaultModesClick
ParentShowHint = False
ShowHint = True
TabOrder = 4
TabOrder = 3
end
object BuildModesPopupMenu: TPopupMenu
left = 168

View File

@ -43,7 +43,6 @@ type
TBuildModesForm = class(TForm)
btnCreateDefaultModes: TButton;
BuildModesStringGrid: TStringGrid;
cbDebugReleaseProject: TCheckBox;
ImageList1: TImageList;
BuildModesPopupMenu: TPopupMenu;
ButtonPanel1: TButtonPanel;
@ -59,8 +58,6 @@ type
procedure btnCreateDefaultModesClick(Sender: TObject);
procedure BuildModesStringGridDrawCell(Sender: TObject;
aCol, aRow: Integer; aRect: TRect; {%H-}aState: TGridDrawState);
procedure CancelButtonClick(Sender: TObject);
procedure cbDebugReleaseProjectClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
procedure DiffSpeedButtonClick(Sender: TObject);
@ -75,7 +72,6 @@ type
procedure BuildModesStringGridValidateEntry(Sender: TObject;
aCol, aRow: Integer; const OldValue: string; var NewValue: String);
procedure FormShow(Sender: TObject);
procedure OKButtonClick(Sender: TObject);
private
fActiveBuildMode: TProjectBuildMode;
fBuildModes: TProjectBuildModes;
@ -500,10 +496,7 @@ begin
ToolButtonMoveDown.Hint:=Format(lisMoveOnePositionDown, [Identifier]);
ToolButtonDiff.Hint:=lisShowDifferencesBetweenModes;
NoteLabel.Caption:='';
cbDebugReleaseProject.Caption:=lisCreateDebugAndReleaseModesNewProj;
//cbDebugReleaseProject.Hint:='Under Construction ...'; // Remove this when implemented.
btnCreateDefaultModes.Caption:=lisCreateNowForThisProject;
btnCreateDefaultModes.Caption:=lisCreateDebugAndReleaseModes;
btnCreateDefaultModes.Hint:=''; // ToDo: Figure out a good hint.
btnCreateDefaultModes.Visible := (fBuildModes.Find(DebugModeName)=Nil)
and (fBuildModes.Find(ReleaseModeName)=Nil);
@ -561,21 +554,6 @@ begin
Result:=fBuildModes[i];
end;
procedure TBuildModesForm.OKButtonClick(Sender: TObject);
begin
;
end;
procedure TBuildModesForm.CancelButtonClick(Sender: TObject);
begin
;
end;
procedure TBuildModesForm.cbDebugReleaseProjectClick(Sender: TObject);
begin
//(Sender as TCheckBox).Checked := False;
end;
procedure TBuildModesForm.BuildModesStringGridDrawCell(Sender: TObject;
aCol, aRow: Integer; aRect: TRect; aState: TGridDrawState);
begin

View File

@ -5817,8 +5817,7 @@ resourcestring
lisMoveOnePositionDown = 'Move "%s" one position down';
lisShowDifferencesBetweenModes = 'Show differences between modes ...';
lisBuildMode = 'Build Mode: %s';
lisCreateDebugAndReleaseModesNewProj = 'Create Debug and Release modes for new projects';
lisCreateNowForThisProject = 'Create now for this project';
lisCreateDebugAndReleaseModes = 'Create Debug and Release modes';
lisChangeBuildMode = 'Change build mode';
lisWarningThisIsTheMainUnitTheNewMainUnitWillBePas = '%sWarning: This is '
+'the main unit. The new main unit will be %s.pas.';