Commit 73488622 authored by Erwan Tulou's avatar Erwan Tulou

skins2: fix uri to path conversion

parent a2104eb8
......@@ -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 )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment