mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-15 07:19:16 +02:00
IDE: run parameters dialog: fixed comboboxes list containing current value
git-svn-id: trunk@32607 -
This commit is contained in:
parent
4cec37047a
commit
7136bc4b7a
@ -391,9 +391,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TRunParamsOptsDlg.SetupLocalPage;
|
procedure TRunParamsOptsDlg.SetupLocalPage;
|
||||||
var
|
|
||||||
List: THistoryList;
|
|
||||||
S: String;
|
|
||||||
begin
|
begin
|
||||||
HostApplicationGroupBox.Caption := dlgHostApplication;
|
HostApplicationGroupBox.Caption := dlgHostApplication;
|
||||||
HostApplicationBrowseBtn.Caption := '...';
|
HostApplicationBrowseBtn.Caption := '...';
|
||||||
@ -406,29 +403,6 @@ begin
|
|||||||
DisplayGroupBox.Caption := dlgRunODisplay;
|
DisplayGroupBox.Caption := dlgRunODisplay;
|
||||||
UseDisplayCheckBox.Caption := dlgRunOUsedisplay;
|
UseDisplayCheckBox.Caption := dlgRunOUsedisplay;
|
||||||
DisplayEdit.Parent := DisplayGroupBox;
|
DisplayEdit.Parent := DisplayGroupBox;
|
||||||
|
|
||||||
// history list: WorkingDirectoryComboBox
|
|
||||||
List:=InputHistories.HistoryLists.GetList(hlWorkingDirectory,true);
|
|
||||||
WorkingDirectoryComboBox.Items.Assign(List);
|
|
||||||
|
|
||||||
// history list: UseLaunchingApplicationComboBox
|
|
||||||
List := InputHistories.HistoryLists.GetList(hlLaunchingApplication,true);
|
|
||||||
S := FindTerminalInPath;
|
|
||||||
if S <> '' then
|
|
||||||
List.AppendEntry(S);
|
|
||||||
{$IFNDEF MSWINDOWS}
|
|
||||||
S := FindTerminalInPath('gnome-terminal');
|
|
||||||
if S <> '' then
|
|
||||||
List.AppendEntry(S);
|
|
||||||
S := FindTerminalInPath('konsole');
|
|
||||||
if S <> '' then
|
|
||||||
List.AppendEntry(S);
|
|
||||||
{$ENDIF}
|
|
||||||
UseLaunchingApplicationComboBox.Items.Assign(List);
|
|
||||||
|
|
||||||
// history list: CmdLineParametersComboBox
|
|
||||||
List:=InputHistories.HistoryLists.GetList(hlCmdLineParameters,true);
|
|
||||||
CmdLineParametersComboBox.Items.Assign(List);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TRunParamsOptsDlg.SetupEnvironmentPage;
|
procedure TRunParamsOptsDlg.SetupEnvironmentPage;
|
||||||
@ -642,16 +616,45 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TRunParamsOptsDlg.SetOptions(NewOptions: TRunParamsOptions);
|
procedure TRunParamsOptsDlg.SetOptions(NewOptions: TRunParamsOptions);
|
||||||
|
var
|
||||||
|
List: THistoryList;
|
||||||
|
S: String;
|
||||||
begin
|
begin
|
||||||
fOptions := NewOptions;
|
fOptions := NewOptions;
|
||||||
|
|
||||||
// local
|
// local
|
||||||
HostApplicationEdit.Text := fOptions.HostApplicationFilename;
|
HostApplicationEdit.Text := fOptions.HostApplicationFilename;
|
||||||
CmdLineParametersComboBox.Text := fOptions.CmdLineParams;
|
|
||||||
UseLaunchingApplicationCheckBox.Checked := fOptions.UseLaunchingApplication;
|
// WorkingDirectoryComboBox
|
||||||
SetComboBoxText(UseLaunchingApplicationComboBox,
|
List:=InputHistories.HistoryLists.GetList(hlWorkingDirectory,true);
|
||||||
fOptions.LaunchingApplicationPathPlusParams);
|
List.AppendEntry(fOptions.WorkingDirectory);
|
||||||
|
WorkingDirectoryComboBox.Items.Assign(List);
|
||||||
WorkingDirectoryComboBox.Text := fOptions.WorkingDirectory;
|
WorkingDirectoryComboBox.Text := fOptions.WorkingDirectory;
|
||||||
|
|
||||||
|
// UseLaunchingApplicationComboBox
|
||||||
|
UseLaunchingApplicationCheckBox.Checked := fOptions.UseLaunchingApplication;
|
||||||
|
List := InputHistories.HistoryLists.GetList(hlLaunchingApplication,true);
|
||||||
|
List.AppendEntry(fOptions.LaunchingApplicationPathPlusParams);
|
||||||
|
S := FindTerminalInPath;
|
||||||
|
if S <> '' then
|
||||||
|
List.AppendEntry(S);
|
||||||
|
{$IFNDEF MSWINDOWS}
|
||||||
|
S := FindTerminalInPath('gnome-terminal');
|
||||||
|
if S <> '' then
|
||||||
|
List.AppendEntry(S);
|
||||||
|
S := FindTerminalInPath('konsole');
|
||||||
|
if S <> '' then
|
||||||
|
List.AppendEntry(S);
|
||||||
|
{$ENDIF}
|
||||||
|
UseLaunchingApplicationComboBox.Items.Assign(List);
|
||||||
|
UseLaunchingApplicationComboBox.Text:=fOptions.LaunchingApplicationPathPlusParams;
|
||||||
|
|
||||||
|
// CmdLineParametersComboBox
|
||||||
|
List:=InputHistories.HistoryLists.GetList(hlCmdLineParameters,true);
|
||||||
|
List.AppendEntry(fOptions.CmdLineParams);
|
||||||
|
CmdLineParametersComboBox.Items.Assign(List);
|
||||||
|
CmdLineParametersComboBox.Text := fOptions.CmdLineParams;
|
||||||
|
|
||||||
UseDisplayCheckBox.Checked := fOptions.UseDisplay;
|
UseDisplayCheckBox.Checked := fOptions.UseDisplay;
|
||||||
DisplayEdit.Text := fOptions.Display;
|
DisplayEdit.Text := fOptions.Display;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user