]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/appcmn.cpp
fixedb ug with normalization of UNC paths (patch 558701)
[wxWidgets.git] / src / common / appcmn.cpp
index a53be00281a6a70525a58c3dfe2a90992a83493e..3e0ecff92977985e9598e089c19217f31f80a29b 100644 (file)
 
 wxAppBase::wxAppBase()
 {
 
 wxAppBase::wxAppBase()
 {
-    // this function is defined by IMPLEMENT_APP() macro in the user code
-    extern const wxBuildOptions& wxGetBuildOptions();
-
-    if ( !CheckBuildOptions(wxGetBuildOptions()) )
-    {
-        wxLogFatalError(_T("Mismatch between the program and library build ")
-                        _T("versions detected."));
-    }
-
     wxTheApp = (wxApp *)this;
 
 #if WXWIN_COMPATIBILITY_2_2
     wxTheApp = (wxApp *)this;
 
 #if WXWIN_COMPATIBILITY_2_2
@@ -191,6 +182,12 @@ void wxAppBase::SetActive(bool active, wxWindow * WXUNUSED(lastFocus))
 
 #endif // wxUSE_GUI
 
 
 #endif // wxUSE_GUI
 
+int wxAppBase::FilterEvent(wxEvent& WXUNUSED(event))
+{
+    // process the events normally by default
+    return -1;
+}
+
 // ----------------------------------------------------------------------------
 // cmd line parsing
 // ----------------------------------------------------------------------------
 // ----------------------------------------------------------------------------
 // cmd line parsing
 // ----------------------------------------------------------------------------
@@ -250,7 +247,9 @@ void wxAppBase::OnInitCmdLine(wxCmdLineParser& parser)
             wxCMD_LINE_SWITCH,
             _T(""),
             OPTION_VERBOSE,
             wxCMD_LINE_SWITCH,
             _T(""),
             OPTION_VERBOSE,
-            gettext_noop("generate verbose log messages")
+            gettext_noop("generate verbose log messages"),
+            wxCMD_LINE_VAL_NONE,
+            0x0
         },
 #endif // wxUSE_LOG
 
         },
 #endif // wxUSE_LOG
 
@@ -260,7 +259,8 @@ void wxAppBase::OnInitCmdLine(wxCmdLineParser& parser)
             _T(""),
             OPTION_THEME,
             gettext_noop("specify the theme to use"),
             _T(""),
             OPTION_THEME,
             gettext_noop("specify the theme to use"),
-            wxCMD_LINE_VAL_STRING
+            wxCMD_LINE_VAL_STRING,
+            0x0
         },
 #endif // __WXUNIVERSAL__
 
         },
 #endif // __WXUNIVERSAL__
 
@@ -273,12 +273,20 @@ void wxAppBase::OnInitCmdLine(wxCmdLineParser& parser)
             _T(""),
             OPTION_MODE,
             gettext_noop("specify display mode to use (e.g. 640x480-16)"),
             _T(""),
             OPTION_MODE,
             gettext_noop("specify display mode to use (e.g. 640x480-16)"),
-            wxCMD_LINE_VAL_STRING
+            wxCMD_LINE_VAL_STRING,
+            0x0
         },
 #endif // __WXMGL__
 
         // terminator
         },
 #endif // __WXMGL__
 
         // terminator
-        { wxCMD_LINE_NONE }
+        {
+            wxCMD_LINE_NONE,
+            _T(""),
+            _T(""),
+            _T(""),
+            wxCMD_LINE_VAL_NONE,
+            0x0
+        }
     };
 
     parser.SetDesc(cmdLineDesc);
     };
 
     parser.SetDesc(cmdLineDesc);
@@ -364,9 +372,17 @@ bool wxAppBase::CheckBuildOptions(const wxBuildOptions& opts)
     int verMaj = wxMAJOR_VERSION,
         verMin = wxMINOR_VERSION;
 
     int verMaj = wxMAJOR_VERSION,
         verMin = wxMINOR_VERSION;
 
-    return wxCMP(isDebug) && wxCMP(verMaj) && wxCMP(verMin);
+    if ( !(wxCMP(isDebug) && wxCMP(verMaj) && wxCMP(verMin)) )
+    {
+        wxLogFatalError(_T("Mismatch between the program and library build ")
+                        _T("versions detected."));
 
 
+        // normally wxLogFatalError doesn't return
+        return FALSE;
+    }
 #undef wxCMP
 #undef wxCMP
+
+    return TRUE;
 }
 
 #ifdef  __WXDEBUG__
 }
 
 #ifdef  __WXDEBUG__