X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/74698d3a22d5e611bbcd731a3ade616c66cfaca6..6788de4d30773ed96c3793c2e0faee88266a7140:/src/common/msgout.cpp?ds=sidebyside diff --git a/src/common/msgout.cpp b/src/common/msgout.cpp index c677a6bef1..7addcc6310 100755 --- a/src/common/msgout.cpp +++ b/src/common/msgout.cpp @@ -50,6 +50,16 @@ wxMessageOutput* wxMessageOutput::ms_msgOut = 0; wxMessageOutput* wxMessageOutput::Get() { + // FIXME this is an hack + static bool inGet = FALSE; + + if(!ms_msgOut && wxTheApp && !inGet) + { + inGet = TRUE; + wxTheApp->DoInit(); + } + + inGet = FALSE; return ms_msgOut; } @@ -73,7 +83,7 @@ void wxMessageOutputStderr::Printf(const wxChar* format, ...) out.PrintfV(format, args); va_end(args); - fprintf(stderr, "%s", out.mb_str()); + fprintf(stderr, "%s", (const char*) out.mb_str()); } // ---------------------------------------------------------------------------- @@ -92,7 +102,7 @@ void wxMessageOutputMessageBox::Printf(const wxChar* format, ...) va_end(args); #ifndef __WXMSW__ - out.Replace("\t"," "); + out.Replace(wxT("\t"),wxT(" ")); #endif ::wxMessageBox(out); } @@ -103,8 +113,6 @@ void wxMessageOutputMessageBox::Printf(const wxChar* format, ...) // wxMessageOutputLog // ---------------------------------------------------------------------------- -#if wxUSE_GUI && defined(__WXMOTIF__) - void wxMessageOutputLog::Printf(const wxChar* format, ...) { va_list args; @@ -119,5 +127,3 @@ void wxMessageOutputLog::Printf(const wxChar* format, ...) // wxLog, which is better than nothing ::wxLogMessage("%s", out.c_str()); } - -#endif // wxUSE_GUI