From: Vadim Zeitlin Date: Mon, 7 Sep 1998 15:38:51 +0000 (+0000) Subject: ok, now it _does_ compile X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/c9dac6640f8ff2b50070bb2224cfd126b81181e6 ok, now it _does_ compile git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@706 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/log.h b/include/wx/log.h index 5d492339b8..00b4cdd1d1 100644 --- a/include/wx/log.h +++ b/include/wx/log.h @@ -82,6 +82,9 @@ public: bool HasPendingMessages() const { return m_bHasMessages; } // only one sink is active at each moment + // get current log target, will call wxApp::CreateLogTarget() to create one + // if none exists + static wxLog *GetActiveTarget(); // change log target, pLogger = NULL disables logging. if bNoFlashOld is true, // the old log target isn't flashed which might lead to loss of messages! // returns the previous log target diff --git a/src/common/log.cpp b/src/common/log.cpp index bf1994214f..6af8892fcd 100644 --- a/src/common/log.cpp +++ b/src/common/log.cpp @@ -265,10 +265,10 @@ wxLog *wxLog::GetActiveTarget() return ms_pLogger; } -wxLog *wxLog::SetActiveTarget(wxLog *pLogger) +wxLog *wxLog::SetActiveTarget(wxLog *pLogger, bool bNoFlashOld) { // flush the old messages before changing - if ( ms_pLogger != NULL ) + if ( (ms_pLogger != NULL) && !bNoFlashOld ) ms_pLogger->Flush(); wxLog *pOldLogger = ms_pLogger; @@ -423,7 +423,7 @@ void wxLogGui::Flush() // do it right now to block any new calls to Flush() while we're here m_bHasMessages = FALSE; - + // @@@ ugly... // concatenate all strings (but not too many to not overfill the msg box) @@ -633,7 +633,7 @@ void wxLogFrame::OnSave(wxCommandEvent& WXUNUSED(event)) // open file // --------- wxFile file; - bool bOk = FALSE; + bool bOk = FALSE; if ( wxFile::Exists(szFileName) ) { bool bAppend = FALSE; wxString strMsg; @@ -723,7 +723,7 @@ void wxLogWindow::Flush() if ( m_pOldLog != NULL ) m_pOldLog->Flush(); - m_bHasMessages = FALSE; + m_bHasMessages = FALSE; } void wxLogWindow::DoLog(wxLogLevel level, const char *szString)