]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/logg.cpp
aui notebook sizing calculations streamlined
[wxWidgets.git] / src / generic / logg.cpp
index b39273fa298e3fec51e2cffcca2db7334a247d50..50e1457c19b354350e8104ba7d823f22c414a8f3 100644 (file)
 // headers
 // ----------------------------------------------------------------------------
 
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-    #pragma implementation "logg.h"
-#endif
-
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
 #ifdef __BORLANDC__
-  #pragma hdrstop
+    #pragma hdrstop
 #endif
 
 #ifndef WX_PRECOMP
@@ -41,7 +37,6 @@
     #include "wx/textctrl.h"
     #include "wx/sizer.h"
     #include "wx/statbmp.h"
-    #include "wx/button.h"
     #include "wx/settings.h"
 #endif // WX_PRECOMP
 
 #include "wx/artprov.h"
 
 #ifdef  __WXMSW__
-  // for OutputDebugString()
-  #include  "wx/msw/private.h"
+    // for OutputDebugString()
+    #include  "wx/msw/private.h"
 #endif // Windows
 
 #ifdef  __WXPM__
-  #include <time.h>
+    #include <time.h>
 #endif
 
 #if wxUSE_LOG_DIALOG
     #include "wx/listctrl.h"
     #include "wx/imaglist.h"
     #include "wx/image.h"
-#else // !wxUSE_LOG_DIALOG
-    #include "wx/msgdlg.h"
 #endif // wxUSE_LOG_DIALOG/!wxUSE_LOG_DIALOG
 
 #if defined(__MWERKS__) && wxUSE_UNICODE
@@ -251,6 +244,12 @@ void wxLogGui::Flush()
     // do it right now to block any new calls to Flush() while we're here
     m_bHasMessages = false;
 
+    unsigned repeatCount = 0;
+    if ( wxLog::GetRepetitionCounting() )
+    {
+        repeatCount = wxLog::DoLogNumberOfRepeats();
+    }
+
     wxString appName = wxTheApp->GetAppName();
     if ( !appName.empty() )
         appName[0u] = (wxChar)wxToupper(appName[0u]);
@@ -288,6 +287,8 @@ void wxLogGui::Flush()
     {
 #if wxUSE_LOG_DIALOG
 
+        if ( repeatCount > 0 )
+            m_aMessages[nMsgCount-1] += wxString::Format(wxT(" (%s)"), m_aMessages[nMsgCount-2].c_str());
         wxLogDialog dlg(NULL,
                         m_aMessages, m_aSeverity, m_aTimes,
                         title, style);
@@ -1221,4 +1222,3 @@ void wxLogTextCtrl::DoLogString(const wxChar *szString, time_t WXUNUSED(t))
 }
 
 #endif // wxUSE_LOG && wxUSE_TEXTCTRL
-