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

git version control git at videolan.org
Sat Feb 13 16:54:11 CET 2010


vlc | branch: master | Erwan Tulou <erwan10 at videolan.org> | Sat Feb 13 16:46:08 2010 +0100| [dc25da7e5a5361b7be519ad1a54ec1faf541494c] | committer: Erwan Tulou 

skins2: remove dead code

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

 modules/gui/skins2/Modules.am                   |    2 -
 modules/gui/skins2/commands/cmd_update_item.cpp |   76 -----------------------
 modules/gui/skins2/commands/cmd_update_item.hpp |   45 -------------
 modules/gui/skins2/src/vlcproc.cpp              |   12 ----
 modules/gui/skins2/src/vlcproc.hpp              |    3 -
 5 files changed, 0 insertions(+), 138 deletions(-)

diff --git a/modules/gui/skins2/Modules.am b/modules/gui/skins2/Modules.am
index bb33366..4105418 100644
--- a/modules/gui/skins2/Modules.am
+++ b/modules/gui/skins2/Modules.am
@@ -38,8 +38,6 @@ SOURCES_skins2 = \
 	commands/cmd_snapshot.cpp \
 	commands/cmd_snapshot.hpp \
 	commands/cmd_show_window.hpp \
-	commands/cmd_update_item.cpp \
-	commands/cmd_update_item.hpp \
 	commands/cmd_vars.cpp \
 	commands/cmd_vars.hpp \
 	\
diff --git a/modules/gui/skins2/commands/cmd_update_item.cpp b/modules/gui/skins2/commands/cmd_update_item.cpp
deleted file mode 100644
index e7d5d22..0000000
--- a/modules/gui/skins2/commands/cmd_update_item.cpp
+++ /dev/null
@@ -1,76 +0,0 @@
-/*****************************************************************************
- * cmd_update_item.cpp
- *****************************************************************************
- * Copyright (C) 2003-2009 the VideoLAN team
- * $Id$
- *
- * Authors: Cyril Deguet     <asmax at via.ecp.fr>
- *          Olivier Teulière <ipkiss at 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
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
- *****************************************************************************/
-
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <vlc_common.h>
-#include <vlc_playlist.h>
-#include "../src/os_factory.hpp"
-#include "async_queue.hpp"
-#include "cmd_vars.hpp"
-#include "cmd_update_item.hpp"
-
-void CmdUpdateItem::execute()
-{
-    playlist_t *pPlaylist = getIntf()->p_sys->p_playlist;
-    if( pPlaylist == NULL )
-        return;
-
-    input_thread_t *p_input = playlist_CurrentInput( pPlaylist );
-    if( !p_input )
-        return;
-
-    // Get playlist item information
-    input_item_t *pItem = input_GetItem( p_input );
-
-    char *pszName = input_item_GetName( pItem );
-    char *pszUri = input_item_GetURI( pItem );
-
-    string name = pszName;
-    // XXX: This should be done in VLC core, not here...
-    // Remove path information if any
-    OSFactory *pFactory = OSFactory::instance( getIntf() );
-    string::size_type pos = name.rfind( pFactory->getDirSeparator() );
-    if( pos != string::npos )
-    {
-        name = name.substr( pos + 1, name.size() - pos + 1 );
-    }
-    UString srcName( getIntf(), name.c_str() );
-    UString srcURI( getIntf(), pszUri );
-
-    free( pszName );
-    free( pszUri );
-
-    // Create commands to update the stream variables
-    CmdSetText *pCmd1 = new CmdSetText( getIntf(), m_rStreamName, srcName );
-    CmdSetText *pCmd2 = new CmdSetText( getIntf(), m_rStreamURI, srcURI );
-    // Push the commands in the asynchronous command queue
-    AsyncQueue *pQueue = AsyncQueue::instance( getIntf() );
-    pQueue->push( CmdGenericPtr( pCmd1 ), false );
-    pQueue->push( CmdGenericPtr( pCmd2 ), false );
-    vlc_object_release( p_input );
-}
-
diff --git a/modules/gui/skins2/commands/cmd_update_item.hpp b/modules/gui/skins2/commands/cmd_update_item.hpp
deleted file mode 100644
index d3acb78..0000000
--- a/modules/gui/skins2/commands/cmd_update_item.hpp
+++ /dev/null
@@ -1,45 +0,0 @@
-/*****************************************************************************
- * cmd_update_item.hpp
- *****************************************************************************
- * Copyright (C) 2003-2009 the VideoLAN team
- * $Id$
- *
- * Authors: Cyril Deguet     <asmax at via.ecp.fr>
- *          Olivier Teulière <ipkiss at 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
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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.,
- * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
- *****************************************************************************/
-
-#ifndef CMD_UPDATE_ITEM_HPP
-#define CMD_UPDATE_ITEM_HPP
-
-#include "cmd_generic.hpp"
-#include <string>
-
-/// Udate item command
-class CmdUpdateItem: public CmdGeneric
-{
-public:
-    CmdUpdateItem( intf_thread_t *I,VarText &N,VarText &U )
-                 : CmdGeneric(I), m_rStreamName(N), m_rStreamURI(U) { }
-    virtual ~CmdUpdateItem() { }
-    virtual void execute();
-    virtual string getType() const { return "update item"; }
-
-private:
-    VarText &m_rStreamName;
-    VarText &m_rStreamURI;
-};
-#endif
diff --git a/modules/gui/skins2/src/vlcproc.cpp b/modules/gui/skins2/src/vlcproc.cpp
index 1c501c8..cc52532 100644
--- a/modules/gui/skins2/src/vlcproc.cpp
+++ b/modules/gui/skins2/src/vlcproc.cpp
@@ -47,7 +47,6 @@
 #include "../commands/cmd_resize.hpp"
 #include "../commands/cmd_vars.hpp"
 #include "../commands/cmd_dialogs.hpp"
-#include "../commands/cmd_update_item.hpp"
 #include "../commands/cmd_audio.hpp"
 #include "../commands/cmd_callbacks.hpp"
 #include "../utils/var_bool.hpp"
@@ -363,17 +362,6 @@ int VlcProc::onInteraction( vlc_object_t *pObj, const char *pVariable,
     return VLC_SUCCESS;
 }
 
-
-void VlcProc::updateStreamName()
-{
-    // Create a update item command
-    CmdUpdateItem *pCmdItem = new CmdUpdateItem( getIntf(), getStreamNameVar(), getStreamURIVar() );
-
-    // Push the command in the asynchronous command queue
-    AsyncQueue *pQueue = AsyncQueue::instance( getIntf() );
-    pQueue->push( CmdGenericPtr( pCmdItem ) );
-}
-
 int VlcProc::onEqBandsChange( vlc_object_t *pObj, const char *pVariable,
                               vlc_value_t oldVal, vlc_value_t newVal,
                               void *pParam )
diff --git a/modules/gui/skins2/src/vlcproc.hpp b/modules/gui/skins2/src/vlcproc.hpp
index ad44658..13d12f3 100644
--- a/modules/gui/skins2/src/vlcproc.hpp
+++ b/modules/gui/skins2/src/vlcproc.hpp
@@ -173,9 +173,6 @@ private:
     /// Define the command that calls manage()
     DEFINE_CALLBACK( VlcProc, Manage );
 
-    /// Update the stream name variable
-    void updateStreamName();
-
     /// Callback for intf-show variable
     static int onIntfShow( vlc_object_t *pObj, const char *pVariable,
                            vlc_value_t oldVal, vlc_value_t newVal,




More information about the vlc-devel mailing list