Commit 2252f84a authored by Gildas Bazin's avatar Gildas Bazin

* modules/gui/ncurses.c, modules/gui/wxwindows/wizard.cpp: compilation fixes.

parent 2d109a77
...@@ -619,8 +619,7 @@ static int HandleKey( intf_thread_t *p_intf, int i_key ) ...@@ -619,8 +619,7 @@ static int HandleKey( intf_thread_t *p_intf, int i_key )
} }
else if( p_sys->i_box_type == BOX_OPEN && p_sys->psz_open_chain ) else if( p_sys->i_box_type == BOX_OPEN && p_sys->psz_open_chain )
{ {
int i_chain_len; int i_chain_len = strlen( p_sys->psz_open_chain );
i_chain_len = strlen( p_sys->psz_open_chain );
playlist_t *p_playlist = p_sys->p_playlist; playlist_t *p_playlist = p_sys->p_playlist;
switch( i_key ) switch( i_key )
...@@ -1558,21 +1557,24 @@ static void ReadDir( intf_thread_t *p_intf ) ...@@ -1558,21 +1557,24 @@ static void ReadDir( intf_thread_t *p_intf )
/* while we still have entries in the directory */ /* while we still have entries in the directory */
while( p_dir_content != NULL ) while( p_dir_content != NULL )
{ {
#if defined( S_ISDIR )
struct stat stat_data;
#endif
struct dir_entry_t *p_dir_entry; struct dir_entry_t *p_dir_entry;
int i_size_entry = strlen( p_sys->psz_current_dir ) + int i_size_entry = strlen( p_sys->psz_current_dir ) +
strlen( p_dir_content->d_name ) + 2; strlen( p_dir_content->d_name ) + 2;
char *psz_uri = (char *)malloc( sizeof(char)*i_size_entry); char *psz_uri = (char *)malloc( sizeof(char)*i_size_entry);
sprintf( psz_uri, "%s/%s", p_sys->psz_current_dir, p_dir_content->d_name ); sprintf( psz_uri, "%s/%s", p_sys->psz_current_dir,
p_dir_content->d_name );
if( ( p_dir_entry = malloc( sizeof( struct dir_entry_t) ) ) == NULL ) if( !( p_dir_entry = malloc( sizeof( struct dir_entry_t) ) ) )
{ {
free( psz_uri); free( psz_uri);
return; return;
} }
#if defined( S_ISDIR ) #if defined( S_ISDIR )
struct stat stat_data;
stat( psz_uri, &stat_data ); stat( psz_uri, &stat_data );
if( S_ISDIR(stat_data.st_mode) ) if( S_ISDIR(stat_data.st_mode) )
#elif defined( DT_DIR ) #elif defined( DT_DIR )
...@@ -1593,6 +1595,7 @@ static void ReadDir( intf_thread_t *p_intf ) ...@@ -1593,6 +1595,7 @@ static void ReadDir( intf_thread_t *p_intf )
INSERT_ELEM( p_sys->pp_dir_entries, p_sys->i_dir_entries, INSERT_ELEM( p_sys->pp_dir_entries, p_sys->i_dir_entries,
p_sys->i_dir_entries, p_dir_entry ); p_sys->i_dir_entries, p_dir_entry );
} }
free( psz_uri ); free( psz_uri );
/* Read next entry */ /* Read next entry */
p_dir_content = readdir( p_current_dir ); p_dir_content = readdir( p_current_dir );
......
...@@ -219,6 +219,7 @@ class wizInputPage : public wxWizardPage ...@@ -219,6 +219,7 @@ class wizInputPage : public wxWizardPage
void SetPintf( intf_thread_t *p_intf ); void SetPintf( intf_thread_t *p_intf );
void SetUri( char *psz_uri ); void SetUri( char *psz_uri );
void SetPartial( int i_from, int i_to ); void SetPartial( int i_from, int i_to );
protected: protected:
bool b_chosen; bool b_chosen;
intf_thread_t *p_intf; intf_thread_t *p_intf;
...@@ -242,10 +243,11 @@ class wizInputPage : public wxWizardPage ...@@ -242,10 +243,11 @@ class wizInputPage : public wxWizardPage
wxWizardPage *p_prev; wxWizardPage *p_prev;
wxWizardPage *p_streaming_page; wxWizardPage *p_streaming_page;
wxWizardPage *p_transcode_page; wxWizardPage *p_transcode_page;
DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE()
}; };
BEGIN_EVENT_TABLE(wizInputPage, wxWizardPageSimple) BEGIN_EVENT_TABLE(wizInputPage, wxWizardPage)
EVT_RADIOBUTTON( InputRadio0_Event, wizInputPage::OnInputChange) EVT_RADIOBUTTON( InputRadio0_Event, wizInputPage::OnInputChange)
EVT_RADIOBUTTON( InputRadio1_Event, wizInputPage::OnInputChange) EVT_RADIOBUTTON( InputRadio1_Event, wizInputPage::OnInputChange)
EVT_BUTTON( Choose_Event, wizInputPage::OnChoose) EVT_BUTTON( Choose_Event, wizInputPage::OnChoose)
...@@ -291,7 +293,7 @@ protected: ...@@ -291,7 +293,7 @@ protected:
DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE()
}; };
BEGIN_EVENT_TABLE(wizTranscodeCodecPage, wxWizardPageSimple) BEGIN_EVENT_TABLE(wizTranscodeCodecPage, wxWizardPage)
EVT_CHECKBOX( VideoEnable_Event, wizTranscodeCodecPage::OnEnableVideo) EVT_CHECKBOX( VideoEnable_Event, wizTranscodeCodecPage::OnEnableVideo)
EVT_CHECKBOX( AudioEnable_Event, wizTranscodeCodecPage::OnEnableAudio) EVT_CHECKBOX( AudioEnable_Event, wizTranscodeCodecPage::OnEnableAudio)
EVT_COMBOBOX( VideoCodec_Event, wizTranscodeCodecPage::OnVideoCodecChange) EVT_COMBOBOX( VideoCodec_Event, wizTranscodeCodecPage::OnVideoCodecChange)
...@@ -321,7 +323,7 @@ protected: ...@@ -321,7 +323,7 @@ protected:
wxWizardPage *p_next; wxWizardPage *p_next;
}; };
BEGIN_EVENT_TABLE(wizStreamingMethodPage, wxWizardPageSimple) BEGIN_EVENT_TABLE(wizStreamingMethodPage, wxWizardPage)
EVT_RADIOBUTTON( MethodRadio0_Event, wizStreamingMethodPage::OnMethodChange) EVT_RADIOBUTTON( MethodRadio0_Event, wizStreamingMethodPage::OnMethodChange)
EVT_RADIOBUTTON( MethodRadio1_Event, wizStreamingMethodPage::OnMethodChange) EVT_RADIOBUTTON( MethodRadio1_Event, wizStreamingMethodPage::OnMethodChange)
EVT_RADIOBUTTON( MethodRadio2_Event, wizStreamingMethodPage::OnMethodChange) EVT_RADIOBUTTON( MethodRadio2_Event, wizStreamingMethodPage::OnMethodChange)
...@@ -356,7 +358,7 @@ protected: ...@@ -356,7 +358,7 @@ protected:
wxWizardPage *p_transcode_page; wxWizardPage *p_transcode_page;
}; };
BEGIN_EVENT_TABLE(wizEncapPage, wxWizardPageSimple) BEGIN_EVENT_TABLE(wizEncapPage, wxWizardPage)
EVT_WIZARD_PAGE_CHANGING(-1, wizEncapPage::OnWizardPageChanging) EVT_WIZARD_PAGE_CHANGING(-1, wizEncapPage::OnWizardPageChanging)
EVT_RADIOBUTTON( EncapRadio0_Event, wizEncapPage::OnEncapChange) EVT_RADIOBUTTON( EncapRadio0_Event, wizEncapPage::OnEncapChange)
EVT_RADIOBUTTON( EncapRadio1_Event, wizEncapPage::OnEncapChange) EVT_RADIOBUTTON( EncapRadio1_Event, wizEncapPage::OnEncapChange)
......
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