IDE: Options page to specify type of project created on startup + other startup options. Issue #38105.

git-svn-id: trunk@64781 -
This commit is contained in:
juha 2021-03-10 19:53:06 +00:00
parent 207dee8890
commit 63fc1a91aa
11 changed files with 421 additions and 176 deletions

2
.gitattributes vendored
View File

@ -7480,6 +7480,8 @@ ide/frames/help_general_options.lfm svneol=native#text/plain
ide/frames/help_general_options.pas svneol=native#text/plain ide/frames/help_general_options.pas svneol=native#text/plain
ide/frames/idecoolbar_options.lfm svneol=native#text/plain ide/frames/idecoolbar_options.lfm svneol=native#text/plain
ide/frames/idecoolbar_options.pas svneol=native#text/pascal ide/frames/idecoolbar_options.pas svneol=native#text/pascal
ide/frames/idestartup_options.lfm svneol=native#text/plain
ide/frames/idestartup_options.pas svneol=native#text/pascal
ide/frames/modematrixctrl.pas svneol=native#text/plain ide/frames/modematrixctrl.pas svneol=native#text/plain
ide/frames/msgwnd_options.lfm svneol=native#text/plain ide/frames/msgwnd_options.lfm svneol=native#text/plain
ide/frames/msgwnd_options.pas svneol=native#text/plain ide/frames/msgwnd_options.pas svneol=native#text/plain

View File

@ -161,6 +161,7 @@ const
EnvOptionsOI = 500; EnvOptionsOI = 500;
EnvOptionsMessages = 550; EnvOptionsMessages = 550;
EnvOptionsFpDoc = 600; EnvOptionsFpDoc = 600;
EnvOptionsIdeStartup = 650;
EnvOptionsBackup = 700; EnvOptionsBackup = 700;
EnvOptionsNaming = 800; EnvOptionsNaming = 800;
EnvOptionsFileFilters = 900; EnvOptionsFileFilters = 900;

View File

@ -681,6 +681,7 @@ type
FRecentPackageFiles: TStringList; FRecentPackageFiles: TStringList;
FMaxRecentPackageFiles: integer; FMaxRecentPackageFiles: integer;
FOpenLastProjectAtStart: boolean; FOpenLastProjectAtStart: boolean;
FNewProjectTemplateAtStart: string;
FMultipleInstances: TIDEMultipleInstancesOption; FMultipleInstances: TIDEMultipleInstancesOption;
// Prevent repopulating Recent project files menu with example projects if it was already cleared up. // Prevent repopulating Recent project files menu with example projects if it was already cleared up.
FAlreadyPopulatedRecentFiles : Boolean; FAlreadyPopulatedRecentFiles : Boolean;
@ -979,6 +980,8 @@ type
property LastOpenPackages: TLastOpenPackagesList read FLastOpenPackages; property LastOpenPackages: TLastOpenPackagesList read FLastOpenPackages;
property OpenLastProjectAtStart: boolean read FOpenLastProjectAtStart property OpenLastProjectAtStart: boolean read FOpenLastProjectAtStart
write FOpenLastProjectAtStart; write FOpenLastProjectAtStart;
property NewProjectTemplateAtStart: string read FNewProjectTemplateAtStart
write FNewProjectTemplateAtStart;
property MultipleInstances: TIDEMultipleInstancesOption read FMultipleInstances property MultipleInstances: TIDEMultipleInstancesOption read FMultipleInstances
write FMultipleInstances; write FMultipleInstances;
property FileDialogFilter: string read FFileDialogFilter write FFileDialogFilter; property FileDialogFilter: string read FFileDialogFilter write FFileDialogFilter;
@ -2576,6 +2579,7 @@ begin
FAutoSaveIntervalInSecs:=FXMLCfg.GetValue(Path+'AutoSave/IntervalInSecs',DefaultAutoSaveIntervalInSecs); FAutoSaveIntervalInSecs:=FXMLCfg.GetValue(Path+'AutoSave/IntervalInSecs',DefaultAutoSaveIntervalInSecs);
FLastSavedProjectFile:=FXMLCfg.GetValue(Path+'AutoSave/LastSavedProjectFile',''); FLastSavedProjectFile:=FXMLCfg.GetValue(Path+'AutoSave/LastSavedProjectFile','');
FOpenLastProjectAtStart:=FXMLCfg.GetValue(Path+'AutoSave/OpenLastProjectAtStart',true); FOpenLastProjectAtStart:=FXMLCfg.GetValue(Path+'AutoSave/OpenLastProjectAtStart',true);
FNewProjectTemplateAtStart:=FXMLCfg.GetValue(Path+'NewProjectTemplateAtStart/Value','Application');
FShowCompileDialog:=FXMLCfg.GetValue(Path+'ShowCompileDialog/Value',false); FShowCompileDialog:=FXMLCfg.GetValue(Path+'ShowCompileDialog/Value',false);
FAutoCloseCompileDialog:=FXMLCfg.GetValue(Path+'AutoCloseCompileDialog/Value',false); FAutoCloseCompileDialog:=FXMLCfg.GetValue(Path+'AutoCloseCompileDialog/Value',false);
FAutoSaveActiveDesktop:=FXMLCfg.GetValue(Path+'AutoSave/ActiveDesktop',True); FAutoSaveActiveDesktop:=FXMLCfg.GetValue(Path+'AutoSave/ActiveDesktop',True);
@ -2951,6 +2955,8 @@ begin
FXMLCfg.SetDeleteValue(Path+'AutoSave/IntervalInSecs',FAutoSaveIntervalInSecs,DefaultAutoSaveIntervalInSecs); FXMLCfg.SetDeleteValue(Path+'AutoSave/IntervalInSecs',FAutoSaveIntervalInSecs,DefaultAutoSaveIntervalInSecs);
FXMLCfg.SetDeleteValue(Path+'AutoSave/LastSavedProjectFile',FLastSavedProjectFile,''); FXMLCfg.SetDeleteValue(Path+'AutoSave/LastSavedProjectFile',FLastSavedProjectFile,'');
FXMLCfg.SetDeleteValue(Path+'AutoSave/OpenLastProjectAtStart',FOpenLastProjectAtStart,true); FXMLCfg.SetDeleteValue(Path+'AutoSave/OpenLastProjectAtStart',FOpenLastProjectAtStart,true);
FXMLCfg.SetDeleteValue(Path+'NewProjectTemplateAtStart/Value',FNewProjectTemplateAtStart,'Application');
FXMLCfg.SetDeleteValue(Path+'AutoSave/ActiveDesktop', FAutoSaveActiveDesktop, True); FXMLCfg.SetDeleteValue(Path+'AutoSave/ActiveDesktop', FAutoSaveActiveDesktop, True);
FXMLCfg.DeletePath(Path+'AutoSave/LastOpenPackages/'); FXMLCfg.DeletePath(Path+'AutoSave/LastOpenPackages/');
if FOpenLastProjectAtStart then if FOpenLastProjectAtStart then

