#include <wx/statline.h>
#include <wx/tokenzr.h>
-#include <vector>
-
-
#ifndef wxRB_SINGLE
# define wxRB_SINGLE 0
#endif
/* Create buttons */
wxButton *ok_button =
- new wxButton( p_advanced_dialog, wxID_OK, wxU(_("OK")) );
+ new wxButton( p_advanced_dialog, wxID_OK, wxU(_("&OK")) );
ok_button->SetDefault();
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 );
+ new wxButton( p_advanced_dialog, wxID_CANCEL, wxU(_("&Cancel")) );
+ wxStdDialogButtonSizer *button_sizer = new wxStdDialogButtonSizer;
+ button_sizer->AddButton( ok_button );
+ button_sizer->AddButton( cancel_button );
+ button_sizer->Realize();
+ sizer->Add( button_sizer, 0, wxEXPAND|wxALL, 5 );
sizer->SetMinSize( 400, -1 );
p_advanced_dialog->SetSizerAndFit( sizer );
/* Create Stream Output checkox */
sout_checkbox = new wxCheckBox( panel, SoutEnable_Event,
wxU(_("Stream/Save")) );
- sout_checkbox->SetToolTip( wxU(_("Use VLC as a server of streams")) );
+ sout_checkbox->SetToolTip( wxU(_("Use VLC as a stream server")) );
common_opt_sizer->Add( sout_checkbox, 0,
wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL );
wxStaticLine *static_line = new wxStaticLine( panel, wxID_OK );
/* Create the buttons */
- wxButton *ok_button = new wxButton( panel, wxID_OK, wxU(_("OK")) );
+ wxButton *ok_button = new wxButton( panel, wxID_OK, wxU(_("&OK")) );
ok_button->SetDefault();
wxButton *cancel_button = new wxButton( panel, wxID_CANCEL,
- wxU(_("Cancel")) );
+ wxU(_("&Cancel")) );
/* Create notebook */
notebook = new wxNotebook( panel, Notebook_Event );
OnPageChange( event );
/* Place everything in sizers */
- 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();
+ wxStdDialogButtonSizer *button_sizer = new wxStdDialogButtonSizer;
+ button_sizer->AddButton( cancel_button );
+ button_sizer->AddButton( ok_button );
+ button_sizer->Realize();
wxBoxSizer *main_sizer = new wxBoxSizer( wxVERTICAL );
wxBoxSizer *panel_sizer = new wxBoxSizer( wxVERTICAL );
#if (!wxCHECK_VERSION(2,5,2))
#endif
panel_sizer->Add( adv_sizer, 0, wxEXPAND | wxALL, 5 );
panel_sizer->Add( static_line, 0, wxEXPAND | wxALL, 5 );
- panel_sizer->Add( button_sizer, 0, wxALIGN_LEFT | wxALL, 5 );
+ panel_sizer->Add( button_sizer, 0, wxEXPAND | wxALL, 5 );
panel_sizer->Layout();
panel->SetSizerAndFit( panel_sizer );
main_sizer->Add( panel, 1, wxGROW, 0 );
#ifdef WIN32
char psz_default_device[3] = {0};
+ char *psz_forced;
/* find the drive_name for the first cdrom drive,
* which is probably "D:" and put the drive_name into
}
}
+ psz_forced = config_GetPsz( p_intf, "dvd" );
- if( strlen(psz_default_device) > 0 )
+ if( strlen(psz_default_device) > 0 &&
+ ( !psz_forced || psz_forced && !*psz_forced ) )
{
if(disc_device)
disc_device->SetValue( wxL2U(psz_default_device) );
{
case 0: /* DVD with menus */
case 1: /* DVD without menus */
- disc_device->SetToolTip( wxU(_("Name of DVD device "
- "to read from.")) );
+ disc_device->SetToolTip( wxU(_("DVD device to use" ) ) );
if( i_disc_type_selection == 0 )
{
mrltemp = wxT("dvd://") + disc_device->GetValue();
config_GetInt( p_intf, "vcdx-PBC" )
? 'P' : 'E', i_disc_title );
#else
- disc_device->SetToolTip( wxU(_("Name of CD-ROM device "
- "to read Video CD from.")) );
+ disc_device->SetToolTip( wxU(_("CD-ROM device to use" ) ) );
mrltemp = wxT("vcd://") + disc_device->GetValue();
if( i_disc_title > 0 )
mrltemp += wxString::Format( wxT("@%d"), i_disc_title );
"for a CD-ROM with an audio CD in it." )) );
mrltemp = wxT("cddax://")
#else
- disc_device->SetToolTip( wxU(_("Name of CD-ROM device "
- "to read audio CD from." )) );
+ disc_device->SetToolTip( wxU(_("CD-ROM device to use" ) ) ) ;
mrltemp = wxT("cdda://")
#endif
+ disc_device->GetValue();
mrltemp = wxT("http://");
mrltemp += net_addrs[2]->GetLineText(0);
-
- caching_name = wxT("http-caching");
+ if( ! mrltemp.Left(4).CmpNoCase(wxT("http")) )
+ caching_name = wxT("http-caching");
+ else if( ! mrltemp.Left(3).CmpNoCase(wxT("mms")) )
+ caching_name = wxT("mms-caching");
+ else
+ caching_name= wxT("ftp-caching");
break;
case 3:
for( int i = 0; i < (int)mrl.GetCount(); i++ )
{
vlc_bool_t b_start = !i && i_open_arg;
- playlist_item_t *p_item;
+ input_item_t *p_input;
char *psz_utf8;
psz_utf8 = wxFromLocale( mrl[i] );
- p_item = playlist_ItemNew( p_intf, psz_utf8, psz_utf8 );
+ p_input = input_ItemNew( p_intf, psz_utf8, NULL );
wxLocaleFree( psz_utf8 );
/* Insert options */
((const char *)mrl[i + 1].mb_str())[0] == ':' )
{
psz_utf8 = wxFromLocale( mrl[i + 1] );
- playlist_ItemAddOption( p_item, psz_utf8 );
+ input_ItemAddOption( p_input, psz_utf8 );
wxLocaleFree( psz_utf8 );
i++;
}
for( int j = 0; j < (int)subsfile_mrl.GetCount(); j++ )
{
psz_utf8 = wxFromLocale( subsfile_mrl[j] );
- playlist_ItemAddOption( p_item, psz_utf8 );
+ input_ItemAddOption( p_input, psz_utf8 );
wxLocaleFree( psz_utf8 );
}
}
for( int j = 0; j < (int)sout_mrl.GetCount(); j++ )
{
psz_utf8 = wxFromLocale( sout_mrl[j] );
- playlist_ItemAddOption( p_item, psz_utf8 );
+ input_ItemAddOption( p_input, psz_utf8 );
wxLocaleFree( psz_utf8 );
}
}
-
if( b_start )
{
- playlist_AddItem( p_playlist, p_item,
- PLAYLIST_APPEND,
- PLAYLIST_END );
- playlist_Control( p_playlist, PLAYLIST_ITEMPLAY, p_item );
+ playlist_PlaylistAddInput( p_playlist, p_input,
+ PLAYLIST_APPEND | PLAYLIST_GO,
+ PLAYLIST_END );
}
else
{
- playlist_AddItem( p_playlist, p_item,
- PLAYLIST_APPEND|PLAYLIST_PREPARSE,
- PLAYLIST_END );
+ playlist_PlaylistAddInput( p_playlist, p_input,
+ PLAYLIST_APPEND|PLAYLIST_PREPARSE,
+ PLAYLIST_END );
}
}
file_dialog = new wxFileDialog( this, wxU(_("Open File")),
wxT(""), wxT(""), wxT("*"), wxOPEN | wxMULTIPLE );
+ file_dialog->SetWildcard(wxU(_("All Files (*.*)|*"
+ "|Sound Files (*.mp3, *.ogg, etc.)|" EXTENSIONS_AUDIO
+ "|Video Files (*.avi, *.mpg, etc.)|" EXTENSIONS_VIDEO
+ "|Playlist Files (*.m3u, *.pls, etc.)|" EXTENSIONS_PLAYLIST
+ "|Subtitle Files (*.srt, *.sub, etc.)|" EXTENSIONS_SUBTITLE)));
+
if( file_dialog && file_dialog->ShowModal() == wxID_OK )
{
wxArrayString paths;
disc_audio->SetRange( 0, 7 ); // up to 8 audio channels
disc_chapter->SetRange( 0, 255 );
disc_title->SetToolTip( wxU(_("Title number.")) );
+ // \bug [string] needs to be DVDs instead of DVD's
disc_sub->SetToolTip( wxU(_(
"DVD's can have up to 32 subtitles numbered 0..31. "
- "Note this is not the same thing as a subtitle name e.g. 'en'. "
+ "Note this is not the same thing as a subtitle name (e.g. 'en'). "
"If a value -1 is used, no subtitle will be shown." )) );
+ // \bug [string] needs to be DVDs instead of DVD's
disc_audio->SetToolTip( wxU(_("Audio track number. "
"DVD's can have up to 8 audio tracks numbered 0..7."
)) );
disc_title->SetRange( 0, 99 ); // only 100 tracks allowed on VCDs
disc_sub->SetRange( -1, 3 ); // up to 4 subtitles -1 = no subtitle
disc_audio->SetRange( 0, 1 ); // up to 2 audio tracks
+ // \bug [string] needs to be SVCDs instead of SVCD's
disc_sub->SetToolTip( wxU(_(
"SVCD's can have up to 4 subtitles numbered 0..3. "
"If a value -1 is used, no subtitle will be shown." )) );
+ // \bug [string] needs to be SVCDs instead of SVCD's
disc_audio->SetToolTip( wxU(_("Audio track number. "
"VCD's can have up to 2 audio tracks numbered 0 or 1. "
)) );
if( subsfile_dialog->align_combo )
{
subsfile_mrl.Add( wxString::Format(wxT("subsdec-align=%i"),
- (int)subsfile_dialog->align_combo->GetClientData(
- subsfile_dialog->align_combo->GetSelection()) ) );
+ (int)subsfile_dialog->align_combo->GetClientData(
+ subsfile_dialog->align_combo->GetSelection()) ) );
}
if( subsfile_dialog->size_combo )
{
subsfile_mrl.Add( wxString::Format( wxT("freetype-rel-fontsize=%i"),
- (int)subsfile_dialog->size_combo->GetClientData(
- subsfile_dialog->size_combo->GetSelection()) ) );
+ (int)subsfile_dialog->size_combo->GetClientData(
+ subsfile_dialog->size_combo->GetSelection()) ) );
}
subsfile_mrl.Add( wxString::Format( wxT("sub-fps=%i"),
subsfile_dialog->fps_spinctrl->GetValue() ) );