From eb97eb94b52be8c5d80346895a49cf7c0b205f94 Mon Sep 17 00:00:00 2001 From: Marc Durdin Date: Tue, 7 Nov 2023 14:26:49 +0700 Subject: [PATCH 1/3] chore(developer): hide 'Remove From Project' for v2.0 projects Relates to #9948. --- ...eyman.Developer.UI.Project.UfrmProject.pas | 3 +++ .../src/tike/xml/project/distribution.xsl | 10 ++++---- developer/src/tike/xml/project/keyboards.xsl | 12 ++++++---- developer/src/tike/xml/project/models.xsl | 24 +++++++++++-------- developer/src/tike/xml/project/packages.xsl | 10 ++++---- 5 files changed, 36 insertions(+), 23 deletions(-) diff --git a/developer/src/tike/project/Keyman.Developer.UI.Project.UfrmProject.pas b/developer/src/tike/project/Keyman.Developer.UI.Project.UfrmProject.pas index 3ce825b5a64..6fcefc44368 100644 --- a/developer/src/tike/project/Keyman.Developer.UI.Project.UfrmProject.pas +++ b/developer/src/tike/project/Keyman.Developer.UI.Project.UfrmProject.pas @@ -404,6 +404,7 @@ procedure TfrmProject.WebCommandProject(Command: WideString; Params: TStringList if Command = 'fileaddnew' then begin { create a new file, add it to the project } + Assert(FGlobalProject.Options.Version = pv10); with TfrmNewFileDetails.Create(Self) do try BaseFileName := FGlobalProject.FileName; @@ -421,6 +422,7 @@ procedure TfrmProject.WebCommandProject(Command: WideString; Params: TStringList else if Command = 'fileaddexisting' then begin { locate an existing file, add it to the project } + Assert(FGlobalProject.Options.Version = pv10); FFileType := FileTypeFromParamType; dlgOpenFile.Filter := GetFileTypeFilter(FFileType, FDefaultExtension); @@ -479,6 +481,7 @@ procedure TfrmProject.WebCommandProject(Command: WideString; Params: TStringList end else if Command = 'removefile' then begin + Assert(FGlobalProject.Options.Version = pv10); pf := SelectedProjectFile; if Assigned(pf) then begin diff --git a/developer/src/tike/xml/project/distribution.xsl b/developer/src/tike/xml/project/distribution.xsl index 3d72f0626fb..2cb0834092c 100644 --- a/developer/src/tike/xml/project/distribution.xsl +++ b/developer/src/tike/xml/project/distribution.xsl @@ -117,10 +117,12 @@ Open Containing Folder keyman:opencontainingfolder?id= - - Remove from Project - keyman:removefile?id= - + + + Remove from Project + keyman:removefile?id= + + diff --git a/developer/src/tike/xml/project/keyboards.xsl b/developer/src/tike/xml/project/keyboards.xsl index 3287a159865..0008ca75f55 100644 --- a/developer/src/tike/xml/project/keyboards.xsl +++ b/developer/src/tike/xml/project/keyboards.xsl @@ -176,11 +176,13 @@ keyman:openbuildfolder?id= - - Remove from Project - keyman:removefile?id= - - + + + Remove from Project + keyman:removefile?id= + + + diff --git a/developer/src/tike/xml/project/models.xsl b/developer/src/tike/xml/project/models.xsl index a68cecc347d..df4bd9f994c 100644 --- a/developer/src/tike/xml/project/models.xsl +++ b/developer/src/tike/xml/project/models.xsl @@ -162,11 +162,13 @@ keyman:openbuildfolder?id= - - Remove from Project - keyman:removefile?id= - - + + + Remove from Project + keyman:removefile?id= + + + @@ -193,11 +195,13 @@ keyman:opencontainingfolder?id= - - Remove from Project - keyman:removefile?id= - - + + + Remove from Project + keyman:removefile?id= + + + \ No newline at end of file diff --git a/developer/src/tike/xml/project/packages.xsl b/developer/src/tike/xml/project/packages.xsl index 2a5905b907f..40a4111bcad 100644 --- a/developer/src/tike/xml/project/packages.xsl +++ b/developer/src/tike/xml/project/packages.xsl @@ -146,10 +146,12 @@ keyman:openbuildfolder?id= - - Remove from Project - keyman:removefile?id= - + + + Remove from Project + keyman:removefile?id= + + From a312f735ad8cf449986053122ebf7a8dcd1e2577 Mon Sep 17 00:00:00 2001 From: Marc Durdin Date: Tue, 7 Nov 2023 14:29:04 +0700 Subject: [PATCH 2/3] chore(developer): tweak prompt for project upgrade --- .../project/Keyman.Developer.UI.Project.UpgradeProject.pas | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/developer/src/tike/project/Keyman.Developer.UI.Project.UpgradeProject.pas b/developer/src/tike/project/Keyman.Developer.UI.Project.UpgradeProject.pas index 463f93ba764..3a211084fb4 100644 --- a/developer/src/tike/project/Keyman.Developer.UI.Project.UpgradeProject.pas +++ b/developer/src/tike/project/Keyman.Developer.UI.Project.UpgradeProject.pas @@ -44,7 +44,8 @@ function TryUpgradeProject(Project: TProject): TUpgradeResult; Exit; end; - case MessageDlg('The current project can be upgraded to Keyman Developer 17.0 format. Do you wish to upgrade it (recommended)?', + case MessageDlg('The current project can be upgraded to Keyman Developer 17.0 format. Do you wish to upgrade it (recommended)?'#13#10#13#10 + 'Note: upgraded projects will not be readable by older versions of Keyman Developer.', mtConfirmation, mbYesNoCancel, 0) of mrNo: Exit; mrCancel: Exit(urCancelled); From 96e78c681802375a4fb1064740a1334f94a900e2 Mon Sep 17 00:00:00 2001 From: Marc Durdin Date: Tue, 7 Nov 2023 14:57:08 +0700 Subject: [PATCH 3/3] chore(developer): fix typo --- .../tike/project/Keyman.Developer.UI.Project.UpgradeProject.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/developer/src/tike/project/Keyman.Developer.UI.Project.UpgradeProject.pas b/developer/src/tike/project/Keyman.Developer.UI.Project.UpgradeProject.pas index 3a211084fb4..7e09f2a1ba3 100644 --- a/developer/src/tike/project/Keyman.Developer.UI.Project.UpgradeProject.pas +++ b/developer/src/tike/project/Keyman.Developer.UI.Project.UpgradeProject.pas @@ -44,7 +44,7 @@ function TryUpgradeProject(Project: TProject): TUpgradeResult; Exit; end; - case MessageDlg('The current project can be upgraded to Keyman Developer 17.0 format. Do you wish to upgrade it (recommended)?'#13#10#13#10 + case MessageDlg('The current project can be upgraded to Keyman Developer 17.0 format. Do you wish to upgrade it (recommended)?'#13#10#13#10+ 'Note: upgraded projects will not be readable by older versions of Keyman Developer.', mtConfirmation, mbYesNoCancel, 0) of mrNo: Exit;