Commit 4cd152b7 authored by Gildas Bazin's avatar Gildas Bazin

* modules/gui/wxwindows/wxwindows.cpp: don't "play on start" when in dialogs provider mode.

* modules/gui/skins2/src/skin_main.cpp: "play on start" support.
* src/interface/interface.c: explicit init of b_play.
* src/libvlc.c: GetFilenames() doesn't start the playlist anymore.
parent 73c89312
...@@ -122,6 +122,9 @@ static int Open( vlc_object_t *p_this ) ...@@ -122,6 +122,9 @@ static int Open( vlc_object_t *p_this )
} }
Dialogs::instance( p_intf ); Dialogs::instance( p_intf );
/* We support play on start */
p_intf->b_play = VLC_TRUE;
return( VLC_SUCCESS ); return( VLC_SUCCESS );
} }
...@@ -208,6 +211,19 @@ static void Run( intf_thread_t *p_intf ) ...@@ -208,6 +211,19 @@ static void Run( intf_thread_t *p_intf )
// Get the instance of OSLoop // Get the instance of OSLoop
OSLoop *loop = OSFactory::instance( p_intf )->getOSLoop(); OSLoop *loop = OSFactory::instance( p_intf )->getOSLoop();
// Check if we need to start playing
if( p_intf->b_play )
{
playlist_t *p_playlist =
(playlist_t *)vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
FIND_ANYWHERE );
if( p_playlist )
{
playlist_Play( p_playlist );
vlc_object_release( p_playlist );
}
}
// Enter the main event loop // Enter the main event loop
loop->run(); loop->run();
...@@ -228,7 +244,7 @@ static void Run( intf_thread_t *p_intf ) ...@@ -228,7 +244,7 @@ static void Run( intf_thread_t *p_intf )
#define SKINS2_CONFIG N_("Config of last used skin") #define SKINS2_CONFIG N_("Config of last used skin")
#define SKINS2_CONFIG_LONG N_("Config of last used skin.") #define SKINS2_CONFIG_LONG N_("Config of last used skin.")
#define SKINS2_TRANSPARENCY N_("Enable transparency effects") #define SKINS2_TRANSPARENCY N_("Enable transparency effects")
#define SKINS2_TRANSPARENCY_LONG N_("You can disable all transparency effects" \ #define SKINS2_TRANSPARENCY_LONG N_("You can disable all transparency effects"\
" if you want. This is mainly useful when moving windows does not behave" \ " if you want. This is mainly useful when moving windows does not behave" \
" correctly.") " correctly.")
......
...@@ -310,7 +310,7 @@ bool Instance::OnInit() ...@@ -310,7 +310,7 @@ bool Instance::OnInit()
vlc_thread_ready( p_intf ); vlc_thread_ready( p_intf );
/* Check if we need to start playing */ /* Check if we need to start playing */
if( p_intf->b_play ) if( !p_intf->pf_show_dialog && p_intf->b_play )
{ {
playlist_t *p_playlist = playlist_t *p_playlist =
(playlist_t *)vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, (playlist_t *)vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
......
...@@ -86,6 +86,7 @@ intf_thread_t* __intf_Create( vlc_object_t *p_this, const char *psz_module ) ...@@ -86,6 +86,7 @@ intf_thread_t* __intf_Create( vlc_object_t *p_this, const char *psz_module )
p_intf->pf_request_window = NULL; p_intf->pf_request_window = NULL;
p_intf->pf_release_window = NULL; p_intf->pf_release_window = NULL;
p_intf->pf_control_window = NULL; p_intf->pf_control_window = NULL;
p_intf->b_play = VLC_FALSE;
/* Choose the best module */ /* Choose the best module */
p_intf->p_module = module_Need( p_intf, "interface", psz_module, 0 ); p_intf->p_module = module_Need( p_intf, "interface", psz_module, 0 );
......
...@@ -1263,8 +1263,7 @@ static int GetFilenames( vlc_t *p_vlc, int i_argc, char *ppsz_argv[] ) ...@@ -1263,8 +1263,7 @@ static int GetFilenames( vlc_t *p_vlc, int i_argc, char *ppsz_argv[] )
VLC_AddTarget( p_vlc->i_object_id, ppsz_argv[ i_opt ], VLC_AddTarget( p_vlc->i_object_id, ppsz_argv[ i_opt ],
(char const **)( i_options ? &ppsz_argv[i_opt + 1] : (char const **)( i_options ? &ppsz_argv[i_opt + 1] :
NULL ), i_options, NULL ), i_options,
PLAYLIST_INSERT | (i_opt == optind ? PLAYLIST_GO : 0), PLAYLIST_INSERT, 0 );
0 );
} }
return VLC_SUCCESS; return VLC_SUCCESS;
......
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