projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
merged MapBitmap() from 2.2 branch
[wxWidgets.git]
/
src
/
generic
/
logg.cpp
diff --git
a/src/generic/logg.cpp
b/src/generic/logg.cpp
index a27b1945a1e3028b78cadad9d5299377e20966b2..911c39c5a7d4b032e71ba1a0a7139e040cca3968 100644
(file)
--- a/
src/generic/logg.cpp
+++ b/
src/generic/logg.cpp
@@
-57,18
+57,11
@@
#include "wx/msw/private.h"
#endif // Windows
#include "wx/msw/private.h"
#endif // Windows
-// may be defined to 0 for old behavior (using wxMessageBox) - shouldn't be
-// changed normally (that's why it's here and not in setup.h).
-// Actually it now is in setup.h.
-#ifndef wxUSE_LOG_DIALOG
-#define wxUSE_LOG_DIALOG 1
-#endif
-
#if wxUSE_LOG_DIALOG
#include "wx/listctrl.h"
#include "wx/imaglist.h"
#include "wx/image.h"
#if wxUSE_LOG_DIALOG
#include "wx/listctrl.h"
#include "wx/imaglist.h"
#include "wx/image.h"
-#else // !wxUSE_
TEXTFILE
+#else // !wxUSE_
LOG_DIALOG
#include "wx/msgdlg.h"
#endif // wxUSE_LOG_DIALOG/!wxUSE_LOG_DIALOG
#include "wx/msgdlg.h"
#endif // wxUSE_LOG_DIALOG/!wxUSE_LOG_DIALOG
@@
-553,15
+546,15
@@
wxLogFrame::~wxLogFrame()
// wxLogWindow
// -----------
// wxLogWindow
// -----------
+
wxLogWindow::wxLogWindow(wxFrame *pParent,
const wxChar *szTitle,
bool bShow,
bool bDoPass)
{
wxLogWindow::wxLogWindow(wxFrame *pParent,
const wxChar *szTitle,
bool bShow,
bool bDoPass)
{
-
m_bPassMessages = bDoPass
;
+
PassMessages(bDoPass)
;
m_pLogFrame = new wxLogFrame(pParent, this, szTitle);
m_pLogFrame = new wxLogFrame(pParent, this, szTitle);
- m_pOldLog = wxLog::SetActiveTarget(this);
if ( bShow )
m_pLogFrame->Show(TRUE);
if ( bShow )
m_pLogFrame->Show(TRUE);
@@
-572,21
+565,10
@@
void wxLogWindow::Show(bool bShow)
m_pLogFrame->Show(bShow);
}
m_pLogFrame->Show(bShow);
}
-void wxLogWindow::Flush()
-{
- if ( m_pOldLog != NULL )
- m_pOldLog->Flush();
-
- m_bHasMessages = FALSE;
-}
-
void wxLogWindow::DoLog(wxLogLevel level, const wxChar *szString, time_t t)
{
// first let the previous logger show it
void wxLogWindow::DoLog(wxLogLevel level, const wxChar *szString, time_t t)
{
// first let the previous logger show it
- if ( m_pOldLog != NULL && m_bPassMessages ) {
- // bogus cast just to access protected DoLog
- ((wxLogWindow *)m_pOldLog)->DoLog(level, szString, t);
- }
+ wxLogPassThrough::DoLog(level, szString, t);
if ( m_pLogFrame ) {
switch ( level ) {
if ( m_pLogFrame ) {
switch ( level ) {
@@
-659,8
+641,6
@@
void wxLogWindow::OnFrameDelete(wxFrame * WXUNUSED(frame))
wxLogWindow::~wxLogWindow()
{
wxLogWindow::~wxLogWindow()
{
- delete m_pOldLog;
-
// may be NULL if log frame already auto destroyed itself
delete m_pLogFrame;
}
// may be NULL if log frame already auto destroyed itself
delete m_pLogFrame;
}