AdvancedOptions_Event
};
-BEGIN_EVENT_TABLE(OpenDialog, wxFrame)
+BEGIN_EVENT_TABLE(OpenDialog, wxDialog)
/* Button events */
EVT_BUTTON(wxID_OK, OpenDialog::OnOk)
EVT_BUTTON(wxID_CANCEL, OpenDialog::OnCancel)
};
BEGIN_EVENT_TABLE(AutoBuiltPanel, wxPanel)
- EVT_BUTTON(wxID_OK, AutoBuiltPanel::OnAdvanced)
EVT_BUTTON(AdvancedOptions_Event, AutoBuiltPanel::OnAdvanced)
END_EVENT_TABLE()
new wxStaticLine( p_advanced_dialog, wxID_OK );
sizer->Add( static_line, 0, wxEXPAND | wxALL, 5 );
- /* Create OK button */
+ /* Create buttons */
wxButton *ok_button =
new wxButton( p_advanced_dialog, wxID_OK, wxU(_("OK")) );
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 );
p_advanced_dialog->SetSizerAndFit( sizer );
void AutoBuiltPanel::OnAdvanced( wxCommandEvent& event )
{
- p_advanced_dialog->Show( !p_advanced_dialog->IsShown() );
- UpdateAdvancedMRL();
- p_open_dialog->UpdateMRL();
+ if( p_advanced_dialog->ShowModal() == wxID_OK )
+ {
+ UpdateAdvancedMRL();
+ p_open_dialog->UpdateMRL();
+ }
}
void AutoBuiltPanel::UpdateAdvancedMRL()
{
ConfigControl *control = advanced_config_array.Item(i);
- mrltemp += wxT(":");
+ mrltemp += (i ? wxT(" :") : wxT(":"));
if( control->GetType() == CONFIG_ITEM_BOOL &&
!control->GetIntValue() ) mrltemp += wxT("no-");
*****************************************************************************/
OpenDialog::OpenDialog( intf_thread_t *_p_intf, wxWindow *_p_parent,
int i_access_method, int i_arg ):
- wxFrame( _p_parent, -1, wxU(_("Open...")), wxDefaultPosition,
+ wxDialog( _p_parent, -1, wxU(_("Open...")), wxDefaultPosition,
wxDefaultSize, wxDEFAULT_FRAME_STYLE )
{
OpenDialog( _p_intf, _p_parent, i_access_method, i_arg, OPEN_NORMAL );
OpenDialog::OpenDialog( intf_thread_t *_p_intf, wxWindow *_p_parent,
int i_access_method, int i_arg, int _i_method ):
- wxFrame( _p_parent, -1, wxU(_("Open...")), wxDefaultPosition,
+ wxDialog( _p_parent, -1, wxU(_("Open...")), wxDefaultPosition,
wxDefaultSize, wxDEFAULT_FRAME_STYLE )
{
/* Initializations */
AutoBuiltPanel *autopanel =
new AutoBuiltPanel( notebook, this, p_intf, p_module );
input_tab_array.Add( autopanel );
- notebook->AddPage( autopanel, wxU( p_module->psz_longname ),
+ notebook->AddPage( autopanel, wxU( p_module->psz_shortname ),
i_access_method == CAPTURE_ACCESS );
}
AutoBuiltPanel *autopanel =
new AutoBuiltPanel( notebook, this, p_intf, p_module );
input_tab_array.Add( autopanel );
- notebook->AddPage( autopanel, wxU( p_module->psz_longname ),
+ notebook->AddPage( autopanel, wxU( p_module->psz_shortname ),
+ i_access_method == CAPTURE_ACCESS );
+ }
+
+ p_module = config_FindModule( VLC_OBJECT(p_intf), "dvb" );
+ if( p_module )
+ {
+ AutoBuiltPanel *autopanel =
+ new AutoBuiltPanel( notebook, this, p_intf, p_module );
+ input_tab_array.Add( autopanel );
+ notebook->AddPage( autopanel, wxU( p_module->psz_shortname ),
i_access_method == CAPTURE_ACCESS );
}
AutoBuiltPanel *autopanel =
new AutoBuiltPanel( notebook, this, p_intf, p_module );
input_tab_array.Add( autopanel );
- notebook->AddPage( autopanel, wxU( p_module->psz_longname ),
+ notebook->AddPage( autopanel, wxU( p_module->psz_shortname ),
i_access_method == CAPTURE_ACCESS );
}
int OpenDialog::Show( int i_access_method, int i_arg )
{
- int i_ret;
notebook->SetSelection( i_access_method );
- i_ret = wxFrame::Show();
+ int i_ret = wxDialog::Show();
Raise();
SetFocus();
i_open_arg = i_arg;
int OpenDialog::Show()
{
- int i_ret;
- i_ret = wxFrame::Show();
+ int i_ret = wxDialog::Show();
Raise();
SetFocus();
return i_ret;
wxU(_("DVD (menus support)")),
wxU(_("DVD")),
wxU(_("VCD")),
- wxU(_("Audio CD"))
-
+ wxU(_("Audio CD")),
+ wxU(_("DVD (experimental)"))
};
disc_type = new wxRadioBox( panel, DiscType_Event, wxU(_("Disc type")),
disc_title->GetValue() );
#endif
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: ;
msg_Err( p_intf, "invalid selection (%d)",
disc_type->GetSelection() );
if( i_method == OPEN_STREAM )
{
Hide();
+ if( IsModal() ) EndModal( wxID_OK );
return;
}
vlc_object_release( p_playlist );
Hide();
+
+ if( IsModal() ) EndModal( wxID_OK );
}
void OpenDialog::OnCancel( wxCommandEvent& WXUNUSED(event) )
{
Hide();
+
+ if( IsModal() ) EndModal( wxID_CANCEL );
}
void OpenDialog::OnPageChange( wxNotebookEvent& event )
switch( disc_type->GetSelection() )
{
- case 0: /* DVD with menues */
- i_selection=0;
- /* Fall through... */
+ case 0: /* DVD with menus */
+ case 4: /* DVD with menus (dvdnav) */
+ i_selection=0;
+ /* Fall through... */
case 1: /* DVD of some sort */
psz_device = config_GetPsz( p_intf, "dvd" );
{
/* Finished the quotes mode */
entry.RemoveLast();
- if( !entry.IsEmpty() ) entries_array.Add( entry );
- entry.Empty();
b_quotes_mode = VLC_FALSE;
}
else if( !b_quotes_mode && entry.Last() != wxT('\"') )