Commit 970fb944 authored by Rocky Bernstein's avatar Rocky Bernstein

Allow setting the subtitle track from the VCD tab (by usurping the

"Chapter" entry).
parent e5a7499f
...@@ -679,7 +679,7 @@ void OpenDialog::UpdateMRL( int i_access_method ) ...@@ -679,7 +679,7 @@ void OpenDialog::UpdateMRL( int i_access_method )
switch ( i_disc_type_selection ) switch ( i_disc_type_selection )
{ {
case 0: case 0: /* DVD with menues */
disc_chapter->Enable(); disc_chapter->Enable();
disc_chapter_label->Enable(); disc_chapter_label->Enable();
mrltemp = wxT("dvd://") mrltemp = wxT("dvd://")
...@@ -688,7 +688,8 @@ void OpenDialog::UpdateMRL( int i_access_method ) ...@@ -688,7 +688,8 @@ void OpenDialog::UpdateMRL( int i_access_method )
disc_title->GetValue(), disc_title->GetValue(),
disc_chapter->GetValue() ); disc_chapter->GetValue() );
break; break;
case 1:
case 1: /* DVD of some sort */
disc_chapter->Enable(); disc_chapter->Enable();
disc_chapter_label->Enable(); disc_chapter_label->Enable();
mrltemp = wxT("dvdsimple://") mrltemp = wxT("dvdsimple://")
...@@ -697,9 +698,16 @@ void OpenDialog::UpdateMRL( int i_access_method ) ...@@ -697,9 +698,16 @@ void OpenDialog::UpdateMRL( int i_access_method )
disc_title->GetValue(), disc_title->GetValue(),
disc_chapter->GetValue() ); disc_chapter->GetValue() );
break; break;
case 2:
disc_chapter->Disable(); case 2: /* VCD of some sort */
disc_chapter_label->Disable(); {
/* The chapter object is used for subtitles */
int i_subtitle = disc_chapter->GetValue();
config_PutInt( p_intf, "spu-channel", i_subtitle );
disc_chapter->Enable();
disc_chapter_label->Enable();
#ifdef HAVE_VCDX #ifdef HAVE_VCDX
if ( disc_title->GetValue() ) if ( disc_title->GetValue() )
mrltemp = wxT("vcdx://") mrltemp = wxT("vcdx://")
...@@ -719,7 +727,10 @@ void OpenDialog::UpdateMRL( int i_access_method ) ...@@ -719,7 +727,10 @@ void OpenDialog::UpdateMRL( int i_access_method )
disc_title->GetValue() ); disc_title->GetValue() );
#endif #endif
break; break;
case 3: }
case 3: /* CD-DA */
disc_chapter->Disable(); disc_chapter->Disable();
disc_chapter_label->Disable(); disc_chapter_label->Disable();
#ifdef HAVE_CDDAX #ifdef HAVE_CDDAX
...@@ -1050,6 +1061,11 @@ void OpenDialog::OnDiscTypeChange( wxCommandEvent& WXUNUSED(event) ) ...@@ -1050,6 +1061,11 @@ void OpenDialog::OnDiscTypeChange( wxCommandEvent& WXUNUSED(event) )
} }
disc_title->SetRange( i_selection, 255 ); disc_title->SetRange( i_selection, 255 );
disc_title->SetValue( i_selection ); disc_title->SetValue( i_selection );
disc_chapter->SetRange( 1, 255 );
disc_chapter->SetValue( 1 );
disc_chapter_label->SetLabel ( wxU(_("Chapter")) );
break; break;
case 2: /* VCD of some sort */ case 2: /* VCD of some sort */
...@@ -1079,6 +1095,11 @@ void OpenDialog::OnDiscTypeChange( wxCommandEvent& WXUNUSED(event) ) ...@@ -1079,6 +1095,11 @@ void OpenDialog::OnDiscTypeChange( wxCommandEvent& WXUNUSED(event) )
disc_title->SetRange( 1, 98 ); disc_title->SetRange( 1, 98 );
#endif #endif
disc_title->SetValue( i_selection ); disc_title->SetValue( i_selection );
/* We use the chapter to set subtitle number */
disc_chapter_label->SetLabel ( wxU(_("Subtitle")) );
disc_chapter->SetRange( -1, 4 );
disc_chapter->SetValue( config_GetInt( p_intf, "spu-channel" ) );
break; break;
case 3: /* CD-DA */ case 3: /* CD-DA */
...@@ -1106,9 +1127,6 @@ void OpenDialog::OnDiscTypeChange( wxCommandEvent& WXUNUSED(event) ) ...@@ -1106,9 +1127,6 @@ void OpenDialog::OnDiscTypeChange( wxCommandEvent& WXUNUSED(event) )
if( psz_device ) free( psz_device ); if( psz_device ) free( psz_device );
disc_chapter->SetRange( 1, 255 );
disc_chapter->SetValue( 1 );
UpdateMRL( DISC_ACCESS ); UpdateMRL( DISC_ACCESS );
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment