]> git.sesse.net Git - vlc/blobdiff - modules/gui/skins2/controls/ctrl_move.cpp
Select item after deleting items from the playlist with KEY_DEL.
[vlc] / modules / gui / skins2 / controls / ctrl_move.cpp
index 5a60360b70f5bd081b070b6171bce9b38859b203..6068c93165f1205172dd6c01b5ad646a430ffefd 100644 (file)
@@ -5,7 +5,7 @@
  * $Id$
  *
  * Authors: Cyril Deguet     <asmax@via.ecp.fr>
- *          Olivier Teulière <ipkiss@via.ecp.fr>
+ *          Olivier Teulière <ipkiss@via.ecp.fr>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -19,7 +19,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #include "ctrl_move.hpp"
@@ -37,9 +37,9 @@ CtrlMove::CtrlMove( intf_thread_t *pIntf, WindowManager &rWindowManager,
     CtrlFlat( pIntf, rHelp, pVisible ), m_fsm( pIntf ),
     m_rWindowManager( rWindowManager ),
     m_rCtrl( rCtrl ), m_rWindow( rWindow ),
-    m_cmdMovingMoving( pIntf, this ),
-    m_cmdStillMoving( pIntf, this ),
-    m_cmdMovingStill( pIntf, this )
+    m_cmdMovingMoving( this ),
+    m_cmdStillMoving( this ),
+    m_cmdMovingStill( this )
 {
     m_pEvt = NULL;
     m_xPos = 0;
@@ -98,33 +98,33 @@ void CtrlMove::handleEvent( EvtGeneric &rEvent )
 
 void CtrlMove::CmdStillMoving::execute()
 {
-    EvtMouse *pEvtMouse = (EvtMouse*)m_pControl->m_pEvt;
+    EvtMouse *pEvtMouse = (EvtMouse*)m_pParent->m_pEvt;
 
-    m_pControl->m_xPos = pEvtMouse->getXPos();
-    m_pControl->m_yPos = pEvtMouse->getYPos();
+    m_pParent->m_xPos = pEvtMouse->getXPos();
+    m_pParent->m_yPos = pEvtMouse->getYPos();
 
-    m_pControl->captureMouse();
+    m_pParent->captureMouse();
 
-    m_pControl->m_rWindowManager.startMove( m_pControl->m_rWindow );
+    m_pParent->m_rWindowManager.startMove( m_pParent->m_rWindow );
 }
 
 
 void CtrlMove::CmdMovingMoving::execute()
 {
-    EvtMotion *pEvtMotion = (EvtMotion*)m_pControl->m_pEvt;
+    EvtMotion *pEvtMotion = (EvtMotion*)m_pParent->m_pEvt;
 
-    int xNewLeft = pEvtMotion->getXPos() - m_pControl->m_xPos +
-                   m_pControl->m_rWindow.getLeft();
-    int yNewTop = pEvtMotion->getYPos() - m_pControl->m_yPos +
-                  m_pControl->m_rWindow.getTop();
+    int xNewLeft = pEvtMotion->getXPos() - m_pParent->m_xPos +
+                   m_pParent->m_rWindow.getLeft();
+    int yNewTop = pEvtMotion->getYPos() - m_pParent->m_yPos +
+                  m_pParent->m_rWindow.getTop();
 
-    m_pControl->m_rWindowManager.move( m_pControl->m_rWindow, xNewLeft, yNewTop );
+    m_pParent->m_rWindowManager.move( m_pParent->m_rWindow, xNewLeft, yNewTop );
 }
 
 
 void CtrlMove::CmdMovingStill::execute()
 {
-    m_pControl->releaseMouse();
+    m_pParent->releaseMouse();
 
-    m_pControl->m_rWindowManager.stopMove();
+    m_pParent->m_rWindowManager.stopMove();
 }