View File

@ -18,7 +18,7 @@
* * * *
*************************************************************************** ***************************************************************************
} }
unit desktop_options; unit Desktop_Options;
{$mode objfpc}{$H+} {$mode objfpc}{$H+}

View File

@ -15,9 +15,9 @@ object FilesOptionsFrame: TFilesOptionsFrame
AnchorSideLeft.Control = Owner AnchorSideLeft.Control = Owner
AnchorSideTop.Control = Owner AnchorSideTop.Control = Owner
Left = 2 Left = 2
Height = 15 Height = 18
Top = 2 Top = 2
Width = 139 Width = 161
Caption = 'MaxRecentOpenFilesLabel' Caption = 'MaxRecentOpenFilesLabel'
ParentColor = False ParentColor = False
end end
@ -25,48 +25,35 @@ object FilesOptionsFrame: TFilesOptionsFrame
AnchorSideLeft.Control = lblCenter AnchorSideLeft.Control = lblCenter
AnchorSideTop.Control = Owner AnchorSideTop.Control = Owner
Left = 314 Left = 314
Height = 15 Height = 18
Top = 2 Top = 2
Width = 147 Width = 170
BorderSpacing.Left = 3 BorderSpacing.Left = 3
Caption = 'MaxRecentProjectFilesLabel' Caption = 'MaxRecentProjectFilesLabel'
ParentColor = False ParentColor = False
end end
object OpenLastProjectAtStartCheckBox: TCheckBox object ShowCompileDialogCheckBox: TCheckBox
AnchorSideLeft.Control = Owner AnchorSideLeft.Control = Owner
AnchorSideTop.Control = MaxRecentOpenFilesSpin AnchorSideTop.Control = MaxRecentOpenFilesSpin
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
Left = 2 Left = 2
Height = 19 Height = 22
Top = 48 Top = 65
Width = 196 Width = 211
BorderSpacing.Top = 6 BorderSpacing.Top = 11
Caption = 'OpenLastProjectAtStartCheckBox'
TabOrder = 2
end
object ShowCompileDialogCheckBox: TCheckBox
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = MultipleInstancesComboBox
AnchorSideTop.Side = asrBottom
AnchorSideRight.Side = asrBottom
Left = 2
Height = 19
Top = 94
Width = 181
BorderSpacing.Top = 2
Caption = 'ShowCompileDialogCheckBox' Caption = 'ShowCompileDialogCheckBox'
OnChange = ShowCompileDialogCheckBoxChange OnChange = ShowCompileDialogCheckBoxChange
TabOrder = 4 TabOrder = 2
end end
object LazarusDirLabel: TLabel object LazarusDirLabel: TLabel
AnchorSideLeft.Control = Owner AnchorSideLeft.Control = Owner
AnchorSideTop.Control = AutoCloseCompileDialogCheckBox AnchorSideTop.Control = AutoCloseCompileDialogCheckBox
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 2 Left = 2
Height = 15 Height = 18
Top = 142 Top = 119
Width = 82 Width = 98
BorderSpacing.Top = 10 BorderSpacing.Top = 10
Caption = 'LazarusDirLabel' Caption = 'LazarusDirLabel'
ParentColor = False ParentColor = False
@ -79,13 +66,13 @@ object FilesOptionsFrame: TFilesOptionsFrame
AnchorSideBottom.Control = LazarusDirComboBox AnchorSideBottom.Control = LazarusDirComboBox
AnchorSideBottom.Side = asrBottom AnchorSideBottom.Side = asrBottom
Left = 597 Left = 597
Height = 23 Height = 32
Top = 157 Top = 137
Width = 23 Width = 23
Anchors = [akTop, akRight, akBottom] Anchors = [akTop, akRight, akBottom]
Caption = '...' Caption = '...'
OnClick = DirectoriesButtonClick OnClick = DirectoriesButtonClick
TabOrder = 7 TabOrder = 5
end end
object LazarusDirComboBox: TComboBox object LazarusDirComboBox: TComboBox
AnchorSideLeft.Control = Owner AnchorSideLeft.Control = Owner
@ -93,12 +80,12 @@ object FilesOptionsFrame: TFilesOptionsFrame
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = LazarusDirButton AnchorSideRight.Control = LazarusDirButton
Left = 2 Left = 2
Height = 23 Height = 32
Top = 157 Top = 137
Width = 595 Width = 595
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
ItemHeight = 15 ItemHeight = 24
TabOrder = 6 TabOrder = 4
Text = 'LazarusDirComboBox' Text = 'LazarusDirComboBox'
end end
object CompilerPathComboBox: TComboBox object CompilerPathComboBox: TComboBox
@ -107,12 +94,12 @@ object FilesOptionsFrame: TFilesOptionsFrame
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = CompilerPathButton AnchorSideRight.Control = CompilerPathButton
Left = 2 Left = 2
Height = 23 Height = 32
Top = 201 Top = 193
Width = 595 Width = 595
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
ItemHeight = 15 ItemHeight = 24
TabOrder = 8 TabOrder = 6
Text = 'CompilerPathComboBox' Text = 'CompilerPathComboBox'
end end
object CompilerPathButton: TButton object CompilerPathButton: TButton
@ -122,22 +109,22 @@ object FilesOptionsFrame: TFilesOptionsFrame
AnchorSideBottom.Control = CompilerPathComboBox AnchorSideBottom.Control = CompilerPathComboBox
AnchorSideBottom.Side = asrBottom AnchorSideBottom.Side = asrBottom
Left = 597 Left = 597
Height = 23 Height = 32
Top = 201 Top = 193
Width = 23 Width = 23
Anchors = [akTop, akRight, akBottom] Anchors = [akTop, akRight, akBottom]
Caption = '...' Caption = '...'
OnClick = FilesButtonClick OnClick = FilesButtonClick
TabOrder = 9 TabOrder = 7
end end
object CompilerPathLabel: TLabel object CompilerPathLabel: TLabel
AnchorSideLeft.Control = Owner AnchorSideLeft.Control = Owner
AnchorSideTop.Control = LazarusDirComboBox AnchorSideTop.Control = LazarusDirComboBox
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 2 Left = 2
Height = 15 Height = 18
Top = 186 Top = 175
Width = 101 Width = 117
BorderSpacing.Top = 6 BorderSpacing.Top = 6
Caption = 'CompilerPathLabel' Caption = 'CompilerPathLabel'
ParentColor = False ParentColor = False
@ -148,12 +135,12 @@ object FilesOptionsFrame: TFilesOptionsFrame
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = FPCSourceDirButton AnchorSideRight.Control = FPCSourceDirButton
Left = 2 Left = 2
Height = 23 Height = 32
Top = 245 Top = 249
Width = 595 Width = 595
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
ItemHeight = 15 ItemHeight = 24
TabOrder = 10 TabOrder = 8
Text = 'FPCSourceDirComboBox' Text = 'FPCSourceDirComboBox'
end end
object FPCSourceDirButton: TButton object FPCSourceDirButton: TButton
@ -163,22 +150,22 @@ object FilesOptionsFrame: TFilesOptionsFrame
AnchorSideBottom.Control = FPCSourceDirComboBox AnchorSideBottom.Control = FPCSourceDirComboBox
AnchorSideBottom.Side = asrBottom AnchorSideBottom.Side = asrBottom
Left = 597 Left = 597
Height = 23 Height = 32
Top = 245 Top = 249
Width = 23 Width = 23
Anchors = [akTop, akRight, akBottom] Anchors = [akTop, akRight, akBottom]
Caption = '...' Caption = '...'
OnClick = DirectoriesButtonClick OnClick = DirectoriesButtonClick
TabOrder = 11 TabOrder = 9
end end
object FPCSourceDirLabel: TLabel object FPCSourceDirLabel: TLabel
AnchorSideLeft.Control = Owner AnchorSideLeft.Control = Owner
AnchorSideTop.Control = CompilerPathComboBox AnchorSideTop.Control = CompilerPathComboBox
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 2 Left = 2
Height = 15 Height = 18
Top = 230 Top = 231
Width = 100 Width = 116
BorderSpacing.Top = 6 BorderSpacing.Top = 6
Caption = 'FPCSourceDirLabel' Caption = 'FPCSourceDirLabel'
ParentColor = False ParentColor = False
@ -188,9 +175,9 @@ object FilesOptionsFrame: TFilesOptionsFrame
AnchorSideTop.Control = FPCSourceDirComboBox AnchorSideTop.Control = FPCSourceDirComboBox
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 2 Left = 2
Height = 15 Height = 18
Top = 274 Top = 287
Width = 81 Width = 94
BorderSpacing.Top = 6 BorderSpacing.Top = 6
Caption = 'MakePathLabel' Caption = 'MakePathLabel'
ParentColor = False ParentColor = False
@ -200,9 +187,9 @@ object FilesOptionsFrame: TFilesOptionsFrame
AnchorSideTop.Control = MakePathComboBox AnchorSideTop.Control = MakePathComboBox
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 2 Left = 2
Height = 15 Height = 18
Top = 318 Top = 343
Width = 90 Width = 107
BorderSpacing.Top = 6 BorderSpacing.Top = 6
Caption = 'TestBuildDirLabel' Caption = 'TestBuildDirLabel'
ParentColor = False ParentColor = False
@ -213,12 +200,12 @@ object FilesOptionsFrame: TFilesOptionsFrame
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = MakePathButton AnchorSideRight.Control = MakePathButton
Left = 2 Left = 2
Height = 23 Height = 32
Top = 289 Top = 305
Width = 595 Width = 595
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
ItemHeight = 15 ItemHeight = 24
TabOrder = 12 TabOrder = 10
Text = 'MakePathComboBox' Text = 'MakePathComboBox'
end end
object MakePathButton: TButton object MakePathButton: TButton
@ -228,13 +215,13 @@ object FilesOptionsFrame: TFilesOptionsFrame
AnchorSideBottom.Control = MakePathComboBox AnchorSideBottom.Control = MakePathComboBox
AnchorSideBottom.Side = asrBottom AnchorSideBottom.Side = asrBottom
Left = 597 Left = 597
Height = 23 Height = 32
Top = 289 Top = 305
Width = 23 Width = 23
Anchors = [akTop, akRight, akBottom] Anchors = [akTop, akRight, akBottom]
Caption = '...' Caption = '...'
OnClick = FilesButtonClick OnClick = FilesButtonClick
TabOrder = 13 TabOrder = 11
end end
object TestBuildDirComboBox: TComboBox object TestBuildDirComboBox: TComboBox
AnchorSideLeft.Control = Owner AnchorSideLeft.Control = Owner
@ -242,12 +229,12 @@ object FilesOptionsFrame: TFilesOptionsFrame
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = TestBuildDirButton AnchorSideRight.Control = TestBuildDirButton
Left = 2 Left = 2
Height = 23 Height = 32
Top = 333 Top = 361
Width = 595 Width = 595
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
ItemHeight = 15 ItemHeight = 24
TabOrder = 14 TabOrder = 12
Text = 'TestBuildDirComboBox' Text = 'TestBuildDirComboBox'
end end
object TestBuildDirButton: TButton object TestBuildDirButton: TButton
@ -257,13 +244,13 @@ object FilesOptionsFrame: TFilesOptionsFrame
AnchorSideBottom.Control = TestBuildDirComboBox AnchorSideBottom.Control = TestBuildDirComboBox
AnchorSideBottom.Side = asrBottom AnchorSideBottom.Side = asrBottom
Left = 597 Left = 597
Height = 23 Height = 32
Top = 333 Top = 361
Width = 23 Width = 23
Anchors = [akTop, akRight, akBottom] Anchors = [akTop, akRight, akBottom]
Caption = '...' Caption = '...'
OnClick = DirectoriesButtonClick OnClick = DirectoriesButtonClick
TabOrder = 15 TabOrder = 13
end end
object AutoCloseCompileDialogCheckBox: TCheckBox object AutoCloseCompileDialogCheckBox: TCheckBox
AnchorSideLeft.Control = ShowCompileDialogCheckBox AnchorSideLeft.Control = ShowCompileDialogCheckBox
@ -271,21 +258,21 @@ object FilesOptionsFrame: TFilesOptionsFrame
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
Left = 32 Left = 32
Height = 19 Height = 22
Top = 113 Top = 87
Width = 207 Width = 239
BorderSpacing.Left = 30 BorderSpacing.Left = 30
Caption = 'AutoCloseCompileDialogCheckBox' Caption = 'AutoCloseCompileDialogCheckBox'
TabOrder = 5 TabOrder = 3
end end
object CompilerTranslationFileLabel: TLabel object CompilerTranslationFileLabel: TLabel
AnchorSideLeft.Control = Owner AnchorSideLeft.Control = Owner
AnchorSideTop.Control = TestBuildDirComboBox AnchorSideTop.Control = TestBuildDirComboBox
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 2 Left = 2
Height = 15 Height = 18
Top = 362 Top = 399
Width = 152 Width = 177
Alignment = taRightJustify Alignment = taRightJustify
BorderSpacing.Top = 6 BorderSpacing.Top = 6
Caption = 'CompilerTranslationFileLabel' Caption = 'CompilerTranslationFileLabel'
@ -300,15 +287,15 @@ object FilesOptionsFrame: TFilesOptionsFrame
AnchorSideBottom.Control = CompilerTranslationFileComboBox AnchorSideBottom.Control = CompilerTranslationFileComboBox
AnchorSideBottom.Side = asrBottom AnchorSideBottom.Side = asrBottom
Left = 597 Left = 597
Height = 23 Height = 32
Top = 377 Top = 417
Width = 23 Width = 23
Anchors = [akTop, akRight, akBottom] Anchors = [akTop, akRight, akBottom]
Caption = '...' Caption = '...'
OnClick = CompilerTranslationFileButtonClick OnClick = CompilerTranslationFileButtonClick
ParentShowHint = False ParentShowHint = False
ShowHint = True ShowHint = True
TabOrder = 17 TabOrder = 15
end end
object CompilerTranslationFileComboBox: TComboBox object CompilerTranslationFileComboBox: TComboBox
AnchorSideLeft.Control = Owner AnchorSideLeft.Control = Owner
@ -316,14 +303,14 @@ object FilesOptionsFrame: TFilesOptionsFrame
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = CompilerTranslationFileButton AnchorSideRight.Control = CompilerTranslationFileButton
Left = 2 Left = 2
Height = 23 Height = 32
Top = 377 Top = 417
Width = 595 Width = 595
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
ItemHeight = 15 ItemHeight = 24
ParentShowHint = False ParentShowHint = False
ShowHint = True ShowHint = True
TabOrder = 16 TabOrder = 14
Text = 'CompilerTranslationFileComboBox' Text = 'CompilerTranslationFileComboBox'
end end
object lblCenter: TLabel object lblCenter: TLabel
@ -342,9 +329,9 @@ object FilesOptionsFrame: TFilesOptionsFrame
AnchorSideRight.Control = lblCenter AnchorSideRight.Control = lblCenter
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
Left = 2 Left = 2
Height = 23 Height = 32
Hint = 'Value 0 means unlimited.' Hint = 'Value 0 means unlimited.'
Top = 19 Top = 22
Width = 305 Width = 305
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
BorderSpacing.Right = 3 BorderSpacing.Right = 3
@ -360,9 +347,9 @@ object FilesOptionsFrame: TFilesOptionsFrame
AnchorSideRight.Control = Owner AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
Left = 316 Left = 316
Height = 23 Height = 32
Hint = 'Value 0 means unlimited.' Hint = 'Value 0 means unlimited.'
Top = 19 Top = 22
Width = 304 Width = 304
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 3 BorderSpacing.Left = 3
@ -371,43 +358,14 @@ object FilesOptionsFrame: TFilesOptionsFrame
ShowHint = True ShowHint = True
TabOrder = 1 TabOrder = 1
end end
object MultipleInstancesLabel: TLabel
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = MultipleInstancesComboBox
AnchorSideTop.Side = asrCenter
Left = 2
Height = 15
Top = 73
Width = 121
Caption = 'MultipleInstancesLabel'
ParentColor = False
end
object MultipleInstancesComboBox: TComboBox
AnchorSideLeft.Control = MultipleInstancesLabel
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = OpenLastProjectAtStartCheckBox
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 131
Height = 23
Top = 69
Width = 489
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 8
BorderSpacing.Top = 2
ItemHeight = 15
Style = csDropDownList
TabOrder = 3
end
object FppkgConfigurationFileLabel: TLabel object FppkgConfigurationFileLabel: TLabel
AnchorSideLeft.Control = Owner AnchorSideLeft.Control = Owner
AnchorSideTop.Control = CompilerTranslationFileComboBox AnchorSideTop.Control = CompilerTranslationFileComboBox
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 2 Left = 2
Height = 15 Height = 18
Top = 406 Top = 455
Width = 153 Width = 176
Alignment = taRightJustify Alignment = taRightJustify
BorderSpacing.Top = 6 BorderSpacing.Top = 6
Caption = 'FppkgConfigurationFileLabel' Caption = 'FppkgConfigurationFileLabel'
@ -421,14 +379,14 @@ object FilesOptionsFrame: TFilesOptionsFrame
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = FppkgConfigurationFileButton AnchorSideRight.Control = FppkgConfigurationFileButton
Left = 2 Left = 2
Height = 23 Height = 32
Top = 421 Top = 473
Width = 595 Width = 595
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
ItemHeight = 15 ItemHeight = 24
ParentShowHint = False ParentShowHint = False
ShowHint = True ShowHint = True
TabOrder = 18 TabOrder = 16
Text = 'FppkgConfigurationFileComboBox' Text = 'FppkgConfigurationFileComboBox'
end end
object FppkgConfigurationFileButton: TButton object FppkgConfigurationFileButton: TButton
@ -438,14 +396,14 @@ object FilesOptionsFrame: TFilesOptionsFrame
AnchorSideBottom.Control = FppkgConfigurationFileComboBox AnchorSideBottom.Control = FppkgConfigurationFileComboBox
AnchorSideBottom.Side = asrBottom AnchorSideBottom.Side = asrBottom
Left = 597 Left = 597
Height = 23 Height = 32
Top = 421 Top = 473
Width = 23 Width = 23
Anchors = [akTop, akRight, akBottom] Anchors = [akTop, akRight, akBottom]
Caption = '...' Caption = '...'
OnClick = FilesButtonClick OnClick = FilesButtonClick
ParentShowHint = False ParentShowHint = False
ShowHint = True ShowHint = True
TabOrder = 19 TabOrder = 17
end end
end end

