]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/log.cpp
Added wxTE_NO_VSCROLL style; corrected joystick event class
[wxWidgets.git] / src / common / log.cpp
index b71af7bd547d4ff0e481dca0f7ae94ae04158515..34391202ed6c860fe50dea0e325bc551c9b9d078 100644 (file)
@@ -47,6 +47,7 @@
 #include  "wx/file.h"
 #include  "wx/textfile.h"
 #include  "wx/utils.h"
+#include  "wx/wxchar.h"
 #include  "wx/log.h"
 
 // other standard headers
@@ -506,6 +507,9 @@ void wxLogGui::Flush()
 
     // no undisplayed messages whatsoever
     Clear();
+    
+    // do it here again
+    m_bHasMessages = FALSE;
 }
 
 // the default behaviour is to discard all informational messages if there
@@ -576,7 +580,6 @@ void wxLogGui::DoLog(wxLogLevel level, const wxChar *szString, time_t t)
                 if ( !m_bErrors ) {
                     m_aMessages.Empty();
                     m_aTimes.Empty();
-                    m_bHasMessages = TRUE;
                     m_bErrors = TRUE;
                 }
                 // fall through
@@ -589,6 +592,7 @@ void wxLogGui::DoLog(wxLogLevel level, const wxChar *szString, time_t t)
 
                 m_aMessages.Add(szString);
                 m_aTimes.Add((long)t);
+                m_bHasMessages = TRUE;
                 break;
     }
 }
@@ -896,7 +900,7 @@ wxLog          *wxLog::ms_pLogger      = (wxLog *)NULL;
 bool            wxLog::ms_doLog        = TRUE;
 bool            wxLog::ms_bAutoCreate  = TRUE;
 
-const wxChar   *wxLog::ms_timestamp    = "%X";  // time only, no date
+const wxChar   *wxLog::ms_timestamp    = _T("%X");  // time only, no date
 
 wxTraceMask     wxLog::ms_ulTraceMask  = (wxTraceMask)0;
 wxArrayString   wxLog::ms_aTraceMasks;