Commit 3605f503 authored by Gildas Bazin's avatar Gildas Bazin

* modules/gui/wxwidgets/*: bug fix + msvc fixes. Patch courtesy of Brian Robb (vascy at hotmail).

parent 0037b3a2
...@@ -240,6 +240,7 @@ class wizInputPage : public wxWizardPage ...@@ -240,6 +240,7 @@ class wizInputPage : public wxWizardPage
OpenDialog *p_open_dialog; OpenDialog *p_open_dialog;
wxListView *listview; wxListView *listview;
wxPanel *open_panel; wxPanel *open_panel;
wxPanel *radio_panel; /* radio buttons should be in their own panel... */
wxWizardPage *p_prev; wxWizardPage *p_prev;
wxWizardPage *p_streaming_page; wxWizardPage *p_streaming_page;
wxWizardPage *p_transcode_page; wxWizardPage *p_transcode_page;
...@@ -531,6 +532,7 @@ wizInputPage::wizInputPage( wxWizard *parent, wxWizardPage *prev, intf_thread_t ...@@ -531,6 +532,7 @@ wizInputPage::wizInputPage( wxWizard *parent, wxWizardPage *prev, intf_thread_t
b_chosen = false; b_chosen = false;
p_open_dialog = NULL; p_open_dialog = NULL;
listview = NULL; listview = NULL;
mrl_text = NULL;
mainSizer = new wxBoxSizer(wxVERTICAL); mainSizer = new wxBoxSizer(wxVERTICAL);
/* Create the texts */ /* Create the texts */
...@@ -538,31 +540,43 @@ wizInputPage::wizInputPage( wxWizard *parent, wxWizardPage *prev, intf_thread_t ...@@ -538,31 +540,43 @@ wizInputPage::wizInputPage( wxWizard *parent, wxWizardPage *prev, intf_thread_t
mainSizer->Add( 0,20,0 ); mainSizer->Add( 0,20,0 );
radio_panel = new wxPanel(this, -1);
radio_panel->SetAutoLayout( TRUE );
wxBoxSizer *radioSizer = new wxBoxSizer(wxVERTICAL);
/* Create the radio buttons */ /* Create the radio buttons */
input_radios[0] = new wxRadioButton( this, InputRadio0_Event , input_radios[0] = new wxRadioButton( radio_panel, InputRadio0_Event ,
wxU( INPUT_OPEN ) ); wxU( INPUT_OPEN ) );
mainSizer->Add( input_radios[0], 0, wxALL, 5 ); radioSizer->Add( input_radios[0], 0, wxALL, 5 );
input_radios[1] = new wxRadioButton( this, InputRadio1_Event , input_radios[1] = new wxRadioButton( radio_panel, InputRadio1_Event ,
wxU( INPUT_PL ) ); wxU( INPUT_PL ) );
radioSizer->Add( input_radios[1], 0, wxALL, 5 );
radio_panel->SetSizer( radioSizer );
radioSizer->Layout();
radioSizer->Fit(radio_panel);
mainSizer->Add( radio_panel );
i_input = 0; i_input = 0;
mainSizer->Add( input_radios[1], 0, wxALL, 5 );
/* Open Panel */ /* Open Panel */
open_panel = new wxPanel(this, -1); open_panel = new wxPanel(this, -1);
open_panel->SetAutoLayout( TRUE ); open_panel->SetAutoLayout( TRUE );
wxBoxSizer *openSizer = new wxBoxSizer(wxHORIZONTAL); wxBoxSizer *openSizer = new wxBoxSizer(wxHORIZONTAL);
mrl_text = new wxTextCtrl( open_panel, -1, wxU( "" ), wxDefaultPosition, mrl_text = new wxTextCtrl( open_panel, -1, wxU( "" ), wxDefaultPosition,
wxSize(200,25) ); wxSize(200,25) );
openSizer->Add( mrl_text, 0 , wxALL, 5 ); openSizer->Add( mrl_text, 0 , wxALL, 5 );
openSizer->Add( new wxButton( open_panel, Choose_Event, wxU(_("Choose...")) ), 0, wxALL, 5 ); openSizer->Add( new wxButton( open_panel, Choose_Event, wxU(_("Choose...")) ), 0, wxALL, 5 );
open_panel->SetSizer( openSizer ); open_panel->SetSizer( openSizer );
openSizer->Layout(); openSizer->Layout();
openSizer->Fit(open_panel); openSizer->Fit(open_panel);
mainSizer->Add( open_panel ); mainSizer->Add( open_panel );
playlist_t *p_playlist = (playlist_t *)vlc_object_find( p_intf, playlist_t *p_playlist = (playlist_t *)vlc_object_find( p_intf,
VLC_OBJECT_PLAYLIST, FIND_ANYWHERE ); VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
...@@ -779,6 +793,8 @@ void wizInputPage::SetPartial( int i_from, int i_to ) ...@@ -779,6 +793,8 @@ void wizInputPage::SetPartial( int i_from, int i_to )
wizTranscodeCodecPage::wizTranscodeCodecPage( wxWizard *parent, wizTranscodeCodecPage::wizTranscodeCodecPage( wxWizard *parent,
wxWizardPage *next) : wxWizardPage(parent) wxWizardPage *next) : wxWizardPage(parent)
{ {
int i;
p_next = next; p_next = next;
acodec = NULL; acodec = NULL;
...@@ -804,7 +820,7 @@ wizTranscodeCodecPage::wizTranscodeCodecPage( wxWizard *parent, ...@@ -804,7 +820,7 @@ wizTranscodeCodecPage::wizTranscodeCodecPage( wxWizard *parent,
video_combo = new wxComboBox( this, VideoCodec_Event, wxT(""), video_combo = new wxComboBox( this, VideoCodec_Event, wxT(""),
wxDefaultPosition, wxSize(200,25), 0, NULL, wxDefaultPosition, wxSize(200,25), 0, NULL,
wxCB_DROPDOWN| wxCB_READONLY ); wxCB_DROPDOWN| wxCB_READONLY );
for( int i= 0; vcodecs_array[i].psz_display != NULL; i++ ) for( i= 0; vcodecs_array[i].psz_display != NULL; i++ )
{ {
video_combo->Append( wxU( vcodecs_array[i].psz_display ) , video_combo->Append( wxU( vcodecs_array[i].psz_display ) ,
(void *)&vcodecs_array[i] ); (void *)&vcodecs_array[i] );
...@@ -844,7 +860,7 @@ wizTranscodeCodecPage::wizTranscodeCodecPage( wxWizard *parent, ...@@ -844,7 +860,7 @@ wizTranscodeCodecPage::wizTranscodeCodecPage( wxWizard *parent,
audio_combo = new wxComboBox( this, AudioCodec_Event, wxT(""), audio_combo = new wxComboBox( this, AudioCodec_Event, wxT(""),
wxDefaultPosition, wxSize(200,25), 0, NULL, wxDefaultPosition, wxSize(200,25), 0, NULL,
wxCB_DROPDOWN| wxCB_READONLY ); wxCB_DROPDOWN| wxCB_READONLY );
for( int i= 0; acodecs_array[i].psz_display != NULL; i++ ) for( i= 0; acodecs_array[i].psz_display != NULL; i++ )
{ {
audio_combo->Append( wxU( acodecs_array[i].psz_display ) , audio_combo->Append( wxU( acodecs_array[i].psz_display ) ,
(void *)&acodecs_array[i] ); (void *)&acodecs_array[i] );
......
...@@ -26,6 +26,11 @@ ...@@ -26,6 +26,11 @@
#undef CreateDialog #undef CreateDialog
#endif #endif
#ifdef _MSC_VER
// turn off 'identifier was truncated to '255' characters in the debug info'
# pragma warning( disable:4786 )
#endif
/* Let vlc take care of the i18n stuff */ /* Let vlc take care of the i18n stuff */
#define WXINTL_NO_GETTEXT_MACRO #define WXINTL_NO_GETTEXT_MACRO
......
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