[vlc-devel] commit: skins2: factorize. ( Rémi Duraffort )

git version control git at videolan.org
Mon Jul 27 13:50:47 CEST 2009


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Mon Jul 27 12:07:54 2009 +0200| [91e6499bfec9c4875258aaa66ffbee6a80263284] | committer: Rémi Duraffort 

skins2: factorize.

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

 modules/gui/skins2/commands/cmd_playlist.cpp |   22 ++++------------------
 1 files changed, 4 insertions(+), 18 deletions(-)

diff --git a/modules/gui/skins2/commands/cmd_playlist.cpp b/modules/gui/skins2/commands/cmd_playlist.cpp
index 34f50f9..28e44ab 100644
--- a/modules/gui/skins2/commands/cmd_playlist.cpp
+++ b/modules/gui/skins2/commands/cmd_playlist.cpp
@@ -56,11 +56,7 @@ void CmdPlaylistRandom::execute()
 {
     playlist_t *pPlaylist = getIntf()->p_sys->p_playlist;
     if( pPlaylist != NULL )
-    {
-        vlc_value_t val;
-        val.b_bool = m_value;
-        var_Set( pPlaylist , "random", val);
-    }
+        var_SetBool( pPlaylist , "random", m_value );
 }
 
 
@@ -68,11 +64,7 @@ void CmdPlaylistLoop::execute()
 {
     playlist_t *pPlaylist = getIntf()->p_sys->p_playlist;
     if( pPlaylist != NULL )
-    {
-        vlc_value_t val;
-        val.b_bool = m_value;
-        var_Set( pPlaylist , "loop", val);
-    }
+        var_SetBool( pPlaylist , "loop", m_value );
 }
 
 
@@ -80,11 +72,7 @@ void CmdPlaylistRepeat::execute()
 {
     playlist_t *pPlaylist = getIntf()->p_sys->p_playlist;
     if( pPlaylist != NULL )
-    {
-        vlc_value_t val;
-        val.b_bool = m_value;
-        var_Set( pPlaylist , "repeat", val);
-    }
+        var_SetBool( pPlaylist , "repeat", m_value );
 }
 
 
@@ -125,7 +113,5 @@ void CmdPlaylistFirst::execute()
 {
     playlist_t *pPlaylist = getIntf()->p_sys->p_playlist;
 
-    playlist_Lock( pPlaylist );
-    playlist_Control( pPlaylist, PLAYLIST_PLAY, pl_Locked );
-    playlist_Unlock( pPlaylist );
+    playlist_Control( pPlaylist, PLAYLIST_PLAY, pl_Unlocked );
 }




More information about the vlc-devel mailing list