removal of VA #ifdefs aournd delete operators and some additional support for accelerators
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7460 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -102,6 +102,7 @@ public:
|
||||
#endif // wxUSE_STATUSBAR
|
||||
|
||||
WXHMENU GetWinMenu() const { return m_hMenu; }
|
||||
WXHWND GetFrame() const { return m_hFrame; }
|
||||
|
||||
// Returns the origin of client area (may be different from (0,0) if the
|
||||
// frame has a toolbar)
|
||||
|
@@ -149,7 +149,11 @@
|
||||
// since you may well need to output
|
||||
// an error log in a production
|
||||
// version (or non-debugging beta)
|
||||
#if defined(__VISAGECPP__) && (__IBMCPP__ < 400 || __IBMC__ < 400 )
|
||||
#define wxUSE_GLOBAL_MEMORY_OPERATORS 0
|
||||
#else
|
||||
#define wxUSE_GLOBAL_MEMORY_OPERATORS 1
|
||||
#endif
|
||||
// In debug mode, cause new and delete to be redefined globally.
|
||||
// If this causes problems (e.g. link errors), set this to 0.
|
||||
|
||||
|
@@ -149,7 +149,11 @@
|
||||
// since you may well need to output
|
||||
// an error log in a production
|
||||
// version (or non-debugging beta)
|
||||
#if defined(__VISAGECPP__) && (__IBMCPP__ < 400 || __IBMC__ < 400 )
|
||||
#define wxUSE_GLOBAL_MEMORY_OPERATORS 0
|
||||
#else
|
||||
#define wxUSE_GLOBAL_MEMORY_OPERATORS 1
|
||||
#endif
|
||||
// In debug mode, cause new and delete to be redefined globally.
|
||||
// If this causes problems (e.g. link errors), set this to 0.
|
||||
|
||||
|
@@ -309,9 +309,7 @@ void wxApp::CleanUp()
|
||||
//
|
||||
// This will flush the old messages if any
|
||||
//
|
||||
#if (!(defined(__VISAGECPP__) && (__IBMCPP__ < 400 || __IBMC__ < 400 )))
|
||||
delete wxLog::SetActiveTarget(new wxLogStderr);
|
||||
#endif
|
||||
#endif // wxUSE_LOG
|
||||
|
||||
//
|
||||
@@ -370,9 +368,7 @@ void wxApp::CleanUp()
|
||||
|
||||
delete wxPendingEvents;
|
||||
#if wxUSE_THREADS
|
||||
#if (!(defined(__VISAGECPP__) && (__IBMCPP__ < 400 || __IBMC__ < 400 )))
|
||||
delete wxPendingEventsLocker;
|
||||
#endif
|
||||
// If we don't do the following, we get an apparent memory leak.
|
||||
((wxEvtHandler&) wxDefaultValidator).ClearEventLocker();
|
||||
#endif
|
||||
@@ -402,9 +398,7 @@ void wxApp::CleanUp()
|
||||
|
||||
#if wxUSE_LOG
|
||||
// do it as the very last thing because everything else can log messages
|
||||
#if (!(defined(__VISAGECPP__) && (__IBMCPP__ < 400 || __IBMC__ < 400 )))
|
||||
delete wxLog::SetActiveTarget(NULL);
|
||||
#endif
|
||||
#endif // wxUSE_LOG
|
||||
} // end of wxApp::CleanUp
|
||||
|
||||
|
@@ -267,6 +267,15 @@ bool wxMenu::DoInsertOrAppend(
|
||||
wxString sError;
|
||||
#if wxUSE_ACCEL
|
||||
UpdateAccel(pItem);
|
||||
|
||||
//
|
||||
// Ensure the accelerator table is set to the frame (not the client!)
|
||||
//
|
||||
if (!::WinSetAccelTable( vHabmain
|
||||
,(HWND)pFrame->GetFrame()
|
||||
,m_vAccelTable.GetHACCEL()
|
||||
))
|
||||
wxLogLastError("WinSetAccelTable");
|
||||
#endif // wxUSE_ACCEL
|
||||
|
||||
//
|
||||
|
Reference in New Issue
Block a user