]> git.sesse.net Git - vlc/blobdiff - modules/gui/wxwindows/open.cpp
Improvements to preferences
[vlc] / modules / gui / wxwindows / open.cpp
index e9fd3cf7b91303dc340590ad47400b62bfbd6e39..e789766d457d47faf89ce04a18bcc7a7beeb5ccf 100644 (file)
@@ -37,6 +37,8 @@
 
 #include <vlc/intf.h>
 
+#include <vector>
+
 #include "wxwindows.h"
 #include "preferences_widgets.h"
 
@@ -221,9 +223,6 @@ AutoBuiltPanel::AutoBuiltPanel( wxWindow *parent, OpenDialog *dialog,
 
     if( b_advanced )
     {
-        wxPanel *dummy_panel = new wxPanel( this, -1 );
-        sizer->Add( dummy_panel, 1 );
-
         wxButton *button =
             new wxButton( this, AdvancedOptions_Event,
                           wxU(_("Advanced options...")) );
@@ -279,7 +278,7 @@ AutoBuiltPanel::AutoBuiltPanel( wxWindow *parent, OpenDialog *dialog,
         while( p_item->i_type != CONFIG_HINT_END && p_item++ );
 
         /* Separation */
-        dummy_panel = new wxPanel( p_advanced_dialog, -1 );
+        wxPanel *dummy_panel = new wxPanel( p_advanced_dialog, -1 );
         sizer->Add( dummy_panel, 1 );
         wxStaticLine *static_line =
             new wxStaticLine( p_advanced_dialog, wxID_OK );
@@ -848,7 +847,13 @@ void OpenDialog::UpdateMRL( int i_access_method )
             break;
 
         case 3: /* CD-DA */
-            mrltemp = wxT("cdda://") + disc_device->GetValue();
+            mrltemp = 
+#ifdef HAVE_CDDAX
+             wxT("cddax://") 
+#else
+             wxT("cdda://") 
+#endif
+             + disc_device->GetValue();
             if( i_disc_title > 0 )
                 mrltemp += wxString::Format( wxT("@%d"), i_disc_title );
 
@@ -1053,8 +1058,7 @@ void OpenDialog::OnOk( wxCommandEvent& WXUNUSED(event) )
 
         if( b_start )
         {
-            int i_pos = playlist_GetPositionById( p_playlist , i_id );
-            playlist_Command( p_playlist, PLAYLIST_GOTO, i_pos );
+            playlist_Control( p_playlist, PLAYLIST_ITEMPLAY , p_item );
         }
     }