X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/021efd65100322b3c152cc1017cfb961664d30a4..ea1795398a32fe1573b50432ce199c9fe3324519:/src/common/appcmn.cpp diff --git a/src/common/appcmn.cpp b/src/common/appcmn.cpp index 003debce41..6eb1fc78d4 100644 --- a/src/common/appcmn.cpp +++ b/src/common/appcmn.cpp @@ -128,8 +128,7 @@ void wxAppBase::CleanUp() wxDeleteStockLists(); - delete wxTheColourDatabase; - wxTheColourDatabase = NULL; + wxDELETE(wxTheColourDatabase); wxAppConsole::CleanUp(); } @@ -350,7 +349,7 @@ bool wxAppBase::ProcessIdle() while (node) { wxWindow* win = node->GetData(); - if (SendIdleEvents(win, event)) + if (win->SendIdleEvents(event)) needMore = true; node = node->GetNext(); } @@ -360,36 +359,6 @@ bool wxAppBase::ProcessIdle() return needMore; } -// Send idle event to window and all subwindows -bool wxAppBase::SendIdleEvents(wxWindow* win, wxIdleEvent& event) -{ - bool needMore = false; - - win->OnInternalIdle(); - - // should we send idle event to this window? - if ( wxIdleEvent::GetMode() == wxIDLE_PROCESS_ALL || - win->HasExtraStyle(wxWS_EX_PROCESS_IDLE) ) - { - event.SetEventObject(win); - win->HandleWindowEvent(event); - - if (event.MoreRequested()) - needMore = true; - } - wxWindowList::compatibility_iterator node = win->GetChildren().GetFirst(); - while ( node ) - { - wxWindow *child = node->GetData(); - if (SendIdleEvents(child, event)) - needMore = true; - - node = node->GetNext(); - } - - return needMore; -} - // ---------------------------------------------------------------------------- // wxGUIAppTraitsBase // ---------------------------------------------------------------------------- @@ -399,7 +368,11 @@ bool wxAppBase::SendIdleEvents(wxWindow* win, wxIdleEvent& event) wxLog *wxGUIAppTraitsBase::CreateLogTarget() { #if wxUSE_LOGGUI +#ifndef __WXOSX_IPHONE__ return new wxLogGui; +#else + return new wxLogStderr; +#endif #else // we must have something! return new wxLogStderr;