Commit 96a9eea8 authored by Clément Stenac's avatar Clément Stenac

Icons support

Misc fprintf cleanup
parent 5b6e15db
......@@ -65,7 +65,7 @@ ConfigControl *ConfigControl::createControl( vlc_object_t *p_this,
if( !p_item->i_list )
p_control = new StringConfigControl( p_this, p_item, parent,false );
else
fprintf(stderr, "GRAA\n" );
fprintf(stderr, "TODO\n" );
break;
default:
break;
......
......@@ -106,28 +106,10 @@ void *VideoWidget::Request( vout_thread_t *p_nvout, int *pi_x, int *pi_y,
}
p_vout = p_nvout;
fprintf( stderr, "[Before update] MI constraints %ix%i -> %ix%i\n",
p_intf->p_sys->p_mi->minimumSize().width(),
p_intf->p_sys->p_mi->minimumSize().height(),
p_intf->p_sys->p_mi->maximumSize().width(),
p_intf->p_sys->p_mi->maximumSize().height() );
setMinimumSize( 1,1 );
p_intf->p_sys->p_mi->videoSize = QSize( *pi_width, *pi_height );
updateGeometry();
need_update = true;
fprintf( stderr, "[After update] MI constraints %ix%i -> %ix%i - Fr %ix%i -> %ix%i (hint %ix%i)\n",
p_intf->p_sys->p_mi->minimumSize().width(),
p_intf->p_sys->p_mi->minimumSize().height(),
p_intf->p_sys->p_mi->maximumSize().width(),
p_intf->p_sys->p_mi->maximumSize().height(),
minimumSize().width(),
minimumSize().height(),
maximumSize().width(),
maximumSize().height(),
sizeHint().width(),sizeHint().height()
);
return (void*)winId();
}
......@@ -142,23 +124,11 @@ void VideoWidget::Release( void *p_win )
{
p_intf->p_sys->p_mi->videoSize = QSize ( 1,1 );
}
fprintf( stderr, "[Before R update] MI constraints %ix%i -> %ix%i\n",
p_intf->p_sys->p_mi->minimumSize().width(),
p_intf->p_sys->p_mi->minimumSize().height(),
p_intf->p_sys->p_mi->maximumSize().width(),
p_intf->p_sys->p_mi->maximumSize().height() );
updateGeometry();
if( !config_GetInt( p_intf, "qt-always-video" ) )
need_update = true;
fprintf( stderr, "[After R update] MI constraints %ix%i -> %ix%i\n",
p_intf->p_sys->p_mi->minimumSize().width(),
p_intf->p_sys->p_mi->minimumSize().height(),
p_intf->p_sys->p_mi->maximumSize().width(),
p_intf->p_sys->p_mi->maximumSize().height() );
p_vout = NULL;
}
......
......@@ -78,28 +78,22 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
settings.beginGroup( "MainWindow" );
videoSize = settings.value( "videoSize", QSize( 200, 200 ) ).
toSize();
}
}
else
videoSize = QSize( 1,1 );
videoWidget->resize( videoSize );
ui.vboxLayout->insertWidget( 0, videoWidget );
}
fprintf( stderr, "Margin : %i\n",ui.vboxLayout->margin() );
readSettings( "MainWindow" );
addSize = QSize( ui.vboxLayout->margin() * 2, PREF_H );
if( config_GetInt( p_intf, "qt-always-video" ) )
mainSize = videoSize + addSize;
else
mainSize = QSize( PREF_W, PREF_H );
resize( mainSize );
mainSize = size();
fprintf( stderr, "Size is %ix%i - Video %ix%i\n", mainSize.width(), mainSize.height(), videoSize.width(), videoSize.height() );
fprintf( stderr, "Additional size around video %ix%i", addSize.width(), addSize.height() );
setMinimumSize( PREF_W, addSize.height() );
/* Init input manager */
......@@ -197,7 +191,6 @@ void MainInterface::setName( QString name )
void MainInterface::setStatus( int status )
{
fprintf( stderr, "Status is now %i\n", status );
if( status == 2 ) // Playing
ui.playButton->setIcon( QIcon( ":/pixmaps/pause.png" ) );
else
......
......@@ -697,22 +697,18 @@ void QVLCMenu::CreateAndConnect( QMenu *menu, const char *psz_var,
MenuItemData *itemData = new MenuItemData( i_object_id, i_val_type,
val, psz_var );
connect( action, SIGNAL(triggered()), THEDP->menusMapper, SLOT(map()) );
connect( action, SIGNAL(triggered()), THEDP->menusMapper, SLOT(map()) );
THEDP->menusMapper->setMapping( action, itemData );
menu->addAction( action );
}
void QVLCMenu::DoAction( intf_thread_t *p_intf, QObject *data )
{
MenuItemData *itemData = qobject_cast<MenuItemData *>(data);
vlc_object_t *p_object = (vlc_object_t *)vlc_object_get( p_intf,
itemData->i_object_id );
if( p_object == NULL ) return;
fprintf( stderr, "Setting %s on %i\n", itemData->psz_var,
p_object->i_object_id );
var_Set( p_object, itemData->psz_var, itemData->val );
vlc_object_release( p_object );
}
/* 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_card_xpm[] = {
"16 16 174 2",
" c #FFFFFF",
". c #E7E7E7",
"+ c #888888",
"@ c #696969",
"# c #B1B1B1",
"$ c #D4D4D4",
"% c #5D5D5D",
"& c #AFAFAF",
"* c #DCDCDC",
"= c #5E5E5E",
"- c #ECECEC",
"; c #FCFCFC",
"> c #D9D9D9",
", c #D3D3D3",
"' c #D2D2D2",
") c #CFCFCF",
"! c #7D7D7D",
"~ c #B2B6B1",
"{ c #72896A",
"] c #6D7E60",
"^ c #6E7E5F",
"/ c #6C7B5C",
"( c #6B7A5B",
"_ c #606C50",
": c #616C4F",
"< c #646F53",
"[ c #5D684C",
"} c #606A4F",
"| c #536148",
"1 c #717370",
"2 c #989B95",
"3 c #667B5C",
"4 c #7F8C7B",
"5 c #8D978A",
"6 c #889185",
"7 c #868F83",
"8 c #858E81",
"9 c #677163",
"0 c #48563D",
"a c #727C67",
"b c #495642",
"c c #697164",
"d c #48573E",
"e c #686B67",
"f c #BFBFBF",
"g c #FEFEFE",
"h c #969993",
"i c #7B8875",
"j c #A9AAA8",
"k c #B7B7B7",
"l c #ADADAD",
"m c #A8A8A8",
"n c #A2A2A2",
"o c #666766",
"p c #545D4D",
"q c #8A8D72",
"r c #52573D",
"s c #969276",
"t c #3E4933",
"u c #6D706C",
"v c #9F9F9F",
"w c #7E8C78",
"x c #929492",
"y c #959595",
"z c #818181",
"A c #7C7C7C",
"B c #7F7F7F",
"C c #4E4F4E",
"D c #495143",
"E c #857664",
"F c #4D3C2B",
"G c #936C5E",
"H c #393F2C",
"I c #676A66",
"J c #9A9A9A",
"K c #979B94",
"L c #586B50",
"M c #4F574C",
"N c #535851",
"O c #4F544D",
"P c #4D514B",
"Q c #4B4E49",
"R c #393E37",
"S c #3B432F",
"T c #58634F",
"U c #3D4737",
"V c #545C4F",
"W c #37432F",
"X c #61635F",
"Y c #A9A9A9",
"Z c #FDFDFD",
"` c #979C96",
" . c #6D8462",
".. c #536045",
"+. c #484F39",
"@. c #414833",
"#. c #3E4531",
"$. c #424733",
"%. c #3E4430",
"&. c #535B3F",
"*. c #566445",
"=. c #566243",
"-. c #59634A",
";. c #4E5843",
">. c #696B67",
",. c #F6F6F6",
"'. c #979C95",
"). c #81916F",
"!. c #6C7257",
"~. c #75795F",
"{. c #676D55",
"]. c #5E634A",
"^. c #6B6E53",
"/. c #566143",
"(. c #576746",
"_. c #65734F",
":. c #69785B",
"<. c #71736F",
"[. c #676766",
"}. c #989796",
"|. c #7E7E7E",
"1. c #959A93",
"2. c #778663",
"3. c #484834",
"4. c #53523B",
"5. c #54553D",
"6. c #444431",
"7. c #494733",
"8. c #576143",
"9. c #65724E",
"0. c #62714D",
"a. c #687859",
"b. c #5E605C",
"c. c #4A4A4A",
"d. c #656565",
"e. c #8C8C8C",
"f. c #666666",
"g. c #AEB1AC",
"h. c #637A5A",
"i. c #677352",
"j. c #5E694A",
"k. c #5E684A",
"l. c #5D6748",
"m. c #5B6647",
"n. c #626E4C",
"o. c #677450",
"p. c #64714D",
"q. c #445135",
"r. c #293121",
"s. c #161B12",
"t. c #5C5C5C",
"u. c #DEDEDE",
"v. c #F8F8F8",
"w. c #757B73",
"x. c #A2A175",
"y. c #9C9A70",
"z. c #9C9A6F",
"A. c #9B996E",
"B. c #9A986D",
"C. c #98956B",
"D. c #323A2D",
"E. c #AAAAAA",
"F. c #979797",
"G. c #AFB1AE",
"H. c #6F6E59",
"I. c #6C6B56",
"J. c #6C6A55",
"K. c #6B6A55",
"L. c #6A6954",
"M. c #5B5F58",
"N. c #EEEEEE",
"O. c #D7D7D7",
"P. c #5F5F5F",
"Q. c #EDEDED",
" . + @ # ",
" $ % & * ",
" $ = - ",
"; > $ $ $ $ $ , ' $ $ $ ) ! - ",
"~ { ] ^ / / ( _ : < [ } | 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 ; ",
"h w x y z A B C D E F G H I J ; ",
"K L M N O P Q R S T U V W X Y Z ",
"` ...+.@.#.$.%.&.*.=.-.;.>.f ,.",
"'.).!.~.{.].^./.(._.:.<.% [.}.|.",
"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.w.x.y.z.A.B.B.B.C.D.E.F.= - ",
" G.H.I.I.I.J.K.K.L.M.N.O.P.Q. ",
" "};
/* XPM */
static char * type_cdda_xpm[] = {
"16 16 119 2",
" c None",
". c #7E7E7E",
"+ c #A3A3A3",
"@ c #000000",
"# c #030303",
"$ c #BDCCFF",
"% c #C1CDF5",
"& c #D8DDF1",
"* c #C4CBE9",
"= c #C0C8F0",
"- c #646464",
"; c #A8A8A8",
"> c #DFF2FF",
", c #F9FDFF",
"' c #E0E7FB",
") c #B1C3F7",
"! c #F7FAFF",
"~ c #FFFFFF",
"{ c #DBDEEE",
"] c #727EB7",
"^ c #2A2928",
"/ c #BBBBBB",
"( c #E1E9FF",
"_ c #FEFFFD",
": c #BECDF6",
"< c #E5ECFC",
"[ c #E8EDFA",
"} c #747CAA",
"| c #85847F",
"1 c #B8B8B8",
"2 c #D4E6FF",
"3 c #EBEEFB",
"4 c #DDE5FB",
"5 c #FEFFFF",
"6 c #EFF3FE",
"7 c #91ABF5",
"8 c #B7BFE3",
"9 c #7C7A7B",
"0 c #878787",
"a c #1A1A1A",
"b c #D1E4FF",
"c c #D8E1F8",
"d c #FAFAFE",
"e c #FFFFFE",
"f c #D5E0FB",
"g c #EFF0F9",
"h c #FBFDFF",
"i c #AAC0FA",
"j c #B0C7FF",
"k c #DEF0FF",
"l c #8A8B8F",
"m c #A4A49F",
"n c #585857",
"o c #D1E5FF",
"p c #B9CAF5",
"q c #C7D4F8",
"r c #E4EBFC",
"s c #F1F5FF",
"t c #D4DDFD",
"u c #C1C9E9",
"v c #B2BEE9",
"w c #D7E6FF",
"x c #383428",
"y c #8B8C90",
"z c #D3E4FF",
"A c #ABBEF3",
"B c #BBCAF6",
"C c #CAD8F8",
"D c #CED9FC",
"E c #B5C5FC",
"F c #AFB4D7",
"G c #DDE6FF",
"H c #1D1B14",
"I c #34322B",
"J c #CFDCFF",
"K c #C2D8FF",
"L c #B8C8F4",
"M c #ABBDF4",
"N c #B8C9F6",
"O c #D1DCFB",
"P c #DAE2FE",
"Q c #AFBAE2",
"R c #CACDE3",
"S c #F8FBFF",
"T c #DAE7FF",
"U c #C5D8FF",
"V c #D5E6FF",
"W c #5E6592",
"X c #C4D3FF",
"Y c #9BB1F2",
"Z c #B0C4F5",
"` c #D6DDF5",
" . c #F5F6FA",
".. c #E2EAFC",
"+. c #DCE7FF",
"@. c #515886",
"#. c #C0D9FF",
"$. c #B3C5FA",
"%. c #FDFDFF",
"&. c #FAFCFF",
"*. c #E6EBFD",
"=. c #DBDDEE",
"-. c #CADBFF",
";. c #FFFEFE",
">. c #FEFDFF",
",. c #F9FAFE",
"'. c #C7D4F7",
"). c #FDFDFE",
"!. c #959AC1",
"~. c #C7D7FF",
"{. c #D2DEFC",
"]. c #DCE5FF",
"^. c #AFB3D2",
"/. c #ADC1FF",
"(. c #C7D2FF",
"_. c #DBE0FA",
":. c #D7DFF6",
"<. c #A1AEDC",
"[. c #98A1CC",
" . ",
" + @ # ",
" $ % & * = @ @ - ; ",
" > , ' ) ! ~ ~ { ] ^ / ",
" ( ~ _ : < ~ ~ ~ [ } | 1 ",
" 2 ~ ~ ~ 3 4 ~ 5 6 7 8 9 0 @ a ",
" b c d e e f g h i j k l m n ",
" o p q r s t u v w x @ y ",
" z A B C D E F G H I J ",
" K L M N O P Q R S T U V W ",
" X Y Z 5 e ` .~ e ..+.@. ",
" #.$.S %.~ &.*.~ ~ ~ =. ",
" -.~ ;.>.,.'.).~ ~ !. ",
" ~.~ ~ 5 {.].~ ^. ",
" /.(._.:.<.[. ",
" "};
/* XPM */
static char * type_directory_xpm[] = {
"16 16 83 1",
" c None",
". c #3274DB",
"+ c #3273DB",
"@ c #3373DB",
"# c #3274DC",
"$ c #3170D6",
"% c #F5FBFD",
"& c #F5F9FD",
"* c #306DD2",
"= c #E8F5FD",
"- c #E8F6FD",
"; c #E9F5FD",
"> c #5F7DB1",
", c #316DD1",
"' c #306ED1",
") c #316ED2",
"! c #306DD1",
"~ c #306ACC",
"{ c #DBF0FD",
"] c #DAEEFD",
"^ c #DBEEFD",
"/ c #DAF0FD",
"( c #2F66C6",
"_ c #CBE8FD",
": c #CBE9FD",
"< c #255FD1",
"[ c #2E63C0",
"} c #B9E2FD",
"| c #BCE2FD",
"1 c #B9E1FD",
"2 c #BCE1FD",
"3 c #9EC6EE",
"4 c #FCFCFD",
"5 c #ACD1FD",
"6 c #2D61BD",
"7 c #A9DAFD",
"8 c #A9DBFD",
"9 c #86B9EC",
"0 c #8CBDFD",
"a c #89BEFD",
"b c #89BDFD",
"c c #2C5EB8",
"d c #99D3FD",
"e c #2259CB",
"f c #6BAAFD",
"g c #6BA9FD",
"h c #2259CC",
"i c #2B5AB1",
"j c #88CBFD",
"k c #1F52C5",
"l c #5098FD",
"m c #4F98FD",
"n c #4F97FD",
"o c #1E52C5",
"p c #2A58AE",
"q c #7AC4FD",
"r c #1C49BD",
"s c #3987FD",
"t c #3988FD",
"u c #1B49BD",
"v c #2955A8",
"w c #6DBEFD",
"x c #1840B5",
"y c #287CFD",
"z c #287BFD",
"A c #277BFD",
"B c #183FB5",
"C c #2852A3",
"D c #62B7FD",
"E c #1337AA",
"F c #FDFDFD",
"G c #AEAEC6",
"H c #1337AC",
"I c #28509F",