Commit bc0d451c authored by gbazin's avatar gbazin

* modules/gui/wxwindows/menus.cpp: don't display choices menu when there is only 1 choice available.
* modules/gui/wxwindows/streamout.cpp: small cosmetic changes.
* modules/gui/wxwindows/open.cpp: added a CD Audio entry.
parent 8b62cc3c
......@@ -2,7 +2,7 @@
* menus.cpp : wxWindows plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
* $Id: menus.cpp,v 1.10 2003/05/15 21:31:53 gbazin Exp $
* $Id: menus.cpp,v 1.11 2003/05/17 22:48:09 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
......@@ -366,6 +366,8 @@ void Menu::CreateMenuItem( wxMenu *menu, char *psz_var,
{
var_Change( p_object, psz_var, VLC_VAR_CHOICESCOUNT, &val, NULL );
if( val.i_int == 0 ) return;
if( (i_type & VLC_VAR_TYPE) != VLC_VAR_VARIABLE && val.i_int == 1 )
return;
}
/* Get the descriptive name of the variable */
......@@ -425,6 +427,8 @@ wxMenu *Menu::CreateChoicesMenu( char *psz_var, vlc_object_t *p_object )
{
var_Change( p_object, psz_var, VLC_VAR_CHOICESCOUNT, &val, NULL );
if( val.i_int == 0 ) return NULL;
if( (i_type & VLC_VAR_TYPE) != VLC_VAR_VARIABLE && val.i_int == 1 )
return NULL;
}
else
{
......
......@@ -2,7 +2,7 @@
* open.cpp : wxWindows plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
* $Id: open.cpp,v 1.22 2003/05/15 15:59:35 gbazin Exp $
* $Id: open.cpp,v 1.23 2003/05/17 22:48:09 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
......@@ -357,9 +357,11 @@ wxPanel *OpenDialog::DiscPanel( wxWindow* parent )
static const wxString disc_type_array[] =
{
wxU(_("DVD")),
wxU(_("DVD (menus support)")),
wxU(_("VCD"))
wxU(_("DVD")),
wxU(_("VCD")),
wxU(_("CD Audio"))
};
disc_type = new wxRadioBox( panel, DiscType_Event, wxU(_("Disc type")),
......@@ -510,8 +512,9 @@ void OpenDialog::UpdateMRL( int i_access_method )
mrl = wxT("file") + demux + wxT("://") + file_combo->GetValue();
break;
case DISC_ACCESS:
mrl = ( disc_type->GetSelection() == 0 ? wxT("dvdold") :
disc_type->GetSelection() == 1 ? wxT("dvd") : wxT("vcd") )
mrl = ( disc_type->GetSelection() == 0 ? wxT("dvdsimple") :
disc_type->GetSelection() == 1 ? wxT("dvd") :
disc_type->GetSelection() == 2 ? wxT("vcd") : wxT("cdda") )
+ demux + wxT("://")
+ disc_device->GetLineText(0)
+ wxString::Format( wxT("@%d:%d"),
......
......@@ -2,7 +2,7 @@
* streamout.cpp : wxWindows plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
* $Id: streamout.cpp,v 1.11 2003/05/15 15:59:35 gbazin Exp $
* $Id: streamout.cpp,v 1.12 2003/05/17 22:48:09 gbazin Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
......@@ -482,7 +482,6 @@ wxPanel *SoutDialog::TranscodingPanel( wxWindow* parent )
wxVERTICAL );
/* Create video transcoding checkox */
# define VCODECS_NUM 8
static const wxString vcodecs_array[] =
{
wxT("mpgv"),
......@@ -494,7 +493,6 @@ wxPanel *SoutDialog::TranscodingPanel( wxWindow* parent )
wxT("I263"),
wxT("WMV1"),
};
# define VBITRATES_NUM 9
static const wxString vbitrates_array[] =
{
wxT("3000"),
......@@ -513,14 +511,14 @@ wxPanel *SoutDialog::TranscodingPanel( wxWindow* parent )
new wxCheckBox( panel, VideoTranscEnable_Event, wxU(_("Video codec")));
video_codec_combo =
new wxComboBox( panel, VideoTranscCodec_Event, wxT("mp4v"),
wxPoint(20,25), wxDefaultSize,
VCODECS_NUM, vcodecs_array, wxCB_READONLY );
wxPoint(20,25), wxDefaultSize, WXSIZEOF(vcodecs_array),
vcodecs_array, wxCB_READONLY );
wxStaticText *bitrate_label =
new wxStaticText( panel, -1, wxU(_("Bitrate (kb/s)")));
video_bitrate_combo =
new wxComboBox( panel, VideoTranscBitrate_Event, wxT("1000"),
wxPoint(20,25), wxDefaultSize,
VBITRATES_NUM, vbitrates_array );
WXSIZEOF(vbitrates_array), vbitrates_array );
video_sizer->Add( video_transc_checkbox, 0,
wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL );
video_sizer->Add( video_codec_combo, 1,
......@@ -531,13 +529,11 @@ wxPanel *SoutDialog::TranscodingPanel( wxWindow* parent )
wxEXPAND | wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL );
/* Create audio transcoding checkox */
# define ACODECS_NUM 2
static const wxString acodecs_array[] =
{
wxT("mpga"),
wxT("a52")
};
# define ABITRATES_NUM 5
static const wxString abitrates_array[] =
{
wxT("512"),
......@@ -552,14 +548,14 @@ wxPanel *SoutDialog::TranscodingPanel( wxWindow* parent )
new wxCheckBox( panel, AudioTranscEnable_Event, wxU(_("Audio codec")));
audio_codec_combo =
new wxComboBox( panel, AudioTranscCodec_Event, wxT("mpga"),
wxPoint(20,25), wxDefaultSize,
ACODECS_NUM, acodecs_array, wxCB_READONLY );
wxPoint(20,25), wxDefaultSize, WXSIZEOF(acodecs_array),
acodecs_array, wxCB_READONLY );
bitrate_label =
new wxStaticText( panel, -1, wxU(_("Bitrate (kb/s)")));
audio_bitrate_combo =
new wxComboBox( panel, AudioTranscBitrate_Event, wxT("192"),
wxPoint(20,25), wxDefaultSize,
ABITRATES_NUM, abitrates_array );
WXSIZEOF(abitrates_array), abitrates_array );
audio_sizer->Add( audio_transc_checkbox, 0,
wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL );
audio_sizer->Add( audio_codec_combo, 1,
......
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