X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/aad65f130d9cb77d0e9f2b7b580c54712386f77a..277f2e527e33de039146ab94358ffec9c98f6112:/src/common/appcmn.cpp diff --git a/src/common/appcmn.cpp b/src/common/appcmn.cpp index 665e19c19a..1018cbae7c 100644 --- a/src/common/appcmn.cpp +++ b/src/common/appcmn.cpp @@ -42,6 +42,7 @@ #include "wx/confbase.h" #include "wx/tokenzr.h" #include "wx/utils.h" +#include "wx/msgout.h" #if wxUSE_GUI #include "wx/artprov.h" @@ -188,12 +189,27 @@ int wxAppBase::FilterEvent(wxEvent& WXUNUSED(event)) return -1; } +void wxAppBase::DoInit() +{ + if(wxMessageOutput::Get()) return; +#if wxUSE_GUI + #ifdef __WXMOTIF__ + wxMessageOutput::Set(new wxMessageOutputLog); + #else + wxMessageOutput::Set(new wxMessageOutputMessageBox); + #endif +#else + wxMessageOutput::Set(new wxMessageOutputStderr); +#endif +} + // ---------------------------------------------------------------------------- // cmd line parsing // ---------------------------------------------------------------------------- bool wxAppBase::OnInit() { + DoInit(); #if wxUSE_CMDLINE_PARSER wxCmdLineParser parser(argc, argv);