<?xml version="1.0"?>
<Denemo>
  <merge>
    <title>A Denemo Keymap</title>
    <author>AT, JRR, RTS</author>
    <map>
      <row>
        <after>ScoreProlog</after>
        <action>SetThumbnail</action>
        <scheme>;;;ThumbnailSelection
(if (d-GetSaved)
	(begin
	(if (d-PreviousMovement)
		(d-WarningDialog (_ "Returning to the first Movement for thumbnail selection")))
	(while (d-PreviousMovement)
		(display "Seeking first movement"))
 	(if (d-GoToSelectionStart)
 		(let ((response "y"))
 			(d-SetThumbnailSelection)
 			(d-Save)
 			(set! response (d-GetUserInput (_ "Thumbnail Selection Complete") (_ "Create thumbnail now?") response))
 			(if (and response (equal? response "y"))
 				(d-CreateThumbnail)))	
 		(d-WarningDialog (_ "No Selection to set the thumbnail to\nCreate a selection and re-run the command."))))
 	(d-WarningDialog (_ "Save the score before trying to set the thumbnail")))
        </scheme>
        <label>Set Thumbnail from Selection</label>
        <tooltip>Sets the thumbnail to the section made in the first movement.</tooltip>
      </row>
    </map>
  </merge>
</Denemo>
