]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/mediactrlcmn.cpp
Misc validity fixes to samples/xrc/rc/*.xrc.
[wxWidgets.git] / src / common / mediactrlcmn.cpp
index 4dbdb06e78520b77289905192b07cf4d58f6b5f5..d8f0b2c747d662c302405a48cc3e438cd42abe91 100644 (file)
@@ -1,10 +1,9 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        src/common/mediactrl.cpp
+// Name:        src/common/mediactrlcmn.cpp
 // Purpose:     wxMediaCtrl common code
 // Author:      Ryan Norton <wxprojects@comcast.net>
 // Modified by:
 // Created:     11/07/04
-// RCS-ID:      $Id$
 // Copyright:   (c) Ryan Norton
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 
 IMPLEMENT_CLASS(wxMediaCtrl, wxControl)
-wxDEFINE_EVENT( wxEVT_MEDIA_STATECHANGED, wxMediaEvent )
-wxDEFINE_EVENT( wxEVT_MEDIA_PLAY, wxMediaEvent )
-wxDEFINE_EVENT( wxEVT_MEDIA_PAUSE, wxMediaEvent )
+wxDEFINE_EVENT( wxEVT_MEDIA_STATECHANGED, wxMediaEvent );
+wxDEFINE_EVENT( wxEVT_MEDIA_PLAY, wxMediaEvent );
+wxDEFINE_EVENT( wxEVT_MEDIA_PAUSE, wxMediaEvent );
 IMPLEMENT_CLASS(wxMediaBackend, wxObject)
 IMPLEMENT_DYNAMIC_CLASS(wxMediaEvent, wxEvent)
-wxDEFINE_EVENT( wxEVT_MEDIA_FINISHED, wxMediaEvent )
-wxDEFINE_EVENT( wxEVT_MEDIA_LOADED, wxMediaEvent )
-wxDEFINE_EVENT( wxEVT_MEDIA_STOP, wxMediaEvent )
+wxDEFINE_EVENT( wxEVT_MEDIA_FINISHED, wxMediaEvent );
+wxDEFINE_EVENT( wxEVT_MEDIA_LOADED, wxMediaEvent );
+wxDEFINE_EVENT( wxEVT_MEDIA_STOP, wxMediaEvent );
 
 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 //
@@ -107,8 +106,7 @@ bool wxMediaCtrl::Create(wxWindow* parent, wxWindowID id,
         {
             if (!Load(fileName))
             {
-                delete m_imp;
-                m_imp = NULL;
+                wxDELETE(m_imp);
                 return false;
             }
         }
@@ -124,7 +122,6 @@ bool wxMediaCtrl::Create(wxWindow* parent, wxWindowID id,
 
         while((classInfo = NextBackend(&it)) != NULL)
         {
-            wxLogMessage( classInfo->GetClassName() );
             if(!DoCreate(classInfo, parent, id,
                          pos, size, style, validator, name))
                 continue;
@@ -172,8 +169,7 @@ bool wxMediaCtrl::Create(wxWindow* parent, wxWindowID id,
 
         if (!Load(location))
         {
-            delete m_imp;
-            m_imp = NULL;
+            wxDELETE(m_imp);
             return false;
         }
 
@@ -251,8 +247,8 @@ const wxClassInfo* wxMediaCtrl::NextBackend(wxClassInfo::const_iterator* it)
           *it != end; ++(*it) )
     {
         const wxClassInfo* classInfo = **it;
-        if ( classInfo->IsKindOf(CLASSINFO(wxMediaBackend)) &&
-             classInfo != CLASSINFO(wxMediaBackend) )
+        if ( classInfo->IsKindOf(wxCLASSINFO(wxMediaBackend))  &&
+             classInfo != wxCLASSINFO(wxMediaBackend) )
         {
             ++(*it);
             return classInfo;
@@ -547,10 +543,10 @@ void wxMediaBackendCommonBase::QueueStopEvent()
 //
 #include "wx/html/forcelnk.h"
 
-#ifdef __WXMSW__ // MSW has huge backends so we do it seperately
+#ifdef __WXMSW__ // MSW has huge backends so we do it separately
 FORCE_LINK(wxmediabackend_am)
 FORCE_LINK(wxmediabackend_wmp10)
-#elif !defined(__WXOSX_COCOA__)
+#else
 FORCE_LINK(basewxmediabackends)
 #endif