X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/945eac794c1b3039dddafc53c5f104f7ba88fadf..f239a20092359e3c914adb79bd39f3f5d2b2e06f:/src/common/mediactrlcmn.cpp?ds=inline diff --git a/src/common/mediactrlcmn.cpp b/src/common/mediactrlcmn.cpp index 4dbdb06e78..555c6e71e3 100644 --- a/src/common/mediactrlcmn.cpp +++ b/src/common/mediactrlcmn.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: src/common/mediactrl.cpp +// Name: src/common/mediactrlcmn.cpp // Purpose: wxMediaCtrl common code // Author: Ryan Norton // Modified by: @@ -45,14 +45,14 @@ //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 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 +107,7 @@ bool wxMediaCtrl::Create(wxWindow* parent, wxWindowID id, { if (!Load(fileName)) { - delete m_imp; - m_imp = NULL; + wxDELETE(m_imp); return false; } } @@ -124,7 +123,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 +170,7 @@ bool wxMediaCtrl::Create(wxWindow* parent, wxWindowID id, if (!Load(location)) { - delete m_imp; - m_imp = NULL; + wxDELETE(m_imp); return false; }