Enable the close window menu item.
Prevent the window from closing if the window controller does not have a document.