IDE: run params: disable parameters when using launching application

git-svn-id: trunk@53054 -
This commit is contained in:
mattias 2016-09-29 08:08:06 +00:00
parent 6d8475d239
commit 2db54d6dde
2 changed files with 67 additions and 58 deletions

View File

@ -8,10 +8,10 @@ object RunParamsOptsDlg: TRunParamsOptsDlg
ClientHeight = 501 ClientHeight = 501
ClientWidth = 500 ClientWidth = 500
Position = poScreenCenter Position = poScreenCenter
LCLVersion = '1.5' LCLVersion = '1.7'
object Notebook: TPageControl object Notebook: TPageControl
Left = 0 Left = 0
Height = 463 Height = 461
Top = 0 Top = 0
Width = 500 Width = 500
ActivePage = GeneralPage ActivePage = GeneralPage
@ -21,25 +21,25 @@ object RunParamsOptsDlg: TRunParamsOptsDlg
TabOrder = 0 TabOrder = 0
object GeneralPage: TTabSheet object GeneralPage: TTabSheet
Caption = 'GeneralPage' Caption = 'GeneralPage'
ClientHeight = 435 ClientHeight = 434
ClientWidth = 492 ClientWidth = 496
object DisplayGroupBox: TGroupBox object DisplayGroupBox: TGroupBox
Left = 6 Left = 6
Height = 80 Height = 80
Top = 214 Top = 212
Width = 480 Width = 484
Align = alTop Align = alTop
AutoSize = True AutoSize = True
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'DisplayGroupBox' Caption = 'DisplayGroupBox'
ClientHeight = 60 ClientHeight = 65
ClientWidth = 476 ClientWidth = 480
TabOrder = 3 TabOrder = 3
object DisplayEdit: TEdit object DisplayEdit: TEdit
Left = 6 Left = 6
Height = 23 Height = 23
Top = 31 Top = 36
Width = 464 Width = 468
Align = alTop Align = alTop
BorderSpacing.Around = 6 BorderSpacing.Around = 6
TabOrder = 1 TabOrder = 1
@ -47,9 +47,9 @@ object RunParamsOptsDlg: TRunParamsOptsDlg
end end
object UseDisplayCheckBox: TCheckBox object UseDisplayCheckBox: TCheckBox
Left = 6 Left = 6
Height = 19 Height = 24
Top = 6 Top = 6
Width = 464 Width = 468
Align = alTop Align = alTop
BorderSpacing.Left = 6 BorderSpacing.Left = 6
BorderSpacing.Top = 6 BorderSpacing.Top = 6
@ -61,76 +61,77 @@ object RunParamsOptsDlg: TRunParamsOptsDlg
end end
object CmdLineParametersGroupBox: TGroupBox object CmdLineParametersGroupBox: TGroupBox
Left = 6 Left = 6
Height = 55 Height = 54
Top = 67 Top = 62
Width = 480 Width = 484
Align = alTop Align = alTop
AutoSize = True AutoSize = True
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'CmdLineParametersGroupBox' Caption = 'CmdLineParametersGroupBox'
ClientHeight = 35 ClientHeight = 39
ClientWidth = 476 ClientWidth = 480
TabOrder = 1 TabOrder = 1
object CmdLineParametersComboBox: TComboBox object CmdLineParametersComboBox: TComboBox
Left = 6 Left = 6
Height = 23 Height = 27
Top = 6 Top = 6
Width = 464 Width = 468
Align = alTop Align = alTop
BorderSpacing.Around = 6 BorderSpacing.Around = 6
ItemHeight = 15 ItemHeight = 0
TabOrder = 0 TabOrder = 0
Text = 'CmdLineParametersComboBox' Text = 'CmdLineParametersComboBox'
end end
end end
object UseLaunchingApplicationGroupBox: TGroupBox object UseLaunchingApplicationGroupBox: TGroupBox
Left = 6 Left = 6
Height = 80 Height = 84
Top = 128 Top = 122
Width = 480 Width = 484
Align = alTop Align = alTop
AutoSize = True AutoSize = True
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'UseLaunchingApplicationGroupBox' Caption = 'UseLaunchingApplicationGroupBox'
ClientHeight = 60 ClientHeight = 69
ClientWidth = 476 ClientWidth = 480
TabOrder = 2 TabOrder = 2
object UseLaunchingApplicationCheckBox: TCheckBox object UseLaunchingApplicationCheckBox: TCheckBox
Left = 6 Left = 6
Height = 19 Height = 24
Top = 6 Top = 6
Width = 464 Width = 468
Align = alTop Align = alTop
BorderSpacing.Left = 6 BorderSpacing.Left = 6
BorderSpacing.Top = 6 BorderSpacing.Top = 6
BorderSpacing.Right = 6 BorderSpacing.Right = 6
BorderSpacing.Bottom = 6 BorderSpacing.Bottom = 6
Caption = 'UseLaunchingApplicationCheckBox' Caption = 'UseLaunchingApplicationCheckBox'
OnChange = UseLaunchingApplicationCheckBoxChange
TabOrder = 0 TabOrder = 0
end end
object UseLaunchingApplicationComboBox: TComboBox object UseLaunchingApplicationComboBox: TComboBox
Left = 6 Left = 6
Height = 23 Height = 27
Top = 31 Top = 36
Width = 464 Width = 468
Align = alTop Align = alTop
BorderSpacing.Around = 6 BorderSpacing.Around = 6
ItemHeight = 15 ItemHeight = 0
TabOrder = 1 TabOrder = 1
Text = 'UseLaunchingApplicationComboBox' Text = 'UseLaunchingApplicationComboBox'
end end
end end
object HostApplicationGroupBox: TGroupBox object HostApplicationGroupBox: TGroupBox
Left = 6 Left = 6
Height = 55 Height = 50
Top = 6 Top = 6
Width = 480 Width = 484
Align = alTop Align = alTop
AutoSize = True AutoSize = True
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'HostApplicationGroupBox' Caption = 'HostApplicationGroupBox'
ClientHeight = 35 ClientHeight = 35
ClientWidth = 476 ClientWidth = 480
TabOrder = 0 TabOrder = 0
object HostApplicationBrowseBtn: TButton object HostApplicationBrowseBtn: TButton
AnchorSideTop.Control = HostApplicationGroupBox AnchorSideTop.Control = HostApplicationGroupBox
@ -138,10 +139,10 @@ object RunParamsOptsDlg: TRunParamsOptsDlg
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = HostApplicationEdit AnchorSideBottom.Control = HostApplicationEdit
AnchorSideBottom.Side = asrBottom AnchorSideBottom.Side = asrBottom
Left = 302 Left = 314
Height = 23 Height = 23
Top = 6 Top = 6
Width = 168 Width = 160
Anchors = [akTop, akRight, akBottom] Anchors = [akTop, akRight, akBottom]
AutoSize = True AutoSize = True
BorderSpacing.Left = 6 BorderSpacing.Left = 6
@ -158,7 +159,7 @@ object RunParamsOptsDlg: TRunParamsOptsDlg
Left = 6 Left = 6
Height = 23 Height = 23
Top = 6 Top = 6
Width = 290 Width = 302
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
BorderSpacing.Around = 6 BorderSpacing.Around = 6
TabOrder = 0 TabOrder = 0
@ -167,15 +168,15 @@ object RunParamsOptsDlg: TRunParamsOptsDlg
end end
object WorkingDirectoryGroupBox: TGroupBox object WorkingDirectoryGroupBox: TGroupBox
Left = 6 Left = 6
Height = 55 Height = 54
Top = 300 Top = 298
Width = 480 Width = 484
Align = alTop Align = alTop
AutoSize = True AutoSize = True
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'WorkingDirectoryGroupBox' Caption = 'WorkingDirectoryGroupBox'
ClientHeight = 35 ClientHeight = 39
ClientWidth = 476 ClientWidth = 480
TabOrder = 4 TabOrder = 4
object WorkingDirectoryBtn: TButton object WorkingDirectoryBtn: TButton
AnchorSideTop.Control = WorkingDirectoryGroupBox AnchorSideTop.Control = WorkingDirectoryGroupBox
@ -183,10 +184,10 @@ object RunParamsOptsDlg: TRunParamsOptsDlg
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = WorkingDirectoryComboBox AnchorSideBottom.Control = WorkingDirectoryComboBox
AnchorSideBottom.Side = asrBottom AnchorSideBottom.Side = asrBottom
Left = 333 Left = 343
Height = 23 Height = 27
Top = 6 Top = 6
Width = 137 Width = 131
Anchors = [akTop, akRight, akBottom] Anchors = [akTop, akRight, akBottom]
AutoSize = True AutoSize = True
BorderSpacing.Top = 6 BorderSpacing.Top = 6
@ -200,12 +201,12 @@ object RunParamsOptsDlg: TRunParamsOptsDlg
AnchorSideTop.Control = WorkingDirectoryGroupBox AnchorSideTop.Control = WorkingDirectoryGroupBox
AnchorSideRight.Control = WorkingDirectoryBtn AnchorSideRight.Control = WorkingDirectoryBtn
Left = 6 Left = 6
Height = 23 Height = 27
Top = 6 Top = 6
Width = 321 Width = 331
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
BorderSpacing.Around = 6 BorderSpacing.Around = 6
ItemHeight = 15 ItemHeight = 0
TabOrder = 0 TabOrder = 0
Text = 'WorkingDirectoryComboBox' Text = 'WorkingDirectoryComboBox'
end end
@ -213,8 +214,8 @@ object RunParamsOptsDlg: TRunParamsOptsDlg
end end
object EnvVarsPage: TTabSheet object EnvVarsPage: TTabSheet
Caption = 'EnvVarsPage' Caption = 'EnvVarsPage'
ClientHeight = 435 ClientHeight = 434
ClientWidth = 492 ClientWidth = 496
OnResize = EnvVarsPageResize OnResize = EnvVarsPageResize
object IncludeSystemVariablesCheckBox: TCheckBox object IncludeSystemVariablesCheckBox: TCheckBox
AnchorSideLeft.Control = EnvVarsPage AnchorSideLeft.Control = EnvVarsPage
@ -242,7 +243,7 @@ object RunParamsOptsDlg: TRunParamsOptsDlg
Anchors = [akTop, akLeft, akRight, akBottom] Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'UserOverridesGroupBox' Caption = 'UserOverridesGroupBox'
ClientHeight = 155 ClientHeight = 160
ClientWidth = 476 ClientWidth = 476
TabOrder = 1 TabOrder = 1
object UserOverridesListView: TListView object UserOverridesListView: TListView
@ -261,12 +262,12 @@ object RunParamsOptsDlg: TRunParamsOptsDlg
item item
AutoSize = True AutoSize = True
Caption = 'Caption' Caption = 'Caption'
Width = 460 Width = 52
end end
item item
AutoSize = True AutoSize = True
Caption = 'Caption' Caption = 'Caption'
Width = 54 Width = 394
end> end>
RowSelect = True RowSelect = True
SortType = stText SortType = stText
@ -332,7 +333,7 @@ object RunParamsOptsDlg: TRunParamsOptsDlg
Anchors = [akTop, akLeft, akRight, akBottom] Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'SystemVariablesGroupBox' Caption = 'SystemVariablesGroupBox'
ClientHeight = 197 ClientHeight = 202
ClientWidth = 476 ClientWidth = 476
TabOrder = 0 TabOrder = 0
object SystemVariablesListView: TListView object SystemVariablesListView: TListView
@ -350,12 +351,12 @@ object RunParamsOptsDlg: TRunParamsOptsDlg
item item
AutoSize = True AutoSize = True
Caption = 'Caption' Caption = 'Caption'
Width = 460 Width = 52
end end
item item
AutoSize = True AutoSize = True
Caption = 'Caption' Caption = 'Caption'
Width = 54 Width = 394
end> end>
ReadOnly = True ReadOnly = True
RowSelect = True RowSelect = True
@ -368,8 +369,8 @@ object RunParamsOptsDlg: TRunParamsOptsDlg
end end
object ButtonPanel: TButtonPanel object ButtonPanel: TButtonPanel
Left = 6 Left = 6
Height = 26 Height = 28
Top = 469 Top = 467
Width = 488 Width = 488
OKButton.Name = 'OKButton' OKButton.Name = 'OKButton'
OKButton.DefaultCaption = True OKButton.DefaultCaption = True

