#define BROWSE_TEXT N_("Filebrowser starting point")
#define BROWSE_LONGTEXT N_( \
- "This option allows you to specify directory the ncurses filebrowser" \
+ "This option allows you to specify the directory the ncurses filebrowser " \
"will show you initially.")
vlc_module_begin();
set_description( _("ncurses interface") );
set_capability( "interface", 10 );
+ set_category( CAT_INTERFACE );
+ set_subcategory( SUBCAT_INTERFACE_GENERAL );
set_callbacks( Open, Close );
add_shortcut( "curses" );
add_directory( "browse-dir", NULL, NULL, BROWSE_TEXT, BROWSE_LONGTEXT, VLC_FALSE );
}
else if( p_sys->i_box_type == BOX_OPEN && p_sys->psz_open_chain )
{
- int i_chain_len;
- i_chain_len = strlen( p_sys->psz_open_chain );
+ int i_chain_len = strlen( p_sys->psz_open_chain );
playlist_t *p_playlist = p_sys->p_playlist;
switch( i_key )
vlc_value_t val_list;
/* Source */
- mvnprintw( y++, 0, COLS, " Source : %s", p_input->psz_source );
+ mvnprintw( y++, 0, COLS, " Source : %s",
+ p_input->input.p_item->psz_uri );
/* State */
var_Get( p_input, "state", &val );
if( p_input )
{
int i,j;
- vlc_mutex_lock( &p_input->p_item->lock );
- for ( i = 0; i < p_input->p_item->i_categories; i++ )
+ vlc_mutex_lock( &p_input->input.p_item->lock );
+ for ( i = 0; i < p_input->input.p_item->i_categories; i++ )
{
- info_category_t *p_category = p_input->p_item->pp_categories[i];
+ info_category_t *p_category = p_input->input.p_item->pp_categories[i];
if( y >= y_end ) break;
MainBoxWrite( p_intf, l++, 1, " [%s]", p_category->psz_name );
for ( j = 0; j < p_category->i_infos; j++ )
MainBoxWrite( p_intf, l++, 1, " %s: %s", p_info->psz_name, p_info->psz_value );
}
}
- vlc_mutex_unlock( &p_input->p_item->lock );
+ vlc_mutex_unlock( &p_input->input.p_item->lock );
}
else
{
/* while we still have entries in the directory */
while( p_dir_content != NULL )
{
+#if defined( S_ISDIR )
+ struct stat stat_data;
+#endif
struct dir_entry_t *p_dir_entry;
int i_size_entry = strlen( p_sys->psz_current_dir ) +
strlen( p_dir_content->d_name ) + 2;
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);
return;
}
#if defined( S_ISDIR )
- struct stat stat_data;
stat( psz_uri, &stat_data );
if( S_ISDIR(stat_data.st_mode) )
#elif defined( DT_DIR )
INSERT_ELEM( p_sys->pp_dir_entries, p_sys->i_dir_entries,
p_sys->i_dir_entries, p_dir_entry );
}
+
free( psz_uri );
/* Read next entry */
p_dir_content = readdir( p_current_dir );