}
}
-void wxLog::DoLogString(const wxChar *WXUNUSED(szString), time_t t)
+void wxLog::DoLogString(const wxChar *WXUNUSED(szString), time_t WXUNUSED(t))
{
wxFAIL_MSG(_T("DoLogString must be overriden if it's called."));
}
m_fp = fp;
}
-void wxLogStderr::DoLogString(const wxChar *szString, time_t t)
+void wxLogStderr::DoLogString(const wxChar *szString, time_t WXUNUSED(t))
{
wxString str(szString);
str << _T('\n');
m_ostr = ostr;
}
-void wxLogStream::DoLogString(const wxChar *szString, time_t t)
+void wxLogStream::DoLogString(const wxChar *szString, time_t WXUNUSED(t))
{
(*m_ostr) << wxConv_libc.cWX2MB(szString) << endl << flush;
}
break;
case wxLOG_Status:
+#if wxUSE_STATUSBAR
{
// find the top window and set it's status text if it has any
wxFrame *pFrame = gs_pFrame;
if ( pFrame != NULL )
pFrame->SetStatusText(szString);
}
+#endif // wxUSE_STATUSBAR
break;
case wxLOG_Trace:
// menu callbacks
void OnClose(wxCommandEvent& event);
void OnCloseWindow(wxCloseEvent& event);
+#if wxUSE_FILE
void OnSave (wxCommandEvent& event);
+#endif // wxUSE_FILE
void OnClear(wxCommandEvent& event);
void OnIdle(wxIdleEvent&);
BEGIN_EVENT_TABLE(wxLogFrame, wxFrame)
// wxLogWindow menu events
EVT_MENU(Menu_Close, wxLogFrame::OnClose)
+#if wxUSE_FILE
EVT_MENU(Menu_Save, wxLogFrame::OnSave)
+#endif // wxUSE_FILE
EVT_MENU(Menu_Clear, wxLogFrame::OnClear)
EVT_CLOSE(wxLogFrame::OnCloseWindow)
// create menu
wxMenuBar *pMenuBar = new wxMenuBar;
wxMenu *pMenu = new wxMenu;
+#if wxUSE_FILE
pMenu->Append(Menu_Save, _("&Save..."), _("Save log contents to file"));
+#endif // wxUSE_FILE
pMenu->Append(Menu_Clear, _("C&lear"), _("Clear the log contents"));
pMenu->AppendSeparator();
pMenu->Append(Menu_Close, _("&Close"), _("Close this window"));
pMenuBar->Append(pMenu, _("&Log"));
SetMenuBar(pMenuBar);
+#if wxUSE_STATUSBAR
// status bar for menu prompts
CreateStatusBar();
+#endif // wxUSE_STATUSBAR
m_log->OnFrameCreate(this);
}
DoClose();
}
+#if wxUSE_FILE
void wxLogFrame::OnSave(wxCommandEvent& WXUNUSED(event))
{
// get the file name
wxLogStatus(this, _("Log saved to the file '%s'."), szFileName);
}
}
+#endif // wxUSE_FILE
void wxLogFrame::OnClear(wxCommandEvent& WXUNUSED(event))
{
// wxLogWindow
// -----------
wxLogWindow::wxLogWindow(wxFrame *pParent,
- const wxChar *szTitle,
- bool bShow,
- bool bDoPass)
+ const wxChar *szTitle,
+ bool bShow,
+ bool bDoPass)
{
m_bPassMessages = bDoPass;
m_bHasMessages = TRUE;
}
-void wxLogWindow::DoLogString(const wxChar *szString, time_t t)
+void wxLogWindow::DoLogString(const wxChar *szString, time_t WXUNUSED(t))
{
// put the text into our window
wxTextCtrl *pText = m_pLogFrame->TextCtrl();