+/*****************************************************************************
+ * Subtitles file event methods.
+ *****************************************************************************/
+void OpenDialog::OnSubsFileEnable( wxCommandEvent& event )
+{
+ subsfile_button->Enable( event.GetInt() != 0 );
+ if( !event.GetInt() )
+ {
+ config_PutPsz( p_intf, "sub-file", "" );
+ }
+ else
+ {
+ demuxdump_checkbox->SetValue( 0 );
+ wxCommandEvent event = wxCommandEvent( wxEVT_NULL );
+ event.SetInt( 0 );
+ OnDemuxDumpEnable( event );
+ }
+}
+
+void OpenDialog::OnSubsFileSettings( wxCommandEvent& WXUNUSED(event) )
+{
+ /* Show/hide the open dialog */
+ if( subsfile_dialog == NULL )
+ subsfile_dialog = new SubsFileDialog( p_intf, p_parent );
+
+ if( subsfile_dialog && subsfile_dialog->ShowModal() == wxID_OK )
+ {
+ config_PutPsz( p_intf, "sub-file",
+ (const char *)subsfile_dialog->file_combo->GetValue().mb_str() );
+ config_PutInt( p_intf, "sub-delay",
+ subsfile_dialog->delay_spinctrl->GetValue() );
+ config_PutFloat( p_intf, "sub-fps",
+ subsfile_dialog->fps_spinctrl->GetValue() );
+ }
+}
+