// headers
// ----------------------------------------------------------------------------
-// no #pragma implementation "log.h" because it's already in src/common/log.cpp
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
+ #pragma implementation "logg.h"
+#endif
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#pragma hdrstop
#endif
-#if !wxUSE_GUI
- #error "This file can't be compiled without GUI!"
-#endif
-
#ifndef WX_PRECOMP
#include "wx/app.h"
#include "wx/button.h"
// allows to exclude the usage of wxDateTime
static wxString TimeStamp(const wxChar *format, time_t t)
{
+#ifdef __WXWINCE__
+ // FIXME
+ return wxEmptyString;
+#else
wxChar buf[4096];
if ( !wxStrftime(buf, WXSIZEOF(buf), format, localtime(&t)) )
{
wxFAIL_MSG(_T("strftime() failed"));
}
return wxString(buf);
+#endif
}
wxASSERT( gs_pFrame == NULL ); // should be reset!
gs_pFrame = pFrame;
+#ifdef __WXWINCE__
+ wxLog::OnLog(wxLOG_Status, msg, 0);
+#else
wxLog::OnLog(wxLOG_Status, msg, time(NULL));
+#endif
gs_pFrame = (wxFrame *) NULL;
}
}
#endif // wxUSE_FILE
void OnClear(wxCommandEvent& event);
- void OnIdle(wxIdleEvent&);
-
// accessors
wxTextCtrl *TextCtrl() const { return m_pTextCtrl; }
// open file
// ---------
- bool bOk = FALSE;
+ bool bOk;
if ( wxFile::Exists(filename) ) {
bool bAppend = FALSE;
wxString strMsg;
#endif // !(wxUSE_LOGGUI || wxUSE_LOGWINDOW)
-#if wxUSE_LOG && wxUSE_GUI && wxUSE_TEXTCTRL
+#if wxUSE_LOG && wxUSE_TEXTCTRL
// ----------------------------------------------------------------------------
// wxLogTextCtrl implementation
wxString msg;
TimeStamp(&msg);
-#if defined(__WXMAC__)
- // VZ: this is a bug in wxMac, it *must* accept '\n' as new line, the
- // translation must be done in wxTextCtrl, not here! (FIXME)
- msg << szString << wxT('\r');
-#else
msg << szString << wxT('\n');
-#endif
-
m_pTextCtrl->AppendText(msg);
}
-#endif // wxUSE_LOG && wxUSE_GUI && wxUSE_TEXTCTRL
+#endif // wxUSE_LOG && wxUSE_TEXTCTRL
-// vi:sts=4:sw=4:et