[vlc-devel] commit: Use the input_MRLSplit to open containing folder for directory and files only . (Jean-Baptiste Kempf )

git version control git at videolan.org
Fri Aug 22 20:53:53 CEST 2008


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Fri Aug 22 11:53:54 2008 -0700| [42d66281100d8ec709de9b93e60780ce0d5cd5c1] | committer: Jean-Baptiste Kempf 

Use the input_MRLSplit to open containing folder for directory and files only.

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

 .../gui/qt4/components/playlist/playlist_model.cpp |   16 +++++++++++++---
 1 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/modules/gui/qt4/components/playlist/playlist_model.cpp b/modules/gui/qt4/components/playlist/playlist_model.cpp
index 6d4fc63..3bb985c 100644
--- a/modules/gui/qt4/components/playlist/playlist_model.cpp
+++ b/modules/gui/qt4/components/playlist/playlist_model.cpp
@@ -946,9 +946,19 @@ void PLModel::popupExplore()
        char *psz_meta = input_item_GetURI( p_input );
        if( psz_meta )
        {
-           /* FIXME add a MRLSplit like function */
-           QFileInfo info( qfu( psz_meta ) );
-           QDesktopServices::openUrl( QUrl::fromLocalFile( info.absolutePath() ) );
+           const char *psz_access;
+           const char *psz_demux;
+           char  *psz_path;
+           input_SplitMRL( &psz_access, &psz_demux, &psz_path, psz_meta );
+
+           if( EMPTY_STR( psz_access ) ||
+               !strncasecmp( psz_access, "file", 4 ) ||
+               !strncasecmp( psz_access, "dire", 4 ) )
+           {
+               QFileInfo info( qfu( psz_meta ) );
+               QDesktopServices::openUrl(
+                               QUrl::fromLocalFile( info.absolutePath() ) );
+           }
            free( psz_meta );
        }
     }




More information about the vlc-devel mailing list