]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/appcmn.cpp
don't inherit the controls colours from the parent - at least for the background...
[wxWidgets.git] / src / common / appcmn.cpp
index c3461c2934a2abb6f8f375761eff03bd4fb14f7f..6795eec0c41d20ccd7c6ece181ca04efd15cb807 100644 (file)
@@ -40,6 +40,8 @@
 #include "wx/cmdline.h"
 #include "wx/thread.h"
 #include "wx/confbase.h"
 #include "wx/cmdline.h"
 #include "wx/thread.h"
 #include "wx/confbase.h"
+#include "wx/tokenzr.h"
+#include "wx/utils.h"
 
 #if !defined(__WXMSW__) || defined(__WXMICROWIN__)
   #include  <signal.h>      // for SIGTRAP used by wxTrap()
 
 #if !defined(__WXMSW__) || defined(__WXMICROWIN__)
   #include  <signal.h>      // for SIGTRAP used by wxTrap()
 // initialization and termination
 // ----------------------------------------------------------------------------
 
 // initialization and termination
 // ----------------------------------------------------------------------------
 
+#ifdef __WXDEBUG__
+static void LINKAGEMODE SetTraceMasks()
+{
+    wxString mask;
+    if ( wxGetEnv(wxT("WXTRACE"), &mask) )
+    {
+        wxStringTokenizer tkn(mask, wxT(","));
+        while ( tkn.HasMoreTokens() )
+            wxLog::AddTraceMask(tkn.GetNextToken());
+    }
+}
+#endif
+
 wxAppBase::wxAppBase()
 {
     wxTheApp = (wxApp *)this;
 wxAppBase::wxAppBase()
 {
     wxTheApp = (wxApp *)this;
@@ -74,6 +89,10 @@ wxAppBase::wxAppBase()
     m_exitOnFrameDelete = TRUE;
     m_isActive = TRUE;
 #endif // wxUSE_GUI
     m_exitOnFrameDelete = TRUE;
     m_isActive = TRUE;
 #endif // wxUSE_GUI
+
+#ifdef __WXDEBUG__
+    SetTraceMasks();
+#endif
 }
 
 wxAppBase::~wxAppBase()
 }
 
 wxAppBase::~wxAppBase()