]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/appbase.cpp
Regenerated makefiles.
[wxWidgets.git] / src / common / appbase.cpp
index 1ba660b4f31aff63ab3e9710be725701564e0eac..81088e790821c7e12c58ab9493bbfa35a4a47b4d 100644 (file)
@@ -46,7 +46,7 @@
 #endif  //Win/Unix
 
 #if defined(__WXMSW__)
-  #include  "wx/msw/private.h"  // includes windows.h for MessageBox()
+  #include  "wx/msw/wrapwin.h"  // includes windows.h for MessageBox()
 #endif
 
 #if wxUSE_FONTMAP
@@ -93,10 +93,6 @@ wxAppConsole *wxAppConsole::ms_appInstance = NULL;
 
 wxAppInitializerFunction wxAppConsole::ms_appInitFn = NULL;
 
-#ifdef __WXMAC__
-bool wxAppConsole::s_macDefaultEncodingIsPC = true ;
-#endif
-
 // ============================================================================
 // wxAppConsole implementation
 // ============================================================================
@@ -113,6 +109,13 @@ wxAppConsole::wxAppConsole()
 
 #ifdef __WXDEBUG__
     SetTraceMasks();
+#if wxUSE_UNICODE
+    // In unicode mode the SetTraceMasks call can cause an apptraits to be
+    // created, but since we are still in the constructor the wrong kind will
+    // be created for GUI apps.  Destroy it so it can be created again later.
+    delete m_traits;
+    m_traits = NULL;
+#endif
 #endif
 }
 
@@ -281,6 +284,34 @@ int wxAppConsole::FilterEvent(wxEvent& WXUNUSED(event))
     return -1;
 }
 
+// ----------------------------------------------------------------------------
+// exception handling
+// ----------------------------------------------------------------------------
+
+#if wxUSE_EXCEPTIONS
+
+void
+wxAppConsole::HandleEvent(wxEvtHandler *handler,
+                          wxEventFunction func,
+                          wxEvent& event) const
+{
+    // by default, simply call the handler
+    (handler->*func)(event);
+}
+
+bool
+wxAppConsole::OnExceptionInMainLoop()
+{
+    throw;
+
+    // some compilers are too stupid to know that we never return after throw
+#if defined(__DMC__) || (defined(_MSC_VER) && _MSC_VER < 1200)
+    return false;
+#endif
+}
+
+#endif // wxUSE_EXCEPTIONS
+
 // ----------------------------------------------------------------------------
 // cmd line parsing
 // ----------------------------------------------------------------------------
@@ -379,7 +410,7 @@ bool wxAppConsole::CheckBuildOptions(const char *optionsSignature,
         msg.Printf(_T("Mismatch between the program and library build versions detected.\nThe library used %s,\nand %s used %s."),
                    lib.c_str(), progName.c_str(), prog.c_str());
 
-        wxLogFatalError(msg);
+        wxLogFatalError(msg.c_str());
 
         // normally wxLogFatalError doesn't return
         return FALSE;