]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/logg.cpp
added init.cpp
[wxWidgets.git] / src / generic / logg.cpp
index 5e1c3ce2b4a834c0b6a5110eeafc4d051a1d06ad..18356d6b23ad87ef5c90e13e8073cb46bf0378a9 100644 (file)
@@ -7,7 +7,7 @@
 // Created:     20.09.99 (extracted from src/common/log.cpp)
 // RCS-ID:      $Id$
 // Copyright:   (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
-// Licence:     wxWindows license
+// Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 // ============================================================================
@@ -18,7 +18,9 @@
 // headers
 // ----------------------------------------------------------------------------
 
-// no #pragma implementation "log.h" because it's already in src/common/log.cpp
+#ifdef __GNUG__
+    #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"
     #include "wx/msgdlg.h"
 #endif // wxUSE_LOG_DIALOG/!wxUSE_LOG_DIALOG
 
+#if defined(__MWERKS__) && wxUSE_UNICODE
+    #include <wtime.h>
+#endif
+
 // the suffix we add to the button to show that the dialog can be expanded
 #define EXPAND_SUFFIX _T(" >>")
 
@@ -620,8 +622,6 @@ void wxLogWindow::DoLog(wxLogLevel level, const wxChar *szString, time_t t)
                 wxLog::DoLog(level, szString, t);
         }
     }
-
-    m_bHasMessages = TRUE;
 }
 
 void wxLogWindow::DoLogString(const wxChar *szString, time_t WXUNUSED(t))
@@ -998,14 +998,14 @@ void wxLogDialog::OnDetails(wxCommandEvent& WXUNUSED(event))
     {
         m_btnDetails->SetLabel(ms_details + EXPAND_SUFFIX);
 
-        sizer->Remove(m_listctrl);
+        sizer->Detach( m_listctrl );
 
 #if wxUSE_STATLINE
-        sizer->Remove(m_statline);
+        sizer->Detach( m_statline );
 #endif // wxUSE_STATLINE
 
 #if wxUSE_FILE
-        sizer->Remove(m_btnSave);
+        sizer->Detach( m_btnSave );
 #endif // wxUSE_FILE
     }
     else // show details now
@@ -1148,7 +1148,7 @@ static int OpenLogFile(wxFile& file, wxString *pFilename)
 
 #endif // !(wxUSE_LOGGUI || wxUSE_LOGWINDOW)
 
-#if wxUSE_TEXTCTRL
+#if wxUSE_LOG && wxUSE_TEXTCTRL
 
 // ----------------------------------------------------------------------------
 // wxLogTextCtrl implementation
@@ -1175,6 +1175,5 @@ void wxLogTextCtrl::DoLogString(const wxChar *szString, time_t WXUNUSED(t))
     m_pTextCtrl->AppendText(msg);
 }
 
-#endif // wxUSE_TEXTCTRL
+#endif // wxUSE_LOG && wxUSE_TEXTCTRL
 
-// vi:sts=4:sw=4:et