-
-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(developer): Project Settings Form for 17.0+ projects 🦕 #9984
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
122 changes: 122 additions & 0 deletions
122
developer/src/tike/project/Keyman.Developer.UI.Project.UfrmProjectSettings20.dfm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
object frmProjectSettings20: TfrmProjectSettings20 | ||
Left = 0 | ||
Top = 0 | ||
BorderStyle = bsDialog | ||
Caption = 'Project Settings' | ||
ClientHeight = 219 | ||
ClientWidth = 418 | ||
Color = clBtnFace | ||
Font.Charset = DEFAULT_CHARSET | ||
Font.Color = clWindowText | ||
Font.Height = -11 | ||
Font.Name = 'Tahoma' | ||
Font.Style = [] | ||
OldCreateOrder = False | ||
Position = poScreenCenter | ||
OnCreate = FormCreate | ||
PixelsPerInch = 96 | ||
TextHeight = 13 | ||
object lblOutputPath: TLabel | ||
Left = 16 | ||
Top = 19 | ||
Width = 59 | ||
Height = 13 | ||
Caption = '&Output path' | ||
FocusControl = editOutputPath | ||
end | ||
object Label2: TLabel | ||
Left = 81 | ||
Top = 73 | ||
Width = 64 | ||
Height = 13 | ||
Caption = 'Placeholders:' | ||
end | ||
object Label3: TLabel | ||
Left = 151 | ||
Top = 73 | ||
Width = 77 | ||
Height = 13 | ||
Caption = '$PROJECTPATH' | ||
end | ||
object Label6: TLabel | ||
Left = 248 | ||
Top = 73 | ||
Width = 122 | ||
Height = 13 | ||
Caption = 'Path that the project is in' | ||
end | ||
object lblSourcePath: TLabel | ||
Left = 16 | ||
Top = 46 | ||
Width = 58 | ||
Height = 13 | ||
Caption = '&Source path' | ||
FocusControl = editSourcePath | ||
end | ||
object editOutputPath: TEdit | ||
Left = 81 | ||
Top = 16 | ||
Width = 320 | ||
Height = 21 | ||
TabOrder = 0 | ||
end | ||
object cmdOK: TButton | ||
Left = 131 | ||
Top = 186 | ||
Width = 75 | ||
Height = 25 | ||
Caption = 'OK' | ||
Default = True | ||
TabOrder = 6 | ||
OnClick = cmdOKClick | ||
end | ||
object cmdCancel: TButton | ||
Left = 212 | ||
Top = 186 | ||
Width = 75 | ||
Height = 25 | ||
Cancel = True | ||
Caption = 'Cancel' | ||
ModalResult = 2 | ||
TabOrder = 7 | ||
end | ||
object chkCompilerWarningsAsErrors: TCheckBox | ||
Left = 81 | ||
Top = 114 | ||
Width = 232 | ||
Height = 17 | ||
Caption = 'Treat compiler &hints and warnings as errors' | ||
TabOrder = 3 | ||
end | ||
object chkWarnDeprecatedCode: TCheckBox | ||
Left = 81 | ||
Top = 137 | ||
Width = 160 | ||
Height = 17 | ||
Caption = 'Warn on &deprecated code' | ||
TabOrder = 4 | ||
end | ||
object chkCheckFilenameConventions: TCheckBox | ||
Left = 81 | ||
Top = 160 | ||
Width = 160 | ||
Height = 17 | ||
Caption = '&Check filename conventions' | ||
TabOrder = 5 | ||
end | ||
object editSourcePath: TEdit | ||
Left = 81 | ||
Top = 43 | ||
Width = 320 | ||
Height = 21 | ||
TabOrder = 1 | ||
end | ||
object chkBuildMetadataFiles: TCheckBox | ||
Left = 81 | ||
Top = 92 | ||
Width = 232 | ||
Height = 17 | ||
Caption = 'Build &metadata files for Keyman Cloud' | ||
TabOrder = 2 | ||
end | ||
end |
82 changes: 82 additions & 0 deletions
82
developer/src/tike/project/Keyman.Developer.UI.Project.UfrmProjectSettings20.pas
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
(* | ||
Name: Keyman.Developer.UI.Project.UfrmProjectSettings | ||
Copyright: Copyright (C) SIL International. | ||
Documentation: | ||
Description: | ||
Create Date: 4 May 2015 | ||
|
||
Modified Date: 24 Aug 2015 | ||
Authors: mcdurdin | ||
Related Files: | ||
Dependencies: | ||
|
||
Bugs: | ||
Todo: | ||
Notes: | ||
History: 04 May 2015 - mcdurdin - I4688 - V9.0 - Add build path to project settings | ||
24 Aug 2015 - mcdurdin - I4865 - Add treat hints and warnings as errors into project | ||
24 Aug 2015 - mcdurdin - I4866 - Add warn on deprecated features to project and compile | ||
|
||
*) | ||
unit Keyman.Developer.UI.Project.UfrmProjectSettings20; // I4688 | ||
|
||
interface | ||
|
||
uses | ||
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, | ||
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls; | ||
|
||
type | ||
TfrmProjectSettings20 = class(TForm) | ||
lblOutputPath: TLabel; | ||
editOutputPath: TEdit; | ||
Label2: TLabel; | ||
cmdOK: TButton; | ||
cmdCancel: TButton; | ||
Label3: TLabel; | ||
Label6: TLabel; | ||
chkCompilerWarningsAsErrors: TCheckBox; | ||
chkWarnDeprecatedCode: TCheckBox; | ||
chkCheckFilenameConventions: TCheckBox; | ||
lblSourcePath: TLabel; | ||
editSourcePath: TEdit; | ||
chkBuildMetadataFiles: TCheckBox; | ||
procedure FormCreate(Sender: TObject); | ||
procedure cmdOKClick(Sender: TObject); | ||
private | ||
{ Private declarations } | ||
public | ||
{ Public declarations } | ||
end; | ||
|
||
implementation | ||
|
||
{$R *.dfm} | ||
|
||
uses | ||
Keyman.Developer.System.Project.Project; | ||
|
||
procedure TfrmProjectSettings20.cmdOKClick(Sender: TObject); | ||
begin | ||
FGlobalProject.Options.BuildPath := Trim(editOutputPath.Text); | ||
FGlobalProject.Options.SourcePath := Trim(editSourcePath.Text); | ||
FGlobalProject.Options.SkipMetadataFiles := not chkBuildMetadataFiles.Checked; | ||
FGlobalProject.Options.CompilerWarningsAsErrors := chkCompilerWarningsAsErrors.Checked; // I4865 | ||
FGlobalProject.Options.WarnDeprecatedCode := chkWarnDeprecatedCode.Checked; // I4866 | ||
FGlobalProject.Options.CheckFilenameConventions := chkCheckFilenameConventions.Checked; | ||
FGlobalProject.Save; | ||
ModalResult := mrOk; | ||
end; | ||
|
||
procedure TfrmProjectSettings20.FormCreate(Sender: TObject); | ||
begin | ||
editOutputPath.Text := FGlobalProject.Options.BuildPath; | ||
editSourcePath.Text := FGlobalProject.Options.SourcePath; | ||
chkBuildMetadataFiles.Checked := not FGlobalProject.Options.SkipMetadataFiles; | ||
chkCompilerWarningsAsErrors.Checked := FGlobalProject.Options.CompilerWarningsAsErrors; // I4865 | ||
chkWarnDeprecatedCode.Checked := FGlobalProject.Options.WarnDeprecatedCode; // I4866 | ||
chkCheckFilenameConventions.Checked := FGlobalProject.Options.CheckFilenameConventions; | ||
if editOutputPath.Text = '' then editOutputPath.Text := '$PROJECTPATH'; | ||
end; | ||
|
||
end. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.