[vlc-devel] commit: skins2: uri-encoded mrl required for drag&drop (Erwan Tulou )
git version control
git at videolan.org
Wed Aug 26 19:42:35 CEST 2009
vlc | branch: master | Erwan Tulou <erwan10 at videolan.org> | Wed Aug 26 19:12:06 2009 +0200| [c8d3f4ae27ec17885aae7981a41099a9c055923a] | committer: Erwan Tulou
skins2: uri-encoded mrl required for drag&drop
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c8d3f4ae27ec17885aae7981a41099a9c055923a
---
modules/gui/skins2/commands/cmd_add_item.cpp | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/modules/gui/skins2/commands/cmd_add_item.cpp b/modules/gui/skins2/commands/cmd_add_item.cpp
index f90c188..90ceb5f 100644
--- a/modules/gui/skins2/commands/cmd_add_item.cpp
+++ b/modules/gui/skins2/commands/cmd_add_item.cpp
@@ -28,27 +28,31 @@
#include <vlc_common.h>
#include <vlc_playlist.h>
+#include <vlc_url.h>
#include "cmd_add_item.hpp"
void CmdAddItem::execute()
{
playlist_t *pPlaylist = getIntf()->p_sys->p_playlist;
- if( pPlaylist == NULL )
- {
+ if( !pPlaylist )
+ return;
+
+ char* psz_uri = make_URI( m_name.c_str() );
+ if( !psz_uri )
return;
- }
if( m_playNow )
{
// Enqueue and play the item
- playlist_Add( pPlaylist, m_name.c_str(), NULL,
+ playlist_Add( pPlaylist, psz_uri, NULL,
PLAYLIST_APPEND | PLAYLIST_GO, PLAYLIST_END, true,
false );
}
else
{
// Enqueue the item only
- playlist_Add( pPlaylist, m_name.c_str(), NULL,
+ playlist_Add( pPlaylist, psz_uri, NULL,
PLAYLIST_APPEND, PLAYLIST_END, true, false );
}
+ free( psz_uri );
}
More information about the vlc-devel
mailing list