* Fixes for MRL Updates

* SetToolTips
parent be8812ae
......@@ -2,7 +2,7 @@
* open.cpp : wxWindows plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
* $Id: open.cpp,v 1.44 2003/11/23 17:51:54 gbazin Exp $
* $Id: open.cpp,v 1.45 2003/11/27 06:37:10 adn Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
......@@ -624,13 +624,15 @@ wxPanel *OpenDialog::V4LPanel( wxWindow* parent )
video_device = new wxTextCtrl( panel, VideoDevice_Event, wxT(""),
wxDefaultPosition, wxDefaultSize,
wxTE_PROCESS_ENTER);
video_device->SetToolTip( wxU(_("Device corresponding to your acquisition "
"card or your webcam")) );
video_sizer->Add( label, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL );
video_sizer->Add( video_device, 1, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL );
label = new wxStaticText( panel, -1, wxU(_("Channel")) );
video_channel = new wxSpinCtrl( panel, VideoChannel_Event );
video_channel = new wxSpinCtrl( panel, VideoChannel_Event, wxT("0") );
video_channel->SetToolTip( wxU(_("Usually 0 is for tuner, 1 for composite "
"and 2 for svideo")) );
video_sizer->Add( label, 0, wxALIGN_LEFT | wxALIGN_CENTER_HORIZONTAL );
video_sizer->Add( video_channel, 1, wxALIGN_LEFT | wxALIGN_CENTER_HORIZONTAL );
sizer->Add( video_sizer, 0, wxEXPAND | wxALL, 5 );
......@@ -1018,7 +1020,6 @@ void OpenDialog::OnV4LTypeChange( wxCommandEvent& WXUNUSED(event) )
case 1:
video_channel->Enable();
video_channel->SetRange( 0, 255 );
video_channel->SetValue( 0 );
break;
case 3:
v4l_button->Disable();
......
......@@ -2,7 +2,7 @@
* v4l.cpp : wxWindows plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
* $Id: v4l.cpp,v 1.3 2003/11/23 18:31:54 alexis Exp $
* $Id: v4l.cpp,v 1.4 2003/11/27 06:37:11 adn Exp $
*
* Authors: Mohammed Adnne Trojette <adn@via.ecp.fr>
*
......@@ -66,10 +66,11 @@ enum
Size_Event,
Norm_Event,
Frequency_Event,
FrequencyEnable_Event,Frequency_Event,
AudioDevice_Event, ADevLocation, AudioChannel_Event,
BitrateEnable_Event, MaxBitrateEnable_Event,
Bitrate_Event, MaxBitrate_Event
};
......@@ -83,18 +84,18 @@ BEGIN_EVENT_TABLE(V4LDialog, wxDialog)
EVT_COMBOBOX(Size_Event, V4LDialog::OnSize)
EVT_CHECKBOX(Norm_Event, V4LDialog::OnNormEnable)
EVT_COMBOBOX(Norm_Event, V4LDialog::OnNorm)
EVT_CHECKBOX(Frequency_Event, V4LDialog::OnFrequencyEnable)
EVT_COMBOBOX(Frequency_Event, V4LDialog::OnFrequency)
EVT_CHECKBOX(FrequencyEnable_Event, V4LDialog::OnFrequencyEnable)
EVT_SPINCTRL(Frequency_Event, V4LDialog::OnFrequency)
/* Events generated by the audio panel */
EVT_CHECKBOX(AudioDevice_Event, V4LDialog::OnAudioEnable)
EVT_TEXT(ADevLocation, V4LDialog::OnAudioEnable)
EVT_TEXT(ADevLocation, V4LDialog::OnAudioChange)
EVT_SPINCTRL(AudioChannel_Event, V4LDialog::OnAudioChannel)
/* Events generated by the bitrate panel */
EVT_CHECKBOX(Bitrate_Event, V4LDialog::OnBitrateEnable)
EVT_CHECKBOX(BitrateEnable_Event, V4LDialog::OnBitrateEnable)
EVT_SPINCTRL(Bitrate_Event, V4LDialog::OnBitrate)
EVT_CHECKBOX(MaxBitrate_Event, V4LDialog::OnMaxBitrateEnable)
EVT_CHECKBOX(MaxBitrateEnable_Event, V4LDialog::OnMaxBitrateEnable)
EVT_SPINCTRL(MaxBitrate_Event, V4LDialog::OnMaxBitrate)
END_EVENT_TABLE()
......@@ -293,17 +294,18 @@ wxPanel *V4LDialog::CommonPanel( wxWindow* parent )
WXSIZEOF(norm_array), norm_array,
wxCB_READONLY );
norm_combo->SetSelection(1);
norm_combo->SetToolTip( wxU(_( "Standard of the analogic signal" )) );
subpanel_sizer->Add( norm_checkbox, 0, wxALIGN_LEFT |
wxALIGN_CENTER_VERTICAL );
subpanel_sizer->Add( norm_combo, 0, wxALIGN_RIGHT |
wxALIGN_CENTER_VERTICAL );
frequency_checkbox = new wxCheckBox( common_subpanel,
Frequency_Event,
FrequencyEnable_Event,
wxU(_("Frequency")) );
frequency = new wxSpinCtrl( common_subpanel, Frequency_Event );
frequency->SetToolTip( wxU(_("The frequency in kHz" )) );
frequency = new wxSpinCtrl( common_subpanel, Frequency_Event,
wxT("479250") );
frequency->SetToolTip( wxU(_("The frequency in KHz" )) );
subpanel_sizer->Add( frequency_checkbox, 0, wxALIGN_LEFT |
wxALIGN_CENTER_VERTICAL );
......@@ -346,13 +348,16 @@ wxPanel *V4LDialog::AudioPanel( wxWindow* parent )
audio_checkbox = new wxCheckBox( audio_subpanel,
AudioDevice_Event,
wxU(_("Audio Device")) );
audio_device = new wxTextCtrl( audio_subpanel, AudioDevice_Event,
audio_device = new wxTextCtrl( audio_subpanel, ADevLocation,
wxT("/dev/dsp"),
wxDefaultPosition, wxSize( 120, -1 ),
wxTE_PROCESS_ENTER);
audio_device->SetToolTip( wxU(_("Audio device")) );
label = new wxStaticText( audio_subpanel, -1, wxU(_("Channel")) );
audio_channel = new wxSpinCtrl( audio_subpanel, AudioChannel_Event );
audio_channel = new wxSpinCtrl( audio_subpanel, AudioChannel_Event,
wxT("0") );
audio_channel->SetToolTip( wxU(_("Usually 0 is for mono "
"and 1 for stereo")) );
subpanel_sizer->Add( audio_checkbox, 0, wxALIGN_RIGHT |
wxALIGN_CENTER_VERTICAL );
subpanel_sizer->Add( audio_device, 1, wxALIGN_RIGHT );
......@@ -392,19 +397,19 @@ wxPanel *V4LDialog::BitratePanel( wxWindow* parent )
subpanel_sizer = new wxFlexGridSizer( 2, 2, 20 );
bitrate_checkbox = new wxCheckBox( bitrate_subpanel,
Bitrate_Event,
BitrateEnable_Event,
wxU(_("Bitrate")) );
bitrate = new wxSpinCtrl( bitrate_subpanel, Bitrate_Event );
bitrate = new wxSpinCtrl( bitrate_subpanel, Bitrate_Event, wxT("3000") );
bitrate->SetToolTip( wxU(_("The average bitrate of the stream")) );
subpanel_sizer->Add( bitrate_checkbox, 0, wxALIGN_LEFT |
wxALIGN_CENTER_VERTICAL );
subpanel_sizer->Add( bitrate, 0, wxALIGN_RIGHT |
wxALIGN_CENTER_VERTICAL );
maxbitrate_checkbox = new wxCheckBox( bitrate_subpanel,
MaxBitrate_Event,
MaxBitrateEnable_Event,
wxU(_("Maximum Bitrate")) );
maxbitrate = new wxSpinCtrl( bitrate_subpanel, MaxBitrate_Event );
maxbitrate = new wxSpinCtrl( bitrate_subpanel, MaxBitrate_Event, wxT("3000") );
subpanel_sizer->Add( maxbitrate_checkbox, 0, wxALIGN_LEFT |
wxALIGN_CENTER_VERTICAL );
......@@ -474,7 +479,6 @@ void V4LDialog::OnNorm( wxCommandEvent& event )
void V4LDialog::OnFrequencyEnable( wxCommandEvent& event )
{
frequency->SetRange( 0, 1200000 );
frequency->SetValue( 479250 );
frequency->Enable( event.GetInt() );
UpdateMRL();
}
......@@ -489,15 +493,18 @@ void V4LDialog::OnFrequency( wxCommandEvent& event )
*****************************************************************************/
void V4LDialog::OnAudioEnable( wxCommandEvent& event )
{
audio_device->SetValue( wxU( "/dev/dsp" ) );
audio_channel->SetRange( 0, 255 );
audio_channel->SetValue( 0 );
audio_device->Enable( event.GetInt() );
audio_channel->Enable( event.GetInt() );
UpdateMRL();
}
void V4LDialog::OnAudioChange( wxCommandEvent& event )
{
UpdateMRL();
}
void V4LDialog::OnAudioChannel( wxCommandEvent& event )
{
UpdateMRL();
......@@ -509,7 +516,6 @@ void V4LDialog::OnAudioChannel( wxCommandEvent& event )
void V4LDialog::OnBitrateEnable( wxCommandEvent& event )
{
bitrate->SetRange( 0, 10000 );
bitrate->SetValue( 3000 );
bitrate->Enable( event.GetInt() );
UpdateMRL();
}
......@@ -522,7 +528,6 @@ void V4LDialog::OnBitrate( wxCommandEvent& event )
void V4LDialog::OnMaxBitrateEnable( wxCommandEvent& event )
{
maxbitrate->SetRange( 0, 10000 );
maxbitrate->SetValue( 3000 );
maxbitrate->Enable( event.GetInt() );
UpdateMRL();
}
......
......@@ -2,7 +2,7 @@
* wxwindows.h: private wxWindows interface description
*****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN
* $Id: wxwindows.h,v 1.73 2003/11/23 17:51:54 gbazin Exp $
* $Id: wxwindows.h,v 1.74 2003/11/27 06:37:11 adn Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
......@@ -439,6 +439,7 @@ private:
void OnCancel( wxCommandEvent& event );
void OnMRLChange( wxCommandEvent& event );
void OnAudioEnable( wxCommandEvent& event );
void OnAudioChange( wxCommandEvent& event );
void OnAudioChannel( wxCommandEvent& event );
void OnSizeEnable( wxCommandEvent& event );
void OnSize( wxCommandEvent& event );
......
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