[vlc-commits] skins2: fix uri to path conversion
Erwan Tulou
git at videolan.org
Fri Jan 12 00:30:05 CET 2018
vlc/vlc-3.0 | branch: master | Erwan Tulou <erwan10 at videolan.org> | Mon Jan 8 23:12:11 2018 +0100| [5a5a621cedff9fd38ba3d2c68058f2287a3d8e98] | committer: Erwan Tulou
skins2: fix uri to path conversion
(cherry picked from commit 7348862286282761da1b92cb53ff4f24a0900b4b)
Signed-off-by: Erwan Tulou <erwan10 at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=5a5a621cedff9fd38ba3d2c68058f2287a3d8e98
---
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 )
More information about the vlc-commits
mailing list