#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)
+// 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"
// private functions
// ----------------------------------------------------------------------------
-#if wxUSE_FILE
+#if wxUSE_FILE && wxUSE_FILEDLG
// pass an uninitialized file object, the function will ask the user for the
// filename and try to open it, returns TRUE on success (file was opened),
// ----------------------------------------------------------------------------
// we use a global variable to store the frame pointer for wxLogStatus - bad,
-// but it's he easiest way
+// but it's the easiest way
static wxFrame *gs_pFrame; // FIXME MT-unsafe
// ============================================================================
else // more than one message
{
#if wxUSE_LOG_DIALOG
+
wxLogDialog dlg(parent,
m_aMessages, m_aSeverity, m_aTimes,
title, style);
case wxLOG_Debug:
#ifdef __WXDEBUG__
{
- #ifdef __WXMSW__
+ #if defined(__WXMSW__) && !defined(__WXMICROWIN__)
// don't prepend debug/trace here: it goes to the
// debug window anyhow, but do put a timestamp
wxString str;
#if wxUSE_FILE
void wxLogFrame::OnSave(wxCommandEvent& WXUNUSED(event))
{
+#if wxUSE_FILEDLG
wxString filename;
wxFile file;
int rc = OpenLogFile(file, &filename);
else {
wxLogStatus(this, _("Log saved to the file '%s'."), filename.c_str());
}
+#endif
}
#endif // wxUSE_FILE
void wxLogDialog::OnSave(wxCommandEvent& WXUNUSED(event))
{
+#if wxUSE_FILEDLG
wxFile file;
int rc = OpenLogFile(file);
if ( rc == -1 )
if ( !ok )
wxLogError(_("Can't save log contents to file."));
+#endif
}
#endif // wxUSE_FILE
#endif // wxUSE_LOG_DIALOG
-#if wxUSE_FILE
+#if wxUSE_FILE && wxUSE_FILEDLG
// pass an uninitialized file object, the function will ask the user for the
// filename and try to open it, returns TRUE on success (file was opened),