Commit 16e51807 authored by Rafaël Carré's avatar Rafaël Carré

Merges ITEM_TYPE_VFILE and ITEM_TYPE_AFILE to ITEM_TYPE_FILE

There is no way at the moment to know if a file is audio only
parent 2caa2480
......@@ -89,16 +89,15 @@ struct input_item_t
};
#define ITEM_TYPE_UNKNOWN 0
#define ITEM_TYPE_AFILE 1
#define ITEM_TYPE_VFILE 2
#define ITEM_TYPE_DIRECTORY 3
#define ITEM_TYPE_DISC 4
#define ITEM_TYPE_CDDA 5
#define ITEM_TYPE_CARD 6
#define ITEM_TYPE_NET 7
#define ITEM_TYPE_PLAYLIST 8
#define ITEM_TYPE_NODE 9
#define ITEM_TYPE_NUMBER 10
#define ITEM_TYPE_FILE 1
#define ITEM_TYPE_DIRECTORY 2
#define ITEM_TYPE_DISC 3
#define ITEM_TYPE_CDDA 4
#define ITEM_TYPE_CARD 5
#define ITEM_TYPE_NET 6
#define ITEM_TYPE_PLAYLIST 7
#define ITEM_TYPE_NODE 8
#define ITEM_TYPE_NUMBER 9
static inline void input_ItemInit( vlc_object_t *p_o, input_item_t *p_i )
{
......
......@@ -515,7 +515,7 @@ static int ReadDir( playlist_t *p_playlist, const char *psz_name,
memcpy (psz_uri, "file://", 7);
p_input = input_ItemNewWithType( VLC_OBJECT(p_playlist),
psz_uri, entry, 0, NULL,
-1, ITEM_TYPE_VFILE );
-1, ITEM_TYPE_FILE );
if (p_input != NULL)
{
if( p_current_input )
......
......@@ -161,7 +161,7 @@ void MetaPanel::saveMeta()
vlc_mutex_lock( &p_input->lock );
int i_type = p_input->i_type;
vlc_mutex_unlock( &p_input->lock );
if( ( i_type == ITEM_TYPE_AFILE ) || ( i_type == ITEM_TYPE_VFILE ) )
if( i_type == ITEM_TYPE_FILE )
{
char *psz_uri_orig = input_item_GetURI( p_input );
char *psz_uri = psz_uri_orig;
......
/* XPM */
static char * type_afile_xpm[] = {
"16 16 107 2",
" c None",
". c #8F8F8F",
"+ c #FFFFFF",
"@ c #B7CFF9",
"# c #B8CFF8",
"$ c #BCD2F7",
"% c #AFCAF4",
"& c #93B7EE",
"* c #5B91E2",
"= c #4E88DE",
"- c #4481D9",
"; c #3A7AD6",
"> c #2F73D2",
", c #246CCD",
"' c #1663CA",
") c #F3F7FE",
"! c #F1F6FD",
"~ c #EFF5FD",
"{ c #F2F7FF",
"] c #F2F8FF",
"^ c #E8EFFB",
"/ c #E6EDF9",
"( c #E7EFFB",
"_ c #E2EAF7",
": c #DCE5F1",
"< c #D9E2EF",
"[ c #D6E1EE",
"} c #FFFFFE",
"| c #EFEEED",
"1 c #D5D5D3",
"2 c #CDCBC9",
"3 c #CCCBC9",
"4 c #D4D2D0",
"5 c #EAE8E5",
"6 c #FCFBF8",
"7 c #FBFAF7",
"8 c #F9F7F4",
"9 c #FAFAFA",
"0 c #CFCFCF",
"a c #A7A7A7",
"b c #818181",
"c c #696969",
"d c #686868",
"e c #808080",
"f c #A5A5A5",
"g c #C6C6C6",
"h c #EFEFEF",
"i c #F3F3F3",
"j c #D2D2D2",
"k c #B0B0B0",
"l c #858585",
"m c #828282",
"n c #989898",
"o c #999999",
"p c #838383",
"q c #848484",
"r c #AEAEAE",
"s c #CACACA",
"t c #F0F0F0",
"u c #F6F6F6",
"v c #BDBDBD",
"w c #9F9F9F",
"x c #E8E8E8",
"y c #C3C3C3",
"z c #A1A1A1",
"A c #ACACAC",
"B c #BBBBBB",
"C c #E4E4E4",
"D c #F4F4F4",
"E c #C9C9C9",
"F c #C2C2C2",
"G c #B8B8B8",
"H c #B9B9B9",
"I c #B5B5B5",
"J c #C1C1C1",
"K c #B1B1B1",
"L c #E5E5E5",
"M c #FEFEFE",
"N c #ABABAB",
"O c #EBEBEB",
"P c #C0C0C0",
"Q c #8B8B8B",
"R c #BABABA",
"S c #A6A6A6",
"T c #F1F1F1",
"U c #F9F9F9",
"V c #DEDEDE",
"W c #F2F2F2",
"X c #909090",
"Y c #D8D8D8",
"Z c #F5F5F5",
"` c #FCFCFC",
" . c #DCDCDC",
".. c #777777",
"+. c #6D6D6D",
"@. c #979797",
"#. c #8C8C8C",
"$. c #F7F7F7",
"%. c #F8F8F8",
"&. c #CECECE",
"*. c #868686",
"=. c #B2B2B2",
"-. c #A8A8A8",
";. c #EAEAEA",
">. c #FBFBFB",
",. c #FDFDFD",
"'. c #EEEEEE",
". . . . . . . . . . . . . . . . ",
". + @ # $ % & * = - ; > , ' + . ",
". + ) ! ~ { ] ^ / ( _ : < [ + . ",
". + + + } | 1 2 3 4 5 6 7 8 + . ",
". + + 9 0 a b c d e f g h i + . ",
". + + j k l m n o p q r s t + . ",
". + u v r w s t x y z A B C + . ",
". + D k E F G H I r J s K L + . ",
". + M N J O P . Q R O E S T + . ",
". + U V . v W W t h J X Y 9 + . ",
". + Z ` ...+.. @.#.q s D h + . ",
". + $.%.$.&.*.l =.v g -.-.-.-.. ",
". + U U U U h C C ;.;.-.+ + . ",
". + >.>.>.>.M M ,.+ '.-.+ . ",
". + + + + + + + + + U -.. ",
". . . . . . . . . . . . "};
/* XPM */
static char * type_vfile_xpm[] = {
static char * type_file_xpm[] = {
"16 16 108 2",
" c None",
". c #8F8F8F",
......
......@@ -33,8 +33,7 @@
#include <vlc_intf_strings.h>
#include "pixmaps/type_unknown.xpm"
#include "pixmaps/type_afile.xpm"
#include "pixmaps/type_vfile.xpm"
#include "pixmaps/type_file.xpm"
#include "pixmaps/type_net.xpm"
#include "pixmaps/type_card.xpm"
#include "pixmaps/type_disc.xpm"
......@@ -276,8 +275,7 @@ PLModel::PLModel( playlist_t *_p_playlist, intf_thread_t *_p_intf,
#define ADD_ICON(type, x) icons[ITEM_TYPE_##type] = QIcon( QPixmap( type_##x##_xpm ) );
ADD_ICON( UNKNOWN , unknown );
ADD_ICON( AFILE,afile );
ADD_ICON( VFILE, vfile );
ADD_ICON( FILE, file );
ADD_ICON( DIRECTORY, directory );
ADD_ICON( DISC, disc );
ADD_ICON( CDDA, cdda );
......
......@@ -245,8 +245,7 @@ input_item_t *input_ItemNewWithType( vlc_object_t *p_obj, const char *psz_uri,
if( psz_name != NULL )
p_input->psz_name = strdup( psz_name );
else if( p_input->i_type == ITEM_TYPE_AFILE
|| p_input->i_type == ITEM_TYPE_VFILE )
else if( p_input->i_type == ITEM_TYPE_FILE )
{
const char *psz_filename = strrchr( p_input->psz_uri, DIR_SEP_CHAR );
if( psz_filename && *psz_filename == DIR_SEP_CHAR )
......@@ -297,14 +296,6 @@ static void GuessType( input_item_t *p_item)
{ NULL, 0 }
};
#if 0 /* Unused */
static struct { char *psz_search; int i_type; } exts_array[] =
{
{ "mp3", ITEM_TYPE_AFILE },
{ NULL, 0 }
};
#endif
for( i = 0; types_array[i].psz_search != NULL; i++ )
{
if( !strncmp( p_item->psz_uri, types_array[i].psz_search,
......@@ -314,5 +305,5 @@ static void GuessType( input_item_t *p_item)
return;
}
}
p_item->i_type = ITEM_TYPE_VFILE;
p_item->i_type = ITEM_TYPE_FILE;
}
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