[vlc-commits] commit: skins2: translate $F into local path instead of uri when possible ( Erwan Tulou )
git at videolan.org
git at videolan.org
Sat Aug 14 14:07:01 CEST 2010
vlc/vlc-1.1 | branch: master | Erwan Tulou <erwan10 at videolan.org> | Fri Jul 30 11:24:19 2010 +0200| [0e04933d5b193b4cbb3ef75ea56350fd841c7a2c] | committer: Erwan Tulou
skins2: translate $F into local path instead of uri when possible
Local paths are more user-friendly for display than full uri
when that makes sense
(cherry picked from commit 6e59bfe80fbbe314625d54ab74a4f7edbb28aef4)
> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=0e04933d5b193b4cbb3ef75ea56350fd841c7a2c
---
modules/gui/skins2/src/vlcproc.cpp | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/modules/gui/skins2/src/vlcproc.cpp b/modules/gui/skins2/src/vlcproc.cpp
index 6e13a04..ad2624a 100644
--- a/modules/gui/skins2/src/vlcproc.cpp
+++ b/modules/gui/skins2/src/vlcproc.cpp
@@ -31,6 +31,7 @@
#include <vlc_aout.h>
#include <vlc_vout.h>
#include <vlc_playlist.h>
+#include <vlc_url.h>
#include "vlcproc.hpp"
#include "os_factory.hpp"
@@ -441,9 +442,12 @@ void VlcProc::on_item_current_changed( vlc_object_t* p_obj, vlc_value_t newVal )
SET_TEXT( m_cVarStreamName, UString( getIntf(), psz_name ) );
free( psz_name );
- // Update full uri
+ // Update local path (if possible) or full uri
char *psz_uri = input_item_GetURI( p_item );
- SET_TEXT( m_cVarStreamURI, UString( getIntf(), psz_uri ) );
+ char *psz_path = make_path( psz_uri );
+ char *psz_save = psz_path ? psz_path : psz_uri;
+ SET_TEXT( m_cVarStreamURI, UString( getIntf(), psz_save ) );
+ free( psz_path );
free( psz_uri );
// Update playtree
More information about the vlc-commits
mailing list