* open.cpp : wxWindows plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
- * $Id: open.cpp,v 1.45 2003/11/27 06:37:10 adn Exp $
+ * $Id: open.cpp,v 1.46 2003/12/09 00:46:03 yoann Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
/* Events generated by the disc panel */
EVT_RADIOBOX(DiscType_Event, OpenDialog::OnDiscTypeChange)
+ EVT_TEXT(DiscDevice_Event, OpenDialog::OnDiscDeviceChange)
EVT_TEXT(DiscDevice_Event, OpenDialog::OnDiscPanelChange)
EVT_TEXT(DiscTitle_Event, OpenDialog::OnDiscPanelChange)
EVT_SPINCTRL(DiscTitle_Event, OpenDialog::OnDiscPanelChange)
#endif
sout_dialog = NULL;
subsfile_dialog = NULL;
+ b_disc_device_changed = false;
/* Create a panel to put everything in */
wxPanel *panel = new wxPanel( this, -1 );
wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL );
sout_button = new wxButton( panel, SoutSettings_Event,
wxU(_("Settings...")) );
- sout_button->Disable();
+ sout_button->Disable();
char *psz_sout = config_GetPsz( p_intf, "sout" );
if( psz_sout && *psz_sout )
disc_type->GetSelection() == 1 ? wxT("dvdsimple") :
disc_type->GetSelection() == 2 ? wxT("vcd") : wxT("cdda") )
+ demux + wxT(":")
- + disc_device->GetLineText(0)
+// + disc_device->GetLineText(0)
+ + disc_device->GetValue()
+ wxString::Format( wxT("@%d:%d"),
disc_title->GetValue(),
disc_chapter->GetValue() );
UpdateMRL( DISC_ACCESS );
}
+void OpenDialog::OnDiscDeviceChange( wxCommandEvent& event )
+{
+ char *psz_device;
+
+ switch( disc_type->GetSelection() )
+ {
+ case 3:
+ psz_device = config_GetPsz( p_intf, "cd-audio" );
+ break;
+
+ case 2:
+ psz_device = config_GetPsz( p_intf, "vcd" );
+ break;
+
+ default:
+ psz_device = config_GetPsz( p_intf, "dvd" );
+ break;
+ }
+
+ if( strcmp( psz_device, disc_device->GetValue().c_str() ) )
+ {
+ b_disc_device_changed = true;
+ }
+
+ UpdateMRL( DISC_ACCESS );
+}
+
void OpenDialog::OnDiscTypeChange( wxCommandEvent& WXUNUSED(event) )
{
char *psz_device;
switch( disc_type->GetSelection() )
{
+ case 3:
+ psz_device = config_GetPsz( p_intf, "cd-audio" );
+ if( !b_disc_device_changed )
+ {
+ disc_device->SetValue( psz_device ? wxU(psz_device) : wxT("") );
+ }
+ break;
+
case 2:
psz_device = config_GetPsz( p_intf, "vcd" );
- disc_device->SetValue( psz_device ? wxU(psz_device) : wxT("") );
+ if( !b_disc_device_changed )
+ {
+ disc_device->SetValue( psz_device ? wxU(psz_device) : wxT("") );
+ }
break;
default:
psz_device = config_GetPsz( p_intf, "dvd" );
- disc_device->SetValue( psz_device ? wxU(psz_device) : wxT("") );
+ if( !b_disc_device_changed )
+ {
+ disc_device->SetValue( psz_device ? wxU(psz_device) : wxT("") );
+ }
break;
}
* wxwindows.h: private wxWindows interface description
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
- * $Id: wxwindows.h,v 1.75 2003/11/29 13:39:43 gbazin Exp $
+ * $Id: wxwindows.h,v 1.76 2003/12/09 00:46:03 yoann Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
/* Event handlers for the disc page */
void OnDiscPanelChange( wxCommandEvent& event );
void OnDiscTypeChange( wxCommandEvent& event );
+ void OnDiscDeviceChange( wxCommandEvent& event );
/* Event handlers for the net page */
void OnNetPanelChange( wxCommandEvent& event );
wxTextCtrl *disc_device;
wxSpinCtrl *disc_title;
wxSpinCtrl *disc_chapter;
-
+
+ /* Indicates if the disc device control was modified */
+ bool b_disc_device_changed;
+
/* Controls for the net panel */
wxRadioBox *net_type;
int i_net_type;
* libvlc.h: main libvlc header
*****************************************************************************
* Copyright (C) 1998-2002 VideoLAN
- * $Id: libvlc.h,v 1.114 2003/12/08 19:50:22 gbazin Exp $
+ * $Id: libvlc.h,v 1.115 2003/12/09 00:46:03 yoann Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
#define VCD_DEV_LONGTEXT N_( \
"This is the default VCD device to use.")
+#define CDAUDIO_DEV_TEXT N_("CD Audio device")
+#define CDAUDIO_DEV_LONGTEXT N_( \
+ "This is the default CD Audio device to use.")
+
#define IPV6_TEXT N_("Force IPv6")
#define IPV6_LONGTEXT N_( \
"If you check this box, IPv6 will be used by default for all UDP and " \
add_file( "dvd", DVD_DEVICE, NULL, DVD_DEV_TEXT, DVD_DEV_LONGTEXT, VLC_FALSE );
add_file( "vcd", VCD_DEVICE, NULL, VCD_DEV_TEXT, VCD_DEV_LONGTEXT, VLC_FALSE );
+ add_file( "cd-audio", CDAUDIO_DEVICE, NULL, CDAUDIO_DEV_TEXT, CDAUDIO_DEV_LONGTEXT, VLC_FALSE );
add_bool( "ipv6", 0, NULL, IPV6_TEXT, IPV6_LONGTEXT, VLC_FALSE );
change_short('6');