diff --git a/windows/src/developer/TIKE/actions/dmActionsKeyboardEditor.pas b/windows/src/developer/TIKE/actions/dmActionsKeyboardEditor.pas index c7f7fdbf1b..5f61ee1a87 100644 --- a/windows/src/developer/TIKE/actions/dmActionsKeyboardEditor.pas +++ b/windows/src/developer/TIKE/actions/dmActionsKeyboardEditor.pas @@ -146,6 +146,7 @@ uses Keyman.Developer.System.Project.kpsProjectFile, Keyman.Developer.System.Project.ProjectFile, Keyman.Developer.UI.Project.ProjectFileUI, + Keyman.Developer.UI.Project.UfrmProject, UframeTextEditor, UfrmKeymanWizard, UfrmDebug, @@ -441,13 +442,18 @@ begin else if ActivePackageEditor <> nil then begin (ActivePackageProjectFile.UI as TProjectFileUI).DoAction(pfaCompile, False); - end; + end + else if frmKeymanDeveloper.ActiveChild is TfrmProject then + (frmKeymanDeveloper.ActiveChild as TfrmProject).CompileAll; end; procedure TmodActionsKeyboardEditor.actKeyboardCompileUpdate(Sender: TObject); begin // TODO: Split Keyboard menu and package editor functions - actKeyboardCompile.Enabled := (ActiveEditor <> nil) or (ActivePackageEditor <> nil); + actKeyboardCompile.Enabled := + (ActiveEditor <> nil) or + (ActivePackageEditor <> nil) or + (frmKeymanDeveloper.ActiveChild is TfrmProject); frmKeymanDeveloper.mnuKeyboard.Visible := actKeyboardCompile.Enabled; frmKeymanDeveloper.mnuDebug.Visible := ActiveEditor <> nil; end; diff --git a/windows/src/developer/TIKE/project/Keyman.Developer.UI.Project.UfrmProject.pas b/windows/src/developer/TIKE/project/Keyman.Developer.UI.Project.UfrmProject.pas index 82c76dafb3..ab7f2f3bd6 100644 --- a/windows/src/developer/TIKE/project/Keyman.Developer.UI.Project.UfrmProject.pas +++ b/windows/src/developer/TIKE/project/Keyman.Developer.UI.Project.UfrmProject.pas @@ -93,6 +93,7 @@ type procedure SetFocus; override; procedure SetGlobalProject; procedure StartClose; override; + procedure CompileAll; end; implementation @@ -265,6 +266,26 @@ begin frmMessages.Clear; end; +procedure TfrmProject.CompileAll; +var + i: Integer; +begin + ClearMessages; + for i := 0 to FGlobalProject.Files.Count - 1 do + begin + if (FGlobalProject.Files[i] is TkmnProjectFile) or + (FGlobalProject.Files[i] is TmodelTsProjectFile) then + begin + if not (FGlobalProject.Files[i].UI as TProjectFileUI).DoAction(pfaCompile, False) then Exit; // I4687 + end; + end; + for i := 0 to FGlobalProject.Files.Count - 1 do + begin + if FGlobalProject.Files[i] is TkpsProjectFile then + if not (FGlobalProject.Files[i].UI as TProjectFileUI).DoAction(pfaCompile, False) then Exit; // I4687 + end; +end; + function TfrmProject.ShouldHandleNavigation(URL: string): Boolean; begin Result := False; @@ -489,20 +510,7 @@ begin end else if Command = 'compileall' then // I4686 begin - ClearMessages; - for i := 0 to FGlobalProject.Files.Count - 1 do - begin - if (FGlobalProject.Files[i] is TkmnProjectFile) or - (FGlobalProject.Files[i] is TmodelTsProjectFile) then - begin - if not (FGlobalProject.Files[i].UI as TProjectFileUI).DoAction(pfaCompile, False) then Exit; // I4687 - end; - end; - for i := 0 to FGlobalProject.Files.Count - 1 do - begin - if FGlobalProject.Files[i] is TkpsProjectFile then - if not (FGlobalProject.Files[i].UI as TProjectFileUI).DoAction(pfaCompile, False) then Exit; // I4687 - end; + CompileAll; end else if Command = 'cleanall' then // I4692 begin diff --git a/windows/src/developer/history.md b/windows/src/developer/history.md index 66102b6f8f..0fe7df31de 100644 --- a/windows/src/developer/history.md +++ b/windows/src/developer/history.md @@ -5,6 +5,7 @@ * Feature: Add unsupported kmdecomp decompiler utility (#2419) * Feature: Show QRCode for web debugger URLs in Keyboard and Package editors (#2433) * Feature: Hotkeys defined in .kmn no longer need to be quoted (#2432) +* Feature: F7 in Project window compiles the whole project (#2442) * Bug Fix: Keyboard ID was not clean by default with Import Windows Keyboard (#2431) * Change: Rename UI references of 'TIKE' to 'Keyman Developer' (#2439) * Change: Application title no longer shows active project, only main window (#2441)