]> git.sesse.net Git - vlc/commitdiff
* modules/gui/wxwindows/dialogs.cpp: fixed add directory.
authorGildas Bazin <gbazin@videolan.org>
Tue, 5 Apr 2005 15:32:26 +0000 (15:32 +0000)
committerGildas Bazin <gbazin@videolan.org>
Tue, 5 Apr 2005 15:32:26 +0000 (15:32 +0000)
modules/gui/wxwindows/dialogs.cpp

index c4119038c33e8090fb32e39d548a2e43713643a4..2951940c3ea6763e86d62b82bc2c5bde5648d7a1 100644 (file)
@@ -427,14 +427,10 @@ void DialogsProvider::OnOpenDirectory( wxCommandEvent& event )
         playlist_item_t *p_item;
         wxString path = p_dir_dialog->GetPath();
 
-        int i_id = playlist_Add( p_playlist, (const char *)path.mb_str(),
-                                             (const char *)path.mb_str(),
-                                             PLAYLIST_APPEND, PLAYLIST_END );
-        p_item = playlist_LockItemGetById( p_playlist, i_id );
-        if( p_item )
-        {
-            input_CreateThread( p_intf, &p_item->input );
-        }
+        playlist_Add( p_playlist, (const char *)path.mb_str(),
+                      (const char *)path.mb_str(),
+                      PLAYLIST_APPEND | (event.GetInt() ? PLAYLIST_GO : 0),
+                      PLAYLIST_END );
     }
 
     vlc_object_release( p_playlist );