Added events to the editor for printing images.

The new images and the preview in the middle are now handled
by events and subscribed functions. The links to the images
now works and a dialog asks the user to give the project
directory.