From 9c8116f8f70399b08b4af7d41861278c1c2665ab Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 11 May 2008 20:32:35 +0000 Subject: [PATCH] take const wxConfig object in wxDocManager::FileHistoryLoad() and wxFileHistory::Load() (patch 1942316) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53562 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/changes.txt | 5 ++++ docs/doxygen/overviews/changes_since28.h | 32 ++++++++++++++++++++++-- include/wx/docview.h | 4 +-- src/common/docview.cpp | 4 +-- 4 files changed, 39 insertions(+), 6 deletions(-) diff --git a/docs/changes.txt b/docs/changes.txt index dfc732b91a..b440c28a81 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -87,6 +87,11 @@ Changes in behaviour not resulting in compilation errors, please read this! can still use wxGenericCalendarCtrl instead of wxCalendarCtrl in your code if you need the extra features. +- wxDocument::FileHistoryLoad() and wxFileHistory::Load() now take const + reference to wxConfigBase argument and not just a reference, please update + your code if you overrode these functions and change the functions in the + derived classes to use const reference as well. + Changes in behaviour which may result in compilation errors ----------------------------------------------------------- diff --git a/docs/doxygen/overviews/changes_since28.h b/docs/doxygen/overviews/changes_since28.h index a822f168aa..0f7846ccdb 100644 --- a/docs/doxygen/overviews/changes_since28.h +++ b/docs/doxygen/overviews/changes_since28.h @@ -62,8 +62,36 @@ Finally, a few structure fields, notable @c wxCmdLineEntryDesc::shortName, @section overview_changes_other Miscellaneous Other Changes -Please see @c docs/changes.txt for details of the other changes until they are -described in more details here. +- Default location of wxFileConfig files has changed under Windows, you will + need to update your code if you access these files directly. + +- wxWindow::IsEnabled() now returns false if a window parent (and not + necessarily the window itself) is disabled, new function IsThisEnabled() + with the same behaviour as old IsEnabled() was added. + +- Generating wxNavigationKeyEvent events doesn't work any more under wxGTK (and + other platforms in the future), use wxWindow::Navigate() or NavigateIn() + instead. + +- Sizers distribute only the extra space between the stretchable items + according to their proportions and not all available space. We believe the + new behaviour corresponds better to user expectations but if you did rely + on the old behaviour you will have to update your code to set the minimal + sizes of the sizer items to be in the same proportion as the items + proportions to return to the old behaviour. + +- wxWindow::Freeze/Thaw() are not virtual any more, if you overrode them in + your code you need to override DoFreeze/Thaw() instead now. + +- wxCalendarCtrl has native implementation in wxGTK, but it has less features + than the generic one. The native implementation is used by default, but you + can still use wxGenericCalendarCtrl instead of wxCalendarCtrl in your code if + you need the extra features. + +- wxDocument::FileHistoryLoad() and wxFileHistory::Load() now take const + reference to wxConfigBase argument and not just a reference, please update + your code if you overrode these functions and change the functions in the + derived classes to use const reference as well. */ diff --git a/include/wx/docview.h b/include/wx/docview.h index f60233b2ce..da00c0f814 100644 --- a/include/wx/docview.h +++ b/include/wx/docview.h @@ -423,7 +423,7 @@ public: virtual void FileHistoryUseMenu(wxMenu *menu); virtual void FileHistoryRemoveMenu(wxMenu *menu); #if wxUSE_CONFIG - virtual void FileHistoryLoad(wxConfigBase& config); + virtual void FileHistoryLoad(const wxConfigBase& config); virtual void FileHistorySave(wxConfigBase& config); #endif // wxUSE_CONFIG @@ -601,7 +601,7 @@ public: virtual void RemoveMenu(wxMenu *menu); #if wxUSE_CONFIG - virtual void Load(wxConfigBase& config); + virtual void Load(const wxConfigBase& config); virtual void Save(wxConfigBase& config); #endif // wxUSE_CONFIG diff --git a/src/common/docview.cpp b/src/common/docview.cpp index d678ca6b54..fd55bcb89f 100644 --- a/src/common/docview.cpp +++ b/src/common/docview.cpp @@ -1509,7 +1509,7 @@ void wxDocManager::FileHistoryRemoveMenu(wxMenu *menu) } #if wxUSE_CONFIG -void wxDocManager::FileHistoryLoad(wxConfigBase& config) +void wxDocManager::FileHistoryLoad(const wxConfigBase& config) { if (m_fileHistory) m_fileHistory->Load(config); @@ -2275,7 +2275,7 @@ void wxFileHistory::RemoveMenu(wxMenu *menu) } #if wxUSE_CONFIG -void wxFileHistory::Load(wxConfigBase& config) +void wxFileHistory::Load(const wxConfigBase& config) { m_fileHistory.Clear();