]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/msgout.cpp
print session additions
[wxWidgets.git] / src / common / msgout.cpp
index fa0667ab21b4c3ed2d7e9e89e6ffaaa4b430d8a0..e6a079969e17786e54a2f96e19ca64e85389f0fb 100755 (executable)
     #include "wx/string.h"
     #include "wx/ffile.h"
     #include "wx/app.h"
     #include "wx/string.h"
     #include "wx/ffile.h"
     #include "wx/app.h"
+    #include "wx/intl.h"
     #if wxUSE_GUI
         #include "wx/msgdlg.h"
     #endif // wxUSE_GUI
 #endif
 
 #include "wx/msgout.h"
     #if wxUSE_GUI
         #include "wx/msgdlg.h"
     #endif // wxUSE_GUI
 #endif
 
 #include "wx/msgout.h"
+#include "wx/log.h"
 
 #include <stdarg.h>
 #include <stdio.h>
 
 #include <stdarg.h>
 #include <stdio.h>
@@ -96,10 +98,16 @@ void wxMessageOutputMessageBox::Printf(const wxChar* format, ...)
     out.PrintfV(format, args);
     va_end(args);
 
     out.PrintfV(format, args);
     va_end(args);
 
+    // the native MSW msg box understands the TABs, others don't
 #ifndef __WXMSW__
 #ifndef __WXMSW__
-    out.Replace(wxT("\t"),wxT("        "));
+    out.Replace(wxT("\t"), wxT("        "));
 #endif
 #endif
-    ::wxMessageBox(out);
+
+    wxString title;
+    if ( wxTheApp )
+        title.Printf(_("%s message"), wxTheApp->GetAppName().c_str());
+
+    ::wxMessageBox(out, title);
 }
 
 #endif // wxUSE_GUI
 }
 
 #endif // wxUSE_GUI
@@ -118,7 +126,7 @@ void wxMessageOutputLog::Printf(const wxChar* format, ...)
     out.PrintfV(format, args);
     va_end(args);
 
     out.PrintfV(format, args);
     va_end(args);
 
-    out.Replace(wxT("\t"),wxT("        "));
+    out.Replace(wxT("\t"), wxT("        "));
 
     ::wxLogMessage(wxT("%s"), out.c_str());
 }
 
     ::wxLogMessage(wxT("%s"), out.c_str());
 }