]> git.sesse.net Git - vlc/commitdiff
Remember the disc selection type (DVD, VCD, CD-DA) selected in "Open
authorRocky Bernstein <rocky@videolan.org>
Tue, 16 Dec 2003 03:21:47 +0000 (03:21 +0000)
committerRocky Bernstein <rocky@videolan.org>
Tue, 16 Dec 2003 03:21:47 +0000 (03:21 +0000)
Disc" and use that as the default for next time.

modules/gui/wxwindows/open.cpp
modules/gui/wxwindows/wxwindows.h

index 658ed4c79709012a07680a2719e0fb3e2a1f6796..e05b5d5d15388cad2d426daa45c105d263a0c4ee 100644 (file)
@@ -2,7 +2,7 @@
  * open.cpp : wxWindows plugin for vlc
  *****************************************************************************
  * Copyright (C) 2000, 2001, 2003 VideoLAN
- * $Id: open.cpp,v 1.55 2003/12/15 20:20:55 gbazin Exp $
+ * $Id: open.cpp,v 1.56 2003/12/16 03:21:47 rocky Exp $
  *
  * Authors: Gildas Bazin <gbazin@netcourrier.com>
  *
@@ -234,6 +234,8 @@ OpenDialog::OpenDialog( intf_thread_t *_p_intf, wxWindow *_p_parent,
     p_parent = _p_parent;
     SetIcon( *p_intf->p_sys->p_icon );
     file_dialog = NULL;
+    i_disc_type_selection = 0;
+    
 #ifndef WIN32
     v4l_dialog = NULL;
 #endif
@@ -476,7 +478,8 @@ wxPanel *OpenDialog::DiscPanel( wxWindow* parent )
                                 wxDefaultPosition, wxDefaultSize,
                                 WXSIZEOF(disc_type_array), disc_type_array,
                                 WXSIZEOF(disc_type_array), wxRA_SPECIFY_COLS );
-    sizer_row->Add( disc_type, 0, wxEXPAND | wxALL, 5 );
+    
+    sizer_row->Add( disc_type, i_disc_type_selection, wxEXPAND | wxALL, 5 );
 
     wxStaticText *label = new wxStaticText( panel, -1, wxU(_("Device name")) );
     disc_device = new wxTextCtrl( panel, DiscDevice_Event, wxT(""),
@@ -678,7 +681,9 @@ void OpenDialog::UpdateMRL( int i_access_method )
         mrltemp = file_combo->GetValue();
         break;
     case DISC_ACCESS:
-      switch ( disc_type->GetSelection() ) 
+      i_disc_type_selection = disc_type->GetSelection();
+
+      switch ( i_disc_type_selection ) 
        {
        case 0:
          disc_chapter->Enable();
index 599e8f4d16f3de6aed17862c4d91a92d0cc2df7e..8676ffa2c2054e8a34260ac37e5a3f0003e09c42 100644 (file)
@@ -2,7 +2,7 @@
  * wxwindows.h: private wxWindows interface description
  *****************************************************************************
  * Copyright (C) 1999, 2000 VideoLAN
- * $Id: wxwindows.h,v 1.80 2003/12/14 22:49:28 gbazin Exp $
+ * $Id: wxwindows.h,v 1.81 2003/12/16 03:21:47 rocky Exp $
  *
  * Authors: Gildas Bazin <gbazin@netcourrier.com>
  *
@@ -362,6 +362,7 @@ private:
     intf_thread_t *p_intf;
     wxWindow *p_parent;
     int i_current_access_method;
+    int i_disc_type_selection;
 
     int i_method; /* Normal or for the stream dialog ? */
     wxComboBox *mrl_combo;