]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/appcmn.cpp
Fix compilation errors under OSX.
[wxWidgets.git] / src / common / appcmn.cpp
index ca3c6fdc7504c616cd67a079c5522643e774e2e4..6eb1fc78d4c578f7aa0e2a850f838c4549b5b3f8 100644 (file)
@@ -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;
@@ -465,11 +438,6 @@ bool wxGUIAppTraitsBase::ShowAssertDialog(const wxString& msg)
         wxString msgDlg = msg;
 
 #if wxUSE_STACKWALKER
-        // on Unix stack frame generation may take some time, depending on the
-        // size of the executable mainly... warn the user that we are working
-        wxFprintf(stderr, wxT("[Debug] Generating a stack trace... please wait"));
-        fflush(stderr);
-
         const wxString stackTrace = GetAssertStackTrace();
         if ( !stackTrace.empty() )
             msgDlg << wxT("\n\nCall stack:\n") << stackTrace;