[vlc-devel] commit: skins2(Windows): add a command to start the first playlist item ( Erwan Tulou )

git version control git at videolan.org
Sun Jun 28 21:59:23 CEST 2009


vlc | branch: 1.0-bugfix | Erwan Tulou <erwan10 at videolan.org> | Sat Jun 27 23:25:20 2009 +0200| [e48e3696895c584c1775eab679e8f0e657ca295b] | committer: Erwan Tulou 

skins2(Windows): add a command to start the first playlist item
(cherry picked from commit 1c4ea6e1a34f5cd9f5e65ffc167e0b68b34aa6e2)

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

 modules/gui/skins2/commands/cmd_playlist.cpp |    9 +++++++++
 modules/gui/skins2/commands/cmd_playlist.hpp |    3 +++
 2 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/modules/gui/skins2/commands/cmd_playlist.cpp b/modules/gui/skins2/commands/cmd_playlist.cpp
index 0e658a0..34f50f9 100644
--- a/modules/gui/skins2/commands/cmd_playlist.cpp
+++ b/modules/gui/skins2/commands/cmd_playlist.cpp
@@ -120,3 +120,12 @@ void CmdPlaylistSave::execute()
         playlist_Export( pPlaylist, m_file.c_str(), pPlaylist->p_local_category, psz_module );
     }
 }
+
+void CmdPlaylistFirst::execute()
+{
+    playlist_t *pPlaylist = getIntf()->p_sys->p_playlist;
+
+    playlist_Lock( pPlaylist );
+    playlist_Control( pPlaylist, PLAYLIST_PLAY, pl_Locked );
+    playlist_Unlock( pPlaylist );
+}
diff --git a/modules/gui/skins2/commands/cmd_playlist.hpp b/modules/gui/skins2/commands/cmd_playlist.hpp
index bd7e630..4ea393f 100644
--- a/modules/gui/skins2/commands/cmd_playlist.hpp
+++ b/modules/gui/skins2/commands/cmd_playlist.hpp
@@ -58,6 +58,9 @@ DEFINE_COMMAND( PlaylistNext, "playlist next" )
 /// Command to jump to the previous item
 DEFINE_COMMAND( PlaylistPrevious, "playlist previous" )
 
+/// Command to start the playlist
+DEFINE_COMMAND( PlaylistFirst, "playlist first" )
+
 
 /// Command to set the random state
 class CmdPlaylistRandom: public CmdGeneric




More information about the vlc-devel mailing list