]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/appbase.cpp
non-pch build fix
[wxWidgets.git] / src / common / appbase.cpp
index 339fe276c4e5df373e25c1ac2cf50985c58bb67c..d2b8a4c3f309060d50a88baa6933249d392d14a0 100644 (file)
@@ -44,6 +44,7 @@
 #include "wx/msgout.h"
 #include "wx/ptr_scpd.h"
 #include "wx/tokenzr.h"
+#include "wx/thread.h"
 
 #if wxUSE_EXCEPTIONS && wxUSE_STL
     #include <exception>
@@ -466,7 +467,7 @@ bool wxAppConsoleBase::OnExceptionInMainLoop()
 
 #if wxUSE_CMDLINE_PARSER
 
-#define OPTION_VERBOSE _T("verbose")
+#define OPTION_VERBOSE "verbose"
 
 void wxAppConsoleBase::OnInitCmdLine(wxCmdLineParser& parser)
 {
@@ -475,8 +476,8 @@ void wxAppConsoleBase::OnInitCmdLine(wxCmdLineParser& parser)
     {
         {
             wxCMD_LINE_SWITCH,
-            _T("h"),
-            _T("help"),
+            "h",
+            "help",
             gettext_noop("show this help message"),
             wxCMD_LINE_VAL_NONE,
             wxCMD_LINE_OPTION_HELP
@@ -485,7 +486,7 @@ void wxAppConsoleBase::OnInitCmdLine(wxCmdLineParser& parser)
 #if wxUSE_LOG
         {
             wxCMD_LINE_SWITCH,
-            wxEmptyString,
+            NULL,
             OPTION_VERBOSE,
             gettext_noop("generate verbose log messages"),
             wxCMD_LINE_VAL_NONE,
@@ -494,14 +495,7 @@ void wxAppConsoleBase::OnInitCmdLine(wxCmdLineParser& parser)
 #endif // wxUSE_LOG
 
         // terminator
-        {
-            wxCMD_LINE_NONE,
-            wxEmptyString,
-            wxEmptyString,
-            wxEmptyString,
-            wxCMD_LINE_VAL_NONE,
-            0x0
-        }
+        wxCMD_LINE_DESC_END
     };
 
     parser.SetDesc(cmdLineDesc);
@@ -651,13 +645,6 @@ void wxConsoleAppTraitsBase::RemoveFromPendingDelete(wxObject * WXUNUSED(object)
     // nothing to do
 }
 
-#if wxUSE_SOCKETS
-GSocketGUIFunctionsTable* wxConsoleAppTraitsBase::GetSocketGUIFunctionsTable()
-{
-    return NULL;
-}
-#endif
-
 // ----------------------------------------------------------------------------
 // wxAppTraits
 // ----------------------------------------------------------------------------
@@ -670,6 +657,31 @@ void wxAppTraitsBase::SetLocale()
 }
 #endif
 
+#if wxUSE_THREADS
+void wxMutexGuiEnterImpl();
+void wxMutexGuiLeaveImpl();
+
+void wxAppTraitsBase::MutexGuiEnter()
+{
+    wxMutexGuiEnterImpl();
+}
+
+void wxAppTraitsBase::MutexGuiLeave()
+{
+    wxMutexGuiLeaveImpl();
+}
+
+void WXDLLIMPEXP_BASE wxMutexGuiEnter()
+{
+    wxAppConsoleBase::GetInstance()->GetTraits()->MutexGuiEnter();
+}
+
+void WXDLLIMPEXP_BASE wxMutexGuiLeave()
+{
+    wxAppConsoleBase::GetInstance()->GetTraits()->MutexGuiLeave();
+}
+#endif // wxUSE_THREADS
+
 #ifdef __WXDEBUG__
 
 bool wxAppTraitsBase::ShowAssertDialog(const wxString& msgOriginal)
@@ -797,12 +809,6 @@ void wxTrap()
 {
 #if defined(__WXMSW__) && !defined(__WXMICROWIN__)
     DebugBreak();
-#elif defined(__WXMAC__) && !defined(__DARWIN__)
-    #if __powerc
-        Debugger();
-    #else
-        SysBreak();
-    #endif
 #elif defined(_MSL_USING_MW_C_HEADERS) && _MSL_USING_MW_C_HEADERS
     Debugger();
 #elif defined(__UNIX__)
@@ -944,6 +950,7 @@ static void LINKAGEMODE SetTraceMasks()
 #endif // wxUSE_LOG
 }
 
+static
 bool DoShowAssertDialog(const wxString& msg)
 {
     // under MSW we can show the dialog even in the console mode