Commit 19afed7b authored by Clément Stenac's avatar Clément Stenac

Implement new playlist system in wxWidgets interface

parent fa55e4cf
/* 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_directory_xpm[] = {
"32 32 4 1",
" c None",
". c #000000",
"+ c #FFFF00",
"@ c #808000",
" ",
" ",
" ",
" ",
" .......... ",
" .......... ",
" ..++++++................ ",
" ..++++++................ ",
" ..++++++++++++++++++++.. ",
" ..++++++++++++++++++++.. ",
" ..++++++++++++++++++++.. ",
" ..++++++++++++++++++++.. ",
" ..++++...................... ",
" ..++++...................... ",
" ..+++.@@@@@@@@@@@@@@@@@@@@.. ",
" ..+++.@@@@@@@@@@@@@@@@@@@@.. ",
" ..++..@@@@@@@@@@@@@@@@@@@@. ",
" ..++..@@@@@@@@@@@@@@@@@@@@. ",
" ..+.@@@@@@@@@@@@@@@@@@@@.. ",
" ..+.@@@@@@@@@@@@@@@@@@@@.. ",
" ....@@@@@@@@@@@@@@@@@@@@. ",
" ....@@@@@@@@@@@@@@@@@@@@. ",
" ..@@@@@@@@@@@@@@@@@@@@.. ",
" ..@@@@@@@@@@@@@@@@@@@@.. ",
" ...................... ",
" ...................... ",
" ",
" ",
" ",
" ",
" ",
" "};
/* XPM */
static char * type_disc_xpm[] = {
"17 16 154 2",
" c #FFFFFF",
". c #BEB2CA",
"+ c #B8A7C8",
"@ c #B8A6CA",
"# c #AF99C3",
"$ c #B19CC5",
"% c #BEAECD",
"& c #C7BCD1",
"* c #C9C1D3",
"= c #BDADCF",
"- c #D6C9E2",
"; c #D9CDE5",
"> c #D7CBE3",
", c #D5C7E2",
"' c #E1D4EC",
") c #ECE3F4",
"! c #F4F0F8",
"~ c #CFC3DA",
"{ c #CEC7D4",
"] c #C8BED2",
"^ c #CDBFDB",
"/ c #DED4E8",
"( c #DCD1E7",
"_ c #DACEE5",
": c #E4D7EE",
"< c #F4EEF8",
"[ c #FAF9FC",
"} c #F9F8FB",
"| c #E2DAE9",
"1 c #C7C0CF",
"2 c #E5E2E9",
"3 c #D2C5DE",
"4 c #E1D8EB",
"5 c #DFD5E9",
"6 c #D5C8E2",
"7 c #E8DDF1",
"8 c #F8F6FB",
"9 c #F9F8FC",
"0 c #D9CEE3",
"a c #C8C2CF",
"b c #C8BBD6",
"c c #E3D9EB",
"d c #E2D9EB",
"e c #D7CAE3",
"f c #D6C9E3",
"g c #EFE6F5",
"h c #F9F6FB",
"i c #F0E9F6",
"j c #E5D8EF",
"k c #AE9CBF",
"l c #D9D4DE",
"m c #D7CCE3",
"n c #E4DCED",
"o c #D4C6E1",
"p c #C8B7D8",
"q c #C7B6D8",
"r c #D3C5E0",
"s c #F0EBF5",
"t c #F5F0F9",
"u c #EBE0F3",
"v c #E0D2EB",
"w c #D4C5E2",
"x c #AE98C4",
"y c #C7C2CC",
"z c #C8BDD3",
"A c #E3DAEC",
"B c #D8CCE4",
"C c #C6B6D7",
"D c #D2C4DF",
"E c #CFC0DE",
"F c #CFC1DE",
"G c #CBBCDB",
"H c #DACCE7",
"I c #D0C1E0",
"J c #C9B9DA",
"K c #C5B3D6",
"L c #BDAACF",
"M c #ADA2B8",
"N c #C9BED5",
"O c #D2C5E0",
"P c #CBBBDA",
"Q c #BCABCC",
"R c #CCC7D1",
"S c #C9B8D8",
"T c #CABADA",
"U c #C7B7D8",
"V c #BEABD1",
"W c #A697B3",
"X c #C8BCD4",
"Y c #E3DBEC",
"Z c #CCBDD9",
"` c #BDB0CA",
" . c #CEC0DD",
".. c #A495B1",
"+. c #C7BDD2",
"@. c #E2DAEB",
"#. c #E5DCED",
"$. c #E5DDED",
"%. c #E8E1EF",
"&. c #D1C4DF",
"*. c #CCBDDB",
"=. c #CCBCDB",
"-. c #B9A6CD",
";. c #ABA0B5",
">. c #D6D2DB",
",. c #D6CBE2",
"'. c #EAE4F1",
"). c #F2EEF6",
"!. c #F4F1F8",
"~. c #DBD0E6",
"{. c #C8B8D8",
"]. c #CABBDA",
"^. c #CEBFDD",
"/. c #CDBDDC",
"(. c #A28BB9",
"_. c #C9C6CC",
":. c #C5B8D2",
"<. c #F6F4F9",
"[. c #E8E1F0",
"}. c #D2C4E0",
"|. c #A190B1",
"1. c #D8D4DC",
"2. c #D9D0E3",
"3. c #F9F7FB",
"4. c #F5F2F9",
"5. c #C4B3D6",
"6. c #A590B9",
"7. c #CAC8CD",
"8. c #D6D1DB",
"9. c #DED6E7",
"0. c #F8F6FA",
"a. c #FAF8FC",
"b. c #EFEAF4",
"c. c #E0D6EA",
"d. c #C5B4D6",
"e. c #A490B8",
"f. c #BFBAC5",
"g. c #D7D3DB",
"h. c #C9BED4",
"i. c #E7E0EF",
"j. c #DCD2E7",
"k. c #D3C5E1",
"l. c #D0C2DE",
"m. c #B39EC6",
"n. c #A392B4",
"o. c #D4D0D8",
"p. c #C0B5CB",
"q. c #BCAFC9",
"r. c #AD9CBE",
"s. c #A593B6",
"t. c #AFA3BA",
"u. c #CCC9CF",
"v. c #E1E2E1",
"w. c #E6E7E6",
" . + @ # $ % & ",
" * = - ; > , ' ) ! ~ { ",
" ] ^ / ( _ > , : < [ } | 1 ",
" 2 3 4 5 ( _ > 6 7 8 [ [ 9 0 a ",
" b c d 5 ( _ e f g [ [ h i j k ",
"l m n d 5 ( o p q r s t u v w x y ",
"z A n d 5 B C D E F G H I J K L M ",
"N n n d 5 O P Q R S p J T U K V W ",
"X Y n d 5 6 T Z ` .q T T U K V ..",
"+.@.#.Y $.%.&.*.&.T q =.T U K -.;.",
">.,.%.'.).} !.~.{.].^./.T U K (._.",
" :.'.<.[ [ } [., }.E /.T U V |. ",
" 1.2.3.[ [ 4.A , }.E /.T 5.6.7. ",
" 8.9.0.a.b.c., }.E /.d.e.f. ",
" g.h.@.i.j.k.l.G m.n._. ",
" o.p.q.r.s.t.u.v.w.w.w.w."};
/* XPM */
static char * type_net_xpm[] = {
"16 16 209 2",
" c #E6E7E6",
". c #E3E4E5",
"+ c #DCDAE2",
"@ c #D2CCDE",
"# c #D0C8E2",
"$ c #D2CAE6",
"% c #D4CDE6",
"& c #C8C2D8",
"* c #E5E6E5",
"= c #E5E5E6",
"- c #DDDAE5",
"; c #D7D1E9",
"> c #D2CBED",
", c #D2CBEF",
"' c #D6D2F1",
") c #C4CBED",
"! c #93A8ED",
"~ c #6578DD",
"{ c #5A69D3",
"] c #CAC4DA",
"^ c #DCDDDC",
"/ c #DFDDE5",
"( c #D5CEF8",
"_ c #BABCEB",
": c #8AACEE",
"< c #4686EA",
"[ c #0B5AF9",
"} c #0041EF",
"| c #002FDB",
"1 c #0022C9",
"2 c #0B1CB8",
"3 c #B5B0D9",
"4 c #D6D7D6",
"5 c #CEC6F5",
"6 c #93A8E4",
"7 c #3987FD",
"8 c #0865FD",
"9 c #004EFC",
"0 c #003EEC",
"a c #0030D9",
"b c #0020C8",
"c c #0615AF",
"d c #9C9BD6",
"e c #CFCFD0",
"f c #E3E2E5",
"g c #CFC8EC",
"h c #8EAAE4",
"i c #156EFD",
"j c #0157FE",
"k c #0049F7",
"l c #003DE7",
"m c #002CD5",
"n c #001ABF",
"o c #0209A3",
"p c #8A8DD1",
"q c #C5C2CB",
"r c #CEC7E6",
"s c #9DA8F2",
"t c #0C5DF9",
"u c #004EFA",
"v c #0042EC",
"w c #0034DE",
"x c #001EC8",
"y c #000CB1",
"z c #00049C",
"A c #7B82BA",
"B c #BFBBC9",
"C c #D3CDE1",
"D c #B9BAE3",
"E c #1F5CE8",
"F c #002EDE",
"G c #001DCB",
"H c #0010B9",
"I c #0008A8",
"J c #020096",
"K c #5852AF",
"L c #C3BFCD",
"M c #DFE4E9",
"N c #BECDEE",
"O c #A7B9F3",
"P c #9DB1F1",
"Q c #ABB3E4",
"R c #C0B6EB",
"S c #355EE2",
"T c #0030DC",
"U c #001FCB",
"V c #0013BD",
"W c #000BAC",
"X c #00029D",
"Y c #070885",
"Z c #3A7162",
"` c #C9C4D2",
" . c #E1E5EA",
".. c #A8C1FA",
"+. c #CCE4FD",
"@. c #DBEEFD",
"#. c #AAC9FD",
"$. c #7797FC",
"%. c #7885EC",
"&. c #5F78BC",
"*. c #0020CA",
"=. c #0015BC",
"-. c #000AB2",
";. c #0101A3",
">. c #0D0E97",
",. c #6472A6",
"'. c #CAD9D4",
"). c #B6B1C3",
"!. c #99AFF3",
"~. c #BFD3FD",
"{. c #E2EDFD",
"]. c #CEE4FD",
"^. c #A5C2FD",
"/. c #7090FD",
"(. c #4963F4",
"_. c #5561C5",
":. c #0011B7",
"<. c #0008AF",
"[. c #2124A9",
"}. c #7C85C1",
"|. c #C4C8DA",
"1. c #BCB4CF",
"2. c #B0ABBA",
"3. c #D0D1D0",
"4. c #657FF1",
"5. c #B4CFFD",
"6. c #C7DAFD",
"7. c #96B5FD",
"8. c #7D9EFD",
"9. c #5B7CFD",
"0. c #3445E8",
"a. c #575BCD",
"b. c #5762AD",
"c. c #9393D3",
"d. c #C4BEE7",
"e. c #ADA0D3",
"f. c #AEA7C1",
"g. c #CECED1",
"h. c #3D48E4",
"i. c #4E6BF0",
"j. c #BBD0FC",
"k. c #BDD2FD",
"l. c #5D7CFB",
"m. c #4E66F0",
"n. c #2729D9",
"o. c #5F64D0",
"p. c #B2A9D6",
"q. c #D4CDEE",
"r. c #D8D3FB",
"s. c #A596D4",
"t. c #B2AAE6",
"u. c #B8AEEC",
"v. c #C5BDE8",
"w. c #D9D7E0",
"x. c #4C4FDA",
"y. c #6A74EA",
"z. c #C0D3FB",
"A. c #CFDFFC",
"B. c #6872E8",
"C. c #7681EC",
"D. c #3130DA",
"E. c #9397D2",
"F. c #BAB0D4",
"G. c #DBD5F1",
"H. c #B3A6DC",
"I. c #A294D1",
"J. c #BAB1ED",
"K. c #B7ACED",
"L. c #9D8FCA",
"M. c #B5B2BF",
"N. c #B3BAE2",
"O. c #8D99F1",
"P. c #D5E4FD",
"Q. c #EEF3FD",
"R. c #DEEAFD",
"S. c #B6C9FA",
"T. c #8E9FE6",
"U. c #C7C8D6",
"V. c #E3E0F4",
"W. c #C4BAE3",
"X. c #D1CAF4",
"Y. c #BDB2EA",
"Z. c #A294C9",
"`. c #A6A0B6",
" + c #CDCECD",
".+ c #E2E3E2",
"++ c #E4E5E4",
"@+ c #AFB9D9",
"#+ c #727DE0",
"$+ c #6769E4",
"%+ c #7982E8",
"&+ c #8D9BCE",
"*+ c #A2A0BA",
"=+ c #ECEDF0",
"-+ c #EFEFFD",
";+ c #CBC4E9",
">+ c #A79CC5",
",+ c #ACA7B9",
"'+ c #CECFCE",
")+ c #E3E4E3",
"!+ c #CCCDCC",
"~+ c #B1B2B1",
"{+ c #AEAEAE",
"]+ c #B9BAB9",
"^+ c #C9C6D0",
"/+ c #C2B8DA",
"(+ c #ADA3C6",
"_+ c #B4B1BD",
":+ c #D3D4D3",
" . + @ # $ % & * ",
" = - ; > , ' ) ! ~ { ] ^ ",
" / ( _ : < [ } | 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 ",
" C D E v F G H I J K L ",
" M N O P Q R S T U V W X Y Z ` ",
" ...+.@.#.$.%.&.*.=.-.;.>.,.'.).",
"!.~.{.].^./.(._.:.<.[.}.|.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.C.D.E.F.G.H.I.J.K.L.M.",
"N.O.P.Q.R.S.T.U.V.W.X.Y.Z.`. +.+",
"++@+#+$+%+&+*+=+-+;+>+,+'+.+ ",
" )+!+~+{+]+^+/+(+_+:+++ "};
/* XPM */
static char * type_playlist_xpm[] = {
"16 16 126 2",
" c None",
". c #959695",
"+ c #000000",
"@ c #0E0E0E",
"# c #282828",
"$ c #696969",
"% c #DADBDA",
"& c #E4E5E4",
"* c #E6E7E6",
"= c #D3D3D3",
"- c #FFFFFF",
"; c #F9F9F9",
"> c #F9F9F8",
", c #E7E7E7",
"' c #E4E4E4",
") c #CDCDCD",
"! c #252525",
"~ c #C8C9C8",
"{ c #E3E4E3",
"] c #F6F6F6",
"^ c #DADADA",
"/ c #9F9F9F",
"( c #FEFEFE",
"_ c #FCFCFB",
": c #FBFBFB",
"< c #F2F2F2",
"[ c #AFAFAE",
"} c #E9E9E9",
"| c #B3B3B3",
"1 c #383838",
"2 c #CECFCE",
"3 c #9E9E9E",
"4 c #FDFDFD",
"5 c #FAFAF9",
"6 c #F3F3F3",
"7 c #A9A9A8",
"8 c #F0F0F0",
"9 c #F4F4F4",
"0 c #ABABAB",
"a c #414141",
"b c #9D9D9C",
"c c #9A9A9A",
"d c #9A9A99",
"e c #9B9B9A",
"f c #9D9C9C",
"g c #0A0A0A",
"h c #9B9B9B",
"i c #F8F8F7",
"j c #F7F6F5",
"k c #F6F6F4",
"l c #F4F3F2",
"m c #F1F0EF",
"n c #F0EFED",
"o c #E5E4E2",
"p c #848381",
"q c #6A6763",
"r c #F8F7F6",
"s c #989897",
"t c #989796",
"u c #EBEAE8",
"v c #E1DFDC",
"w c #B6B6B4",
"x c #72706C",
"y c #B1B0AF",
"z c #818180",
"A c #AFAFAD",
"B c #EFEFED",
"C c #EFEEEC",
"D c #ECEBE9",
"E c #E8E7E5",
"F c #A4A4A1",
"G c #C4C3C0",
"H c #817D74",
"I c #7F7F7E",
"J c #7F7E7D",
"K c #EEEDEB",
"L c #EDECEA",
"M c #E8E7E4",
"N c #E7E6E3",
"O c #8B867D",
"P c #7D7D7C",
"Q c #ACABA9",
"R c #91908E",
"S c #8E8E8C",
"T c #E6E4E1",
"U c #A2A19F",
"V c #646462",
"W c #A49E93",
"X c #7C7B7A",
"Y c #7B7B7A",
"Z c #E7E5E2",
"` c #E4E3DF",
" . c #E3E2DE",
".. c #DEDDD9",
"+. c #DDDCD8",
"@. c #E0DFDB",
"#. c #A19C90",
"$. c #E6E5E2",
"%. c #E5E4E1",
"&. c #8E8E8B",
"*. c #747371",
"=. c #0B0B0B",
"-. c #DCDBD7",
";. c #DBD9D5",
">. c #A19B90",
",. c #E3E2DF",
"'. c #E4E2DF",
"). c #DCDAD6",
"!. c #D9D7D3",
"~. c #E1E0DC",
"{. c #E2E1DD",
"]. c #71716F",
"^. c #0B0B0A",
"/. c #706F6D",
"(. c #D8D6D1",
"_. c #9F998D",
":. c #999891",
"<. c #A39D92",
"[. c #A39D91",
"}. c #A29C90",
"|. c #A19B8F",
"1. c #9D978C",
"2. c #9B968A",
"3. c #676359",
"4. c #919191",
"5. c #757575",
". + + + + + + + + + @ # $ % & * ",
"+ = - - - - - ; > > , ' ) ! ~ { ",
"+ ] ^ / - ( _ : > < [ } - | 1 2 ",
"+ - / 3 4 _ 5 > > 6 7 8 - 9 0 a ",
"+ - 4 b : 5 c d e f } + + + + g ",
"+ - : h > i j k l m n n o p q + ",
"+ - > i r j s t t t l u v w x + ",
"+ - y z A B n C D E + + F G H + ",
"+ - I B J K L D M N + + + v O + ",
"+ - L P Q D R R S T + U V v W + ",
"+ - X X Y M N Z ` .+ ..+.@.#.+ ",
"+ - $.$.$.%.&.*.=.=.+ -.;.+.>.+ ",
"+ - ,. .'.` .+ + + + ).!.-.>.+ ",
"+ - v ~.@.{.~.].=.^./.!.(.!._.+ ",
"+ :.W <.[.<.}.|.>._._.1.1.2.3.+ ",
"4.+ + + + + + + + + + + + + + 5."};
/* XPM */
static char *type_unknown_xpm[] = {
/* width height num_colors chars_per_pixel */
" 32 32 2 1",
/* colors */
". c #000000",
"# c #ffffff",
/* pixels */
"################################",
"################################",
"####................############",
"####................############",
"####..############....##########",
"####..############....##########",
"####..##..##..####..##..########",
"####..##..##..####..##..########",
"####..############........######",
"####..############........######",
"####..##..##..##########..######",
"####..##..##..##########..######",
"####..##################..######",
"###...##################..######",
"####..##..##..##..##..##..######",
"####..##..##..##..##..##..######",
"####..##################..######",
"####..##################..######",
"####..##..##..##..##..##..######",
"####..##..##..##..##..##..######",
"####..##################..######",
"####..##################..######",
"####..##..##..##..##..##..######",
"####..##..##..##..##..##..######",
"####..##################..######",
"####..##################..######",
"####......................######",
"####......................######",
"################################",
"################################",
"################################",
"################################"
};
......@@ -189,7 +189,7 @@ void DialogsProvider::OnIdle( wxIdleEvent& WXUNUSED(event) )
{
/* Update the log window */
if( p_messages_dialog )
p_messages_dialog->UpdateLog();
// p_messages_dialog->UpdateLog();
/* Update the playlist */
if( p_playlist_dialog )
......
......@@ -147,12 +147,12 @@ struct filter {
static const struct filter vfilters[] =
{
{ "clone", "Image clone", "Creates several clones of the image" },
{ "distort", "Distortion", "Adds distorsion effects" },
{ "invert", "Image inversion" , "Inverts the image colors" },
{ "crop", "Image cropping", "Crops the image" },
{ "motionblur", "Blurring", "Creates a motion blurring on the image" },
{ "transform", "Transformation", "Rotates or flips the image" },
{ "clone", N_("Image clone"), N_("Creates several clones of the image") },
{ "distort", N_("Distortion"), N_("Adds distorsion effects") },
{ "invert", N_("Image inversion") , N_("Inverts the image colors") },
{ "crop", N_("Image cropping"), N_("Crops the image") },
{ "motionblur", N_("Blurring"), N_("Creates a motion blurring on the image") },
{ "transform", N_("Transformation"), N_("Rotates or flips the image") },
{ NULL, NULL, NULL } /* Do not remove this line */
};
......
......@@ -53,15 +53,12 @@ enum
Name_Event,
Author_Event,
Enabled_Event,
New_Event,
};
BEGIN_EVENT_TABLE(ItemInfoDialog, wxDialog)
/* Button events */
EVT_BUTTON(wxID_OK, ItemInfoDialog::OnOk)
EVT_BUTTON(wxID_CANCEL, ItemInfoDialog::OnCancel)
/* Events generated by the panels */
EVT_BUTTON( New_Event, ItemInfoDialog::OnNewGroup)
END_EVENT_TABLE()
......@@ -87,9 +84,6 @@ ItemInfoDialog::ItemInfoDialog( intf_thread_t *_p_intf,
/* Create the standard info panel */
wxPanel *info_panel = InfoPanel( panel );
/* Create the group panel */
wxPanel *group_panel = GroupPanel( panel );
/* Separation */
wxStaticLine *static_line = new wxStaticLine( panel, wxID_OK );
......@@ -107,7 +101,6 @@ ItemInfoDialog::ItemInfoDialog( intf_thread_t *_p_intf,
wxBoxSizer *main_sizer = new wxBoxSizer( wxVERTICAL );
wxBoxSizer *panel_sizer = new wxBoxSizer( wxVERTICAL );
panel_sizer->Add( info_panel, 0, wxEXPAND | wxALL, 5 );
panel_sizer->Add( group_panel, 0, wxEXPAND | wxALL, 5 );
panel_sizer->Add( static_line, 0, wxEXPAND | wxALL, 5 );
panel_sizer->Add( button_sizer, 0, wxALIGN_LEFT | wxALIGN_BOTTOM |
wxALL, 5 );
......@@ -195,76 +188,6 @@ wxPanel *ItemInfoDialog::InfoPanel( wxWindow* parent )
return info_panel;
}
wxPanel *ItemInfoDialog::GroupPanel( wxWindow* parent )
{
wxPanel *panel = new wxPanel( parent, -1, wxDefaultPosition,
wxDefaultSize );
wxStaticBox *panel_box = new wxStaticBox( panel, -1,
wxU(_("Group Info")) );
wxStaticBoxSizer *panel_sizer = new wxStaticBoxSizer( panel_box,
wxVERTICAL);
wxBoxSizer *subpanel_sizer;
group_subpanel = new wxPanel( panel, -1 );
subpanel_sizer = new wxBoxSizer( wxVERTICAL) ;
enabled_checkbox = new wxCheckBox( group_subpanel,
-1, wxU(_("Item Enabled")) );
enabled_checkbox->SetValue( p_item->b_enabled);
wxStaticText *group_label = new wxStaticText( group_subpanel,
-1, wxU(_("Group")) );
playlist_t *p_playlist =
(playlist_t *)vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
FIND_ANYWHERE );
if( p_playlist == NULL )
{
return NULL;
}
group_combo = new wxComboBox( group_subpanel, -1,
wxT(""),wxDefaultPosition, wxDefaultSize,
0, NULL, wxCB_READONLY );
wxButton *newgroup_button = new wxButton( group_subpanel, New_Event,
wxU(_("New Group")));
for( int i=0; i< p_playlist->i_groups ; i++)
{
group_combo->Append( wxU( p_playlist->pp_groups[i]->psz_name ) );
if( p_playlist->pp_groups[i]->i_id == p_item->i_group )
{
group_combo->SetSelection( i );
group_combo->SetValue( wxU( p_playlist->pp_groups[i]->psz_name ) );
}
}
vlc_object_release ( p_playlist );
subpanel_sizer->Add( enabled_checkbox, 0, wxALIGN_RIGHT|
wxALIGN_CENTER_VERTICAL );
subpanel_sizer->Add( group_label, 0, wxALIGN_LEFT |
wxALIGN_CENTER_VERTICAL );
wxBoxSizer *group_sizer = new wxBoxSizer( wxHORIZONTAL);
group_sizer->Add(group_combo, 0, wxALIGN_LEFT|wxRIGHT, 5);
group_sizer->Add( newgroup_button, 0, wxALIGN_RIGHT|wxLEFT, 5);
group_sizer->Layout();
subpanel_sizer->Add( group_sizer, 0, wxALIGN_RIGHT );
group_subpanel->SetSizerAndFit( subpanel_sizer );
/* Stuff everything into the main panel */
panel_sizer->Add( group_subpanel, 0,
wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL | wxALL, 5 );
panel->SetSizerAndFit( panel_sizer );
/* Update panel */
return panel;
}
void ItemInfoDialog::UpdateInfo()
{
if( !info_root )
......@@ -312,16 +235,6 @@ void ItemInfoDialog::OnOk( wxCommandEvent& WXUNUSED(event) )
else if( b_old_enabled == VLC_TRUE && !enabled_checkbox->IsChecked() )
p_playlist->i_enabled --;
for (int i=0 ; i< p_playlist->i_groups ; i++)
{
if( !strcasecmp( p_playlist->pp_groups[i]->psz_name,
group_combo->GetValue().mb_str() ))
{
p_item->i_group = p_playlist->pp_groups[i]->i_id;
break;
}
}
vlc_object_release( p_playlist );
}
......@@ -334,19 +247,3 @@ void ItemInfoDialog::OnCancel( wxCommandEvent& WXUNUSED(event) )
{
EndModal( wxID_CANCEL );
}
void ItemInfoDialog::OnNewGroup( wxCommandEvent& WXUNUSED(event) )
{
NewGroup *p_newgroup = NULL;
p_newgroup = new NewGroup( p_intf, this );
if( p_newgroup)
{
if( p_newgroup->ShowModal() == wxID_OK && p_newgroup->psz_name)
{
group_combo->Append( wxU( p_newgroup->psz_name ) );
}
delete( p_newgroup );
}
}
......@@ -1050,8 +1050,7 @@ void OpenDialog::OnOk( wxCommandEvent& WXUNUSED(event) )
if( b_start )
{
int i_pos = playlist_GetPositionById( p_playlist , i_id );
playlist_Command( p_playlist, PLAYLIST_GOTO, i_pos );
playlist_Control( p_playlist, PLAYLIST_ITEMPLAY , p_item );
}
}
......
......@@ -5,6 +5,7 @@
* $Id$
*
* Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Clment Stenac <zorglub@videolan.org>
*
* This program is free software; you can redistribute it and/OR MODIFy
* it under the terms of the GNU General Public License as published by
......@@ -33,6 +34,14 @@
#include "bitmaps/repeat.xpm"
#include "bitmaps/loop.xpm"
#include "bitmaps/type_unknown.xpm"
#include "bitmaps/type_net.xpm"
#include "bitmaps/type_card.xpm"
#include "bitmaps/type_disc.xpm"
#include "bitmaps/type_directory.xpm"
#include "bitmaps/type_playlist.xpm"
#include <wx/dynarray.h>
#define HELP_SHUFFLE N_( "Shuffle" )
#define HELP_LOOP N_( "Loop" )
......@@ -64,8 +73,6 @@ enum
RSortTitle_Event,
SortAuthor_Event,
RSortAuthor_Event,
SortGroup_Event,
RSortGroup_Event,
Randomize_Event,
EnableSelection_Event,
......@@ -78,9 +85,6 @@ enum
Repeat_Event,
SelectAll_Event,
EnableGroup_Event,
DisableGroup_Event,
Up_Event,
Down_Event,
Infos_Event,
......@@ -94,12 +98,14 @@ enum
Search_Event,
/* controls */
ListView_Event,
TreeCtrl_Event,
Browse_Event, /* For export playlist */
/* custom events */
UpdateItem_Event
UpdateItem_Event,
FirstView_Event = wxID_HIGHEST + 1000,
};
DEFINE_LOCAL_EVENT_TYPE( wxEVT_PLAYLIST );
......@@ -118,8 +124,6 @@ BEGIN_EVENT_TABLE(Playlist, wxFrame)
EVT_MENU(RSortTitle_Event, Playlist::OnSort)
EVT_MENU(SortAuthor_Event, Playlist::OnSort)
EVT_MENU(RSortAuthor_Event, Playlist::OnSort)
EVT_MENU(SortGroup_Event, Playlist::OnSort)
EVT_MENU(RSortGroup_Event, Playlist::OnSort)
EVT_MENU(Randomize_Event, Playlist::OnSort)
......@@ -130,25 +134,23 @@ BEGIN_EVENT_TABLE(Playlist, wxFrame)
EVT_MENU(SelectAll_Event, Playlist::OnSelectAll)
EVT_MENU(Infos_Event, Playlist::OnInfos)
EVT_MENU_OPEN( Playlist::OnMenuOpen )
EVT_MENU( -1, Playlist::OnMenuEvent )
EVT_TOOL(Random_Event, Playlist::OnRandom)
EVT_TOOL(Repeat_Event, Playlist::OnRepeat)
EVT_TOOL(Loop_Event, Playlist::OnLoop)
EVT_MENU(EnableGroup_Event, Playlist::OnEnDis)
EVT_MENU(DisableGroup_Event, Playlist::OnEnDis)
/* Listview events */
EVT_LIST_ITEM_ACTIVATED(ListView_Event, Playlist::OnActivateItem)
EVT_LIST_COL_CLICK(ListView_Event, Playlist::OnColSelect)
EVT_LIST_KEY_DOWN(ListView_Event, Playlist::OnKeyDown)
EVT_LIST_ITEM_RIGHT_CLICK(ListView_Event, Playlist::OnPopup)
/* Popup events */
EVT_MENU( PopupPlay_Event, Playlist::OnPopupPlay)
EVT_MENU( PopupDel_Event, Playlist::OnPopupDel)
EVT_MENU( PopupEna_Event, Playlist::OnPopupEna)
EVT_MENU( PopupInfo_Event, Playlist::OnPopupInfo)
/* Tree control events */
EVT_TREE_ITEM_ACTIVATED( TreeCtrl_Event, Playlist::OnActivateItem )
EVT_CONTEXT_MENU( Playlist::OnPopup )
/* Button events */
EVT_BUTTON( Search_Event, Playlist::OnSearch)
......@@ -168,20 +170,27 @@ BEGIN_EVENT_TABLE(Playlist, wxFrame)
EVT_CLOSE(Playlist::OnClose)
END_EVENT_TABLE()
/* Event Table for the Newgroup class */
BEGIN_EVENT_TABLE(NewGroup, wxDialog)
EVT_BUTTON( wxID_OK, NewGroup::OnOk)
EVT_BUTTON( wxID_CANCEL, NewGroup::OnCancel)
END_EVENT_TABLE()
/*****************************************************************************
* PlaylistItem class
****************************************************************************/
class PlaylistItem : public wxTreeItemData
{
public:
PlaylistItem( playlist_item_t *_p_item ) : wxTreeItemData()
{
p_item = _p_item;
}
protected:
playlist_item_t *p_item;
friend class Playlist;
};
/*****************************************************************************
* Constructor.
*****************************************************************************/
Playlist::Playlist( intf_thread_t *_p_intf, wxWindow *p_parent ):
wxFrame( p_parent, -1, wxU(_("Playlist")), wxDefaultPosition,
wxSize(345,400), wxDEFAULT_FRAME_STYLE ), listview(NULL)
wxSize(345,400), wxDEFAULT_FRAME_STYLE )
{
vlc_value_t val;
......@@ -192,6 +201,10 @@ Playlist::Playlist( intf_thread_t *_p_intf, wxWindow *p_parent ):
b_need_update = VLC_FALSE;
SetIcon( *p_intf->p_sys->p_icon );
p_view_menu = NULL;
i_current_view = VIEW_SIMPLE;
i_title_sorted = 0;
i_author_sorted = 0;
i_group_sorted = 0;
......@@ -219,9 +232,6 @@ Playlist::Playlist( intf_thread_t *_p_intf, wxWindow *p_parent ):
sort_menu->Append( SortAuthor_Event, wxU(_("Sort by &author")) );
sort_menu->Append( RSortAuthor_Event, wxU(_("Reverse sort by author")) );
sort_menu->AppendSeparator();
sort_menu->Append( SortGroup_Event, wxU(_("Sort by &group")) );
sort_menu->Append( RSortGroup_Event, wxU(_("Reverse sort by group")) );
sort_menu->AppendSeparator();
sort_menu->Append( Randomize_Event, wxU(_("&Shuffle Playlist")) );
/* Create our "Selection" menu */
......@@ -233,18 +243,15 @@ Playlist::Playlist( intf_thread_t *_p_intf, wxWindow *p_parent ):
selection_menu->Append( DeleteSelection_Event, wxU(_("D&elete")) );
selection_menu->Append( SelectAll_Event, wxU(_("&Select All")) );
/* Create our "Group" menu */
wxMenu *group_menu = new wxMenu;
group_menu->Append( EnableGroup_Event, wxU(_("&Enable all group items")) );
group_menu->Append( DisableGroup_Event,
wxU(_("&Disable all group items")) );
/* Create our "View" menu */
ViewMenu();
/* Append the freshly created menus to the menu bar */
wxMenuBar *menubar = new wxMenuBar( wxMB_DOCKABLE );
menubar->Append( manage_menu, wxU(_("&Manage")) );
menubar->Append( sort_menu, wxU(_("S&ort")) );
menubar->Append( selection_menu, wxU(_("&Selection")) );
menubar->Append( group_menu, wxU(_("&Groups")) );
menubar->Append( p_view_menu, wxU(_("&View items") ) );
/* Attach the menu bar to the frame */
SetMenuBar( menubar );
......@@ -302,27 +309,42 @@ Playlist::Playlist( intf_thread_t *_p_intf, wxWindow *p_parent ):
search_button->SetDefault();
toolbar->Realize();
/* Create the listview */
/* FIXME: the given size is arbitrary, and prevents us from resizing
* the window to smaller dimensions. But the sizers don't seem to adjust
* themselves to the size of a listview, and with a wxDefaultSize the
* playlist window is ridiculously small */
listview = new wxListView( playlist_panel, ListView_Event,
/* Create the tree */
treectrl = new wxTreeCtrl( playlist_panel, TreeCtrl_Event,
wxDefaultPosition, wxDefaultSize,
wxLC_REPORT | wxSUNKEN_BORDER );
wxTR_HIDE_ROOT | wxTR_LINES_AT_ROOT|
wxTR_NO_LINES |
wxTR_HAS_BUTTONS | wxTR_TWIST_BUTTONS |
wxTR_MULTIPLE | wxTR_EXTENDED );
/* Create image list */
wxImageList *p_images = new wxImageList( 16 , 16, TRUE);
wxIcon icons[10];
icons[ ITEM_TYPE_UNKNOWN ] = wxIcon( type_unknown_xpm );
icons[ ITEM_TYPE_DISC ] = wxIcon( type_disc_xpm );
icons[ ITEM_TYPE_DIRECTORY ] = wxIcon( type_directory_xpm );
icons[ ITEM_TYPE_PLAYLIST ] = wxIcon( type_playlist_xpm );
icons[ ITEM_TYPE_NET ] = wxIcon( type_net_xpm );
icons[ ITEM_TYPE_CARD ] = wxIcon( type_card_xpm );
for( int i = 0; i< WXSIZEOF( icons ) ; i++ )
{
p_images->Add( wxBitmap( wxBitmap(icons[i]).ConvertToImage().Rescale(16,16) ) );
}
treectrl->AssignImageList( p_images );
treectrl->AddRoot( wxU(_("root" )), -1, -1, NULL );
/* Reduce font size */
wxFont font= listview->GetFont();
wxFont font= treectrl->GetFont();
font.SetPointSize(8);
listview->SetFont( font );
listview->InsertColumn( 0, wxU(_("Name")) );
listview->SetColumnWidth( 0, 250 );
listview->InsertColumn( 1, wxU(_("Duration")) );
listview->SetColumnWidth( 1, 75 );
listview->Layout();
treectrl->SetFont( font );
/* Create the Up-Down buttons */
#if 0
wxButton *up_button =
new wxButton( playlist_panel, Up_Event, wxU(_("Up") ) );
wxButton *down_button =
......@@ -330,16 +352,17 @@ Playlist::Playlist( intf_thread_t *_p_intf, wxWindow *p_parent ):
wxBoxSizer *updown_sizer = new wxBoxSizer( wxHORIZONTAL );
updown_sizer->Layout();
/* The top and bottom sizers */
wxBoxSizer *bottom_sizer = new wxBoxSizer( wxHORIZONTAL );
bottom_sizer->Add( up_button, 0, wxALIGN_LEFT | wxRIGHT, 3);
bottom_sizer->Add( down_button, 0, wxALIGN_LEFT | wxLEFT, 3);
bottom_sizer->Layout();
#endif
wxBoxSizer *panel_sizer = new wxBoxSizer( wxVERTICAL );
panel_sizer->Add( listview, 1, wxEXPAND | wxALL, 5 );
panel_sizer->Add( treectrl, 1, wxEXPAND | wxALL, 5 );
#if 0
panel_sizer->Add( bottom_sizer, 0, wxALL, 5);
#endif
panel_sizer->Layout();
playlist_panel->SetSizerAndFit( panel_sizer );
......@@ -376,10 +399,12 @@ Playlist::Playlist( intf_thread_t *_p_intf, wxWindow *p_parent ):
void Playlist::OnSize( wxSizeEvent& event)
{
#if 0
wxSize size = GetClientSize();
if( listview )
listview->SetColumnWidth( 0, size.x - listview->GetColumnWidth(1)
- 15 /* margins */ );
- 15 /* margins */ );
#endif
event.Skip();
}
......@@ -402,9 +427,140 @@ Playlist::~Playlist()
/**********************************************************************
* Update one playlist item
**********************************************************************/
void Playlist::UpdateNode( playlist_t *p_playlist, playlist_item_t *p_node,
wxTreeItemId node )
{
long cookie;
wxTreeItemId child;
for( int i = 0; i< p_node->i_children ; i++ )
{
if( i == 0 )
{
child = treectrl->GetFirstChild( node, cookie);
}
else
{
child = treectrl->GetNextChild( node, cookie );
}
if( !child.IsOk() )
{
/* Not enough children */
CreateNode( p_playlist, p_node->pp_children[i], node );
/* Keep the tree pointer up to date */
child = treectrl->GetNextChild( node, cookie );
}
else
{
}
}
}
/* Creates the node p_node as last child of parent */
void Playlist::CreateNode( playlist_t *p_playlist, playlist_item_t *p_node,
wxTreeItemId parent )
{
long cookie;
wxTreeItemId node = treectrl->AppendItem( parent, p_node->input.psz_name,
-1,-1,
new PlaylistItem( p_node ) );
treectrl->SetItemImage( node, p_node->input.i_type );
for( int i = 0; i< p_node->i_children ; i++ )
{
/* Append the item */
if( p_node->pp_children[i]->i_children == -1 )
{
wxTreeItemId item = treectrl->AppendItem( node,
p_node->pp_children[i]->input.psz_name,
-1,-1,
new PlaylistItem( p_node->pp_children[i]) );
treectrl->SetItemImage( item,
p_node->pp_children[i]->input.i_type);
}
else
{
CreateNode( p_playlist, p_node->pp_children[i],
node );
}
}
}
wxTreeItemId Playlist::FindItem( wxTreeItemId root, playlist_item_t *p_item )
{
long cookie;
PlaylistItem *p_wxcurrent;
wxTreeItemId search;
wxTreeItemId item = treectrl->GetFirstChild( root, cookie );
wxTreeItemId child;
while( item.IsOk() )
{
p_wxcurrent = (PlaylistItem *)treectrl->GetItemData( item );
if( p_wxcurrent->p_item == p_item )
{
return item;
}
if( treectrl->ItemHasChildren( item ) )
{
wxTreeItemId search = FindItem( item, p_item );
if( search.IsOk() )
{
return search;
}
}
item = treectrl->GetNextChild( root, cookie);
}
/* Not found */
wxTreeItemId dummy;
return dummy;
}
/*wxTreeItemId Playlist::FindItemByName( wxTreeItemId root, wxString search_string, wxTreeItemId current )
{
long cookie;
PlaylistItem *p_wxcurrent;
wxTreeItemId search;
wxTreeItemId item = treectrl->GetFirstChild( root, cookie );
wxTreeItemId child;
while( item.IsOk() )
{
if( treectrl->GetItemText( item).Lower().Contains(
search_string.Lower() ) )
{
return item;
if( treectrl->ItemHasChildren( item ) )
{
wxTreeItemId search = FindItem( item, p_item );
if( search.IsOk() )
{
return search;
}
}
item = treectrl->GetNextChild( root, cookie);
}
*/ /* Not found */
/*wxTreeItemId dummy;
return dummy;
}
*/
void Playlist::SetCurrentItem( wxTreeItemId item )
{
if( item.IsOk() )
{
treectrl->SetItemBold( item, true );
treectrl->EnsureVisible( item );
}
}
void Playlist::UpdateItem( int i )
{
if( i < 0 ) return; /* Sanity check */
playlist_item_t *p_item;
playlist_t *p_playlist =
(playlist_t *)vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
......@@ -415,36 +571,64 @@ void Playlist::UpdateItem( int i )
return;
}
playlist_item_t *p_item = playlist_ItemGetByPos( p_playlist, i );
p_item = playlist_ItemGetById( p_playlist, i );
wxTreeItemId item = FindItem( treectrl->GetRootItem(), p_item);
UpdateTreeItem( p_playlist, item );
vlc_object_release(p_playlist);
}
void Playlist::UpdateTreeItem( playlist_t *p_playlist ,wxTreeItemId item )
{
playlist_item_t *p_item;
if( !item.IsOk() )
{
return;
}
p_item = ((PlaylistItem *)treectrl->GetItemData( item ))->p_item;
if( !p_item )
{
vlc_object_release(p_playlist);
return;
}
char *psz_author = playlist_ItemGetInfo( p_item, _("General"), _("Author"));
wxString msg;
char *psz_author = playlist_ItemGetInfo( p_item, _("Meta-information"),
_("Artist"));
char psz_duration[MSTRTIME_MAX_SIZE];
mtime_t dur = p_item->input.i_duration;
if( dur != -1 )
secstotimestr( psz_duration, dur/1000000 );
else
memcpy( psz_duration, "-:--:--", sizeof("-:--:--") );
if( !strcmp( psz_author, "" ) )
{
listview->SetItem( i, 0, wxL2U(p_item->input.psz_name) );
msg.Printf( wxString( wxL2U( p_item->input.psz_name ) ) + wxU( " ( ") +
wxString(wxL2U(psz_duration ) ) + wxU( ")") );
}
else
{
wxString msg;
msg.Printf( wxString(wxU( psz_author )) + wxT(" - ") +
wxString(wxL2U(p_item->input.psz_name)) );
listview->SetItem( i, 0, msg );
wxString(wxL2U(p_item->input.psz_name)) + wxU( " ( ") +
wxString(wxL2U(psz_duration ) ) + wxU( ")") );
}
treectrl->SetItemText( item , msg );
if( p_playlist->status.p_item == p_item )
{
SetCurrentItem( item );
}
else
{
treectrl->SetItemBold( item, false );
}
#if 0
listview->SetItem( i, 0, wxL2U(p_item->input.psz_name) );
listview->SetItem( i, 1, wxU( playlist_ItemGetInfo( p_item,
_("General"), _("Author") ) ) );
char *psz_group = playlist_FindGroup(p_playlist,
p_item->i_group);
listview->SetItem( i, 3,
wxL2U( psz_group ? psz_group : _("Normal") ) );
#endif
if( p_item->b_enabled == VLC_FALSE )
{
wxListItem listitem;
......@@ -452,29 +636,7 @@ void Playlist::UpdateItem( int i )
listitem.SetTextColour( *wxLIGHT_GREY);
listview->SetItem(listitem);
}
char psz_duration[MSTRTIME_MAX_SIZE];
mtime_t dur = p_item->input.i_duration;
if( dur != -1 )
secstotimestr( psz_duration, dur/1000000 );
else
memcpy( psz_duration, "-:--:--", sizeof("-:--:--") );
listview->SetItem( i, 1, wxU(psz_duration) );
/* Change the colour for the currenty played stream */
wxListItem listitem;
listitem.m_itemId = i;
if( i == p_playlist->i_index )
{
listitem.SetTextColour( *wxRED );
}
else
{
listitem.SetTextColour( *wxBLACK );
}
listview->SetItem( listitem );
vlc_object_release(p_playlist);
#endif
}
/**********************************************************************
......@@ -482,6 +644,7 @@ void Playlist::UpdateItem( int i )
**********************************************************************/
void Playlist::Rebuild()
{
playlist_view_t *p_view;
playlist_t *p_playlist =
(playlist_t *)vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
FIND_ANYWHERE );
......@@ -490,31 +653,38 @@ void Playlist::Rebuild()
return;
}
int i_focused = listview->GetFocusedItem();
/* Clear the list... */
listview->DeleteAllItems();
/* ...and rebuild it */
vlc_mutex_lock( &p_playlist->object_lock );
for( int i = 0; i < p_playlist->i_size; i++ )
p_view = playlist_ViewFind( p_playlist, i_current_view ); /* FIXME */
/* HACK we should really get new*/
msg_Dbg( p_intf, "rebuilding tree" );
treectrl->DeleteAllItems();
treectrl->AddRoot( wxU(_("root" )), -1, -1,
new PlaylistItem( p_view->p_root) );
wxTreeItemId root = treectrl->GetRootItem();
UpdateNode( p_playlist, p_view->p_root, root );
wxTreeItemId item;
if( p_playlist->status.p_item != NULL )
{
wxString filename = wxL2U(p_playlist->pp_items[i]->input.psz_name);
listview->InsertItem( i, filename );
/* FIXME: Very slow, need to find the playlist many times */
UpdateItem( i );
item = FindItem( root, p_playlist->status.p_item );
}
vlc_mutex_unlock( &p_playlist->object_lock );
if( i_focused >= 0 && i_focused < p_playlist->i_size )
else if( p_playlist->status.p_node != NULL )
{
listview->Focus( i_focused );
listview->Select( i_focused );
item = FindItem( root, p_playlist->status.p_node );
}
else if( p_playlist->i_index >= 0 )
else
{
listview->Focus( p_playlist->i_index );
item = root;
}
SetCurrentItem( item );
vlc_mutex_unlock( &p_playlist->object_lock );
vlc_object_release( p_playlist );
}
......@@ -547,7 +717,7 @@ void Playlist::UpdatePlaylist()
{
return;
}
#if 0
/* Update the colour of items */
int i_playlist_index = p_playlist->i_index;
if( p_intf->p_sys->i_playing != i_playlist_index )
......@@ -565,14 +735,14 @@ void Playlist::UpdatePlaylist()
}
p_intf->p_sys->i_playing = i_playlist_index;
}
#endif
vlc_object_release( p_playlist );
}
/*****************************************************************************
* Private methods.
*****************************************************************************/
void Playlist::DeleteItem( int item )
void Playlist::DeleteItem( int item_id )
{
playlist_t *p_playlist =
(playlist_t *)vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
......@@ -582,8 +752,7 @@ void Playlist::DeleteItem( int item )
return;
}
playlist_Delete( p_playlist, item );
listview->DeleteItem( item );
playlist_Delete( p_playlist, item_id );
vlc_object_release( p_playlist );
}
......@@ -601,6 +770,7 @@ void Playlist::OnSave( wxCommandEvent& WXUNUSED(event) )
char *psz_module;
} formats[] = {{ _("M3U file"), "*.m3u", "export-m3u" },
{ _("PLS file"), "*.pls", "export-pls" }};
wxString filter = wxT("");
playlist_t * p_playlist =
......@@ -667,18 +837,12 @@ void Playlist::OnAddFile( wxCommandEvent& WXUNUSED(event) )
{
p_intf->p_sys->pf_show_dialog( p_intf, INTF_DIALOG_FILE_SIMPLE, 0, 0 );
#if 0
Rebuild();
#endif
}
void Playlist::OnAddMRL( wxCommandEvent& WXUNUSED(event) )
{
p_intf->p_sys->pf_show_dialog( p_intf, INTF_DIALOG_FILE, 0, 0 );
#if 0
Rebuild();
#endif
}
/********************************************************************
......@@ -693,7 +857,7 @@ void Playlist::OnUp( wxCommandEvent& event )
{
return;
}
#if 0
/* We use the first selected item, so find it */
long i_item = listview->GetNextItem( -1, wxLIST_NEXT_ALL,
wxLIST_STATE_SELECTED);
......@@ -702,6 +866,7 @@ void Playlist::OnUp( wxCommandEvent& event )
playlist_Move( p_playlist, i_item, i_item - 1 );
listview->Focus( i_item - 1 );
}
#endif
vlc_object_release( p_playlist );
}
......@@ -714,7 +879,7 @@ void Playlist::OnDown( wxCommandEvent& event )
{
return;
}
#if 0
/* We use the first selected item, so find it */
long i_item = listview->GetNextItem( -1, wxLIST_NEXT_ALL,
wxLIST_STATE_SELECTED );
......@@ -723,6 +888,7 @@ void Playlist::OnDown( wxCommandEvent& event )
playlist_Move( p_playlist, i_item, i_item + 2 );
listview->Focus( i_item + 1 );
}
#endif
vlc_object_release( p_playlist );
}
......@@ -752,12 +918,6 @@ void Playlist::OnSort( wxCommandEvent& event )
case RSortAuthor_Event:
playlist_SortAuthor( p_playlist, ORDER_REVERSE );
break;
case SortGroup_Event:
playlist_SortGroup( p_playlist, ORDER_NORMAL );
break;
case RSortGroup_Event:
playlist_SortGroup( p_playlist, ORDER_REVERSE );
break;
case Randomize_Event:
playlist_Sort( p_playlist, SORT_RANDOM, ORDER_NORMAL );
break;
......@@ -767,73 +927,6 @@ void Playlist::OnSort( wxCommandEvent& event )
Rebuild();
}
void Playlist::OnColSelect( wxListEvent& event )
{
playlist_t *p_playlist =
(playlist_t *)vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
FIND_ANYWHERE );
if( p_playlist == NULL )
{
return;
}
switch( event.GetColumn() )
{
case 0:
if( i_title_sorted != 1 )
{
playlist_SortTitle( p_playlist, ORDER_NORMAL );
i_title_sorted = 1;
}
else
{
playlist_SortTitle( p_playlist, ORDER_REVERSE );
i_title_sorted = -1;
}
break;
case 1:
if( i_author_sorted != 1 )
{
playlist_SortAuthor( p_playlist, ORDER_NORMAL );
i_author_sorted = 1;
}
else
{
playlist_SortAuthor( p_playlist, ORDER_REVERSE );
i_author_sorted = -1;
}
break;
case 2:
if( i_duration_sorted != 1 )
{
playlist_Sort( p_playlist, SORT_DURATION, ORDER_NORMAL );
i_duration_sorted = 1;
}
else
{
playlist_Sort( p_playlist, SORT_DURATION, ORDER_REVERSE );
i_duration_sorted = -1;
}
break;
case 3:
if( i_group_sorted != 1 )
{
playlist_SortGroup( p_playlist, ORDER_NORMAL );
i_group_sorted = 1;
}
else
{
playlist_SortGroup( p_playlist, ORDER_REVERSE );
i_group_sorted = -1;
}
break;
default:
break;
}
vlc_object_release( p_playlist );
Rebuild();
}
/**********************************************************************
* Search functions
**********************************************************************/
......@@ -850,7 +943,9 @@ void Playlist::OnSearch( wxCommandEvent& WXUNUSED(event) )
int i_current;
int i_first = 0 ;
int i_item = -1;
}
#if 0
for( i_current = 0; i_current < listview->GetItemCount(); i_current++ )
{
if( listview->GetItemState( i_current, wxLIST_STATE_SELECTED ) ==
......@@ -928,54 +1023,17 @@ void Playlist::OnSearch( wxCommandEvent& WXUNUSED(event) )
listview->Select( i_item, TRUE );
listview->Focus( i_item );
}
#endif
/**********************************************************************
* Selection functions
**********************************************************************/
void Playlist::OnInvertSelection( wxCommandEvent& WXUNUSED(event) )
{
for( long item = 0; item < listview->GetItemCount(); item++ )
{
listview->Select( item, ! listview->IsSelected( item ) );
}
}
void Playlist::OnDeleteSelection( wxCommandEvent& WXUNUSED(event) )
{
long *pd_del = NULL;
int i_del = 0;
int i;
/* Delete from the end to the beginning, to avoid a shift of indices */
for( long item = listview->GetItemCount() - 1; item >= 0; item-- )
{
/* TODO : use vector */
if( listview->IsSelected( item ) )
{
if( i_del> 0 )
{
pd_del = (long *)realloc( pd_del, sizeof( void **) *
(i_del + 1 ) );
}
else
{
pd_del = (long *)malloc( sizeof( void ** ) );
}
pd_del[i_del] = item;
i_del ++;
}
}
for( long item = listview->GetItemCount() - 1; item >= 0; item-- )
{
for( i = 0 ; i < i_del; i++ )
{
if( item == pd_del[i] )
{
DeleteItem( item );
}
}
}
Rebuild();
}
......@@ -988,7 +1046,7 @@ void Playlist::OnEnableSelection( wxCommandEvent& WXUNUSED(event) )
{
return;
}
#if 0
for( long item = listview->GetItemCount() - 1; item >= 0; item-- )
{
if( listview->IsSelected( item ) )
......@@ -998,6 +1056,7 @@ void Playlist::OnEnableSelection( wxCommandEvent& WXUNUSED(event) )
UpdateItem( item );
}
}
#endif
vlc_object_release( p_playlist);
}
......@@ -1010,7 +1069,7 @@ void Playlist::OnDisableSelection( wxCommandEvent& WXUNUSED(event) )
{
return;
}
#if 0
for( long item = listview->GetItemCount() - 1; item >= 0; item-- )
{
if( listview->IsSelected( item ) )
......@@ -1020,15 +1079,18 @@ void Playlist::OnDisableSelection( wxCommandEvent& WXUNUSED(event) )
UpdateItem( item );
}
}
#endif
vlc_object_release( p_playlist);
}
void Playlist::OnSelectAll( wxCommandEvent& WXUNUSED(event) )
{
#if 0
for( long item = 0; item < listview->GetItemCount(); item++ )
{
listview->Select( item, TRUE );
}
#endif
}
/**********************************************************************
......@@ -1081,22 +1143,47 @@ void Playlist::OnRepeat( wxCommandEvent& event )
void Playlist::OnActivateItem( wxListEvent& event )
void Playlist::OnActivateItem( wxTreeEvent& event )
{
playlist_t *p_playlist =
(playlist_t *)vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
FIND_ANYWHERE );
playlist_item_t *p_item,*p_node;
playlist_t *p_playlist = (playlist_t *)vlc_object_find( p_intf,
VLC_OBJECT_PLAYLIST,FIND_ANYWHERE );
PlaylistItem *p_wxitem = (PlaylistItem *)treectrl->GetItemData(
event.GetItem() );
wxTreeItemId parent = treectrl->GetItemParent( event.GetItem() );
if( parent.IsOk() )
{
fprintf(stderr,"Ca gre\n" );
}
else
{
fprintf(stderr,"Ca craint\n" );
}
PlaylistItem *p_wxparent = (PlaylistItem *)treectrl->GetItemData( parent );
if( p_playlist == NULL )
{
return;
}
playlist_Goto( p_playlist, event.GetIndex() );
if( p_wxitem->p_item->i_children == -1 )
{
p_node = p_wxparent->p_item;
p_item = p_wxitem->p_item;
}
else
{
p_node = p_wxitem->p_item;
p_item = NULL;
}
playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, i_current_view,
p_node, p_item );
vlc_object_release( p_playlist );
}
void Playlist::OnKeyDown( wxListEvent& event )
void Playlist::OnKeyDown( wxTreeEvent& event )
{
long keycode = event.GetKeyCode();
/* Delete selected items */
......@@ -1109,11 +1196,20 @@ void Playlist::OnKeyDown( wxListEvent& event )
void Playlist::ShowInfos( int i_item )
{
if( i_item == -1 )
{
return;
}
}
void Playlist::OnInfos( wxCommandEvent& WXUNUSED(event) )
{
/* We use the first selected item, so find it */
#if 0
long i_item = listview->GetNextItem( -1, wxLIST_NEXT_ALL,
wxLIST_STATE_SELECTED );
ShowInfos( i_item );
#endif
}
void Playlist::OnEnDis( wxCommandEvent& event )
{
playlist_t *p_playlist =
(playlist_t *)vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
FIND_ANYWHERE );
......@@ -1121,30 +1217,38 @@ void Playlist::ShowInfos( int i_item )
{
return;
}
#if 0
long i_item = listview->GetNextItem( -1, wxLIST_NEXT_ALL,
wxLIST_STATE_SELECTED );
vlc_mutex_lock( &p_playlist->object_lock);
playlist_item_t *p_item = playlist_ItemGetByPos( p_playlist, i_item );
vlc_mutex_unlock( &p_playlist->object_lock );
if( p_item )
if( i_item >= 0 && i_item < p_playlist->i_size )
{
iteminfo_dialog = new ItemInfoDialog( p_intf, p_item, this );
if( iteminfo_dialog->ShowModal() == wxID_OK ) UpdateItem( i_item );
delete iteminfo_dialog;
Rebuild();
}
#endif
vlc_object_release( p_playlist );
}
void Playlist::OnInfos( wxCommandEvent& WXUNUSED(event) )
/**********************************************************************
* Menu
**********************************************************************/
void Playlist::OnMenuOpen( wxMenuEvent& event)
{
/* We use the first selected item, so find it */
long i_item = listview->GetNextItem( -1, wxLIST_NEXT_ALL,
wxLIST_STATE_SELECTED );
ShowInfos( i_item );
#if defined( __WXMSW__ )
# define GetEventObject GetMenu
#endif
if( event.GetEventObject() == p_view_menu )
{
p_view_menu = ViewMenu();
}
#if defined( __WXMSW__ )
# undef GetEventObject
#endif
}
void Playlist::OnEnDis( wxCommandEvent& event )
void Playlist::OnMenuEvent( wxCommandEvent& event )
{
playlist_t *p_playlist =
(playlist_t *)vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
......@@ -1154,41 +1258,108 @@ void Playlist::OnEnDis( wxCommandEvent& event )
return;
}
long i_item = listview->GetNextItem( -1, wxLIST_NEXT_ALL,
wxLIST_STATE_SELECTED );
if( event.GetId() < FirstView_Event )
{
event.Skip();
return;
}
if( i_item >= 0 && i_item < p_playlist->i_size )
int i_new_view = event.GetId() - FirstView_Event;
playlist_view_t *p_view = playlist_ViewFind( p_playlist, i_new_view );
if( p_view != NULL )
{
switch( event.GetId() )
{
case EnableGroup_Event:
/*XXX*/
playlist_EnableGroup( p_playlist,
p_playlist->pp_items[i_item]->i_group );
break;
case DisableGroup_Event:
playlist_DisableGroup( p_playlist,
p_playlist->pp_items[i_item]->i_group );
break;
}
Rebuild();
i_current_view = i_new_view;
playlist_ViewUpdate( p_playlist, i_new_view );
Rebuild();
vlc_object_release( p_playlist );
return;
}
else if( i_new_view >= VIEW_FIRST_SORTED && i_new_view <= VIEW_LAST_SORTED )
{
playlist_ViewInsert( p_playlist, i_new_view, "View" );
playlist_ViewUpdate( p_playlist, i_new_view );
i_current_view = i_new_view;
Rebuild();
}
vlc_object_release( p_playlist );
}
wxMenu * Playlist::ViewMenu()
{
playlist_t *p_playlist =
(playlist_t *)vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
FIND_ANYWHERE );
if( p_playlist == NULL )
{
return NULL;
}
if( !p_view_menu )
{
p_view_menu = new wxMenu;
}
else
{
wxMenuItemList::Node *node = p_view_menu->GetMenuItems().GetFirst();
for( ; node; )
{
wxMenuItem *item = node->GetData();
node = node->GetNext();
p_view_menu->Delete( item );
}
}
/* FIXME : have a list of "should have" views */
p_view_menu->Append( FirstView_Event + VIEW_CATEGORY,
wxU(_("By category") ) );
p_view_menu->Append( FirstView_Event + VIEW_SIMPLE,
wxU(_("Manually added") ) );
p_view_menu->Append( FirstView_Event + VIEW_ALL,
wxU(_("All items, unsorted") ) );
p_view_menu->Append( FirstView_Event + VIEW_S_AUTHOR,
wxU(_("Sorted by author") ) );
#if 0
for( int i = 0; i< p_playlist->i_views; i++ )
{
p_view_menu->Append( FirstView_Event + p_playlist->pp_views[i]->i_id,
wxU( p_playlist->pp_views[i]->psz_name ) );
}
#endif
vlc_object_release( p_playlist);
return p_view_menu;
}
/*****************************************************************************
* Popup management functions
*****************************************************************************/
void Playlist::OnPopup( wxListEvent& event )
void Playlist::OnPopup( wxContextMenuEvent& event )
{
i_popup_item = event.GetIndex();
for( long item = 0; item < listview->GetItemCount(); item++ )
wxPoint pt = event.GetPosition();
i_popup_item = treectrl->HitTest( ScreenToClient( pt ) );
if( i_popup_item.IsOk() )
{
PlaylistItem *p_wxitem = (PlaylistItem *)treectrl->GetItemData(
i_popup_item );
PlaylistItem *p_wxparent= (PlaylistItem *) treectrl->GetItemData(
treectrl->GetItemParent( i_popup_item ) );
p_popup_item = p_wxitem->p_item;
p_popup_parent = p_wxparent->p_item;
treectrl->SelectItem( i_popup_item );
Playlist::PopupMenu( popup_menu,
ScreenToClient( wxGetMousePosition() ) );
}
else
{
listview->Select( item, FALSE );
}
listview->Select( i_popup_item );
Playlist::PopupMenu( popup_menu, ScreenToClient( wxGetMousePosition() ) );
}
void Playlist::OnPopupPlay( wxMenuEvent& event )
......@@ -1200,16 +1371,29 @@ void Playlist::OnPopupPlay( wxMenuEvent& event )
{
return;
}
if( i_popup_item != -1 )
if( p_popup_item != NULL )
{
playlist_Goto( p_playlist, i_popup_item );
playlist_Control( p_playlist, PLAYLIST_VIEWPLAY,
VIEW_SIMPLE, p_popup_parent, p_popup_item );
/*FIXME*/
}
vlc_object_release( p_playlist );
}
void Playlist::OnPopupDel( wxMenuEvent& event )
{
DeleteItem( i_popup_item );
PlaylistItem *p_wxitem;
p_wxitem = (PlaylistItem *)treectrl->GetItemData( i_popup_item );
if( p_wxitem->p_item->i_children == -1 )
{
DeleteItem( p_wxitem->p_item->input.i_id );
}
else
{
//DeleteNode( p_wxitem->p_item );
}
}
void Playlist::OnPopupEna( wxMenuEvent& event )
......@@ -1222,24 +1406,26 @@ void Playlist::OnPopupEna( wxMenuEvent& event )
return;
}
if( p_playlist->pp_items[i_popup_item]->b_enabled )
//playlist_IsEnabled( p_playlist, i_popup_item ) )
{
playlist_Disable( p_playlist, i_popup_item );
}
else
{
playlist_Enable( p_playlist, i_popup_item );
}
p_popup_item->b_enabled = VLC_TRUE - p_popup_item->b_enabled;
vlc_object_release( p_playlist);
UpdateItem( i_popup_item );
}
void Playlist::OnPopupInfo( wxMenuEvent& event )
{
ShowInfos( i_popup_item );
if( p_popup_item )
{
iteminfo_dialog = new ItemInfoDialog( p_intf, p_popup_item, this );
if( iteminfo_dialog->ShowModal() == wxID_OK )
{
UpdateItem( i_popup_item );
}
delete iteminfo_dialog;
}
}
/*****************************************************************************
* Custom events management
*****************************************************************************/
......@@ -1297,80 +1483,3 @@ static int ItemChanged( vlc_object_t *p_this, const char *psz_variable,
return 0;
}
/***************************************************************************
* NewGroup Class
***************************************************************************/
NewGroup::NewGroup( intf_thread_t *_p_intf, wxWindow *_p_parent ):
wxDialog( _p_parent, -1, wxU(_("New Group")), wxDefaultPosition,
wxDefaultSize, wxDEFAULT_FRAME_STYLE )
{
/* Initializations */
p_intf = _p_intf;
psz_name = NULL;
SetIcon( *p_intf->p_sys->p_icon );
/* Create a panel to put everything in*/
wxPanel *panel = new wxPanel( this, -1 );
panel->SetAutoLayout( TRUE );
wxStaticText *group_label =
new wxStaticText( panel, -1,
wxU(_("Enter a name for the new group:")));
groupname = new wxTextCtrl(panel, -1, wxU(""), wxDefaultPosition,
wxSize(100, 27), wxTE_PROCESS_ENTER);
wxButton *ok_button = new wxButton(panel, wxID_OK, wxU(_("OK")) );
ok_button->SetDefault();
wxButton *cancel_button = new wxButton( panel, wxID_CANCEL,
wxU(_("Cancel")) );
wxBoxSizer *button_sizer = new wxBoxSizer( wxHORIZONTAL );
button_sizer->Add( ok_button, 0, wxALL, 5 );
button_sizer->Add( cancel_button, 0, wxALL, 5 );
button_sizer->Layout();
wxBoxSizer *panel_sizer = new wxBoxSizer( wxVERTICAL );
panel_sizer->Add( group_label, 0, wxEXPAND | wxALL, 5 );
panel_sizer->Add( groupname, 0, wxEXPAND | wxALL, 5 );
panel_sizer->Add( button_sizer, 0, wxEXPAND | wxALL, 5 );
panel_sizer->Layout();
panel->SetSizerAndFit( panel_sizer );
wxBoxSizer *main_sizer = new wxBoxSizer( wxVERTICAL );
main_sizer->Add( panel, 1, wxEXPAND, 0 );
main_sizer->Layout();
SetSizerAndFit( main_sizer );
}
NewGroup::~NewGroup()
{
}
void NewGroup::OnOk( wxCommandEvent& event )
{
psz_name = strdup( groupname->GetLineText(0).mb_str() );
playlist_t * p_playlist =
(playlist_t *)vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
FIND_ANYWHERE );
if( p_playlist )
{
if( !playlist_CreateGroup( p_playlist, psz_name ) )
{
psz_name = NULL;
}
vlc_object_release( p_playlist );
}
EndModal( wxID_OK );
}
void NewGroup::OnCancel( wxCommandEvent& WXUNUSED(event) )
{
EndModal( wxID_CANCEL );
}
......@@ -44,6 +44,7 @@
#include <wx/wizard.h>
#include "vlc_keys.h"
/* Hmmm, work-around for newest wxWin */
#ifdef wxStaticCastEvent
# undef wxStaticCastEvent
......@@ -786,6 +787,7 @@ private:
void OnSize( wxSizeEvent &event );
/* Menu Handlers */
void OnAddFile( wxCommandEvent& event );
void OnAddMRL( wxCommandEvent& event );
void OnClose( wxCommandEvent& event );
......@@ -797,7 +799,11 @@ private:
void OnSave( wxCommandEvent& event );
void OnSort( wxCommandEvent& event );
void OnColSelect( wxListEvent& event );
void OnMenuEvent( wxCommandEvent& event );
void OnMenuOpen( wxMenuEvent& event );
wxMenu *ViewMenu();
void OnUp( wxCommandEvent& event);
void OnDown( wxCommandEvent& event);
......@@ -810,18 +816,27 @@ private:
void OnRandom( wxCommandEvent& event );
void OnRepeat( wxCommandEvent& event );
void OnLoop ( wxCommandEvent& event );
void OnActivateItem( wxListEvent& event );
void OnKeyDown( wxListEvent& event );
void OnActivateItem( wxTreeEvent& event );
void OnKeyDown( wxTreeEvent& event );
void OnNewGroup( wxCommandEvent& event );
/* Popup functions */
void OnPopup( wxListEvent& event );
void OnPopup( wxContextMenuEvent& event );
void OnPopupPlay( wxMenuEvent& event );
void OnPopupDel( wxMenuEvent& event );
void OnPopupEna( wxMenuEvent& event );
void OnPopupInfo( wxMenuEvent& event );
void Rebuild();
/* Update */
void UpdateNode( playlist_t *, playlist_item_t*, wxTreeItemId );
void CreateNode( playlist_t *, playlist_item_t*, wxTreeItemId );
wxTreeItemId FindItem( wxTreeItemId, playlist_item_t * );
void SetCurrentItem( wxTreeItemId );
void UpdateTreeItem( playlist_t *, wxTreeItemId );
/* Custom events */
void OnPlaylistEvent( wxCommandEvent& event );
......@@ -831,15 +846,20 @@ private:
wxMenu *popup_menu;
wxMenu *p_view_menu;
ItemInfoDialog *iteminfo_dialog;
intf_thread_t *p_intf;
wxListView *listview;
wxTreeCtrl *treeview;
wxTreeCtrl *treectrl;
int i_update_counter;
int i_sort_mode;
int i_popup_item;
int i_current_view;
wxTreeItemId i_popup_item;
playlist_item_t *p_popup_item;
playlist_item_t *p_popup_parent;
int i_title_sorted;
int i_author_sorted;
......@@ -847,30 +867,6 @@ private:
int i_duration_sorted;
};
class NewGroup: public wxDialog
{
public:
/* Constructor */
NewGroup( intf_thread_t *p_intf, wxWindow *p_parent );
virtual ~NewGroup();
private:
/* Event handlers (these functions should _not_ be virtual) */
void OnOk( wxCommandEvent& event );
void OnCancel( wxCommandEvent& event );
DECLARE_EVENT_TABLE();
intf_thread_t *p_intf;
wxTextCtrl *groupname;
protected:
friend class Playlist;
friend class ItemInfoDialog;
char *psz_name;
};
/* ItemInfo Dialog */
class ItemInfoDialog: public wxDialog
{
......@@ -889,7 +885,6 @@ private:
/* Event handlers (these functions should _not_ be virtual) */
void OnOk( wxCommandEvent& event );
void OnCancel( wxCommandEvent& event );
void OnNewGroup( wxCommandEvent& event );
void UpdateInfo();
......@@ -914,8 +909,6 @@ private:
wxTreeItemId info_root;
wxCheckBox *enabled_checkbox;
wxComboBox *group_combo;
int ids_array[100];
};
......
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