View File

@ -22,7 +22,7 @@
Frame for environment options for main paths, like Frame for environment options for main paths, like
Lazarus directory, compiler path. Lazarus directory, compiler path.
} }
unit files_options; unit Files_Options;
{$mode objfpc}{$H+} {$mode objfpc}{$H+}
@ -49,7 +49,6 @@ type
TFilesOptionsFrame = class(TAbstractIDEOptionsEditor) TFilesOptionsFrame = class(TAbstractIDEOptionsEditor)
AutoCloseCompileDialogCheckBox: TCheckBox; AutoCloseCompileDialogCheckBox: TCheckBox;
MultipleInstancesComboBox: TComboBox;
CompilerTranslationFileButton:TButton; CompilerTranslationFileButton:TButton;
CompilerTranslationFileComboBox:TComboBox; CompilerTranslationFileComboBox:TComboBox;
CompilerTranslationFileLabel:TLabel; CompilerTranslationFileLabel:TLabel;
@ -59,7 +58,6 @@ type
FPCSourceDirButton:TButton; FPCSourceDirButton:TButton;
FPCSourceDirComboBox:TComboBox; FPCSourceDirComboBox:TComboBox;
FPCSourceDirLabel:TLabel; FPCSourceDirLabel:TLabel;
MultipleInstancesLabel: TLabel;
lblCenter: TLabel; lblCenter: TLabel;
LazarusDirButton:TButton; LazarusDirButton:TButton;
LazarusDirComboBox:TComboBox; LazarusDirComboBox:TComboBox;
@ -71,7 +69,6 @@ type
MaxRecentOpenFilesLabel: TLabel; MaxRecentOpenFilesLabel: TLabel;
MaxRecentProjectFilesSpin: TSpinEdit; MaxRecentProjectFilesSpin: TSpinEdit;
MaxRecentProjectFilesLabel: TLabel; MaxRecentProjectFilesLabel: TLabel;
OpenLastProjectAtStartCheckBox: TCheckBox;
ShowCompileDialogCheckBox: TCheckBox; ShowCompileDialogCheckBox: TCheckBox;
TestBuildDirButton:TButton; TestBuildDirButton:TButton;
TestBuildDirComboBox:TComboBox; TestBuildDirComboBox:TComboBox;
@ -99,7 +96,6 @@ type
fOldFppkcConfigurationFilename: string; fOldFppkcConfigurationFilename: string;
FOldMaxRecentOpenFiles: integer; FOldMaxRecentOpenFiles: integer;
FOldMaxRecentProjectFiles: integer; FOldMaxRecentProjectFiles: integer;
FOldOpenLastProjectAtStart: boolean;
fOldShowCompileDialog: boolean; fOldShowCompileDialog: boolean;
fOldAutoCloseCompileDialog: boolean; fOldAutoCloseCompileDialog: boolean;
function CheckLazarusDir(Buttons: TMsgDlgButtons): boolean; function CheckLazarusDir(Buttons: TMsgDlgButtons): boolean;
@ -109,7 +105,6 @@ type
function CheckMake: boolean; function CheckMake: boolean;
function CheckFPCMsgFile: boolean; function CheckFPCMsgFile: boolean;
public public
constructor Create(AOwner: TComponent); override;
function Check: Boolean; override; function Check: Boolean; override;
function GetTitle: String; override; function GetTitle: String; override;
procedure Setup({%H-}ADialog: TAbstractOptionsEditorDialog); override; procedure Setup({%H-}ADialog: TAbstractOptionsEditorDialog); override;
@ -280,7 +275,6 @@ begin
MaxRecentOpenFilesLabel.Hint:=dlgMaxRecentHint; MaxRecentOpenFilesLabel.Hint:=dlgMaxRecentHint;
MaxRecentProjectFilesLabel.Caption:=dlgMaxRecentProjs; MaxRecentProjectFilesLabel.Caption:=dlgMaxRecentProjs;
MaxRecentProjectFilesLabel.Hint:=dlgMaxRecentHint; MaxRecentProjectFilesLabel.Hint:=dlgMaxRecentHint;
OpenLastProjectAtStartCheckBox.Caption:=dlgQOpenLastPrj;
ShowCompileDialogCheckBox.Visible:=false; ShowCompileDialogCheckBox.Visible:=false;
AutoCloseCompileDialogCheckBox.Visible:=false; AutoCloseCompileDialogCheckBox.Visible:=false;
LazarusDirLabel.Caption:=dlgLazarusDir; LazarusDirLabel.Caption:=dlgLazarusDir;
@ -290,16 +284,6 @@ begin
Add(ProgramDirectoryWithBundle); Add(ProgramDirectoryWithBundle);
EndUpdate; EndUpdate;
end; end;
MultipleInstancesLabel.Caption := dlgMultipleInstances;
with MultipleInstancesComboBox.Items do
begin
BeginUpdate;
Add(dlgMultipleInstances_AlwaysStartNew);
Add(dlgMultipleInstances_OpenFilesInRunning);
Add(dlgMultipleInstances_ForceSingleInstance);
EndUpdate;
end;
Assert(MultipleInstancesComboBox.Items.Count = Ord(High(TIDEMultipleInstancesOption))+1);
CompilerPathLabel.Caption:=Format(dlgFpcExecutable,[GetDefaultCompilerFilename]); CompilerPathLabel.Caption:=Format(dlgFpcExecutable,[GetDefaultCompilerFilename]);
FPCSourceDirLabel.Caption:=dlgFpcSrcPath; FPCSourceDirLabel.Caption:=dlgFpcSrcPath;
@ -436,12 +420,6 @@ begin
MaxRecentOpenFilesSpin.Value := MaxRecentOpenFiles; MaxRecentOpenFilesSpin.Value := MaxRecentOpenFiles;
FOldMaxRecentProjectFiles := MaxRecentProjectFiles; FOldMaxRecentProjectFiles := MaxRecentProjectFiles;
MaxRecentProjectFilesSpin.Value := MaxRecentProjectFiles; MaxRecentProjectFilesSpin.Value := MaxRecentProjectFiles;
FOldOpenLastProjectAtStart := OpenLastProjectAtStart;
// open last project at start
OpenLastProjectAtStartCheckBox.Checked:=OpenLastProjectAtStart;
MultipleInstancesComboBox.ItemIndex := Ord(MultipleInstances);
// compile dialog // compile dialog
fOldShowCompileDialog:=ShowCompileDialog; fOldShowCompileDialog:=ShowCompileDialog;
@ -474,8 +452,6 @@ begin
// recent files and directories // recent files and directories
MaxRecentOpenFiles := MaxRecentOpenFilesSpin.Value; MaxRecentOpenFiles := MaxRecentOpenFilesSpin.Value;
MaxRecentProjectFiles := MaxRecentProjectFilesSpin.Value; MaxRecentProjectFiles := MaxRecentProjectFilesSpin.Value;
OpenLastProjectAtStart:=OpenLastProjectAtStartCheckBox.Checked;
MultipleInstances := TIDEMultipleInstancesOption(MultipleInstancesComboBox.ItemIndex);
ShowCompileDialog := ShowCompileDialogCheckBox.Checked; ShowCompileDialog := ShowCompileDialogCheckBox.Checked;
AutoCloseCompileDialog := AutoCloseCompileDialogCheckBox.Checked; AutoCloseCompileDialog := AutoCloseCompileDialogCheckBox.Checked;
end; end;
@ -497,7 +473,6 @@ begin
// recent files and directories // recent files and directories
MaxRecentOpenFiles := FOldMaxRecentOpenFiles; MaxRecentOpenFiles := FOldMaxRecentOpenFiles;
MaxRecentProjectFiles := FOldMaxRecentProjectFiles; MaxRecentProjectFiles := FOldMaxRecentProjectFiles;
OpenLastProjectAtStart := FOldOpenLastProjectAtStart;
ShowCompileDialog := fOldShowCompileDialog; ShowCompileDialog := fOldShowCompileDialog;
AutoCloseCompileDialog := fOldAutoCloseCompileDialog; AutoCloseCompileDialog := fOldAutoCloseCompileDialog;
end; end;
@ -620,11 +595,6 @@ begin
Result:=true; Result:=true;
end; end;
constructor TFilesOptionsFrame.Create(AOwner: TComponent); // ~bk to be removed
begin
inherited Create(AOwner);
end;
class function TFilesOptionsFrame.SupportedOptionsClass: TAbstractIDEOptionsClass; class function TFilesOptionsFrame.SupportedOptionsClass: TAbstractIDEOptionsClass;
begin begin
Result := TEnvironmentOptions; Result := TEnvironmentOptions;

