sout_button->Enable();
subsfile_mrl.Add( wxString(wxT("sout=")) + wxL2U(psz_sout) );
}
- if( psz_sout ) free( psz_sout );
+ free( psz_sout );
common_opt_sizer->Add( sout_button, 1, wxALIGN_LEFT |
wxALIGN_CENTER_VERTICAL );
OpenDialog::~OpenDialog()
{
/* Clean up */
- if( file_dialog ) delete file_dialog;
- if( sout_dialog ) delete sout_dialog;
- if( subsfile_dialog ) delete subsfile_dialog;
+ delete file_dialog;
+ delete sout_dialog;
+ delete subsfile_dialog;
}
int OpenDialog::Show( int i_access_method, int i_arg )
0, wxALIGN_CENTER_VERTICAL | wxALL, 5 );
subfile_combo = new wxComboBox( panel, SubFileName_Event,
wxL2U( psz_subsfile ) );
- if( psz_subsfile ) free( psz_subsfile );
+ free( psz_subsfile );
subbrowse_button = new wxButton( panel, SubFileBrowse_Event,
wxU(_("Browse...")) );
subfile_sizer->Add( subfile_combo, 1, wxALL | wxALIGN_CENTER_VERTICAL, 5 );
}
/* Update the playlist */
- playlist_t *p_playlist =
- (playlist_t *)vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
- FIND_ANYWHERE );
+ playlist_t *p_playlist = pl_Yield( p_intf );
if( p_playlist == NULL ) return;
for( int i = 0; i < (int)mrl.GetCount(); i++ )
{
- vlc_bool_t b_start = !i && i_open_arg;
+ bool b_start = !i && i_open_arg;
input_item_t *p_input;
char *psz_utf8;
/* FIXME: playlist_AddInput() can fail */
playlist_AddInput( p_playlist, p_input,
PLAYLIST_APPEND | ( b_start ? PLAYLIST_GO : PLAYLIST_PREPARSE ),
- PLAYLIST_END, VLC_TRUE, VLC_FALSE );
+ PLAYLIST_END, true, pl_Unlocked );
+ vlc_gc_decref( p_input );
}
-
- vlc_object_release( p_playlist );
+ pl_Release( p_intf );
Hide();
break;
}
- free(psz_device);
+ free( psz_device );
disc_probe->SetValue(FALSE);
UpdateMRL( DISC_ACCESS );
disc_title->SetValue( 0 ); i_disc_title = 0;
disc_chapter->SetValue( 0 ); i_disc_chapter = 0;
- if( psz_device ) free( psz_device );
+ free( psz_device );
UpdateMRL( DISC_ACCESS );
}
*****************************************************************************/
wxArrayString SeparateEntries( wxString entries )
{
- vlc_bool_t b_quotes_mode = VLC_FALSE;
+ bool b_quotes_mode = false;
wxArrayString entries_array;
wxString entry;
{
/* Enters quotes mode */
entry.RemoveLast();
- b_quotes_mode = VLC_TRUE;
+ b_quotes_mode = true;
}
else if( b_quotes_mode && entry.Last() == wxT('\"') )
{
/* Finished the quotes mode */
entry.RemoveLast();
- b_quotes_mode = VLC_FALSE;
+ b_quotes_mode = false;
}
else if( !b_quotes_mode && entry.Last() != wxT('\"') )
{