added wxDocument::AlreadySaved() and use it in OnUpdateFileSave() to ensure that the "Save" menu item is enabled for new documents, even although they're not modified yet (otherwise the standard Ctrl-S key doesn't work in this case which is pretty annoying)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56581 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2008-10-29 16:23:25 +00:00
parent d7b3a73d07
commit de56f24082
3 changed files with 24 additions and 3 deletions

View File

@@ -1008,6 +1008,22 @@ public:
*/
virtual bool AddView(wxView* view);
/**
Returns true if the document hasn't been modified since the last time
it had been saved.
Notice that this function returns @false if the document had been never
saved at all, so it may be also used to test whether it makes sense to
save the document: if it returns @true, there is nothing to save but if
@false is returned, it can be saved, even if it might be not modified
(this can be used to create an empty document file by the user).
@see IsModified(), GetDocumentSaved()
@since 2.9.0
*/
bool AlreadySaved() const;
/**
Closes the document, by calling OnSaveModified() and then (if this
returned @true) OnCloseDocument(). This does not normally delete the