View File

@ -0,0 +1,108 @@
object IdeStartupFrame: TIdeStartupFrame
Left = 0
Height = 470
Top = 0
Width = 589
ClientHeight = 470
ClientWidth = 589
TabOrder = 0
DesignLeft = 317
DesignTop = 418
object OpenLastProjectAtStartCheckBox: TCheckBox
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = lblProjectToOpen
AnchorSideTop.Side = asrBottom
AnchorSideRight.Side = asrBottom
Left = 6
Height = 22
Top = 91
Width = 231
BorderSpacing.Left = 6
BorderSpacing.Top = 6
Caption = 'OpenLastProjectAtStartCheckBox'
OnChange = OpenLastProjectAtStartCheckBoxChange
TabOrder = 0
end
object lblFileAssociation: TDividerBevel
AnchorSideTop.Control = Owner
Left = 0
Height = 18
Top = 0
Width = 597
Caption = 'Using File Association in OS'
Anchors = [akLeft, akRight]
Font.Style = [fsBold]
ParentColor = False
ParentFont = False
end
object lblProjectToOpen: TDividerBevel
AnchorSideTop.Control = MultipleInstancesComboBox
AnchorSideTop.Side = asrBottom
Left = 0
Height = 18
Top = 67
Width = 597
Caption = 'Project to Open or Create'
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 11
Font.Style = [fsBold]
ParentColor = False
ParentFont = False
end
object LazarusInstancesLabel: TLabel
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = MultipleInstancesComboBox
AnchorSideTop.Side = asrCenter
Left = 1
Height = 18
Top = 31
Width = 139
BorderSpacing.Left = 1
Caption = 'LazarusInstancesLabel'
ParentColor = False
end
object MultipleInstancesComboBox: TComboBox
AnchorSideLeft.Control = LazarusInstancesLabel
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = lblFileAssociation
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 148
Height = 32
Top = 24
Width = 441
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 8
BorderSpacing.Top = 6
ItemHeight = 18
Style = csDropDownList
TabOrder = 1
end
object ProjectTypeRG: TRadioGroup
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = OpenLastProjectAtStartCheckBox
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = Owner
AnchorSideBottom.Side = asrBottom
Left = 1
Height = 348
Top = 122
Width = 588
Anchors = [akTop, akLeft, akRight, akBottom]
AutoFill = True
BorderSpacing.Left = 1
BorderSpacing.Top = 9
Caption = 'New Project Type'
ChildSizing.LeftRightSpacing = 6
ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
ChildSizing.EnlargeVertical = crsHomogenousChildResize
ChildSizing.ShrinkHorizontal = crsScaleChilds
ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1
TabOrder = 2
end
end

