Remove redumdant b_play code
authorRémi Denis-Courmont <rdenis@simphalempin.com>
Wed, 4 Jun 2008 16:50:20 +0000 (19:50 +0300)
committerRémi Denis-Courmont <rdenis@simphalempin.com>
Wed, 4 Jun 2008 16:51:09 +0000 (19:51 +0300)
include/vlc_interface.h
modules/gui/macosx/intf.m
modules/gui/qt4/qt4.cpp
modules/gui/skins2/src/skin_main.cpp
modules/gui/wince/wince.cpp
modules/gui/wxwidgets/wxwidgets.cpp
src/interface/interface.c
src/libvlc.c

index 23fa959..6e78ef2 100644 (file)
@@ -54,7 +54,6 @@ struct intf_thread_t
     VLC_COMMON_MEMBERS
 
     /* Thread properties and locks */
-    bool          b_play;
     bool          b_should_run_on_first_thread;
 
     /* Specific interfaces */
index 29ab5a0..cc9e77f 100644 (file)
@@ -108,7 +108,6 @@ int OpenIntf ( vlc_object_t *p_this )
 
     p_intf->p_sys->o_sendport = [[NSPort port] retain];
     p_intf->p_sys->p_sub = msg_Subscribe( p_intf );
-    p_intf->b_play = true;
     p_intf->pf_run = Run;
     p_intf->b_should_run_on_first_thread = true;
 
@@ -560,11 +559,6 @@ static VLCMain *_o_sharedMainInstance = nil;
 
     p_playlist = pl_Yield( p_intf );
 
-    /* Check if we need to start playing */
-    if( p_intf->b_play )
-    {
-        playlist_Control( p_playlist, PLAYLIST_PLAY, false );
-    }
     var_Create( p_playlist, "fullscreen", VLC_VAR_BOOL | VLC_VAR_DOINHERIT);
     val.b_bool = false;
 
index 97ea626..bba8a65 100644 (file)
@@ -235,9 +235,6 @@ static int Open( vlc_object_t *p_this )
     p_intf->p_sys->p_playlist = pl_Yield( p_intf );
     p_intf->p_sys->p_sub = msg_Subscribe( p_intf );
 
-    /* We support play on start */
-    p_intf->b_play = true;
-
     return VLC_SUCCESS;
 }
 
@@ -353,12 +350,6 @@ static void Init( intf_thread_t *p_intf )
     app->installTranslator( &qtTranslator );
 #endif  //ENABLE_NLS
 
-    /* Start playing if needed */
-    if( !p_intf->pf_show_dialog && p_intf->b_play )
-    {
-        playlist_Control( THEPL, PLAYLIST_PLAY, false );
-    }
-
     /* Explain to the core how to show a dialog :D */
     p_intf->pf_show_dialog = ShowDialog;
 
index 1e63337..2784db7 100644 (file)
@@ -163,9 +163,6 @@ static int Open( vlc_object_t *p_this )
     Dialogs::instance( p_intf );
     ThemeRepository::instance( p_intf );
 
-    // We support play on start
-    p_intf->b_play = true;
-
     return( VLC_SUCCESS );
 }
 
@@ -252,19 +249,6 @@ 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_Control( p_playlist, PLAYLIST_PLAY, false );
-            vlc_object_release( p_playlist );
-        }
-    }
-
     // Enter the main event loop
     loop->run();
 
index 29b9dae..07306ec 100644 (file)
@@ -253,19 +253,6 @@ static void MainLoop( intf_thread_t *p_intf )
     /* OK, initialization is over */
     vlc_thread_ready( p_intf );
 
-    /* Check if we need to start playing */
-    if( !p_intf->pf_show_dialog && 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 );
-        }
-    }
-
     // Main message loop
     while( GetMessage( &msg, NULL, 0, 0 ) > 0 )
     {
index 6cad370..13e1331 100644 (file)
@@ -208,9 +208,6 @@ static int Open( vlc_object_t *p_this )
 
     p_intf->pf_show_dialog = NULL;
 
-    /* We support play on start */
-    p_intf->b_play = true;
-
     p_intf->p_sys->b_video_autosize =
         config_GetInt( p_intf, "wx-autosize" );
 
@@ -390,19 +387,6 @@ bool Instance::OnInit()
     /* OK, initialization is over */
     vlc_thread_ready( p_intf );
 
-    /* Check if we need to start playing */
-    if( !p_intf->pf_show_dialog && p_intf->b_play )
-    {
-        playlist_t *p_playlist =
-            (playlist_t *)vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
-                                           FIND_ANYWHERE );
-        if( p_playlist )
-        {
-            playlist_Control( p_playlist, PLAYLIST_PLAY, false );
-            vlc_object_release( p_playlist );
-        }
-    }
-
     /* Return TRUE to tell program to continue (FALSE would terminate) */
     return TRUE;
 }
index 7a39c07..1e15b8c 100644 (file)
@@ -99,7 +99,6 @@ 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 = false;
     p_intf->b_interaction = false;
     p_intf->b_should_run_on_first_thread = false;
 
@@ -224,9 +223,6 @@ static void RunInterface( intf_thread_t *p_intf )
             vlc_object_unlock( p_intf );
         }
 
-        /* Reset play on start status */
-        p_intf->b_play = false;
-
         if( !p_intf->psz_switch_intf )
         {
             break;
index ec267bc..5b2c7bc 100644 (file)
@@ -1133,7 +1133,6 @@ int libvlc_InternalAddIntf( libvlc_int_t *p_libvlc, char const *psz_module )
     }
 
     /* Try to run the interface */
-    p_intf->b_play = false; /* TODO: remove b_play completely */
     i_err = intf_RunThread( p_intf );
     if( i_err )
     {