]> git.sesse.net Git - vlc/commitdiff
Fixed the 'Do not use DVD menus' check box.
authorEric Petit <titer@videolan.org>
Fri, 17 Jan 2003 18:19:43 +0000 (18:19 +0000)
committerEric Petit <titer@videolan.org>
Fri, 17 Jan 2003 18:19:43 +0000 (18:19 +0000)
modules/gui/beos/InterfaceWindow.cpp
modules/gui/beos/PreferencesWindow.cpp
modules/gui/beos/PreferencesWindow.h
modules/gui/beos/VlcWrapper.cpp
modules/gui/beos/VlcWrapper.h

index 82a3f1c2b0d4a93361bda0844fe13e7a0317aabf..3dd097553c64276f86485c807fbebffc3b227b0b 100644 (file)
@@ -2,7 +2,7 @@
  * InterfaceWindow.cpp: beos interface
  *****************************************************************************
  * Copyright (C) 1999, 2000, 2001 VideoLAN
- * $Id: InterfaceWindow.cpp,v 1.18 2003/01/16 15:26:23 titer Exp $
+ * $Id: InterfaceWindow.cpp,v 1.19 2003/01/17 18:19:43 titer Exp $
  *
  * Authors: Jean-Marc Dressler <polux@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
@@ -69,6 +69,7 @@ InterfaceWindow::InterfaceWindow( BRect frame, const char *name,
 {
     p_intf = p_interface;
     p_wrapper = p_intf->p_sys->p_wrapper;
+    p_intf->p_sys->b_dvdold = false;
     
     fPlaylistIsEmpty = ( p_wrapper->PlaylistSize() < 0 );
     
index dbd9918b481d143163e316232fcf871ca8658fdf..7705a39ebae8a4f1cfdff3d9e54ebebfa059ccdf 100644 (file)
@@ -2,7 +2,7 @@
  * PreferencesWindow.cpp: beos interface
  *****************************************************************************
  * Copyright (C) 1999, 2000, 2001 VideoLAN
- * $Id: PreferencesWindow.cpp,v 1.7 2003/01/16 15:26:23 titer Exp $
+ * $Id: PreferencesWindow.cpp,v 1.8 2003/01/17 18:19:43 titer Exp $
  *
  * Authors: Eric Petit <titer@videolan.org>
  *
@@ -75,13 +75,9 @@ PreferencesWindow::PreferencesWindow( BRect frame, const char* name,
     rect = fGeneralView->Bounds();
     rect.InsetBy( 10, 10 );
     rect.bottom = rect.top + 10;
-    fOldDvdCheck = new BCheckBox( rect, "olddvd", "Do not use DVD menus",
-                                  new BMessage( OLDDVD_CHECK ) );
-    fGeneralView->AddChild( fOldDvdCheck );
-    fprintf( stderr, "%s\n", config_GetPsz( p_intf, "access" ) );
-    if( config_GetPsz( p_intf, "access" ) &&
-        !strncmp( config_GetPsz( p_intf, "access" ), "dvdold,any", 10 ) )
-        fOldDvdCheck->SetValue( 1 );
+    fDvdOldCheck = new BCheckBox( rect, "dvdold", "Do not use DVD menus",
+                                  new BMessage( DVDOLD_CHECK ) );
+    fGeneralView->AddChild( fDvdOldCheck );
     
     rect.top = rect.bottom + 20;
     rect.bottom = rect.top + 30;
@@ -177,7 +173,7 @@ void PreferencesWindow::MessageReceived( BMessage * p_message )
 {
        switch ( p_message->what )
        {
-           case OLDDVD_CHECK:
+           case DVDOLD_CHECK:
            case SLIDER_UPDATE:
            {
                ApplyChanges();
@@ -221,7 +217,7 @@ void PreferencesWindow::ReallyQuit()
  *****************************************************************************/
 void PreferencesWindow::SetDefaults()
 {
-    fOldDvdCheck->SetValue( 0 );
+    fDvdOldCheck->SetValue( 0 );
     fPpSlider->SetValue( 0 );
     fBrightnessSlider->SetValue( 100 );
     fContrastSlider->SetValue( 100 );
@@ -234,10 +230,10 @@ void PreferencesWindow::SetDefaults()
  *****************************************************************************/
 void PreferencesWindow::ApplyChanges()
 {
-    if( fOldDvdCheck->Value() )
-        config_PutPsz( p_intf, "access", "dvdold,any" );
+    if( fDvdOldCheck->Value() )
+        p_intf->p_sys->b_dvdold = true;
     else
-        config_PutPsz( p_intf, "access", NULL );
+        p_intf->p_sys->b_dvdold = false;
     
     config_PutInt( p_intf, "ffmpeg-pp-q", fPpSlider->Value() );
     config_PutFloat( p_intf, "brightness",
index c5bc05050cc7e418496e739d6dfa8e0b484ba20f..e0762f875c870ac863ff48727981d8437bfc6f94 100644 (file)
@@ -2,7 +2,7 @@
  * PreferencesWindow.h
  *****************************************************************************
  * Copyright (C) 1999, 2000, 2001 VideoLAN
- * $Id: PreferencesWindow.h,v 1.5 2003/01/16 15:26:23 titer Exp $
+ * $Id: PreferencesWindow.h,v 1.6 2003/01/17 18:19:43 titer Exp $
  *
  * Authors: Eric Petit <titer@videolan.org>
  *
@@ -33,7 +33,7 @@
 #define PREFS_SAVE     'prsa'
 #define PREFS_DEFAULTS 'prde'
 #define SLIDER_UPDATE  'slup'
-#define OLDDVD_CHECK   'olch'
+#define DVDOLD_CHECK   'dvch'
 
 class PreferencesWindow : public BWindow
 {
@@ -54,7 +54,7 @@ class PreferencesWindow : public BWindow
         BView *          fAdjustView;
         BTab *           fGeneralTab;
         BTab *           fAdjustTab;
-        BCheckBox *      fOldDvdCheck;
+        BCheckBox *      fDvdOldCheck;
         BSlider *        fPpSlider;
         BSlider *        fContrastSlider;
         BSlider *        fBrightnessSlider;
index 4f74c1f75a8d7569ca4ca7e4ca92413158c58224..f282269ab855504be45854115f4641337399d909 100644 (file)
@@ -2,7 +2,7 @@
  * VlcWrapper.cpp: BeOS plugin for vlc (derived from MacOS X port)
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: VlcWrapper.cpp,v 1.19 2003/01/14 22:03:38 titer Exp $
+ * $Id: VlcWrapper.cpp,v 1.20 2003/01/17 18:19:43 titer Exp $
  *
  * Authors: Florian G. Pflug <fgp@phlo.org>
  *          Jon Lech Johansen <jon-vl@nanocrew.net>
@@ -252,10 +252,9 @@ void VlcWrapper::openFiles( BList* o_files, bool replace )
 
 void VlcWrapper::openDisc(BString o_type, BString o_device, int i_title, int i_chapter)
 {
-    BString o_source("");
-    o_source << o_type << ":" << o_device ;
-
-    playlist_Add( p_playlist, o_source.String(),
+    if( p_intf->p_sys->b_dvdold )
+        o_device.Prepend( "dvdold:" );
+    playlist_Add( p_playlist, o_device.String(),
                   PLAYLIST_APPEND | PLAYLIST_GO, PLAYLIST_END );
 }
 
index 36d9aaf1e90725e5a739892e7de7b6f01c84a2c2..0d18aa05cb41354a7be98e1da7a60698eebea6a9 100644 (file)
@@ -2,7 +2,7 @@
  * VlcWrapper.h: BeOS plugin for vlc (derived from MacOS X port)
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: VlcWrapper.h,v 1.13 2003/01/14 14:48:55 titer Exp $
+ * $Id: VlcWrapper.h,v 1.14 2003/01/17 18:19:43 titer Exp $
  *
  * Authors: Florian G. Pflug <fgp@phlo.org>
  *          Jon Lech Johansen <jon-vl@nanocrew.net>
@@ -42,6 +42,7 @@ struct intf_sys_t
     int                      i_part;
     audio_volume_t    i_saved_volume;
     int               i_channel;
+    bool              b_dvdold;
     
     VlcWrapper * p_wrapper;
 };