View File

@ -0,0 +1,170 @@
{
***************************************************************************
* *
* This source is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This code is distributed in the hope that it will be useful, but *
* WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
* General Public License for more details. *
* *
* A copy of the GNU General Public License is available on the World *
* Wide Web at <http://www.gnu.org/copyleft/gpl.html>. You can also *
* obtain it by writing to the Free Software Foundation, *
* Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1335, USA. *
* *
***************************************************************************
Abtract:
Frame for environment options for new projects.
}
unit IdeStartup_Options;
{$mode ObjFPC}{$H+}
interface
uses
SysUtils,
// LCL
StdCtrls, Dialogs, Controls, Spin, CheckLst, ExtCtrls,
// LazUtils
FileUtil, LazFileUtils, LazLoggerBase,
// IDE
EnvironmentOpts,
// CodeTools
CodeToolManager, DefineTemplates,
// BuildIntf
ProjectIntf,
// IdeIntf
IDEOptionsIntf, IDEOptEditorIntf, IDEDialogs, IDEUtils, DividerBevel,
// IDE
LazarusIDEStrConsts, InputHistory, LazConf, DialogProcs, InitialSetupProc, Classes;
type
{ TIdeStartupFrame }
TIdeStartupFrame = class(TAbstractIDEOptionsEditor)
lblFileAssociation: TDividerBevel;
lblProjectToOpen: TDividerBevel;
MultipleInstancesComboBox: TComboBox;
LazarusInstancesLabel: TLabel;
OpenLastProjectAtStartCheckBox: TCheckBox;
ProjectTypeRG: TRadioGroup;
procedure OpenLastProjectAtStartCheckBoxChange(Sender: TObject);
private
FOldOpenLastProjectAtStart: boolean;
FOldProjectTemplateAtStart: string;
public
//function Check: Boolean; override;
function GetTitle: String; override;
procedure Setup({%H-}ADialog: TAbstractOptionsEditorDialog); override;
procedure ReadSettings(AOptions: TAbstractIDEOptions); override;
procedure WriteSettings(AOptions: TAbstractIDEOptions); override;
procedure RestoreSettings(AOptions: TAbstractIDEOptions); override;
class function SupportedOptionsClass: TAbstractIDEOptionsClass; override;
end;
implementation
{$R *.lfm}
{ TIdeStartupFrame }
procedure TIdeStartupFrame.OpenLastProjectAtStartCheckBoxChange(Sender: TObject);
begin
ProjectTypeRG.Enabled := not (Sender as TCheckBox).Checked;
end;
{
function TIdeStartupFrame.Check: Boolean;
begin
Result:=inherited Check;
end;
}
function TIdeStartupFrame.GetTitle: String;
begin
Result := dlgEnvIdeStartup;
end;
procedure TIdeStartupFrame.Setup(ADialog: TAbstractOptionsEditorDialog);
var
i: Integer;
begin
// Using File Association in OS
lblFileAssociation.Caption := dlgFileAssociationInOS;
LazarusInstancesLabel.Caption := dlgLazarusInstances;
with MultipleInstancesComboBox.Items do
begin
BeginUpdate;
Add(dlgMultipleInstances_AlwaysStartNew);
Add(dlgMultipleInstances_OpenFilesInRunning);
Add(dlgMultipleInstances_ForceSingleInstance);
EndUpdate;
end;
Assert(MultipleInstancesComboBox.Items.Count = Ord(High(TIDEMultipleInstancesOption))+1);
// Project to Open or Create
lblProjectToOpen.Caption := dlgProjectToOpenOrCreate;
OpenLastProjectAtStartCheckBox.Caption := dlgQOpenLastPrj;
ProjectTypeRG.Caption := dlgNewProjectType;
for i:=0 to ProjectDescriptors.Count-1 do
if ProjectDescriptors[i].VisibleInNewDialog then
ProjectTypeRG.Items.Add(ProjectDescriptors[i].Name); // GetLocalizedName
end;
procedure TIdeStartupFrame.ReadSettings(AOptions: TAbstractIDEOptions);
var
i: Integer;
begin
with AOptions as TEnvironmentOptions do
begin
MultipleInstancesComboBox.ItemIndex := Ord(MultipleInstances);
FOldOpenLastProjectAtStart := OpenLastProjectAtStart;
OpenLastProjectAtStartCheckBox.Checked:=OpenLastProjectAtStart;
FOldProjectTemplateAtStart := NewProjectTemplateAtStart;
for i := 0 to ProjectTypeRG.Items.Count-1 do
if ProjectTypeRG.Items[i] = FOldProjectTemplateAtStart then
begin
ProjectTypeRG.ItemIndex := i;
Exit;
end;
ProjectTypeRG.ItemIndex := 0;
end;
end;
procedure TIdeStartupFrame.WriteSettings(AOptions: TAbstractIDEOptions);
begin
with AOptions as TEnvironmentOptions do
begin
MultipleInstances := TIDEMultipleInstancesOption(MultipleInstancesComboBox.ItemIndex);
OpenLastProjectAtStart := OpenLastProjectAtStartCheckBox.Checked;
NewProjectTemplateAtStart := ProjectTypeRG.Items[ProjectTypeRG.ItemIndex];
end;
end;
procedure TIdeStartupFrame.RestoreSettings(AOptions: TAbstractIDEOptions);
begin
inherited RestoreSettings(AOptions);
with AOptions as TEnvironmentOptions do
begin
OpenLastProjectAtStart := FOldOpenLastProjectAtStart;
NewProjectTemplateAtStart := FOldProjectTemplateAtStart;
end;
end;
class function TIdeStartupFrame.SupportedOptionsClass: TAbstractIDEOptionsClass;
begin
Result := TEnvironmentOptions;
end;
initialization
RegisterIDEOptionsEditor(GroupEnvironment, TIdeStartupFrame, EnvOptionsIdeStartup);
end.

