X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9180b5352f9d5b5bcccee563e9b3c0f68c4f1303..ede3a6d68af66772b4f5f94208b4126bab566cc8:/src/common/mediactrlcmn.cpp diff --git a/src/common/mediactrlcmn.cpp b/src/common/mediactrlcmn.cpp index 51ba32f6c8..074777d486 100644 --- a/src/common/mediactrlcmn.cpp +++ b/src/common/mediactrlcmn.cpp @@ -108,9 +108,9 @@ bool wxMediaCtrl::Create(wxWindow* parent, wxWindowID id, { wxClassInfo::sm_classTable->BeginFind(); - wxClassInfo* classInfo = NextBackend(); + wxClassInfo* classInfo; - while(classInfo) + while((classInfo = NextBackend()) != NULL) { if(!DoCreate(classInfo, parent, id, pos, size, style, validator, name)) @@ -131,8 +131,6 @@ bool wxMediaCtrl::Create(wxWindow* parent, wxWindowID id, SetBestFittingSize(size); return true; } - - classInfo = NextBackend(); } m_imp = NULL; @@ -172,9 +170,9 @@ bool wxMediaCtrl::Create(wxWindow* parent, wxWindowID id, { wxClassInfo::sm_classTable->BeginFind(); - wxClassInfo* classInfo = NextBackend(); + wxClassInfo* classInfo; - while(classInfo) + while((classInfo = NextBackend()) != NULL) { if(!DoCreate(classInfo, parent, id, pos, size, style, validator, name)) @@ -187,8 +185,6 @@ bool wxMediaCtrl::Create(wxWindow* parent, wxWindowID id, } else delete m_imp; - - classInfo = NextBackend(); } m_imp = NULL; @@ -214,10 +210,6 @@ bool wxMediaCtrl::DoCreate(wxClassInfo* classInfo, if( m_imp->CreateControl(this, parent, id, pos, size, style, validator, name) ) { - this->Connect(GetId(), wxEVT_MEDIA_FINISHED, - (wxObjectEventFunction) (wxEventFunction) - (wxMediaEventFunction) - &wxMediaCtrl::OnMediaFinished); return true; } @@ -415,32 +407,10 @@ void wxMediaCtrl::DoMoveWindow(int x, int y, int w, int h) m_imp->Move(x, y, w, h); } -void wxMediaCtrl::Loop(bool bLoop) -{ - m_bLoop = bLoop; -} - -bool wxMediaCtrl::IsLooped() -{ - return m_bLoop; -} - -void wxMediaCtrl::OnMediaFinished(wxMediaEvent& WXUNUSED(evt)) -{ - if(m_bLoop) - { -#ifdef __WXDEBUG__ - wxASSERT( Play() ); -#else - Play(); -#endif - } -} - //DARWIN gcc compiler badly screwed up - needs destructor impl in source wxMediaBackend::~wxMediaBackend() { } -#include +#include "wx/html/forcelnk.h" FORCE_LINK(basewxmediabackends); //---------------------------------------------------------------------------