View File

@ -115,6 +115,7 @@ type
procedure HelpButtonClick(Sender: TObject); procedure HelpButtonClick(Sender: TObject);
procedure OkButtonClick(Sender: TObject); procedure OkButtonClick(Sender: TObject);
procedure HostApplicationBrowseBtnClick(Sender: TObject); procedure HostApplicationBrowseBtnClick(Sender: TObject);
procedure UseLaunchingApplicationCheckBoxChange(Sender: TObject);
procedure UserOverridesListViewSelectItem(Sender: TObject; {%H-}Item: TListItem; procedure UserOverridesListViewSelectItem(Sender: TObject; {%H-}Item: TListItem;
{%H-}Selected: Boolean); {%H-}Selected: Boolean);
procedure WorkingDirectoryBtnClick(Sender: TObject); procedure WorkingDirectoryBtnClick(Sender: TObject);
@ -482,6 +483,12 @@ begin
end; end;
end; end;
procedure TRunParamsOptsDlg.UseLaunchingApplicationCheckBoxChange(
Sender: TObject);
begin
CmdLineParametersGroupBox.Enabled:=not UseLaunchingApplicationCheckBox.Checked;
end;
procedure TRunParamsOptsDlg.UserOverridesListViewSelectItem(Sender: TObject; procedure TRunParamsOptsDlg.UserOverridesListViewSelectItem(Sender: TObject;
Item: TListItem; Selected: Boolean); Item: TListItem; Selected: Boolean);
var var
@ -641,6 +648,7 @@ begin
// UseLaunchingApplicationComboBox // UseLaunchingApplicationComboBox
UseLaunchingApplicationCheckBox.Checked := fOptions.UseLaunchingApplication; UseLaunchingApplicationCheckBox.Checked := fOptions.UseLaunchingApplication;
CmdLineParametersGroupBox.Enabled:=not UseLaunchingApplicationCheckBox.Checked;
List := InputHistories.HistoryLists.GetList(hlLaunchingApplication,true,rltFile); List := InputHistories.HistoryLists.GetList(hlLaunchingApplication,true,rltFile);
List.AppendEntry(fOptions.LaunchingApplicationPathPlusParams); List.AppendEntry(fOptions.LaunchingApplicationPathPlusParams);
S := FindTerminalInPath; S := FindTerminalInPath;