diff --git a/docs/changes.txt b/docs/changes.txt index 2a8bb95f03..2e6c7ff105 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -5,6 +5,8 @@ wxWindows 2.5/2.6 Change Log INCOMPATIBLE CHANGES SINCE 2.4.x ================================ +- wxDocManager::GetNoHistoryFiles() renamed to GetHistoryFilesCount() + OTHER CHANGES ============= diff --git a/docs/latex/wx/docmanag.tex b/docs/latex/wx/docmanag.tex index 50b9e0da96..83b22df2e5 100644 --- a/docs/latex/wx/docmanag.tex +++ b/docs/latex/wx/docmanag.tex @@ -246,9 +246,9 @@ Returns the directory last selected by the user when opening a file. Initially e Returns the number of documents that can be open simultaneously. -\membersection{wxDocManager::GetNoHistoryFiles} +\membersection{wxDocManager::GetHistoryFilesCount} -\func{int}{GetNoHistoryFiles}{\void} +\func{size\_t}{GetHistoryFilesCount}{\void} Returns the number of files currently stored in the file history. diff --git a/include/wx/docview.h b/include/wx/docview.h index ef9a47fd52..0c900011ba 100644 --- a/include/wx/docview.h +++ b/include/wx/docview.h @@ -399,7 +399,7 @@ public: // File history management virtual void AddFileToHistory(const wxString& file); virtual void RemoveFileFromHistory(size_t i); - virtual size_t GetNoHistoryFiles() const; + virtual size_t GetHistoryFilesCount() const; virtual wxString GetHistoryFile(size_t i) const; virtual void FileHistoryUseMenu(wxMenu *menu); virtual void FileHistoryRemoveMenu(wxMenu *menu); @@ -411,12 +411,15 @@ public: virtual void FileHistoryAddFilesToMenu(); virtual void FileHistoryAddFilesToMenu(wxMenu* menu); - inline wxString GetLastDirectory() const { return m_lastDirectory; } - inline void SetLastDirectory(const wxString& dir) { m_lastDirectory = dir; } + wxString GetLastDirectory() const { return m_lastDirectory; } + void SetLastDirectory(const wxString& dir) { m_lastDirectory = dir; } // Get the current document manager static wxDocManager* GetDocumentManager() { return sm_docManager; } + // deprecated, don't use + virtual size_t GetNoHistoryFiles() const; + protected: long m_flags; int m_defaultDocumentNameCounter; @@ -560,13 +563,13 @@ public: // Accessors virtual wxString GetHistoryFile(size_t i) const; - - // A synonym for GetNoHistoryFiles virtual size_t GetCount() const { return m_fileHistoryN; } - size_t GetNoHistoryFiles() const { return m_fileHistoryN; } wxList& GetMenus() const { return (wxList&) m_fileMenus; } + // deprecated, don't use + size_t GetNoHistoryFiles() const { return m_fileHistoryN; } + protected: // Last n files wxChar** m_fileHistory; diff --git a/src/common/docview.cpp b/src/common/docview.cpp index e3d0f5ab88..601a15803c 100644 --- a/src/common/docview.cpp +++ b/src/common/docview.cpp @@ -1374,12 +1374,9 @@ void wxDocManager::FileHistoryAddFilesToMenu() m_fileHistory->AddFilesToMenu(); } -size_t wxDocManager::GetNoHistoryFiles() const +size_t wxDocManager::GetHistoryFilesCount() const { - if (m_fileHistory) - return m_fileHistory->GetNoHistoryFiles(); - else - return 0; + return m_fileHistory ? m_fileHistory->GetCount() : 0; }