View File

@ -64,7 +64,7 @@
<PackageName Value="SynEdit"/> <PackageName Value="SynEdit"/>
</Item8> </Item8>
</RequiredPackages> </RequiredPackages>
<Units Count="242"> <Units Count="243">
<Unit0> <Unit0>
<Filename Value="lazarus.pp"/> <Filename Value="lazarus.pp"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
@ -82,7 +82,9 @@
<Filename Value="frames/files_options.pas"/> <Filename Value="frames/files_options.pas"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<ComponentName Value="FilesOptionsFrame"/> <ComponentName Value="FilesOptionsFrame"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Frame"/> <ResourceBaseClass Value="Frame"/>
<UnitName Value="Files_Options"/>
</Unit2> </Unit2>
<Unit3> <Unit3>
<Filename Value="frames/desktop_options.pas"/> <Filename Value="frames/desktop_options.pas"/>
@ -90,6 +92,7 @@
<ComponentName Value="DesktopOptionsFrame"/> <ComponentName Value="DesktopOptionsFrame"/>
<HasResources Value="True"/> <HasResources Value="True"/>
<ResourceBaseClass Value="Frame"/> <ResourceBaseClass Value="Frame"/>
<UnitName Value="Desktop_Options"/>
</Unit3> </Unit3>
<Unit4> <Unit4>
<Filename Value="frames/window_options.pas"/> <Filename Value="frames/window_options.pas"/>
@ -110,6 +113,7 @@
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<ComponentName Value="BackupOptionsFrame"/> <ComponentName Value="BackupOptionsFrame"/>
<ResourceBaseClass Value="Frame"/> <ResourceBaseClass Value="Frame"/>
<UnitName Value="Backup_Options"/>
</Unit6> </Unit6>
<Unit7> <Unit7>
<Filename Value="frames/naming_options.pas"/> <Filename Value="frames/naming_options.pas"/>
@ -136,6 +140,7 @@
<Filename Value="frames/editor_display_options.pas"/> <Filename Value="frames/editor_display_options.pas"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<ComponentName Value="EditorDisplayOptionsFrame"/> <ComponentName Value="EditorDisplayOptionsFrame"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Frame"/> <ResourceBaseClass Value="Frame"/>
</Unit10> </Unit10>
<Unit11> <Unit11>
@ -776,6 +781,7 @@
<Unit114> <Unit114>
<Filename Value="lfmunitresource.pas"/> <Filename Value="lfmunitresource.pas"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="lfmUnitResource"/>
</Unit114> </Unit114>
<Unit115> <Unit115>
<Filename Value="sourcemarks.pas"/> <Filename Value="sourcemarks.pas"/>
@ -786,6 +792,7 @@
<Filename Value="checklfmdlg.pas"/> <Filename Value="checklfmdlg.pas"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<HasResources Value="True"/> <HasResources Value="True"/>
<UnitName Value="CheckLFMDlg"/>
</Unit116> </Unit116>
<Unit117> <Unit117>
<Filename Value="sortselectiondlg.pas"/> <Filename Value="sortselectiondlg.pas"/>
@ -862,6 +869,7 @@
<Unit130> <Unit130>
<Filename Value="componentpalette.pas"/> <Filename Value="componentpalette.pas"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="ComponentPalette"/>
</Unit130> </Unit130>
<Unit131> <Unit131>
<Filename Value="codecontextform.pas"/> <Filename Value="codecontextform.pas"/>
@ -937,7 +945,10 @@
<Unit146> <Unit146>
<Filename Value="diskdiffsdialog.pas"/> <Filename Value="diskdiffsdialog.pas"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<ComponentName Value="DiskDiffsDlg"/>
<HasResources Value="True"/> <HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="DiskDiffsDialog"/>
</Unit146> </Unit146>
<Unit147> <Unit147>
<Filename Value="unusedunitsdlg.pas"/> <Filename Value="unusedunitsdlg.pas"/>
@ -982,6 +993,7 @@
<Filename Value="newprojectdlg.pp"/> <Filename Value="newprojectdlg.pp"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<HasResources Value="True"/> <HasResources Value="True"/>
<UnitName Value="NewProjectDlg"/>
</Unit155> </Unit155>
<Unit156> <Unit156>
<Filename Value="codetoolsoptions.pas"/> <Filename Value="codetoolsoptions.pas"/>
@ -1011,6 +1023,7 @@
<Unit161> <Unit161>
<Filename Value="transfermacros.pp"/> <Filename Value="transfermacros.pp"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="TransferMacros"/>
</Unit161> </Unit161>
<Unit162> <Unit162>
<Filename Value="publishmodule.pas"/> <Filename Value="publishmodule.pas"/>
@ -1434,6 +1447,14 @@
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="ExtToolsIDE"/> <UnitName Value="ExtToolsIDE"/>
</Unit241> </Unit241>
<Unit242>
<Filename Value="frames/idestartup_options.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="IdeStartupFrame"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Frame"/>
<UnitName Value="IdeStartup_Options"/>
</Unit242>
</Units> </Units>
</ProjectOptions> </ProjectOptions>
<CompilerOptions> <CompilerOptions>

