]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/logg.cpp
tiny fixes
[wxWidgets.git] / src / generic / logg.cpp
index c3085720e5a143bb5933bc5cc27675b51c3c1c7d..9164360cecfadd3b4befd108d15139ee43392697 100644 (file)
@@ -27,8 +27,8 @@
   #pragma hdrstop
 #endif
 
-#ifdef wxUSE_NOGUI
-    #error "This file can't be compiled in NOGUI mode!"
+#if !wxUSE_GUI
+    #error "This file can't be compiled without GUI!"
 #endif
 
 #ifndef WX_PRECOMP
 #include "wx/file.h"
 #include "wx/textfile.h"
 
+#ifdef  __WXMSW__
+  // for OutputDebugString()
+  #include  "wx/msw/private.h"
+#endif // Windows
+
 // ----------------------------------------------------------------------------
 // global variables
 // ----------------------------------------------------------------------------
@@ -90,11 +95,11 @@ wxLogTextCtrl::wxLogTextCtrl(wxTextCtrl *pTextCtrl)
     m_pTextCtrl = pTextCtrl;
 }
 
-void wxLogTextCtrl::DoLogString(const wxChar *szString, time_t t)
+void wxLogTextCtrl::DoLogString(const wxChar *szString, time_t WXUNUSED(t))
 {
     wxString msg;
     TimeStamp(&msg);
-    msg << szString << _T('\n');
+    msg << szString << T('\n');
 
     m_pTextCtrl->AppendText(msg);
 }
@@ -138,7 +143,7 @@ void wxLogGui::Flush()
         if ( nLines > 25 )  // don't put too many lines in message box
             break;
 
-        str << m_aMessages[n - 1] << _T("\n");
+        str << m_aMessages[n - 1] << T("\n");
     }
 
     const wxChar *title;
@@ -208,13 +213,13 @@ void wxLogGui::DoLog(wxLogLevel level, const wxChar *szString, time_t t)
                         // debug window anyhow, but do put a timestamp
                         wxString str;
                         TimeStamp(&str);
-                        str << szString << _T("\n\r");
+                        str << szString << T("\n\r");
                         OutputDebugString(str);
                     #else
                         // send them to stderr
-                        wxFprintf(stderr, _T("%s: %s\n"),
-                                  level == wxLOG_Trace ? _T("Trace")
-                                                       : _T("Debug"),
+                        wxFprintf(stderr, T("%s: %s\n"),
+                                  level == wxLOG_Trace ? T("Trace")
+                                                       : T("Debug"),
                                   szString);
                         fflush(stderr);
                     #endif
@@ -351,7 +356,7 @@ void wxLogFrame::OnSave(wxCommandEvent& WXUNUSED(event))
 {
     // get the file name
     // -----------------
-    const wxChar *szFileName = wxSaveFileSelector(_T("log"), _T("txt"), _T("log.txt"));
+    const wxChar *szFileName = wxSaveFileSelector(T("log"), T("txt"), T("log.txt"));
     if ( szFileName == NULL ) {
         // cancelled
         return;
@@ -511,7 +516,7 @@ void wxLogWindow::DoLogString(const wxChar *szString, time_t WXUNUSED(t))
 
     wxString msg;
     TimeStamp(&msg);
-    msg << szString << _T('\n');
+    msg << szString << T('\n');
 
     pText->AppendText(msg);