]> git.sesse.net Git - vlc/commitdiff
* modules/gui/wxwindows/wxwindows.cpp: don't "play on start" when in dialogs provider...
authorGildas Bazin <gbazin@videolan.org>
Tue, 20 Apr 2004 17:57:58 +0000 (17:57 +0000)
committerGildas Bazin <gbazin@videolan.org>
Tue, 20 Apr 2004 17:57:58 +0000 (17:57 +0000)
* 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.

modules/gui/skins2/src/skin_main.cpp
modules/gui/wxwindows/wxwindows.cpp
src/interface/interface.c
src/libvlc.c

index 3d93cf798b11e0edab467cdb059de7d9f459e980..85584510cdc418199e061bc7a928b243b83e5614 100644 (file)
@@ -122,6 +122,9 @@ static int Open( vlc_object_t *p_this )
     }
     Dialogs::instance( p_intf );
 
+    /* We support play on start */
+    p_intf->b_play = VLC_TRUE;
+
     return( VLC_SUCCESS );
 }
 
@@ -208,6 +211,19 @@ static void Run( intf_thread_t *p_intf )
     // Get the instance of OSLoop
     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
     loop->run();
 
@@ -228,7 +244,7 @@ static void Run( intf_thread_t *p_intf )
 #define SKINS2_CONFIG      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_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" \
     " correctly.")
 
index 0454ef54810eff4e30a9e2462d22e0a1b7c9a538..6eaf4fb7a568337d914b6a44f862aa141af0ec71 100644 (file)
@@ -310,7 +310,7 @@ bool Instance::OnInit()
     vlc_thread_ready( p_intf );
 
     /* 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 *)vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
index d2de9a84c27fa56d896252121593fe2b3cfb5859..c32285f78d8baf07a518607857ea525a5a4de5e8 100644 (file)
@@ -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_release_window = NULL;
     p_intf->pf_control_window = NULL;
+    p_intf->b_play = VLC_FALSE;
 
     /* Choose the best module */
     p_intf->p_module = module_Need( p_intf, "interface", psz_module, 0 );
index 51b9fad3bdf25acd1cca1cb4f89d437963cd0cf6..f2425b8e88716dc27c9935bc03c8335b64682622 100644 (file)
@@ -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 ],
                        (char const **)( i_options ? &ppsz_argv[i_opt + 1] :
                                         NULL ), i_options,
-                       PLAYLIST_INSERT | (i_opt == optind ? PLAYLIST_GO : 0),
-                       0 );
+                       PLAYLIST_INSERT, 0 );
     }
 
     return VLC_SUCCESS;