View File

@ -152,14 +152,6 @@ resourcestring
lisMoveUp = 'Move Up'; lisMoveUp = 'Move Up';
lisMoveDown = 'Move Down'; lisMoveDown = 'Move Down';
dlgMultipleInstances = 'Multiple Lazarus instances';
dlgMultipleInstances_AlwaysStartNew = 'always start a new instance';
dlgMultipleInstances_OpenFilesInRunning = 'open files in a running instance';
dlgMultipleInstances_ForceSingleInstance = 'do not allow multiple instances';
dlgRunningInstanceModalError = 'The running Lazarus instance cannot accept any files.'+sLineBreak+'Do you want to open them in a new IDE instance?'+sLineBreak+sLineBreak+'%s';
dlgForceUniqueInstanceModalError = 'The running Lazarus instance cannot accept any files.';
dlgRunningInstanceNotRespondingError = 'Lazarus instance is running but not responding.';
// *** Rest of the resource strings *** // *** Rest of the resource strings ***
lisImportPackageListXml = 'Import package list (*.xml)'; lisImportPackageListXml = 'Import package list (*.xml)';
@ -1315,8 +1307,7 @@ resourcestring
dlgFrmEditor = 'Form Editor'; dlgFrmEditor = 'Form Editor';
dlgObjInsp = 'Object Inspector'; dlgObjInsp = 'Object Inspector';
dlgEnvFiles = 'Files'; dlgEnvFiles = 'Files';
dlgEnvIdeStartup = 'IDE Startup';
//
dlgEnvBckup = 'Backup'; dlgEnvBckup = 'Backup';
dlgNaming = 'Naming'; dlgNaming = 'Naming';
lisInformation = 'Information'; lisInformation = 'Information';
@ -1475,7 +1466,6 @@ resourcestring
dlgMaxRecentFiles = 'Max recent files'; dlgMaxRecentFiles = 'Max recent files';
dlgMaxRecentProjs = 'Max recent project files'; dlgMaxRecentProjs = 'Max recent project files';
dlgMaxRecentHint = 'Value 0 means unlimited.'; dlgMaxRecentHint = 'Value 0 means unlimited.';
dlgQOpenLastPrj = 'Open last project and packages at start';
dlgLazarusDir = 'Lazarus directory (default for all projects)'; dlgLazarusDir = 'Lazarus directory (default for all projects)';
dlgFpcExecutable = 'Compiler executable (e.g. %s)'; dlgFpcExecutable = 'Compiler executable (e.g. %s)';
dlgFpcSrcPath = 'FPC source directory'; dlgFpcSrcPath = 'FPC source directory';
@ -1607,6 +1597,7 @@ resourcestring
lisShowsDescriptionForSelectedProperty = 'A box at the bottom shows ' lisShowsDescriptionForSelectedProperty = 'A box at the bottom shows '
+'description for the selected property.'; +'description for the selected property.';
lisShowPropertyFilterInObjectInspector = 'Show property filter'; lisShowPropertyFilterInObjectInspector = 'Show property filter';
dlgEnvBackupHelpNote = 'Notes: Project files are all files in the project directory'; dlgEnvBackupHelpNote = 'Notes: Project files are all files in the project directory';
lisEnvOptDlgInvalidDebuggerFilename = 'Invalid debugger filename'; lisEnvOptDlgInvalidDebuggerFilename = 'Invalid debugger filename';
lisEnvOptDlgInvalidDebuggerFilenameMsg = 'The debugger file "%s" is not an executable.'; lisEnvOptDlgInvalidDebuggerFilenameMsg = 'The debugger file "%s" is not an executable.';
@ -1619,6 +1610,20 @@ resourcestring
+'failed to compile.%sRemove it from the installation list?'; +'failed to compile.%sRemove it from the installation list?';
lisEnvOptDlgTestDirNotFoundMsg = 'Test directory "%s" not found.'; lisEnvOptDlgTestDirNotFoundMsg = 'Test directory "%s" not found.';
// Ide Startup options
dlgFileAssociationInOS = 'Using File Association in OS';
dlgLazarusInstances = 'Lazarus instances';
dlgMultipleInstances_AlwaysStartNew = 'always start a new instance';
dlgMultipleInstances_OpenFilesInRunning = 'open files in a running instance';
dlgMultipleInstances_ForceSingleInstance = 'do not allow multiple instances';
dlgRunningInstanceModalError = 'The running Lazarus instance cannot accept any files.'
+sLineBreak+'Do you want to open them in a new IDE instance?'+sLineBreak+sLineBreak+'%s';
dlgForceUniqueInstanceModalError = 'The running Lazarus instance cannot accept any files.';
dlgRunningInstanceNotRespondingError = 'Lazarus instance is running but not responding.';
dlgProjectToOpenOrCreate = 'Project to Open or Create';
dlgQOpenLastPrj = 'Open last project and packages at start';
dlgNewProjectType = 'New Project Type';
// open-dialog filters // open-dialog filters
dlgFilterAll = 'All files'; dlgFilterAll = 'All files';
dlgFilterXML = 'XML files'; dlgFilterXML = 'XML files';

