Added customizable wxDocManager::OnMRUFileNotExist() virtual method.
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 22 Jul 2011 16:16:09 +0000 (16:16 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 22 Jul 2011 16:16:09 +0000 (16:16 +0000)
commitd38eb01c91f5d84236a881c71c78ae0e3b06fb17
tree90ab9abab088ed178d0b91851eef22f10db69f58
parent1ecc323f2609c8afea31948b9eac2d965cc84f5e
Added customizable wxDocManager::OnMRUFileNotExist() virtual method.

This method can be overridden to customize the previously hard-coded handling
of the case when a file selected from the MRU menu doesn't exist any more: we
used to always remove it from the file history completely. This may, however,
be inappropriate and, in fact, probably never, or very rarely, is the right
thing to do when the file that we failed to open still exists.

So never remove the file from the MRU if we failed to open an existing file
(also don't give an error about it as it should have been already given by
CreateDocument()) and, while we still do it for the non-existent files, allow
to override this behaviour by overriding the new OnMRUFileNotExist() method.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68334 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
docs/changes.txt
include/wx/docview.h
interface/wx/docview.h
src/common/docview.cpp