]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/mediactrl.cpp
[ 1509599 ] 'Split pickers page in widgets sample' with more icons and rebaking.
[wxWidgets.git] / src / msw / mediactrl.cpp
index 4931215a5f1c8d57443aff88ebcc481705c7c50f..885ab1ed1454519836370691ccc8495b11a2b57f 100644 (file)
 #include "wx/wxprec.h"
 
 #ifdef __BORLANDC__
-#pragma hdrstop
+    #pragma hdrstop
 #endif
 
-//---------------------------------------------------------------------------
-// MediaCtrl include
-//---------------------------------------------------------------------------
+#if wxUSE_MEDIACTRL
+
 #include "wx/mediactrl.h"
 
-//---------------------------------------------------------------------------
-// Compilation guard
-//---------------------------------------------------------------------------
-#if wxUSE_MEDIACTRL
+#ifndef WX_PRECOMP
+    #include "wx/log.h"
+    #include "wx/dcclient.h"
+    #include "wx/timer.h"
+    #include "wx/math.h"        // log10 & pow
+#endif
 
-//---------------------------------------------------------------------------
-// WX Includes
-//---------------------------------------------------------------------------
-#include "wx/log.h"         // wxLogDebug
-#include "wx/math.h"        // log10 & pow
 #include "wx/msw/private.h" // user info and wndproc setting/getting
-#include "wx/dcclient.h"
-#include "wx/timer.h"
 #include "wx/dynlib.h"
 
 //---------------------------------------------------------------------------
@@ -1685,7 +1679,7 @@ enum
 
 #define wxDL_METHOD_LOAD( lib, name, success ) \
     pfn_ ## name = (name ## Type) lib.GetSymbol( wxT(#name), &success ); \
-    if (!success) { wxLog::EnableLogging(bWasLoggingEnabled); return false; }
+    if (!success) return false
 
 
 class WXDLLIMPEXP_MEDIA wxQuickTimeLibrary
@@ -1799,12 +1793,12 @@ bool wxQuickTimeLibrary::Initialize()
 {
     m_ok = false;
 
-    // Turn off the wxDynamicLibrary logging
-    bool bWasLoggingEnabled = wxLog::EnableLogging(false);
+    // Turn off the wxDynamicLibrary logging as we're prepared to handle the
+    // errors
+    wxLogNull nolog;
 
     if (!m_dll.Load(wxT("qtmlClient.dll")))
     {
-        wxLog::EnableLogging(bWasLoggingEnabled);
         return false;
     }
 
@@ -1864,7 +1858,6 @@ bool wxQuickTimeLibrary::Initialize()
     wxDL_METHOD_LOAD( m_dll, EndUpdate, m_ok );
     wxDL_METHOD_LOAD( m_dll, GetMoviesStickyError, m_ok );
 
-    wxLog::EnableLogging(bWasLoggingEnabled);
     m_ok = true;
 
     return true;
@@ -3347,9 +3340,6 @@ IMPLEMENT_DYNAMIC_CLASS(wxQTMediaBackend, wxMediaBackend)
 // team I believe
 #define MOVIE_DELAY 20
 
-#include "wx/timer.h"
-
-
 //---------------------------------------------------------------------------
 // wxQTLoadTimer
 //
@@ -4180,7 +4170,4 @@ void wxQTMediaEvtHandler::OnEraseBackground(wxEraseEvent& evt)
 #include "wx/html/forcelnk.h"
 FORCE_LINK_ME(basewxmediabackends)
 
-//---------------------------------------------------------------------------
-//  End wxMediaCtrl Compilation Guard and this file
-//---------------------------------------------------------------------------
 #endif //wxUSE_MEDIACTRL