View File

@ -114,7 +114,7 @@ uses
ChgEncodingDlg, ConvertDelphi, MissingPropertiesDlg, LazXMLForms, ChgEncodingDlg, ConvertDelphi, MissingPropertiesDlg, LazXMLForms,
// environment option frames // environment option frames
editor_general_options, componentpalette_options, formed_options, OI_options, editor_general_options, componentpalette_options, formed_options, OI_options,
MsgWnd_Options, files_options, desktop_options, window_options, MsgWnd_Options, Files_Options, Desktop_Options, window_options, IdeStartup_Options,
Backup_Options, naming_options, fpdoc_options, idecoolbar_options, editortoolbar_options, Backup_Options, naming_options, fpdoc_options, idecoolbar_options, editortoolbar_options,
editor_display_options, editor_keymapping_options, editor_mouseaction_options, editor_display_options, editor_keymapping_options, editor_mouseaction_options,
editor_mouseaction_options_advanced, editor_color_options, editor_markup_options, editor_mouseaction_options_advanced, editor_color_options, editor_markup_options,
@ -2298,6 +2298,7 @@ procedure TMainIDE.SetupStartProject;
var var
ProjectLoaded: Boolean; ProjectLoaded: Boolean;
AProjectFilename: String; AProjectFilename: String;
PrjDesc: TProjectDescriptor;
CmdLineFiles: TStrings; CmdLineFiles: TStrings;
i: Integer; i: Integer;
OpenFlags: TOpenFlags; OpenFlags: TOpenFlags;
@ -2386,7 +2387,10 @@ begin
// IDE was closed without a project => restore that state // IDE was closed without a project => restore that state
end else begin end else begin
// create new project // create new project
DoNewProject(ProjectDescriptorApplication); PrjDesc := ProjectDescriptors.FindByName(EnvironmentOptions.NewProjectTemplateAtStart);
if PrjDesc = nil then
PrjDesc := ProjectDescriptorApplication; // Fallback to Application
DoNewProject(PrjDesc);
end; end;
end; end;