Commit f3701945 authored by Gildas Bazin's avatar Gildas Bazin

* modules/gui/wxwindows/open.cpp: fixed the update of the advanced MRLs. Added a dvdnav option.

parent 7bec8db2
...@@ -161,7 +161,6 @@ private: ...@@ -161,7 +161,6 @@ private:
}; };
BEGIN_EVENT_TABLE(AutoBuiltPanel, wxPanel) BEGIN_EVENT_TABLE(AutoBuiltPanel, wxPanel)
EVT_BUTTON(wxID_OK, AutoBuiltPanel::OnAdvanced)
EVT_BUTTON(AdvancedOptions_Event, AutoBuiltPanel::OnAdvanced) EVT_BUTTON(AdvancedOptions_Event, AutoBuiltPanel::OnAdvanced)
END_EVENT_TABLE() END_EVENT_TABLE()
...@@ -275,11 +274,17 @@ AutoBuiltPanel::AutoBuiltPanel( wxWindow *parent, OpenDialog *dialog, ...@@ -275,11 +274,17 @@ AutoBuiltPanel::AutoBuiltPanel( wxWindow *parent, OpenDialog *dialog,
new wxStaticLine( p_advanced_dialog, wxID_OK ); new wxStaticLine( p_advanced_dialog, wxID_OK );
sizer->Add( static_line, 0, wxEXPAND | wxALL, 5 ); sizer->Add( static_line, 0, wxEXPAND | wxALL, 5 );
/* Create OK button */ /* Create buttons */
wxButton *ok_button = wxButton *ok_button =
new wxButton( p_advanced_dialog, wxID_OK, wxU(_("OK")) ); new wxButton( p_advanced_dialog, wxID_OK, wxU(_("OK")) );
ok_button->SetDefault(); ok_button->SetDefault();
sizer->Add( ok_button, 0, wxALL, 5 ); wxButton *cancel_button =
new wxButton( p_advanced_dialog, wxID_CANCEL, wxU(_("Cancel")) );
wxBoxSizer *button_sizer = new wxBoxSizer( wxHORIZONTAL );
button_sizer->Add( ok_button, 0, wxALL, 5 );
button_sizer->Add( cancel_button, 0, wxALL, 5 );
button_sizer->Layout();
sizer->Add( button_sizer, 0, wxALL, 0 );
sizer->SetMinSize( 400, -1 ); sizer->SetMinSize( 400, -1 );
p_advanced_dialog->SetSizerAndFit( sizer ); p_advanced_dialog->SetSizerAndFit( sizer );
...@@ -290,9 +295,11 @@ AutoBuiltPanel::AutoBuiltPanel( wxWindow *parent, OpenDialog *dialog, ...@@ -290,9 +295,11 @@ AutoBuiltPanel::AutoBuiltPanel( wxWindow *parent, OpenDialog *dialog,
void AutoBuiltPanel::OnAdvanced( wxCommandEvent& event ) void AutoBuiltPanel::OnAdvanced( wxCommandEvent& event )
{ {
p_advanced_dialog->Show( !p_advanced_dialog->IsShown() ); if( p_advanced_dialog->ShowModal() == wxID_OK )
UpdateAdvancedMRL(); {
p_open_dialog->UpdateMRL(); UpdateAdvancedMRL();
p_open_dialog->UpdateMRL();
}
} }
void AutoBuiltPanel::UpdateAdvancedMRL() void AutoBuiltPanel::UpdateAdvancedMRL()
...@@ -594,8 +601,8 @@ wxPanel *OpenDialog::DiscPanel( wxWindow* parent ) ...@@ -594,8 +601,8 @@ wxPanel *OpenDialog::DiscPanel( wxWindow* parent )
wxU(_("DVD (menus support)")), wxU(_("DVD (menus support)")),
wxU(_("DVD")), wxU(_("DVD")),
wxU(_("VCD")), wxU(_("VCD")),
wxU(_("Audio CD")) wxU(_("Audio CD")),
wxU(_("DVD (experimental)"))
}; };
disc_type = new wxRadioBox( panel, DiscType_Event, wxU(_("Disc type")), disc_type = new wxRadioBox( panel, DiscType_Event, wxU(_("Disc type")),
...@@ -826,6 +833,17 @@ void OpenDialog::UpdateMRL( int i_access_method ) ...@@ -826,6 +833,17 @@ void OpenDialog::UpdateMRL( int i_access_method )
disc_title->GetValue() ); disc_title->GetValue() );
#endif #endif
break; break;
case 4: /* DVD of some sort */
disc_chapter->Enable();
disc_chapter_label->Enable();
mrltemp = wxT("dvdnav://")
+ disc_device->GetValue()
+ wxString::Format( wxT("@%d:%d"),
disc_title->GetValue(),
disc_chapter->GetValue() );
break;
default: ; default: ;
msg_Err( p_intf, "invalid selection (%d)", msg_Err( p_intf, "invalid selection (%d)",
disc_type->GetSelection() ); disc_type->GetSelection() );
...@@ -1112,9 +1130,10 @@ void OpenDialog::OnDiscTypeChange( wxCommandEvent& WXUNUSED(event) ) ...@@ -1112,9 +1130,10 @@ void OpenDialog::OnDiscTypeChange( wxCommandEvent& WXUNUSED(event) )
switch( disc_type->GetSelection() ) switch( disc_type->GetSelection() )
{ {
case 0: /* DVD with menues */ case 0: /* DVD with menus */
i_selection=0; case 4: /* DVD with menus (dvdnav) */
/* Fall through... */ i_selection=0;
/* Fall through... */
case 1: /* DVD of some sort */ case 1: /* DVD of some sort */
psz_device = config_GetPsz( p_intf, "dvd" ); psz_device = config_GetPsz( p_intf, "dvd" );
......
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