AppDelegate is now an NSWindowDelegate

Prevents the preferences window from closing and
never being able to come back.