]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/appbase.cpp
Regenerated makefiles.
[wxWidgets.git] / src / common / appbase.cpp
index 941c8aa71b2624293b90505cffab93c24a206700..81088e790821c7e12c58ab9493bbfa35a4a47b4d 100644 (file)
 #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
     #include "wx/fontmap.h"
 #endif // wxUSE_FONTMAP
 
-#if wxUSE_SOCKETS
-    #include "wx/gsocket.h"
-#endif // wxUSE_SOCKETS
-
 #if defined(__WXMAC__)
     // VZ: MacTypes.h is enough under Mac OS X (where I could test it) but
     //     I don't know which headers are needed under earlier systems so
@@ -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,10 @@ int wxAppConsole::FilterEvent(wxEvent& WXUNUSED(event))
     return -1;
 }
 
+// ----------------------------------------------------------------------------
+// exception handling
+// ----------------------------------------------------------------------------
+
 #if wxUSE_EXCEPTIONS
 
 void
@@ -292,6 +299,17 @@ wxAppConsole::HandleEvent(wxEvtHandler *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
 
 // ----------------------------------------------------------------------------
@@ -392,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;
@@ -479,16 +497,6 @@ GSocketGUIFunctionsTable* wxConsoleAppTraitsBase::GetSocketGUIFunctionsTable()
 {
     return NULL;
 }
-
-// TODO: Use a different class that only stubs out the event loop functions
-GSocketBSD* wxConsoleAppTraitsBase::CreateGSocket()
-{
-#ifdef wxUSE_GSOCKET_CPLUSPLUS
-    return new GSocketBSDGUIShim();
-#else
-    return NULL;
-#endif
-}
 #endif
 
 // ----------------------------------------------------------------------------