vlc | branch: master | Erwan Tulou <erwa...@videolan.org> | Mon Jan 8 23:12:11 2018 +0100| [7348862286282761da1b92cb53ff4f24a0900b4b] | committer: Erwan Tulou
skins2: fix uri to path conversion > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7348862286282761da1b92cb53ff4f24a0900b4b --- modules/gui/skins2/src/dialogs.cpp | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/modules/gui/skins2/src/dialogs.cpp b/modules/gui/skins2/src/dialogs.cpp index f59ea71065..465e3102dc 100644 --- a/modules/gui/skins2/src/dialogs.cpp +++ b/modules/gui/skins2/src/dialogs.cpp @@ -31,6 +31,7 @@ #include "../commands/cmd_playtree.hpp" #include <vlc_playlist.h> #include <vlc_modules.h> +#include <vlc_url.h> /// Callback called when a new skin is chosen void Dialogs::showChangeSkinCB( intf_dialog_args_t *pArg ) @@ -41,13 +42,18 @@ void Dialogs::showChangeSkinCB( intf_dialog_args_t *pArg ) { if( pArg->psz_results[0] ) { - // Create a change skin command - CmdChangeSkin *pCmd = - new CmdChangeSkin( pIntf, pArg->psz_results[0] ); - - // Push the command in the asynchronous command queue - AsyncQueue *pQueue = AsyncQueue::instance( pIntf ); - pQueue->push( CmdGenericPtr( pCmd ) ); + char* psz_path = vlc_uri2path( pArg->psz_results[0] ); + if( psz_path ) + { + // Create a change skin command + CmdChangeSkin *pCmd = + new CmdChangeSkin( pIntf, psz_path ); + free( psz_path ); + + // Push the command in the asynchronous command queue + AsyncQueue *pQueue = AsyncQueue::instance( pIntf ); + pQueue->push( CmdGenericPtr( pCmd ) ); + } } } else if( !pIntf->p_sys->p_theme ) _______________________________________________ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits