compilation fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2628 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -16,6 +16,25 @@
|
|||||||
#pragma interface "log.h"
|
#pragma interface "log.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// forward declarations
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
class WXDLLEXPORT wxTextCtrl;
|
||||||
|
class WXDLLEXPORT wxLogFrame;
|
||||||
|
class WXDLLEXPORT wxFrame;
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// types
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
typedef unsigned long wxTraceMask;
|
||||||
|
typedef unsigned long wxLogLevel;
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// headers
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
#if wxUSE_LOG
|
#if wxUSE_LOG
|
||||||
|
|
||||||
#include <time.h> // for time_t
|
#include <time.h> // for time_t
|
||||||
@@ -68,17 +87,6 @@ enum
|
|||||||
#define wxTraceOleCalls 0x0100 // OLE interface calls
|
#define wxTraceOleCalls 0x0100 // OLE interface calls
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef unsigned long wxTraceMask;
|
|
||||||
typedef unsigned long wxLogLevel;
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
|
||||||
// forward declarations
|
|
||||||
// ----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
class WXDLLEXPORT wxTextCtrl;
|
|
||||||
class WXDLLEXPORT wxLogFrame;
|
|
||||||
class WXDLLEXPORT wxFrame;
|
|
||||||
|
|
||||||
#if wxUSE_IOSTREAMH
|
#if wxUSE_IOSTREAMH
|
||||||
// N.B. BC++ doesn't have istream.h, ostream.h
|
// N.B. BC++ doesn't have istream.h, ostream.h
|
||||||
# include <iostream.h>
|
# include <iostream.h>
|
||||||
@@ -376,10 +384,9 @@ extern void WXDLLEXPORT wxLog##level(arg1, const wxChar *szFormat, ...)
|
|||||||
|
|
||||||
// log functions do nothing at all
|
// log functions do nothing at all
|
||||||
#define DECLARE_LOG_FUNCTION(level) \
|
#define DECLARE_LOG_FUNCTION(level) \
|
||||||
inline void WXDLLEXPORT wxLog##level(const wxChar * WXUNUSED(szFormat), ...) {}
|
inline void WXDLLEXPORT wxLog##level(const wxChar *szFormat, ...) {}
|
||||||
#define DECLARE_LOG_FUNCTION2(level, arg1) \
|
#define DECLARE_LOG_FUNCTION2(level, arg1) \
|
||||||
inline void WXDLLEXPORT wxLog##level(WXUNUSED(arg1), \
|
inline void WXDLLEXPORT wxLog##level(arg1, const wxChar *szFormat, ...) {}
|
||||||
const wxChar *WXUNUSED(szFormat), ...) {}
|
|
||||||
|
|
||||||
#endif // wxUSE_LOG/!wxUSE_LOG
|
#endif // wxUSE_LOG/!wxUSE_LOG
|
||||||
|
|
||||||
|
@@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
#include "wx/defs.h"
|
#include "wx/defs.h"
|
||||||
#include "wx/event.h"
|
#include "wx/event.h"
|
||||||
|
#include "wx/dynarray.h"
|
||||||
|
|
||||||
class WXDLLEXPORT wxMenuItem;
|
class WXDLLEXPORT wxMenuItem;
|
||||||
class WXDLLEXPORT wxMenuBar;
|
class WXDLLEXPORT wxMenuBar;
|
||||||
|
@@ -172,6 +172,13 @@
|
|||||||
#define wxUSE_SOCKETS 0
|
#define wxUSE_SOCKETS 0
|
||||||
// Set to 1 to use socket classes
|
// Set to 1 to use socket classes
|
||||||
|
|
||||||
|
// these settings can't be set to 0 for now
|
||||||
|
#define wxUSE_INTL 1
|
||||||
|
#define wxUSE_LOG 1
|
||||||
|
#define wxUSE_VALIDATORS 1
|
||||||
|
#define wxUSE_ACCEL 1
|
||||||
|
#define wxUSE_SASH 1
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Finer detail
|
* Finer detail
|
||||||
*
|
*
|
||||||
|
@@ -416,6 +416,7 @@ void wxApp::CleanUp()
|
|||||||
{
|
{
|
||||||
//// COMMON CLEANUP
|
//// COMMON CLEANUP
|
||||||
|
|
||||||
|
#if wxUSE_LOG
|
||||||
// flush the logged messages if any and install a 'safer' log target: the
|
// flush the logged messages if any and install a 'safer' log target: the
|
||||||
// default one (wxLogGui) can't be used after the resources are freed just
|
// default one (wxLogGui) can't be used after the resources are freed just
|
||||||
// below and the user suppliedo ne might be even more unsafe (using any
|
// below and the user suppliedo ne might be even more unsafe (using any
|
||||||
@@ -424,6 +425,7 @@ void wxApp::CleanUp()
|
|||||||
|
|
||||||
// this will flush the old messages if any
|
// this will flush the old messages if any
|
||||||
delete wxLog::SetActiveTarget(new wxLogStderr);
|
delete wxLog::SetActiveTarget(new wxLogStderr);
|
||||||
|
#endif // wxUSE_LOG
|
||||||
|
|
||||||
// One last chance for pending objects to be cleaned up
|
// One last chance for pending objects to be cleaned up
|
||||||
wxTheApp->DeletePendingObjects();
|
wxTheApp->DeletePendingObjects();
|
||||||
@@ -529,8 +531,10 @@ void wxApp::CleanUp()
|
|||||||
// wxDebugContext::SetStream(NULL, NULL);
|
// wxDebugContext::SetStream(NULL, NULL);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if wxUSE_LOG
|
||||||
// do it as the very last thing because everything else can log messages
|
// do it as the very last thing because everything else can log messages
|
||||||
delete wxLog::SetActiveTarget(NULL);
|
delete wxLog::SetActiveTarget(NULL);
|
||||||
|
#endif // wxUSE_LOG
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !defined(_WINDLL) || (defined(_WINDLL) && defined(WXMAKINGDLL))
|
#if !defined(_WINDLL) || (defined(_WINDLL) && defined(WXMAKINGDLL))
|
||||||
@@ -944,10 +948,12 @@ void wxApp::OnIdle(wxIdleEvent& event)
|
|||||||
// 'Garbage' collection of windows deleted with Close().
|
// 'Garbage' collection of windows deleted with Close().
|
||||||
DeletePendingObjects();
|
DeletePendingObjects();
|
||||||
|
|
||||||
|
#if wxUSE_LOG
|
||||||
// flush the logged messages if any
|
// flush the logged messages if any
|
||||||
wxLog *pLog = wxLog::GetActiveTarget();
|
wxLog *pLog = wxLog::GetActiveTarget();
|
||||||
if ( pLog != NULL && pLog->HasPendingMessages() )
|
if ( pLog != NULL && pLog->HasPendingMessages() )
|
||||||
pLog->Flush();
|
pLog->Flush();
|
||||||
|
#endif // wxUSE_LOG
|
||||||
|
|
||||||
// Send OnIdle events to all windows
|
// Send OnIdle events to all windows
|
||||||
if ( SendIdleEvents() )
|
if ( SendIdleEvents() )
|
||||||
|
Reference in New Issue
Block a user