In what situation would self._preferences_window not be None?