]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/mediactrlcmn.cpp
document (and check for it with assert) that wxGetKeyState(WXK_[LMR]BUTTON) doesn...
[wxWidgets.git] / src / common / mediactrlcmn.cpp
index 7e295307e19e26a3554c8434bfb3a7d3edd71424..074777d48631384f0cb1be83221c214ebb1dbaa5 100644 (file)
@@ -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,28 +407,6 @@ 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()
 {                               }