[vlc-devel] commit: skins2: remove dead code (Erwan Tulou )

git version control git at videolan.org
Thu Jan 14 15:23:59 CET 2010


vlc | branch: master | Erwan Tulou <erwan10 at videolan.org> | Thu Jan 14 11:20:40 2010 +0100| [bd179ee7be3df40f75b398fd83b47f71fd4788b2] | committer: Erwan Tulou 

skins2: remove dead code

Remove the old way of tracking change in vout size (no longer used)

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=bd179ee7be3df40f75b398fd83b47f71fd4788b2
---

 modules/gui/skins2/controls/ctrl_video.cpp |   19 -------------------
 modules/gui/skins2/controls/ctrl_video.hpp |    5 +----
 modules/gui/skins2/src/vlcproc.cpp         |    5 ++---
 modules/gui/skins2/src/vlcproc.hpp         |    4 ----
 4 files changed, 3 insertions(+), 30 deletions(-)

diff --git a/modules/gui/skins2/controls/ctrl_video.cpp b/modules/gui/skins2/controls/ctrl_video.cpp
index 3fe0fd8..68c8e4c 100644
--- a/modules/gui/skins2/controls/ctrl_video.cpp
+++ b/modules/gui/skins2/controls/ctrl_video.cpp
@@ -39,13 +39,6 @@ CtrlVideo::CtrlVideo( intf_thread_t *pIntf, GenericLayout &rLayout,
     m_xShift( 0 ), m_yShift( 0 ), m_bAutoResize( autoResize ),
     m_pVoutWindow( NULL ), m_bIsUseable( false )
 {
-    // Observe the vout size variable if the control is auto-resizable
-    if( m_bAutoResize )
-    {
-        VarBox &rVoutSize = VlcProc::instance( pIntf )->getVoutSizeVar();
-        rVoutSize.addObserver( this );
-    }
-
     VarBool &rFullscreen = VlcProc::instance( getIntf() )->getFullscreenVar();
     rFullscreen.addObserver( this );
 }
@@ -53,9 +46,6 @@ CtrlVideo::CtrlVideo( intf_thread_t *pIntf, GenericLayout &rLayout,
 
 CtrlVideo::~CtrlVideo()
 {
-    VarBox &rVoutSize = VlcProc::instance( getIntf() )->getVoutSizeVar();
-    rVoutSize.delObserver( this );
-
     VarBool &rFullscreen = VlcProc::instance( getIntf() )->getFullscreenVar();
     rFullscreen.delObserver( this );
 
@@ -148,15 +138,6 @@ void CtrlVideo::resizeControl( int width, int height )
 }
 
 
-void CtrlVideo::onUpdate( Subject<VarBox> &rVoutSize, void *arg )
-{
-    int newWidth = ((VarBox&)rVoutSize).getWidth() + m_xShift;
-    int newHeight = ((VarBox&)rVoutSize).getHeight() + m_yShift;
-
-    resizeControl( newWidth, newHeight );
-}
-
-
 void CtrlVideo::onUpdate( Subject<VarBool> &rVariable, void *arg  )
 {
     // Visibility changed
diff --git a/modules/gui/skins2/controls/ctrl_video.hpp b/modules/gui/skins2/controls/ctrl_video.hpp
index 37a295f..9afd703 100644
--- a/modules/gui/skins2/controls/ctrl_video.hpp
+++ b/modules/gui/skins2/controls/ctrl_video.hpp
@@ -31,7 +31,7 @@
 
 
 /// Control video
-class CtrlVideo: public CtrlGeneric, public Observer<VarBox>
+class CtrlVideo: public CtrlGeneric
 {
 public:
     CtrlVideo( intf_thread_t *pIntf, GenericLayout &rLayout,
@@ -56,9 +56,6 @@ public:
     /// Get the type of control (custom RTTI)
     virtual string getType() const { return "video"; }
 
-    /// Method called when the vout size is updated
-    virtual void onUpdate( Subject<VarBox> &rVoutSize, void* );
-
     /// Method called when visibility or ActiveLayout is updated
     virtual void onUpdate( Subject<VarBool> &rVariable , void* );
 
diff --git a/modules/gui/skins2/src/vlcproc.cpp b/modules/gui/skins2/src/vlcproc.cpp
index 38fa44d..40a9bdf 100644
--- a/modules/gui/skins2/src/vlcproc.cpp
+++ b/modules/gui/skins2/src/vlcproc.cpp
@@ -74,9 +74,8 @@ void VlcProc::destroy( intf_thread_t *pIntf )
 
 
 VlcProc::VlcProc( intf_thread_t *pIntf ): SkinObject( pIntf ),
-    m_varVoutSize( pIntf ), m_varEqBands( pIntf ),
-    m_pVout( NULL ), m_pAout( NULL ), m_bEqualizer_started( false ),
-    m_cmdManage( this )
+    m_varEqBands( pIntf ), m_pVout( NULL ), m_pAout( NULL ),
+    m_bEqualizer_started( false ), m_cmdManage( this )
 {
     // Create a timer to poll the status of the vlc
     OSFactory *pOsFactory = OSFactory::instance( pIntf );
diff --git a/modules/gui/skins2/src/vlcproc.hpp b/modules/gui/skins2/src/vlcproc.hpp
index c38ff48..ad44658 100644
--- a/modules/gui/skins2/src/vlcproc.hpp
+++ b/modules/gui/skins2/src/vlcproc.hpp
@@ -81,9 +81,6 @@ public:
     VarText &getStreamSampleRateVar()
         { return *((VarText*)(m_cVarStreamSampleRate.get())); }
 
-    /// Getter for the vout size variable
-    VarBox &getVoutSizeVar() { return m_varVoutSize; }
-
     /// Getter/Setter for the fullscreen variable
     VarBool &getFullscreenVar() { return *((VarBool*)(m_cVarFullscreen.get())); }
     void setFullscreenVar( bool );
@@ -142,7 +139,6 @@ private:
     VariablePtr m_cVarRecording;
     /// Variables related to the vout
     VariablePtr m_cVarFullscreen;
-    VarBox m_varVoutSize;
     VariablePtr m_cVarHasVout;
     /// Variables related to audio
     VariablePtr m_cVarHasAudio;




More information about the vlc-devel mailing list