]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/logg.cpp
using new API (no visual difference)
[wxWidgets.git] / src / generic / logg.cpp
index 8c20b7af42cd042af06340658a8d19b244f6b138..fd7f2a25b22b0276cf3144afafe08ef532f01f7c 100644 (file)
 // headers
 // ----------------------------------------------------------------------------
 
 // headers
 // ----------------------------------------------------------------------------
 
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-    #pragma implementation "logg.h"
-#endif
-
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
 // allows to exclude the usage of wxDateTime
 static wxString TimeStamp(const wxChar *format, time_t t)
 {
 // 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)) )
     {
     wxChar buf[4096];
     if ( !wxStrftime(buf, WXSIZEOF(buf), format, localtime(&t)) )
     {
@@ -99,7 +91,6 @@ static wxString TimeStamp(const wxChar *format, time_t t)
         wxFAIL_MSG(_T("strftime() failed"));
     }
     return wxString(buf);
         wxFAIL_MSG(_T("strftime() failed"));
     }
     return wxString(buf);
-#endif
 }
 
 
 }
 
 
@@ -434,6 +425,8 @@ void wxLogGui::DoLog(wxLogLevel level, const wxChar *szString, time_t t)
 // wxLogWindow and wxLogFrame implementation
 // ----------------------------------------------------------------------------
 
 // wxLogWindow and wxLogFrame implementation
 // ----------------------------------------------------------------------------
 
+#if wxUSE_LOGWINDOW
+
 // log frame class
 // ---------------
 class wxLogFrame : public wxFrame
 // log frame class
 // ---------------
 class wxLogFrame : public wxFrame
@@ -687,6 +680,8 @@ wxLogWindow::~wxLogWindow()
     delete m_pLogFrame;
 }
 
     delete m_pLogFrame;
 }
 
+#endif // wxUSE_LOGWINDOW
+
 // ----------------------------------------------------------------------------
 // wxLogDialog
 // ----------------------------------------------------------------------------
 // ----------------------------------------------------------------------------
 // wxLogDialog
 // ----------------------------------------------------------------------------
@@ -776,21 +771,21 @@ wxLogDialog::wxLogDialog(wxWindow *parent,
     switch ( style & wxICON_MASK )
     {
         case wxICON_ERROR:
     switch ( style & wxICON_MASK )
     {
         case wxICON_ERROR:
-            bitmap = wxArtProvider::GetIcon(wxART_ERROR, wxART_MESSAGE_BOX);
+            bitmap = wxArtProvider::GetBitmap(wxART_ERROR, wxART_MESSAGE_BOX);
 #ifdef __WXPM__
             bitmap.SetId(wxICON_SMALL_ERROR);
 #endif
             break;
 
         case wxICON_INFORMATION:
 #ifdef __WXPM__
             bitmap.SetId(wxICON_SMALL_ERROR);
 #endif
             break;
 
         case wxICON_INFORMATION:
-            bitmap = wxArtProvider::GetIcon(wxART_INFORMATION, wxART_MESSAGE_BOX);
+            bitmap = wxArtProvider::GetBitmap(wxART_INFORMATION, wxART_MESSAGE_BOX);
 #ifdef __WXPM__
             bitmap.SetId(wxICON_SMALL_INFO);
 #endif
             break;
 
         case wxICON_WARNING:
 #ifdef __WXPM__
             bitmap.SetId(wxICON_SMALL_INFO);
 #endif
             break;
 
         case wxICON_WARNING:
-            bitmap = wxArtProvider::GetIcon(wxART_WARNING, wxART_MESSAGE_BOX);
+            bitmap = wxArtProvider::GetBitmap(wxART_WARNING, wxART_MESSAGE_BOX);
 #ifdef __WXPM__
             bitmap.SetId(wxICON_SMALL_WARNING);
 #endif
 #ifdef __WXPM__
             bitmap.SetId(wxICON_SMALL_WARNING);
 #endif
@@ -913,7 +908,7 @@ void wxLogDialog::CreateDetailsControls()
     if ( !fmt )
     {
         // default format
     if ( !fmt )
     {
         // default format
-        fmt = wxDefaultDateTimeFormat;
+        fmt = _T("%c");
     }
 
     size_t count = m_messages.GetCount();
     }
 
     size_t count = m_messages.GetCount();
@@ -999,7 +994,7 @@ void wxLogDialog::OnSave(wxCommandEvent& WXUNUSED(event))
     if ( !fmt )
     {
         // default format
     if ( !fmt )
     {
         // default format
-        fmt = wxDefaultDateTimeFormat;
+        fmt = _T("%c");
     }
 
     size_t count = m_messages.GetCount();
     }
 
     size_t count = m_messages.GetCount();
@@ -1122,7 +1117,7 @@ void wxLogDialog::OnDetails(wxCommandEvent& WXUNUSED(event))
     SetSize(wxDefaultCoord, size.y);
 
 #ifdef __WXGTK__
     SetSize(wxDefaultCoord, size.y);
 
 #ifdef __WXGTK__
-    // VS: this is neccessary in order to force frame redraw under
+    // VS: this is necessary in order to force frame redraw under
     // WindowMaker or fvwm2 (and probably other broken WMs).
     // Otherwise, detailed list wouldn't be displayed.
     Show();
     // WindowMaker or fvwm2 (and probably other broken WMs).
     // Otherwise, detailed list wouldn't be displayed.
     Show();
@@ -1157,7 +1152,7 @@ static int OpenLogFile(wxFile& file, wxString *pFilename, wxWindow *parent)
 
     // open file
     // ---------
 
     // open file
     // ---------
-    bool bOk;
+    bool bOk wxDUMMY_INITIALIZE(false);
     if ( wxFile::Exists(filename) ) {
         bool bAppend = false;
         wxString strMsg;
     if ( wxFile::Exists(filename) ) {
         bool bAppend = false;
         wxString strMsg;