Skip to content

Commit

Permalink
Add Escape shortcut to close Build Window
Browse files Browse the repository at this point in the history
  • Loading branch information
kenmo-pb authored and fantaisie-software committed Dec 17, 2019
1 parent 01b6174 commit 733ca65
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 12 additions & 1 deletion PureBasicIDE/CompilerWindow.pb
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,13 @@ EndProcedure
Procedure BuildWindowEvents(EventID)
Quit = 0

If EventID = #PB_Event_Menu ; Little wrapper to map the shortcut events (identified as menu)
EventID = #PB_Event_Gadget ; to normal gadget events...
GadgetID = EventMenu()
Else
GadgetID = EventGadget()
EndIf

If EventID = #PB_Event_Gadget
Select EventGadget()
Case #GADGET_Build_Targets
Expand Down Expand Up @@ -558,7 +565,11 @@ Procedure BuildWindowEvents(EventID)
ForEver

Case #GADGET_Build_Close
Quit = 1
; CompilerBusy goes to 0 after each target
; UseProjectBuildWindow goes to 0 when all are done
If (Not CompilerBusy) And (Not UseProjectBuildWindow)
Quit = 1
EndIf

EndSelect

Expand Down
2 changes: 2 additions & 0 deletions PureBasicIDE/dialogs/Build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,6 @@
</multibox>

</vbox>

<shortcut key="#PB_Shortcut_Escape" id="#GADGET_Build_Close" />
</window>

0 comments on commit 733ca65

Please sign in to comment.