Compare commits
1235 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
a104e92471 | ||
|
1929804541 | ||
|
a564b3b272 | ||
|
d083528ad5 | ||
|
4d63a9462d | ||
|
5a64886b7c | ||
|
76986e8908 | ||
|
9a9a7148af | ||
|
aec7a0b140 | ||
|
eff42af593 | ||
|
ad2b54ad90 | ||
|
4e316a48ea | ||
|
87863ae7e2 | ||
|
5e439b990f | ||
|
5dcf426cdf | ||
|
5b6c4560ae | ||
|
fec670f27c | ||
|
fb13ccd285 | ||
|
b3b70cea82 | ||
|
f84d08e011 | ||
|
9c5966000c | ||
|
79bfdec895 | ||
|
9f5215302c | ||
|
73d7ba03f5 | ||
|
d623bbefc2 | ||
|
907dad95e1 | ||
|
565217a53a | ||
|
bee6485475 | ||
|
ace18dfa1f | ||
|
95f1162b6e | ||
|
e5bdd2242f | ||
|
deb0eb819c | ||
|
04864c7d79 | ||
|
43c4daa4e3 | ||
|
fc95cee6ce | ||
|
fff8fbfe80 | ||
|
eec8b76de0 | ||
|
68f03dbd13 | ||
|
753e1b3c90 | ||
|
e828dadec8 | ||
|
6e929986cb | ||
|
e1b086e3a4 | ||
|
27147a0140 | ||
|
66836ae0bd | ||
|
6342e6a9f8 | ||
|
042ccbe730 | ||
|
6c6411561b | ||
|
18e3669911 | ||
|
240517b0cd | ||
|
fab36b2262 | ||
|
dd74ce04e6 | ||
|
e3a43e8ca6 | ||
|
c401ea0d91 | ||
|
2d03b8aea0 | ||
|
178aed9174 | ||
|
6552deca61 | ||
|
89009c09be | ||
|
34672c7bed | ||
|
3caeb4642a | ||
|
80b0eacfed | ||
|
aa078e86e5 | ||
|
9daf0a6089 | ||
|
6dead5e7e1 | ||
|
335868ea95 | ||
|
fc45646205 | ||
|
dbd466d3ed | ||
|
292d8c9530 | ||
|
6b68598d1d | ||
|
0d9e248dac | ||
|
46a86fe6a5 | ||
|
a56ca4ddfc | ||
|
6483c55749 | ||
|
5a56a3e060 | ||
|
585f32c4d8 | ||
|
9ea311526c | ||
|
1342fdb9a7 | ||
|
2cc4fccd66 | ||
|
a2d0899285 | ||
|
06cc52744d | ||
|
df758aa3f8 | ||
|
f79ed86b57 | ||
|
c9b0c92450 | ||
|
57d1c29d35 | ||
|
cdf7c11b29 | ||
|
be7b5babe9 | ||
|
f7f2c51d4e | ||
|
4889ed6a33 | ||
|
3557686681 | ||
|
58dfc54e00 | ||
|
bddbc7a194 | ||
|
33e0116e4b | ||
|
b07f498516 | ||
|
c77be81e5b | ||
|
11cf2c78d8 | ||
|
77bcc7c7aa | ||
|
5b97802104 | ||
|
25ec5cb432 | ||
|
8b4b4a8f0c | ||
|
6448cebec6 | ||
|
191ee259d4 | ||
|
dc364726c0 | ||
|
6ac0f68224 | ||
|
3c3078f9f8 | ||
|
b994befc58 | ||
|
56cf0239da | ||
|
69d75362b3 | ||
|
8db9c79e57 | ||
|
e9ee617d94 | ||
|
c9c6534af5 | ||
|
1b9767995b | ||
|
1c561ba7a9 | ||
|
52baebc899 | ||
|
63c029554a | ||
|
3900dd27d2 | ||
|
e9fb17dadb | ||
|
56c2f86381 | ||
|
a8440c72e4 | ||
|
cbb5bac075 | ||
|
b7f1f56f77 | ||
|
9fe17cf6f5 | ||
|
d641f06e6d | ||
|
7668f04c0c | ||
|
a73d1cd342 | ||
|
35c4a29cbe | ||
|
f6e00fbb86 | ||
|
3f9503364c | ||
|
36b2a585f9 | ||
|
42220a8c95 | ||
|
1ac4efa88a | ||
|
cfe42d10ea | ||
|
6ad9e820e3 | ||
|
47a403a9c8 | ||
|
b2fc0935a4 | ||
|
a04d384ac4 | ||
|
325bb0bf8f | ||
|
c2a79d4cbf | ||
|
b17b8356ad | ||
|
a41b174851 | ||
|
458d32ed7c | ||
|
a0383b6664 | ||
|
9b1fc4cd24 | ||
|
2a27ef88f6 | ||
|
d1ecf6d748 | ||
|
396b5cd6e0 | ||
|
55e7d6383b | ||
|
dbcbffb6c4 | ||
|
6b51872c3e | ||
|
79d8b081d7 | ||
|
165276912f | ||
|
413052bf8e | ||
|
46fd72920c | ||
|
399b835436 | ||
|
9f76cdf486 | ||
|
881bf5dd9d | ||
|
8bb9661960 | ||
|
a1c69b0b43 | ||
|
5083849514 | ||
|
8d75ba4d64 | ||
|
b54b7f6455 | ||
|
488eb387cb | ||
|
99143f6148 | ||
|
1d4320afea | ||
|
d9c3162146 | ||
|
4a1b021753 | ||
|
3418d5295b | ||
|
bf30dc37a2 | ||
|
6ed4902e00 | ||
|
e3f6e61900 | ||
|
c9b1daeba7 | ||
|
52531e9125 | ||
|
72b6252ab5 | ||
|
95f3ead710 | ||
|
07a9486e4d | ||
|
7efceebb1c | ||
|
47529ee4d8 | ||
|
6fdc49b6e5 | ||
|
78ad724bac | ||
|
fad6768955 | ||
|
03384c4e19 | ||
|
63e59e7e27 | ||
|
b768e84afe | ||
|
8fdddb501f | ||
|
f6d00be6c1 | ||
|
783893f750 | ||
|
ff9074421a | ||
|
5a719f39bd | ||
|
39a40ce372 | ||
|
fdb13a1f78 | ||
|
9f99108701 | ||
|
1e022bf627 | ||
|
354dad71d9 | ||
|
ea7dc6e057 | ||
|
c9ceb5f813 | ||
|
576c66133e | ||
|
0c704d2928 | ||
|
d611bad383 | ||
|
3c2139ebeb | ||
|
081102fee4 | ||
|
c68772c9b5 | ||
|
68c421e00e | ||
|
93722665af | ||
|
b8a38f7eda | ||
|
06374586e0 | ||
|
a7fd04e1f3 | ||
|
9661a38c10 | ||
|
47e9f27199 | ||
|
4e59f1dc12 | ||
|
68b146e560 | ||
|
b06d50be98 | ||
|
cc6a7fd5c5 | ||
|
0488aa10f8 | ||
|
7dcd6e8edc | ||
|
11c6d4cdca | ||
|
60b746c430 | ||
|
1f2cc33364 | ||
|
5d215b1326 | ||
|
46723bf9d3 | ||
|
36789637a2 | ||
|
6e669fe530 | ||
|
90c1a4ec51 | ||
|
3e7b2b72cf | ||
|
de5df30941 | ||
|
f5764906d6 | ||
|
f6dce6181e | ||
|
ba74c22663 | ||
|
14fd0424a1 | ||
|
4d7945291e | ||
|
2eabaa0195 | ||
|
7ffe53b745 | ||
|
ff9a033e1e | ||
|
ef41c80eb1 | ||
|
25a67447d3 | ||
|
9242a7c942 | ||
|
7cd51a6108 | ||
|
82a2ff900b | ||
|
d6a533527e | ||
|
758d65e018 | ||
|
1ccc368195 | ||
|
7abc185586 | ||
|
4bf4cdda7b | ||
|
5fcb7e637a | ||
|
ad9cf93f28 | ||
|
c0c43441c1 | ||
|
dc79dfe403 | ||
|
ef5af2c7d8 | ||
|
d4e82d8c94 | ||
|
4f3ae14dbf | ||
|
3655a2b537 | ||
|
014c6e7344 | ||
|
bea98a5e30 | ||
|
aff87e936a | ||
|
5f0200b151 | ||
|
f1fb4a2ed8 | ||
|
20d1c2a5cc | ||
|
9c8a9e0c52 | ||
|
b72863a1ff | ||
|
2c3bf472bc | ||
|
05c0f3e2d3 | ||
|
8abf965447 | ||
|
0460f6f776 | ||
|
2ea2b57d92 | ||
|
9fe40f0682 | ||
|
f81db381be | ||
|
9320d2f9c2 | ||
|
1639d617f7 | ||
|
4341256594 | ||
|
584c4446b5 | ||
|
424ac7a1d5 | ||
|
9bc38282e9 | ||
|
9011e4977e | ||
|
4c2c4b7c6d | ||
|
a6a362944a | ||
|
a059cc2e18 | ||
|
9a13d475a6 | ||
|
1a240911f5 | ||
|
a4f65cbcc2 | ||
|
073cbbaad5 | ||
|
4c8fa37d0e | ||
|
038daffab7 | ||
|
bd893995c3 | ||
|
9634d3230f | ||
|
01d6a22f92 | ||
|
b3c144b4bf | ||
|
3875f0b693 | ||
|
cf4d0fe465 | ||
|
06ac5cffb6 | ||
|
3987ce7690 | ||
|
c4c74d84dc | ||
|
79c283b181 | ||
|
2e25337cc1 | ||
|
e989bc1652 | ||
|
a8810e90c1 | ||
|
daca5fa107 | ||
|
d3fbbf778a | ||
|
44cbcd434e | ||
|
9e80ef8aca | ||
|
52cb7cebd9 | ||
|
54c203982f | ||
|
c3e8420b57 | ||
|
d59ffc55b1 | ||
|
f32de6bece | ||
|
4f4406ffb1 | ||
|
6064b2029e | ||
|
31fb398b37 | ||
|
3b8deef8c5 | ||
|
075a5a0f14 | ||
|
2a96048b7c | ||
|
ce13d7fed5 | ||
|
8ffbebb2b6 | ||
|
ce60d46fa6 | ||
|
93a31146b1 | ||
|
d22bccd9fb | ||
|
3430535774 | ||
|
3c3c1414fe | ||
|
64d220d9c5 | ||
|
41e908bb34 | ||
|
94b7ff59d5 | ||
|
0ea928ade7 | ||
|
d1db5441df | ||
|
45f7cd2938 | ||
|
41b3ebf4e4 | ||
|
330efc5833 | ||
|
6f4a26220d | ||
|
919644d07a | ||
|
30cabb304c | ||
|
b80230c962 | ||
|
e8563b119b | ||
|
83051cd554 | ||
|
cfce10fbec | ||
|
09087e2a8e | ||
|
3520a7d0d8 | ||
|
7b4d08a7f5 | ||
|
7e6b543a70 | ||
|
41c79b931f | ||
|
477202aa47 | ||
|
ff0d9a9837 | ||
|
2c83807efc | ||
|
3517726d92 | ||
|
a00ea52b0b | ||
|
e4b11807f2 | ||
|
7b521b0690 | ||
|
8f14777831 | ||
|
ef3246db9c | ||
|
7726302103 | ||
|
2b85536625 | ||
|
2bfa77c1ff | ||
|
9d4974b174 | ||
|
eaf9d806d1 | ||
|
152b07d816 | ||
|
441fa10add | ||
|
261149287c | ||
|
80320fcf4e | ||
|
de6c80f04d | ||
|
a4891bc64d | ||
|
13ecdb04ee | ||
|
633dddf281 | ||
|
8941036105 | ||
|
f46d0803be | ||
|
eec1e56dda | ||
|
324f8a9515 | ||
|
793babcd12 | ||
|
8fb15633d3 | ||
|
4b77b9525f | ||
|
eff08a7cbd | ||
|
6c8550bf64 | ||
|
29239e08d3 | ||
|
34677a9c85 | ||
|
66914824af | ||
|
08f6970303 | ||
|
4878784ebe | ||
|
7984d38628 | ||
|
b5ab183504 | ||
|
91f8ab27ee | ||
|
7c9fc46caa | ||
|
48d07a679b | ||
|
f4d1bc8dfb | ||
|
5c380b0b8c | ||
|
9787e3bc08 | ||
|
5e15808508 | ||
|
9a4d4cc409 | ||
|
fd936617d7 | ||
|
ef02bd8fae | ||
|
ffe30498cb | ||
|
2585467f0a | ||
|
68cf583e4b | ||
|
e2336b595d | ||
|
5911b51d05 | ||
|
9e23315972 | ||
|
e536157a4f | ||
|
c850fa3520 | ||
|
a8b655fef8 | ||
|
3ed443456a | ||
|
0a46febf36 | ||
|
956243e570 | ||
|
b86c0f5c5e | ||
|
7b96505d27 | ||
|
ba80899ee5 | ||
|
f9b18a9c26 | ||
|
ed306b00f0 | ||
|
f38f6b2eed | ||
|
5929adfa57 | ||
|
758bb74603 | ||
|
7d33ca1dec | ||
|
953a9d2f71 | ||
|
c90f0efad2 | ||
|
e4ad727a6f | ||
|
97e69f9dcc | ||
|
e5086f5b49 | ||
|
c5236b897e | ||
|
383ae37ce5 | ||
|
cd753265a1 | ||
|
9a0b3409d9 | ||
|
8d620363b7 | ||
|
1db24d9c01 | ||
|
ccd485290e | ||
|
9f0b412626 | ||
|
31945b9017 | ||
|
11a6f419aa | ||
|
5f8b56ff85 | ||
|
fc5bf30a79 | ||
|
8cff1f7b76 | ||
|
86860b6da3 | ||
|
1d3d7738ae | ||
|
f3f1c2d814 | ||
|
e63eef8faf | ||
|
cb3a4cf66b | ||
|
cf771ae94b | ||
|
1b09361c51 | ||
|
6172ef3df4 | ||
|
a0cda5cce6 | ||
|
445d6ca84c | ||
|
2be3ebd90b | ||
|
8a9c8278e2 | ||
|
7c66269ac1 | ||
|
30dcf3cebb | ||
|
f5d2251312 | ||
|
004ea967ad | ||
|
55ab72ee76 | ||
|
54b8def06a | ||
|
778f352c0f | ||
|
34fab0f210 | ||
|
ddfe32eec3 | ||
|
cf678ce89f | ||
|
4cbcbd2cda | ||
|
8cba2c4727 | ||
|
24d524f558 | ||
|
f060b6fd6b | ||
|
2a98857af1 | ||
|
147364de84 | ||
|
9b895034df | ||
|
ef575c4d6d | ||
|
31a67ecd42 | ||
|
5bc0a496ed | ||
|
38a7051bba | ||
|
b5167db7a3 | ||
|
b62dd8e96a | ||
|
f023bb2bc7 | ||
|
8a4e75e8fb | ||
|
7197040026 | ||
|
c9bf8eb349 | ||
|
0fba1504f0 | ||
|
1347736ead | ||
|
360748dd0b | ||
|
18a3f15101 | ||
|
eba1505e1d | ||
|
0f21cde318 | ||
|
1c1b6ea940 | ||
|
4f55c6aa9a | ||
|
83d48c99aa | ||
|
40248965be | ||
|
584fc8a1b6 | ||
|
3d0421b0a6 | ||
|
633ade23fc | ||
|
f6d377275b | ||
|
5053c3cc7a | ||
|
eb03e2c912 | ||
|
699a6583b2 | ||
|
a760577924 | ||
|
5e40409ed9 | ||
|
7eb361f514 | ||
|
3a500a6303 | ||
|
de48898d34 | ||
|
6b23a58678 | ||
|
d650ea45b5 | ||
|
3f139addc3 | ||
|
8488eac070 | ||
|
1a338aa602 | ||
|
118b074aa3 | ||
|
4f46ba3e61 | ||
|
2bba9ba000 | ||
|
4c2bb1dd28 | ||
|
8849577f82 | ||
|
cef3f3ef0d | ||
|
0dda262c18 | ||
|
eb7845092a | ||
|
24bf86fc37 | ||
|
ea7e641bdd | ||
|
0f3ba435d9 | ||
|
d199fe5ff0 | ||
|
c63e56712e | ||
|
a14b3cf49a | ||
|
14f75a0f8c | ||
|
52df44c40c | ||
|
0fb232216c | ||
|
0449557ab2 | ||
|
00e4faa690 | ||
|
9e354b4392 | ||
|
743bffc9a6 | ||
|
23d30e6197 | ||
|
302bdd4c6d | ||
|
3a53f96119 | ||
|
42f5ef4bc9 | ||
|
e7df308d2a | ||
|
c533778f3b | ||
|
8defaa6be5 | ||
|
fe97fbe977 | ||
|
96d8d8b2b2 | ||
|
115c618fc2 | ||
|
46793bbf99 | ||
|
ed11593b16 | ||
|
7cc4632761 | ||
|
362f8fc622 | ||
|
708668ea0a | ||
|
80e1946fa4 | ||
|
85d70f3408 | ||
|
b9537802e3 | ||
|
0c0a2ea55c | ||
|
ca14fbf0aa | ||
|
9f1ec0ce93 | ||
|
9a3cc63700 | ||
|
9aaadad95b | ||
|
3bf6682fce | ||
|
9f009f5979 | ||
|
cb072fcf2c | ||
|
5a94949b94 | ||
|
589202bde7 | ||
|
6dd12f1940 | ||
|
c5a50849ec | ||
|
6a68a1aa1d | ||
|
aaa2417e74 | ||
|
add5308bc3 | ||
|
b431c34d5f | ||
|
4ba59c07f9 | ||
|
681521e5a5 | ||
|
8731665257 | ||
|
e406fb90a9 | ||
|
5dabdd73a1 | ||
|
179d84c39b | ||
|
e5636a446e | ||
|
27c7b3fc17 | ||
|
7e35961874 | ||
|
c0688dfc1f | ||
|
f6078403e0 | ||
|
0569ee0f1a | ||
|
7badddb99c | ||
|
d0e0d53ee7 | ||
|
6e176c77a6 | ||
|
ba8cfc3e91 | ||
|
2f97ff63f3 | ||
|
641759c362 | ||
|
ae938cf04c | ||
|
8f13fcdda6 | ||
|
29bca56e56 | ||
|
297b230669 | ||
|
1c6c52056f | ||
|
25bb7bd547 | ||
|
8c175b88c5 | ||
|
85c7cb4186 | ||
|
09a7d790ad | ||
|
d49a43709d | ||
|
96fe10cc9f | ||
|
8626678d23 | ||
|
2a27cbde0d | ||
|
1f10444d5c | ||
|
1bb8ff97d4 | ||
|
518546b525 | ||
|
17e1003714 | ||
|
011ece182f | ||
|
8e742a06d9 | ||
|
3c024ab7ac | ||
|
f216a0fe82 | ||
|
f9b5bda925 | ||
|
edf47aefd1 | ||
|
203b2b251c | ||
|
987e6b97dc | ||
|
4a93e54e63 | ||
|
658201eb98 | ||
|
c0e486df3f | ||
|
e0177ed895 | ||
|
b325d9bf0f | ||
|
9e01e92839 | ||
|
83c53b7150 | ||
|
2fb7c5c289 | ||
|
e9ed034dc7 | ||
|
f88ee0fc82 | ||
|
68188a7958 | ||
|
b537a237a8 | ||
|
1fc3c4c2f2 | ||
|
8d695c5091 | ||
|
d3f4046396 | ||
|
b80f3717b8 | ||
|
7f9fc557a9 | ||
|
14639337d4 | ||
|
0c136e6815 | ||
|
3057cdab5d | ||
|
539f2eb700 | ||
|
4c0c610b15 | ||
|
6ec8f127c0 | ||
|
5db219d571 | ||
|
f3eb8fa30a | ||
|
f70da74f46 | ||
|
35bbfac2c5 | ||
|
b304bf008d | ||
|
ebe39d9fac | ||
|
4bafeb34fd | ||
|
8e1cefbbb7 | ||
|
2d4fb5e00b | ||
|
6e2ac3b931 | ||
|
3c7d73d4ae | ||
|
fca7d05ed7 | ||
|
cf649cdafe | ||
|
7c5a4065df | ||
|
475633c328 | ||
|
f542e97a70 | ||
|
c7ac6b5670 | ||
|
2d92cdade0 | ||
|
b53f83aa95 | ||
|
fa5728d773 | ||
|
85662bb478 | ||
|
a1b3538131 | ||
|
06ba09f357 | ||
|
f70f61ac2f | ||
|
953a271bee | ||
|
0ead914d02 | ||
|
ac8a4b5a3a | ||
|
e3bb4c9b14 | ||
|
d88eaacf8d | ||
|
1a541c43ad | ||
|
edd69b30e0 | ||
|
d85291ae3e | ||
|
ff0ebfbcc1 | ||
|
e0ca2178d0 | ||
|
69f1d776eb | ||
|
2ae503612b | ||
|
f53369089a | ||
|
2f5ebd2071 | ||
|
56cb000130 | ||
|
db5313129e | ||
|
844eb3868a | ||
|
1c14f562ad | ||
|
b26bd5e296 | ||
|
52b77464f1 | ||
|
8152207334 | ||
|
e7826d725e | ||
|
3523609cad | ||
|
663752010c | ||
|
d6778a55cf | ||
|
9418fd0fb8 | ||
|
124706afab | ||
|
cf818f64c6 | ||
|
b94445b32a | ||
|
f025edf095 | ||
|
09bbc9c28d | ||
|
a98f6db089 | ||
|
673fdf1b67 | ||
|
8ebbb55842 | ||
|
df31cbbe77 | ||
|
5c700394a8 | ||
|
d442c2158a | ||
|
11779e2037 | ||
|
855180f905 | ||
|
372eda8f2f | ||
|
e941f74f99 | ||
|
4350fad789 | ||
|
cce80ff535 | ||
|
c82845d22a | ||
|
7ab68fb418 | ||
|
ae56d51076 | ||
|
aa8898a720 | ||
|
e9ab459b30 | ||
|
65779b18eb | ||
|
ca0166d8fd | ||
|
5f62c1abb2 | ||
|
f94fd218a0 | ||
|
f3dfc9631c | ||
|
44fa85af6b | ||
|
cd04d027a0 | ||
|
7829be0936 | ||
|
b98d591077 | ||
|
29fa5c4cd9 | ||
|
70608158fe | ||
|
106740abca | ||
|
1c50db9ce9 | ||
|
2dfa25fbee | ||
|
fa577aa018 | ||
|
0e83e47f1a | ||
|
c1ee97fc40 | ||
|
ec66cf29f3 | ||
|
f1200ac74d | ||
|
be1827e554 | ||
|
b46af3405e | ||
|
6c2ed4baed | ||
|
247e8ffbf4 | ||
|
52d93e8881 | ||
|
5d2e3f37f1 | ||
|
455136a722 | ||
|
ec8fd589e0 | ||
|
5ea8586c59 | ||
|
47cd4de267 | ||
|
22a502fd59 | ||
|
fce45b1d8d | ||
|
2b7623b6d5 | ||
|
5f73c3fb0e | ||
|
9476c3a3de | ||
|
5d13694530 | ||
|
5df328424d | ||
|
51d89c7210 | ||
|
f8d48cc9fc | ||
|
5f7bd6087f | ||
|
7549d73115 | ||
|
5eef57f3b8 | ||
|
4ad6b2bebf | ||
|
af5211aada | ||
|
58b625ef03 | ||
|
4ffbd839eb | ||
|
f8def37879 | ||
|
205bde833f | ||
|
e2bb4d7340 | ||
|
b040870cf1 | ||
|
4de60911cd | ||
|
058808aa61 | ||
|
253d65d5a3 | ||
|
2b682a14ae | ||
|
84d817c9d4 | ||
|
4db10f8195 | ||
|
2277c14882 | ||
|
359fd9761d | ||
|
e9fa2259a7 | ||
|
746d24da50 | ||
|
e341120f64 | ||
|
4e71a56b18 | ||
|
6ec80ee427 | ||
|
28a8ca444b | ||
|
a75e827d62 | ||
|
3dbb4fad41 | ||
|
ecf70e7b86 | ||
|
53c1e0986b | ||
|
16f49b58a8 | ||
|
1df01c77e3 | ||
|
27073eb4f4 | ||
|
eb3d9553ed | ||
|
188dc0b3bd | ||
|
4e7672fd63 | ||
|
6c35a435f0 | ||
|
5263b21138 | ||
|
49d40186be | ||
|
660a7cd059 | ||
|
ad739d0ce8 | ||
|
4e8d0d46fe | ||
|
02713c1661 | ||
|
8d561b5a56 | ||
|
25ece740e2 | ||
|
1c66534cb8 | ||
|
08610eee13 | ||
|
b8ccf9b2af | ||
|
537115fac5 | ||
|
3924521aed | ||
|
8bbe15edee | ||
|
0a686337f8 | ||
|
98d939a81b | ||
|
e1c6e83b98 | ||
|
d41e30c359 | ||
|
4bb63d428f | ||
|
85f970ea2d | ||
|
3411dde52f | ||
|
4a63606c84 | ||
|
2d439ed959 | ||
|
0e213abfd4 | ||
|
be737a24f2 | ||
|
f796f1f133 | ||
|
b2dc6f1f3c | ||
|
d73800bd5f | ||
|
52bb303ffa | ||
|
4e8c99554a | ||
|
428dbe8f0e | ||
|
f24a25b370 | ||
|
4107c01ad1 | ||
|
24c7b0074a | ||
|
378aae9567 | ||
|
742f73f028 | ||
|
52930918f2 | ||
|
be0f2e7e45 | ||
|
6134c4fdec | ||
|
5f1a2df610 | ||
|
d3d29acf09 | ||
|
b32b84f8c7 | ||
|
95ce975d40 | ||
|
8532189b54 | ||
|
1223d3dac3 | ||
|
a6c838cd39 | ||
|
03f0870f53 | ||
|
931959ecc8 | ||
|
b34037f26f | ||
|
f95e2ad703 | ||
|
5fac4a34bd | ||
|
3f9c2366f2 | ||
|
a708f37cd6 | ||
|
dd1071f180 | ||
|
576a886937 | ||
|
1208035da3 | ||
|
7944c9f826 | ||
|
6ee7df9514 | ||
|
4a3b6aa1d3 | ||
|
77b8224949 | ||
|
c4c94de1ac | ||
|
75cb466909 | ||
|
fd6235995f | ||
|
840460d960 | ||
|
3b46f3fe32 | ||
|
a2281dcf58 | ||
|
a19eb9c447 | ||
|
ceffbb6a77 | ||
|
c5439b4e7d | ||
|
0b227eff42 | ||
|
033b4cc6cc | ||
|
4fdec44755 | ||
|
6606bd4185 | ||
|
7cc964dfc5 | ||
|
b3bfc2b464 | ||
|
a937ac265c | ||
|
1058dd93f1 | ||
|
f4f9a148af | ||
|
d07f191a1e | ||
|
0ba9a9e076 | ||
|
ac7aadf615 | ||
|
3873189d79 | ||
|
891692d914 | ||
|
2d31de245f | ||
|
8c587e9b75 | ||
|
84622380d6 | ||
|
0736a65f2a | ||
|
658deb3bcd | ||
|
cfed5be1ca | ||
|
9fa4033b2a | ||
|
2c620ba440 | ||
|
01bf3a3818 | ||
|
8641222395 | ||
|
b4aedd606c | ||
|
ee1afc665f | ||
|
57e31e1319 | ||
|
46f6941325 | ||
|
61f3e1854c | ||
|
5cb327af38 | ||
|
648b2d69f9 | ||
|
e4f8c229b4 | ||
|
189e3ea348 | ||
|
e2c71e7a18 | ||
|
3b1268bbfd | ||
|
248d26fe69 | ||
|
afcac34208 | ||
|
9aa6e2a338 | ||
|
434acf21a4 | ||
|
aaf0df736b | ||
|
bb0d82aa10 | ||
|
9556414bf5 | ||
|
172ccd0428 | ||
|
31a9c75c08 | ||
|
fde7ef75af | ||
|
af7b20ee55 | ||
|
0277d1213e | ||
|
c62c4fa1d9 | ||
|
a520f7bff3 | ||
|
37f5b9114e | ||
|
d2dc3082b1 | ||
|
bd4d5da641 | ||
|
dad65da497 | ||
|
49aadaab0e | ||
|
864d665494 | ||
|
719151b44e | ||
|
1c3a9da5ed | ||
|
154b672d47 | ||
|
cfa2268c05 | ||
|
d37fd8955c | ||
|
a7d30582a6 | ||
|
0a570849c5 | ||
|
442d1b2713 | ||
|
9749df00d1 | ||
|
8a9a48fda1 | ||
|
777ebd77c8 | ||
|
36855783a7 | ||
|
8595539dea | ||
|
687ed02df0 | ||
|
3b861983e6 | ||
|
9caf9fc98f | ||
|
f58ba2926e | ||
|
049184bdfd | ||
|
6d6f51fdb6 | ||
|
2ee085d13d | ||
|
fb8a761278 | ||
|
625a7b8fda | ||
|
b15bef72df | ||
|
0aa65e2d95 | ||
|
53acf6420e | ||
|
f54dee3ccc | ||
|
b494d5ae79 | ||
|
7975140452 | ||
|
11ea67632c | ||
|
af09c04834 | ||
|
90d6492de6 | ||
|
73bcbd2590 | ||
|
faf3558754 | ||
|
37719a247e | ||
|
08df9f924f | ||
|
5812b2bec1 | ||
|
1d54be04e0 | ||
|
de98665b00 | ||
|
f23af07f6a | ||
|
9904367106 | ||
|
46a73566f5 | ||
|
2de19a1c94 | ||
|
5594e25dcf | ||
|
0c47327fc4 | ||
|
d6bf6744d8 | ||
|
094e8653ff | ||
|
5d6f31a25d | ||
|
545b6abfa1 | ||
|
d8270bddfa | ||
|
dfb03eabe6 | ||
|
6ea9dc4f1b | ||
|
acfaf3970e | ||
|
4402bd8f03 | ||
|
56280db289 | ||
|
6ebc103bc5 | ||
|
a40253da26 | ||
|
8f181bc4a0 | ||
|
625dc0304b | ||
|
5f9c21120d | ||
|
1e6bbba189 | ||
|
13ac8c093a | ||
|
d7e68f3a1d | ||
|
d60b38b3aa | ||
|
e47b750d21 | ||
|
ff764df4af | ||
|
630439cddf | ||
|
8b477e1f71 | ||
|
e021695230 | ||
|
70f00872a1 | ||
|
f14ae332eb | ||
|
76ff49a8ba | ||
|
dad726b6ca | ||
|
4aa8ec6bb8 | ||
|
757f1c6175 | ||
|
cfa5c9932e | ||
|
4bbb07ee1f | ||
|
66581fcaa2 | ||
|
b83e9bbf82 | ||
|
48a3ad29ff | ||
|
cede16bc50 | ||
|
e57105669c | ||
|
17480fd887 | ||
|
42d8476ea1 | ||
|
d901f0ba86 | ||
|
cea780b85b | ||
|
381e89d3df | ||
|
b4a8e32f44 | ||
|
26a7d37298 | ||
|
9291c75669 | ||
|
f61d0a07b1 | ||
|
999e0ad4c2 | ||
|
1721a0b693 | ||
|
2ceb075706 | ||
|
9a84a7deea | ||
|
1f6323941b | ||
|
c6c91181ab | ||
|
e4e9f1bec8 | ||
|
18d9360ad3 | ||
|
efbbdf1e72 | ||
|
624c05bdf4 | ||
|
e0d63535a6 | ||
|
7832dd42b2 | ||
|
d49294d288 | ||
|
b84a884387 | ||
|
9eeed5223c | ||
|
f520b6d5d0 | ||
|
d3ce2162ca | ||
|
1cc1ba2b7a | ||
|
6c0d984990 | ||
|
08e4da1c8a | ||
|
ba77ca4292 | ||
|
398d2c7cce | ||
|
b513a34fb8 | ||
|
272c31f132 | ||
|
ef9a790df0 | ||
|
f020df31d2 | ||
|
d26cf3de9d | ||
|
6af4ff6537 | ||
|
5c4a7dd273 | ||
|
41fb2ee1dc | ||
|
656221dcc0 | ||
|
2b8825f814 | ||
|
020da4d5c8 | ||
|
e0d1fb72a8 | ||
|
6d61173bca | ||
|
0f4b1bc91b | ||
|
36738fc9e4 | ||
|
5750f51bdd | ||
|
c569678a26 | ||
|
af19a09a3c | ||
|
92fb2dbb0d | ||
|
bc33bd8420 | ||
|
27c2bc1b2d | ||
|
337be1f989 | ||
|
6c9c3ce7ec | ||
|
495fe05a75 | ||
|
ab61314e0f | ||
|
70c1cc8829 | ||
|
b6c1d06165 | ||
|
d40ed14d80 | ||
|
6970ea39e4 | ||
|
2ce5bb1fea | ||
|
6fb920c826 | ||
|
40dc30044f | ||
|
b9515d3408 | ||
|
b99a1a753c | ||
|
e1d4088d98 | ||
|
a1cd3cf5bb | ||
|
cf054875b5 | ||
|
61e934bacc | ||
|
13a1eed144 | ||
|
a2cc3ee2fd | ||
|
483386e440 | ||
|
695902d962 | ||
|
6d62fb8c1e | ||
|
9f0febe402 | ||
|
bbb28032e7 | ||
|
97b57009c9 | ||
|
c96ecd9697 | ||
|
e0edb2b15b | ||
|
f32bab7733 | ||
|
bc266e1f7c | ||
|
5b48442006 | ||
|
bf009c8854 | ||
|
898ad5804e | ||
|
dfd36d459b | ||
|
5ceb04e571 | ||
|
4ca29feab1 | ||
|
95e1d8c5a3 | ||
|
22e69bbb8c | ||
|
b8aa4e1bc3 | ||
|
b6cc9dae09 | ||
|
e6a394e8e7 | ||
|
4e09f52b22 | ||
|
903ea66b36 | ||
|
525072f757 | ||
|
b741d163a1 | ||
|
b1a135fff9 | ||
|
d8d7347394 | ||
|
d8b07cee9c | ||
|
729c9237fe | ||
|
b2fc9cb8ac | ||
|
89c04ea3f6 | ||
|
93bf2e1bb9 | ||
|
0504bec81d | ||
|
7f9ded7816 | ||
|
c915f2f161 | ||
|
034510cdda | ||
|
6899b38944 | ||
|
b3aa6c9a6c | ||
|
eddc7bbf4e | ||
|
9bc112090d | ||
|
0b37514cfe | ||
|
e93ef1dd6e | ||
|
fe7b798cda | ||
|
a0cd7869bc | ||
|
c2d0382bae | ||
|
bb09c15c30 | ||
|
0a68b36295 | ||
|
b4a8154eae | ||
|
869640b2e2 | ||
|
de982f8b50 | ||
|
0ed8e62de8 | ||
|
5f677d4c83 | ||
|
6218cec38a | ||
|
c2d9baa9d9 | ||
|
8f6cc7846a | ||
|
a2f139c204 | ||
|
22d3048017 | ||
|
1367d82006 | ||
|
9572c440ea | ||
|
45b57b715f | ||
|
48e3eb877d | ||
|
9ec9fb9362 | ||
|
f32c1f1338 | ||
|
4f14ce96cb | ||
|
aeeff01d64 | ||
|
2bc71743de | ||
|
0cffdf124a | ||
|
789b698e7a | ||
|
0dbe87e2f4 | ||
|
0e069c6b88 | ||
|
f4ccb9f802 | ||
|
3bf2fa1237 | ||
|
7609906994 | ||
|
c626a161cd | ||
|
bcf84c2b8c | ||
|
d15878555f | ||
|
5121d060db | ||
|
f48c2c9b5c | ||
|
2c9c5ea8bb | ||
|
2b8a1fa2ca | ||
|
6c55d1e510 | ||
|
577a706b9f | ||
|
e7d78ea52e | ||
|
2b947254d5 | ||
|
32da3965f8 | ||
|
44e10db28d | ||
|
bc96846839 | ||
|
1425b68c39 | ||
|
f3e45bd240 | ||
|
d2bd6b8744 | ||
|
dbb9d14deb | ||
|
6ec2fae320 | ||
|
ef81026ffb | ||
|
45a276cf33 | ||
|
c6259d2feb | ||
|
3a7cab851d | ||
|
158bbff8de | ||
|
3f457d4a00 | ||
|
9cb06d70b2 | ||
|
e616e33239 | ||
|
c2c6ace3e5 | ||
|
7fa7fe3886 | ||
|
8f61715b6d | ||
|
e4918e777e | ||
|
19da9ef754 | ||
|
0a07750efb | ||
|
c78fe2f701 | ||
|
9ea1fa7f4b | ||
|
b9087ad7b7 | ||
|
efaa1eb18f | ||
|
89f39f1a1f | ||
|
b0ae9fead5 | ||
|
983acfc7e4 | ||
|
79920efe4f | ||
|
b250d13362 | ||
|
df13198c5c | ||
|
202c4b821e | ||
|
e789066b9b | ||
|
46ffedf530 | ||
|
fd72e7fa4e | ||
|
a9e08a7104 | ||
|
442a933f9b | ||
|
a2d6d82d83 | ||
|
2a7adda968 | ||
|
98aaec0ffd | ||
|
c0183aa359 | ||
|
c3197a39b0 | ||
|
6789c1f032 | ||
|
6fe1d178dd | ||
|
859d2e8641 | ||
|
3787eefa48 | ||
|
54f280f792 | ||
|
401f691359 | ||
|
77b0adaf7f | ||
|
7b5ab89fef | ||
|
464170cca9 | ||
|
dcdb937cf3 | ||
|
2c180c6123 | ||
|
1540b7b5bf | ||
|
030b91ba9f | ||
|
76d4821295 | ||
|
e72cf5423c | ||
|
ad7ac35422 | ||
|
ea21848811 | ||
|
a65d037def | ||
|
a667fbd8b4 | ||
|
92240b6e0c | ||
|
20eeaf73ac | ||
|
a1314347f9 | ||
|
fab69e3cae | ||
|
cc2cc8397e | ||
|
fe7d128056 | ||
|
d3a8f57e1c | ||
|
96c279275e | ||
|
d6a504c38b | ||
|
b1224c0a2b | ||
|
694787c8d6 | ||
|
8a6254c47e | ||
|
216d4511f7 | ||
|
043aa8755d | ||
|
e772dcecad | ||
|
ac99970bd4 | ||
|
7547250631 | ||
|
06bd6edc8c | ||
|
98aa2a447e | ||
|
00973e6365 | ||
|
dc11760640 | ||
|
1f955ae8d5 | ||
|
8c6ef2f533 | ||
|
d4f12d6d33 | ||
|
00f2195dd2 | ||
|
23ecf1264f | ||
|
7fcdbe9c9e | ||
|
8fa8f9b733 | ||
|
7a731c0fa5 | ||
|
700e53eb2c | ||
|
5968d6c903 | ||
|
c7317dbe54 | ||
|
031f52f6b7 | ||
|
fa6579f8f0 | ||
|
c9c99d58ab | ||
|
b9d6548243 | ||
|
914c02b7ab | ||
|
b83a7bed00 | ||
|
f3c19779cd | ||
|
9ef5894685 | ||
|
71117d3c42 | ||
|
079f758b66 | ||
|
dd83f121c8 | ||
|
8f326ee41b | ||
|
f32320fd67 | ||
|
0a7e49f6d5 | ||
|
33d8c0314c | ||
|
b73d5b4424 | ||
|
c4a450e5de | ||
|
b32ac0cf04 | ||
|
52c0e9993b | ||
|
1c3b3e9173 | ||
|
9690276079 | ||
|
58362883b3 | ||
|
5b8f35294b | ||
|
12c5b18b05 | ||
|
05315b14bd | ||
|
dd842a1393 | ||
|
a467b8f2e8 |
1
.gitignore
vendored
@@ -17,3 +17,4 @@ clang/
|
||||
win/
|
||||
gcc/
|
||||
tags
|
||||
.DS_Store
|
||||
|
6
.gitmodules
vendored
@@ -1,6 +0,0 @@
|
||||
[submodule "thirdparty/jreen"]
|
||||
path = thirdparty/jreen
|
||||
url = git://github.com/euroelessar/jreen.git
|
||||
[submodule "thirdparty/qtweetlib/QTweetLib"]
|
||||
path = thirdparty/qtweetlib/QTweetLib
|
||||
url = git://github.com/minimoog/QTweetLib.git
|
@@ -15,15 +15,18 @@ SET( TOMAHAWK_APPLICATION_NAME "Tomahawk" )
|
||||
SET( TOMAHAWK_DESCRIPTION_SUMMARY "The social media player" )
|
||||
|
||||
SET( TOMAHAWK_VERSION_MAJOR 0 )
|
||||
SET( TOMAHAWK_VERSION_MINOR 2 )
|
||||
SET( TOMAHAWK_VERSION_PATCH 99 )
|
||||
SET( TOMAHAWK_VERSION_MINOR 4 )
|
||||
SET( TOMAHAWK_VERSION_PATCH 2 )
|
||||
|
||||
#SET( TOMAHAWK_VERSION_RC 0 )
|
||||
|
||||
# enforce proper symbol exporting on all platforms
|
||||
add_definitions( "-fvisibility=hidden" )
|
||||
|
||||
# build options
|
||||
option(BUILD_GUI "Build Tomahawk with GUI" ON)
|
||||
option(BUILD_RELEASE "Generate TOMAHAWK_VERSION without GIT info" OFF)
|
||||
option(LEGACY_KDE_INTEGRATION "Install tomahawk.protocol file, deprecated since 4.6.0" OFF)
|
||||
|
||||
# generate version string
|
||||
|
||||
@@ -48,13 +51,15 @@ IF( NOT BUILD_RELEASE )
|
||||
ENDIF()
|
||||
|
||||
|
||||
|
||||
# set paths
|
||||
SET( THIRDPARTY_DIR ${CMAKE_SOURCE_DIR}/thirdparty )
|
||||
SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" )
|
||||
SET( CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" )
|
||||
SET( CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" )
|
||||
|
||||
# make predefined install dirs available everywhere
|
||||
INCLUDE(GNUInstallDirs)
|
||||
|
||||
# installer creation
|
||||
INCLUDE( TomahawkCPack.cmake )
|
||||
|
||||
@@ -69,7 +74,7 @@ IF( NOT BUILD_GUI )
|
||||
MESSAGE( STATUS "Building Tomahawk ${TOMAHAWK_VERSION} in HEADLESS mode ***" )
|
||||
ELSE()
|
||||
MESSAGE( STATUS "Building Tomahawk ${TOMAHAWK_VERSION} full GUI version ***" )
|
||||
LIST(APPEND NEEDED_QT4_COMPONENTS "QtGui" "QtWebkit" )
|
||||
LIST(APPEND NEEDED_QT4_COMPONENTS "QtGui" "QtWebkit" "QtUiTools" )
|
||||
ENDIF()
|
||||
|
||||
IF( BUILD_GUI AND UNIX AND NOT APPLE )
|
||||
@@ -77,7 +82,7 @@ IF( BUILD_GUI AND UNIX AND NOT APPLE )
|
||||
ENDIF()
|
||||
|
||||
macro_optional_find_package(Qt4 4.7.0 COMPONENTS ${NEEDED_QT4_COMPONENTS} )
|
||||
macro_log_feature(QT4_FOUND "Qt" "A cross-platform application and UI framework" "http://qt.nokia.com" TRUE "" "If you see this, although libqt4-devel is installed, check whether \n the qtwebkit-devel package is installed as well")
|
||||
macro_log_feature(QT4_FOUND "Qt" "A cross-platform application and UI framework" "http://qt.nokia.com" TRUE "" "If you see this, although libqt4-devel is installed, check whether the \n qtwebkit-devel package and whatever contains QtUiTools is installed too")
|
||||
|
||||
macro_optional_find_package(Phonon 4.5.0)
|
||||
macro_log_feature(PHONON_FOUND "Phonon" "The Phonon multimedia library" "http://phonon.kde.org" TRUE "" "")
|
||||
@@ -85,8 +90,8 @@ if(PHONON_FOUND)
|
||||
message(STATUS "Phonon found; ensure that phonon-vlc is at least 0.4")
|
||||
endif()
|
||||
|
||||
macro_optional_find_package(LibEchonest 1.1.7)
|
||||
macro_log_feature(LIBECHONEST_FOUND "Echonest" "Qt library for communicating with The Echo Nest" "http://projects.kde.org/libechonest" TRUE "" "libechonest 1.1.8 is needed for dynamic playlists and the infosystem")
|
||||
macro_optional_find_package(LibEchonest 1.1.10)
|
||||
macro_log_feature(LIBECHONEST_FOUND "Echonest" "Qt library for communicating with The Echo Nest" "http://projects.kde.org/libechonest" TRUE "" "libechonest 1.1.10 is needed for dynamic playlists and the infosystem")
|
||||
|
||||
macro_optional_find_package(CLucene 0.9.23)
|
||||
macro_log_feature(CLucene_FOUND "CLucene" "The open-source, C++ search engine" "http://clucene.sf.net" TRUE "" "CLucene is used for indexing the collection")
|
||||
@@ -105,40 +110,50 @@ macro_log_feature(Boost_FOUND "Boost" "Provides free peer-reviewed portable C++
|
||||
macro_optional_find_package(QCA2)
|
||||
macro_log_feature(QCA2_FOUND "QCA2" "Provides encryption and signing functions required for Grooveshark resolver" "http://delta.affinix.com/qca/" FALSE "" "")
|
||||
|
||||
macro_optional_find_package(LibAttica)
|
||||
macro_log_feature(LIBATTICA_FOUND "libattica" "Provides support for automatic fetching and managing of resolvers from the tomahawk website" "https://projects.kde.org/projects/kdesupport/attica" FALSE "" "")
|
||||
|
||||
macro_optional_find_package(QuaZip)
|
||||
macro_log_feature(QuaZip_FOUND "QuaZip" "Provides support for extracting downloaded resolvers automatically." "http://quazip.sourceforge.net/" FALSE "" "")
|
||||
|
||||
macro_optional_find_package(Jreen)
|
||||
macro_log_feature(LIBJREEN_FOUND "Jreen" "Qt XMPP Library" "https://github.com/euroelessar/jreen" FALSE "" "Jreen is needed for the Jabber SIP plugin.\n")
|
||||
|
||||
macro_optional_find_package(QTweetLib)
|
||||
macro_log_feature(QTWEETLIB_FOUND "QTweetLib" "Qt Twitter Library" "https://github.com/minimoog/QTweetLib" FALSE "" "QTweetLib is needed for the Twitter SIP plugin.\n")
|
||||
|
||||
|
||||
IF( NOT QuaZip_FOUND )
|
||||
add_subdirectory( ${CMAKE_SOURCE_DIR}/src/libtomahawk/thirdparty/quazip )
|
||||
SET( QuaZip_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR}/libtomahawk/thirdparty/quazip )
|
||||
SET( QuaZip_LIBRARY quazip )
|
||||
SET( QuaZip_LIBRARIES ${QuaZip_LIBRARY} )
|
||||
SET( QuaZip_FOUND true )
|
||||
macro_log_feature(QuaZip_FOUND "QuaZip" "Provides support for extracting downloaded resolvers automatically. Building internal copy" "http://quazip.sourceforge.net/" FALSE "" "")
|
||||
|
||||
# copy headers to build/quazip so we can use proper includes inside the code
|
||||
FILE( COPY ${CMAKE_SOURCE_DIR}/src/libtomahawk/thirdparty/quazip/quazip/ DESTINATION ${CMAKE_BINARY_DIR}/libtomahawk/thirdparty/quazip )
|
||||
ENDIF()
|
||||
|
||||
# required
|
||||
#While we distribute our own liblastfm2, don't need to look for it
|
||||
#macro_optional_find_package(LibLastFm 0.3.3)
|
||||
#macro_log_feature(LIBLASTFM_FOUND "LastFm" "Qt library for the Last.fm webservices" "https://github.com/mxcl/liblastfm" FALSE "" "liblastfm is needed for scrobbling tracks to Last.fm and fetching cover artwork")
|
||||
set(LIBLASTFM_FOUND true)
|
||||
|
||||
#### submodules start
|
||||
# automatically init submodules here, don't delete this code we may add submodules again
|
||||
|
||||
# this installs headers and such and should really be handled in a separate package by packagers
|
||||
IF( INTERNAL_JREEN )
|
||||
ADD_SUBDIRECTORY( ${THIRDPARTY_DIR}/jreen )
|
||||
SET( LIBJREEN_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR}/thirdparty/jreen/include )
|
||||
SET( LIBJREEN_LIBRARY jreen )
|
||||
SET( LIBJREEN_LIBRARIES ${LIBJREEN_LIBRARY} )
|
||||
SET( LIBJREEN_FOUND true )
|
||||
MESSAGE(STATUS "INTERNAL libjreen: ${LIBJREEN_INCLUDE_DIR}, ${LIBJREEN_LIBRARY}")
|
||||
ELSE( INTERNAL_JREEN )
|
||||
macro_optional_find_package(Jreen)
|
||||
ENDIF( INTERNAL_JREEN )
|
||||
macro_log_feature(LIBJREEN_FOUND "Jreen" "Qt XMPP Library" "https://github.com/euroelessar/jreen" FALSE "" "Jreen is needed for the Jabber SIP plugin. \n\n Use -DINTERNAL_JREEN=ON to build the git submodule inside Tomahawk \n Be aware this installs a full jreen with headers and everything!\n")
|
||||
|
||||
# this installs headers and such and should really be handled in a separate package by packagers
|
||||
IF( INTERNAL_QTWEETLIB )
|
||||
ADD_SUBDIRECTORY( ${THIRDPARTY_DIR}/qtweetlib )
|
||||
# copy headers to build/QTweetLib so we can use proper includes inside the code
|
||||
FILE( COPY ${CMAKE_SOURCE_DIR}/thirdparty/qtweetlib/QTweetLib/src/ DESTINATION ${CMAKE_BINARY_DIR}/QTweetLib )
|
||||
SET( QTWEETLIB_INCLUDE_DIR ${CMAKE_BINARY_DIR} )
|
||||
SET( QTWEETLIB_LIBRARY tomahawk_qtweetlib )
|
||||
SET( QTWEETLIB_LIBRARIES ${QTWEETLIB_LIBRARY} )
|
||||
SET( QTWEETLIB_FOUND true )
|
||||
MESSAGE(STATUS "INTERNAL libQTweetLib: ${QTWEETLIB_INCLUDE_DIR}, ${QTWEETLIB_LIBRARY}")
|
||||
ELSE( INTERNAL_QTWEETLIB )
|
||||
macro_optional_find_package(QTweetLib)
|
||||
ENDIF( INTERNAL_QTWEETLIB )
|
||||
macro_log_feature(QTWEETLIB_FOUND "QTweetLib" "Qt Twitter Library" "https://github.com/minimoog/QTweetLib" FALSE "" "QTweetLib is needed for the Twitter SIP plugin. \n\n Use -DINTERNAL_QTWEETLIB=ON to build the git submodule inside Tomahawk \n")
|
||||
# IF( FALSE )
|
||||
# IF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.gitmodules)
|
||||
# EXECUTE_PROCESS(COMMAND git submodule init WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} )
|
||||
# EXECUTE_PROCESS(COMMAND git submodule update WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} )
|
||||
# ENDIF(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.gitmodules)
|
||||
# ENDIF()
|
||||
|
||||
#### submodules end
|
||||
|
||||
### libportfwd
|
||||
SET( LIBPORTFWD_INCLUDE_DIR ${THIRDPARTY_DIR}/libportfwd/include )
|
||||
@@ -147,8 +162,8 @@ SET( LIBPORTFWD_LIBRARIES ${LIBPORTFWD_LIBRARY} )
|
||||
ADD_SUBDIRECTORY( ${THIRDPARTY_DIR}/libportfwd )
|
||||
|
||||
# we need pthreads too
|
||||
macro_optional_find_package(Threads)
|
||||
macro_log_feature(THREADS_FOUND "Threads" "Threading Library" "" TRUE "" "Platform specific library for threading")
|
||||
#macro_optional_find_package(Threads)
|
||||
#macro_log_feature(THREADS_FOUND "Threads" "Threading Library" "" TRUE "" "Platform specific library for threading")
|
||||
|
||||
macro_optional_find_package(KDE4)
|
||||
macro_optional_find_package(KDE4Installed)
|
||||
@@ -158,9 +173,12 @@ macro_optional_find_package(KDE4Installed)
|
||||
|
||||
# macro_optional_find_package(KDE4)
|
||||
IF(KDE4_FOUND)
|
||||
#KDE4 adds and removes some compiler flags that we don't like
|
||||
STRING( REPLACE "-std=iso9899:1990" "" CLEAN_C_FLAGS ${CMAKE_C_FLAGS} )
|
||||
SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexceptions" )
|
||||
IF( CMAKE_C_FLAGS )
|
||||
# KDE4 adds and removes some compiler flags that we don't like
|
||||
# (only for gcc not for clang e.g.)
|
||||
STRING( REPLACE "-std=iso9899:1990" "" CLEAN_C_FLAGS ${CMAKE_C_FLAGS} )
|
||||
SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexceptions" )
|
||||
ENDIF()
|
||||
ELSE()
|
||||
SET( CLEAN_C_FLAGS ${CMAKE_C_FLAGS} )
|
||||
ENDIF()
|
||||
@@ -195,3 +213,9 @@ ADD_SUBDIRECTORY( src/libtomahawk )
|
||||
SET( TOMAHAWK_LIBRARIES tomahawklib )
|
||||
ADD_SUBDIRECTORY( src )
|
||||
ADD_SUBDIRECTORY( admin )
|
||||
|
||||
IF( BUILD_GUI )
|
||||
IF( NOT DISABLE_CRASHREPORTER )
|
||||
ADD_SUBDIRECTORY( src/breakpad/CrashReporter )
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
@@ -2,6 +2,7 @@
|
||||
# This module looks for clucene (http://clucene.sf.net) support
|
||||
# It will define the following values
|
||||
#
|
||||
# CLUCENE_INCLUDE_DIRS = CLUCENE_INCLUDE_DIR + CLUCENE_LIBRARY_DIR
|
||||
# CLUCENE_INCLUDE_DIR = where CLucene/StdHeader.h can be found
|
||||
# CLUCENE_LIBRARY_DIR = where CLucene/clucene-config.h can be found
|
||||
# CLUCENE_LIBRARIES = the libraries to link against CLucene
|
||||
@@ -12,7 +13,16 @@
|
||||
INCLUDE(CheckSymbolExists)
|
||||
INCLUDE(FindLibraryWithDebug)
|
||||
|
||||
# try to locate a patched unstable version (for comp's sake *sigh*) first
|
||||
FIND_PACKAGE(CLuceneUnstable)
|
||||
IF(CLUCENEUNSTABLE_FOUND)
|
||||
SET(CLucene_FOUND TRUE)
|
||||
SET(CLUCENE_INCLUDE_DIR ${CLUCENE_UNSTABLE_INCLUDE_DIRS})
|
||||
SET(CLUCENE_INCLUDE_DIRS ${CLUCENE_INCLUDE_DIR})
|
||||
SET(CLUCENE_LIBRARIES ${CLUCENE_UNSTABLE_LIBS})
|
||||
|
||||
#MESSAGE(FATAL_ERROR NARF)
|
||||
ELSE(CLUCENEUNSTABLE_FOUND)
|
||||
IF(CLucene_FIND_VERSION)
|
||||
SET(CLUCENE_MIN_VERSION ${CLucene_FIND_VERSION})
|
||||
ELSEIF()
|
||||
@@ -98,8 +108,11 @@ ENDIF (CLUCENE_LIBRARY_DIR)
|
||||
|
||||
IF(CLUCENE_INCLUDE_DIR AND CLUCENE_LIBRARIES AND CLUCENE_LIBRARY_DIR AND CLUCENE_GOOD_VERSION)
|
||||
SET(CLucene_FOUND TRUE)
|
||||
SET(CLUCENE_INCLUDE_DIRS ${CLUCENE_LIBRARY_DIR} ${CLUCENE_INCLUDE_DIR})
|
||||
ENDIF(CLUCENE_INCLUDE_DIR AND CLUCENE_LIBRARIES AND CLUCENE_LIBRARY_DIR AND CLUCENE_GOOD_VERSION)
|
||||
|
||||
ENDIF(CLUCENEUNSTABLE_FOUND)
|
||||
|
||||
IF(CLucene_FOUND)
|
||||
IF(NOT CLucene_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Found CLucene: ${CLUCENE_LIBRARIES} version ${CLUCENE_VERSION}")
|
||||
@@ -111,7 +124,8 @@ ELSE(CLucene_FOUND)
|
||||
ENDIF(CLucene_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
CLUCENE_INCLUDE_DIR
|
||||
CLUCENE_LIBRARY_DIR
|
||||
CLUCENE_INCLUDE_DIRS
|
||||
CLUCENE_INCLUDE_DIR
|
||||
CLUCENE_LIBRARY_DIR
|
||||
CLUCENE_LIBRARIES
|
||||
)
|
||||
|
37
CMakeModules/FindCLuceneUnstable.cmake
Normal file
@@ -0,0 +1,37 @@
|
||||
# - Try to find clucene-unstable
|
||||
# This is a workaround for distros, that want to ship a recent enough clucene but don't want to replace the old version
|
||||
#
|
||||
# CLUCENEUNSTABLE_FOUND - system has clucene-unstable
|
||||
# CLUCENE_UNSTABLE_INCLUDE_DIR - the clucene-unstable include directories
|
||||
# CLUCENE_UNSTABLE_LIBS - link these to use clucene-unstable
|
||||
#
|
||||
# (c) Dominik Schmidt <dev@dominik-schmidt.de>
|
||||
#
|
||||
|
||||
# Include dir
|
||||
find_path(CLUCENE_UNSTABLE_INCLUDE_DIR
|
||||
NAMES CLucene.h
|
||||
PATH_SUFFIXES clucene-unstable
|
||||
PATHS ${KDE4_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
# Finally the library itself
|
||||
find_library(CLUCENE_UNSTABLE_SHARED_LIB
|
||||
NAMES clucene-unstable-shared
|
||||
PATHS ${KDE4_LIB_DIR}
|
||||
)
|
||||
|
||||
find_library(CLUCENE_UNSTABLE_CORE_LIB
|
||||
NAMES clucene-unstable-core
|
||||
PATHS ${KDE4_LIB_DIR}
|
||||
)
|
||||
|
||||
|
||||
SET( CLUCENE_UNSTABLE_LIBS ${CLUCENE_UNSTABLE_SHARED_LIB} ${CLUCENE_UNSTABLE_CORE_LIB} )
|
||||
SET( CLUCENE_UNSTABLE_INCLUDE_DIRS ${CLUCENE_UNSTABLE_INCLUDE_DIR})
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(CLuceneUnstable DEFAULT_MSG CLUCENE_UNSTABLE_LIBS CLUCENE_UNSTABLE_INCLUDE_DIRS)
|
||||
|
||||
|
||||
MARK_AS_ADVANCED(CLUCENE_UNSTABLE_LIBS CLUCENE_UNSTABLE_INCLUDE_DIRS)
|
||||
|
63
CMakeModules/FindLibAttica.cmake
Normal file
@@ -0,0 +1,63 @@
|
||||
# Try to find the Attica library
|
||||
# Once done this will define
|
||||
#
|
||||
# LIBATTICA_FOUND Indicates that Attica was found
|
||||
# LIBATTICA_LIBRARIES Libraries needed to use Attica
|
||||
# LIBATTICA_LIBRARY_DIRS Paths needed for linking against Attica
|
||||
# LIBATTICA_INCLUDE_DIR Path needed for finding Attica include files
|
||||
#
|
||||
# The minimum required version of LibAttica can be specified using the
|
||||
# standard syntax, e.g. find_package(LibAttica 0.20)
|
||||
|
||||
# Copyright (c) 2009 Frederik Gladhorn <gladhorn@kde.org>
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
|
||||
# Support LIBATTICA_MIN_VERSION for compatibility:
|
||||
IF(NOT LibAttica_FIND_VERSION)
|
||||
SET(LibAttica_FIND_VERSION "${LIBATTICA_MIN_VERSION}")
|
||||
ENDIF(NOT LibAttica_FIND_VERSION)
|
||||
|
||||
# the minimum version of LibAttica we require
|
||||
IF(NOT LibAttica_FIND_VERSION)
|
||||
SET(LibAttica_FIND_VERSION "0.1.0")
|
||||
ENDIF(NOT LibAttica_FIND_VERSION)
|
||||
|
||||
|
||||
IF (NOT WIN32)
|
||||
# use pkg-config to get the directories and then use these values
|
||||
# in the FIND_PATH() and FIND_LIBRARY() calls
|
||||
FIND_PACKAGE(PkgConfig)
|
||||
PKG_CHECK_MODULES(PC_LIBATTICA QUIET libattica)
|
||||
SET(LIBATTICA_DEFINITIONS ${PC_ATTICA_CFLAGS_OTHER})
|
||||
ENDIF (NOT WIN32)
|
||||
|
||||
FIND_PATH(LIBATTICA_INCLUDE_DIR attica/provider.h
|
||||
HINTS
|
||||
${PC_LIBATTICA_INCLUDEDIR}
|
||||
${PC_LIBATTICA_INCLUDE_DIRS}
|
||||
PATH_SUFFIXES attica
|
||||
)
|
||||
|
||||
# Store the version number in the cache, so we don't have to search everytime:
|
||||
IF(LIBATTICA_INCLUDE_DIR AND NOT LIBATTICA_VERSION)
|
||||
FILE(READ ${LIBATTICA_INCLUDE_DIR}/attica/version.h LIBATTICA_VERSION_CONTENT)
|
||||
STRING (REGEX MATCH "LIBATTICA_VERSION_STRING \".*\"\n" LIBATTICA_VERSION_MATCH "${LIBATTICA_VERSION_CONTENT}")
|
||||
IF(LIBATTICA_VERSION_MATCH)
|
||||
STRING(REGEX REPLACE "LIBATTICA_VERSION_STRING \"(.*)\"\n" "\\1" _LIBATTICA_VERSION ${LIBATTICA_VERSION_MATCH})
|
||||
ENDIF(LIBATTICA_VERSION_MATCH)
|
||||
SET(LIBATTICA_VERSION "${_LIBATTICA_VERSION}" CACHE STRING "Version number of LibAttica" FORCE)
|
||||
ENDIF(LIBATTICA_INCLUDE_DIR AND NOT LIBATTICA_VERSION)
|
||||
|
||||
|
||||
FIND_LIBRARY(LIBATTICA_LIBRARIES NAMES attica libattica
|
||||
HINTS
|
||||
${PC_LIBATTICA_LIBDIR}
|
||||
${PC_LIBATTICA_LIBRARY_DIRS}
|
||||
)
|
||||
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibAttica REQUIRED_VARS LIBATTICA_LIBRARIES LIBATTICA_INCLUDE_DIR
|
||||
VERSION_VAR LIBATTICA_VERSION)
|
||||
|
||||
MARK_AS_ADVANCED(LIBATTICA_INCLUDE_DIR LIBATTICA_LIBRARIES)
|
@@ -19,53 +19,19 @@ macro(_phonon_find_version)
|
||||
file(READ ${_phonon_namespace_header_file} _phonon_header LIMIT 5000 OFFSET 1000)
|
||||
string(REGEX MATCH "define PHONON_VERSION_STR \"(4\\.[0-9]+\\.[0-9a-z]+)\"" _phonon_version_match "${_phonon_header}")
|
||||
set(PHONON_VERSION "${CMAKE_MATCH_1}")
|
||||
message(STATUS "Phonon Version: ${PHONON_VERSION}")
|
||||
endmacro(_phonon_find_version)
|
||||
|
||||
if(PHONON_FOUND)
|
||||
# Already found, nothing more to do except figuring out the version
|
||||
# the dirs listed with HINTS are searched before the default sets of dirs
|
||||
find_library(PHONON_LIBRARY NAMES phonon HINTS ${KDE4_LIB_INSTALL_DIR} ${QT_LIBRARY_DIR})
|
||||
find_path(PHONON_INCLUDE_DIR NAMES phonon/phonon_export.h HINTS ${KDE4_INCLUDE_INSTALL_DIR} ${QT_INCLUDE_DIR} ${INCLUDE_INSTALL_DIR} ${QT_LIBRARY_DIR})
|
||||
|
||||
if(PHONON_INCLUDE_DIR AND PHONON_LIBRARY)
|
||||
set(PHONON_LIBS ${phonon_LIB_DEPENDS} ${PHONON_LIBRARY})
|
||||
set(PHONON_INCLUDES ${PHONON_INCLUDE_DIR}/KDE ${PHONON_INCLUDE_DIR})
|
||||
_phonon_find_version()
|
||||
else(PHONON_FOUND)
|
||||
if(PHONON_INCLUDE_DIR AND PHONON_LIBRARY)
|
||||
set(PHONON_FIND_QUIETLY TRUE)
|
||||
endif(PHONON_INCLUDE_DIR AND PHONON_LIBRARY)
|
||||
endif(PHONON_INCLUDE_DIR AND PHONON_LIBRARY)
|
||||
|
||||
# As discussed on kde-buildsystem: first look at CMAKE_PREFIX_PATH, then at the suggested PATHS (kde4 install dir)
|
||||
find_library(PHONON_LIBRARY NAMES phonon phonon4 PATHS ${KDE4_LIB_INSTALL_DIR} ${QT_LIBRARY_DIR})
|
||||
# then at the default system locations (CMAKE_SYSTEM_PREFIX_PATH, i.e. /usr etc.)
|
||||
find_library(PHONON_LIBRARY NAMES phonon phonon4)
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Phonon DEFAULT_MSG PHONON_INCLUDE_DIR PHONON_LIBRARY)
|
||||
|
||||
find_path(PHONON_INCLUDE_DIR NAMES phonon/phonon_export.h PATHS ${KDE4_INCLUDE_INSTALL_DIR} ${QT_INCLUDE_DIR} ${INCLUDE_INSTALL_DIR} ${QT_LIBRARY_DIR})
|
||||
find_path(PHONON_INCLUDE_DIR NAMES phonon/phonon_export.h)
|
||||
|
||||
_phonon_find_version()
|
||||
if(PHONON_INCLUDE_DIR AND PHONON_LIBRARY AND NOT PHONON_VERSION VERSION_LESS ${Phonon_FIND_VERSION})
|
||||
set(PHONON_LIBS ${phonon_LIB_DEPENDS} ${PHONON_LIBRARY})
|
||||
set(PHONON_INCLUDES ${PHONON_INCLUDE_DIR}/KDE ${PHONON_INCLUDE_DIR})
|
||||
set(PHONON_FOUND TRUE)
|
||||
else(PHONON_INCLUDE_DIR AND PHONON_LIBRARY AND NOT PHONON_VERSION VERSION_LESS ${Phonon_FIND_VERSION})
|
||||
set(PHONON_FOUND FALSE)
|
||||
endif(PHONON_INCLUDE_DIR AND PHONON_LIBRARY AND NOT PHONON_VERSION VERSION_LESS ${Phonon_FIND_VERSION})
|
||||
|
||||
if(PHONON_FOUND)
|
||||
if(NOT PHONON_FIND_QUIETLY)
|
||||
message(STATUS "Found Phonon: ${PHONON_LIBRARY}")
|
||||
message(STATUS "Found Phonon Includes: ${PHONON_INCLUDES}")
|
||||
endif(NOT PHONON_FIND_QUIETLY)
|
||||
else(PHONON_FOUND)
|
||||
if(Phonon_FIND_REQUIRED)
|
||||
if(NOT PHONON_INCLUDE_DIR)
|
||||
message(STATUS "Phonon includes NOT found!")
|
||||
endif(NOT PHONON_INCLUDE_DIR)
|
||||
if(NOT PHONON_LIBRARY)
|
||||
message(STATUS "Phonon library NOT found!")
|
||||
endif(NOT PHONON_LIBRARY)
|
||||
message(FATAL_ERROR "Phonon library or includes NOT found!")
|
||||
else(Phonon_FIND_REQUIRED)
|
||||
message(STATUS "Unable to find Phonon")
|
||||
endif(Phonon_FIND_REQUIRED)
|
||||
endif(PHONON_FOUND)
|
||||
|
||||
|
||||
mark_as_advanced(PHONON_INCLUDE_DIR PHONON_LIBRARY PHONON_INCLUDES)
|
||||
endif(PHONON_FOUND)
|
||||
mark_as_advanced(PHONON_INCLUDE_DIR PHONON_LIBRARY)
|
||||
|
11
CMakeModules/FindQuaZip.cmake
Normal file
@@ -0,0 +1,11 @@
|
||||
find_package(Qt4)
|
||||
find_path(QuaZip_INCLUDE_DIR quazip.h ${CMAKE_INSTALL_PREFIX}/include/quazip ${CMAKE_INSTALL_PREFIX}/include /usr/include/quazip /usr/local/include/quazip ${QT_INCLUDE_DIR}/quazip ${QT_INCLUDE_DIR} ${QUAZIP_DIR}/include/quazip ${QUAZIP_DIR}/quazip ${QUAZIP_DIR}/include)
|
||||
find_library(QuaZip_LIBRARY NAMES quazip PATHS ${CMAKE_INSTALL_PREFIX}/lib64 ${CMAKE_INSTALL_PREFIX}/lib ${CMAKE_INSTALL_PREFIX}/Library/Frameworks ${QUAZIP_DIR}/lib64 ${QUAZIP_DIR}/lib ${QUAZIP_DIR}/quazip ${QUAZIP_DIR})
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(quazip DEFAULT_MSG QuaZip_LIBRARY QuaZip_INCLUDE_DIR)
|
||||
set(QuaZip_LIBRARIES ${QuaZip_LIBRARY})
|
||||
mark_as_advanced(QuaZip_LIBRARY QuaZip_INCLUDE_DIR)
|
||||
|
||||
if(QuaZip_LIBRARY AND QuaZip_INCLUDE_DIR)
|
||||
set(QuaZip_FOUND TRUE)
|
||||
endif()
|
@@ -56,7 +56,7 @@ ELSE()
|
||||
include(FindLibraryWithDebug)
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
find_path(TAGLIB_CFLAGS
|
||||
find_path(TAGLIB_INCLUDES
|
||||
NAMES
|
||||
tag.h
|
||||
PATH_SUFFIXES taglib
|
||||
|
182
CMakeModules/GNUInstallDirs.cmake
Normal file
@@ -0,0 +1,182 @@
|
||||
# - Define GNU standard installation directories
|
||||
# Provides install directory variables as defined for GNU software:
|
||||
# http://www.gnu.org/prep/standards/html_node/Directory-Variables.html
|
||||
# Inclusion of this module defines the following variables:
|
||||
# CMAKE_INSTALL_<dir> - destination for files of a given type
|
||||
# CMAKE_INSTALL_FULL_<dir> - corresponding absolute path
|
||||
# where <dir> is one of:
|
||||
# BINDIR - user executables (bin)
|
||||
# SBINDIR - system admin executables (sbin)
|
||||
# LIBEXECDIR - program executables (libexec)
|
||||
# SYSCONFDIR - read-only single-machine data (etc)
|
||||
# SHAREDSTATEDIR - modifiable architecture-independent data (com)
|
||||
# LOCALSTATEDIR - modifiable single-machine data (var)
|
||||
# LIBDIR - object code libraries (lib or lib64)
|
||||
# INCLUDEDIR - C header files (include)
|
||||
# OLDINCLUDEDIR - C header files for non-gcc (/usr/include)
|
||||
# DATAROOTDIR - read-only architecture-independent data root (share)
|
||||
# DATADIR - read-only architecture-independent data (DATAROOTDIR)
|
||||
# INFODIR - info documentation (DATAROOTDIR/info)
|
||||
# LOCALEDIR - locale-dependent data (DATAROOTDIR/locale)
|
||||
# MANDIR - man documentation (DATAROOTDIR/man)
|
||||
# DOCDIR - documentation root (DATAROOTDIR/doc/PROJECT_NAME)
|
||||
# Each CMAKE_INSTALL_<dir> value may be passed to the DESTINATION options of
|
||||
# install() commands for the corresponding file type. If the includer does
|
||||
# not define a value the above-shown default will be used and the value will
|
||||
# appear in the cache for editing by the user.
|
||||
# Each CMAKE_INSTALL_FULL_<dir> value contains an absolute path constructed
|
||||
# from the corresponding destination by prepending (if necessary) the value
|
||||
# of CMAKE_INSTALL_PREFIX.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2011 Nikita Krupen'ko <krnekit@gmail.com>
|
||||
# Copyright 2011 Kitware, Inc.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
# (To distribute this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
# Installation directories
|
||||
#
|
||||
if(NOT DEFINED CMAKE_INSTALL_BINDIR)
|
||||
set(CMAKE_INSTALL_BINDIR "bin" CACHE PATH "user executables (bin)")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_SBINDIR)
|
||||
set(CMAKE_INSTALL_SBINDIR "sbin" CACHE PATH "system admin executables (sbin)")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_LIBEXECDIR)
|
||||
set(CMAKE_INSTALL_LIBEXECDIR "libexec" CACHE PATH "program executables (libexec)")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_SYSCONFDIR)
|
||||
set(CMAKE_INSTALL_SYSCONFDIR "etc" CACHE PATH "read-only single-machine data (etc)")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_SHAREDSTATEDIR)
|
||||
set(CMAKE_INSTALL_SHAREDSTATEDIR "com" CACHE PATH "modifiable architecture-independent data (com)")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_LOCALSTATEDIR)
|
||||
set(CMAKE_INSTALL_LOCALSTATEDIR "var" CACHE PATH "modifiable single-machine data (var)")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_LIBDIR)
|
||||
set(_LIBDIR_DEFAULT "lib")
|
||||
# Override this default 'lib' with 'lib64' iff:
|
||||
# - we are on Linux system but NOT cross-compiling
|
||||
# - we are NOT on debian
|
||||
# - we are on a 64 bits system
|
||||
# reason is: amd64 ABI: http://www.x86-64.org/documentation/abi.pdf
|
||||
# Note that the future of multi-arch handling may be even
|
||||
# more complicated than that: http://wiki.debian.org/Multiarch
|
||||
if(CMAKE_SYSTEM_NAME MATCHES "Linux"
|
||||
AND NOT CMAKE_CROSSCOMPILING
|
||||
AND NOT EXISTS "/etc/debian_version")
|
||||
if(NOT DEFINED CMAKE_SIZEOF_VOID_P)
|
||||
message(AUTHOR_WARNING
|
||||
"Unable to determine default CMAKE_INSTALL_LIBDIR directory because no target architecture is known. "
|
||||
"Please enable at least one language before including GNUInstallDirs.")
|
||||
else()
|
||||
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
|
||||
set(_LIBDIR_DEFAULT "lib64")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
set(CMAKE_INSTALL_LIBDIR "${_LIBDIR_DEFAULT}" CACHE PATH "object code libraries (${_LIBDIR_DEFAULT})")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_INCLUDEDIR)
|
||||
set(CMAKE_INSTALL_INCLUDEDIR "include" CACHE PATH "C header files (include)")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_OLDINCLUDEDIR)
|
||||
set(CMAKE_INSTALL_OLDINCLUDEDIR "/usr/include" CACHE PATH "C header files for non-gcc (/usr/include)")
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED CMAKE_INSTALL_DATAROOTDIR)
|
||||
set(CMAKE_INSTALL_DATAROOTDIR "share" CACHE PATH "read-only architecture-independent data root (share)")
|
||||
endif()
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Values whose defaults are relative to DATAROOTDIR. Store empty values in
|
||||
# the cache and store the defaults in local variables if the cache values are
|
||||
# not set explicitly. This auto-updates the defaults as DATAROOTDIR changes.
|
||||
|
||||
if(NOT CMAKE_INSTALL_DATADIR)
|
||||
set(CMAKE_INSTALL_DATADIR "" CACHE PATH "read-only architecture-independent data (DATAROOTDIR)")
|
||||
set(CMAKE_INSTALL_DATADIR "${CMAKE_INSTALL_DATAROOTDIR}")
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_INSTALL_INFODIR)
|
||||
set(CMAKE_INSTALL_INFODIR "" CACHE PATH "info documentation (DATAROOTDIR/info)")
|
||||
set(CMAKE_INSTALL_INFODIR "${CMAKE_INSTALL_DATAROOTDIR}/info")
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_INSTALL_LOCALEDIR)
|
||||
set(CMAKE_INSTALL_LOCALEDIR "" CACHE PATH "locale-dependent data (DATAROOTDIR/locale)")
|
||||
set(CMAKE_INSTALL_LOCALEDIR "${CMAKE_INSTALL_DATAROOTDIR}/locale")
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_INSTALL_MANDIR)
|
||||
set(CMAKE_INSTALL_MANDIR "" CACHE PATH "man documentation (DATAROOTDIR/man)")
|
||||
set(CMAKE_INSTALL_MANDIR "${CMAKE_INSTALL_DATAROOTDIR}/man")
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_INSTALL_DOCDIR)
|
||||
set(CMAKE_INSTALL_DOCDIR "" CACHE PATH "documentation root (DATAROOTDIR/doc/PROJECT_NAME)")
|
||||
set(CMAKE_INSTALL_DOCDIR "${CMAKE_INSTALL_DATAROOTDIR}/doc/${PROJECT_NAME}")
|
||||
endif()
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
mark_as_advanced(
|
||||
CMAKE_INSTALL_BINDIR
|
||||
CMAKE_INSTALL_SBINDIR
|
||||
CMAKE_INSTALL_LIBEXECDIR
|
||||
CMAKE_INSTALL_SYSCONFDIR
|
||||
CMAKE_INSTALL_SHAREDSTATEDIR
|
||||
CMAKE_INSTALL_LOCALSTATEDIR
|
||||
CMAKE_INSTALL_LIBDIR
|
||||
CMAKE_INSTALL_INCLUDEDIR
|
||||
CMAKE_INSTALL_OLDINCLUDEDIR
|
||||
CMAKE_INSTALL_DATAROOTDIR
|
||||
CMAKE_INSTALL_DATADIR
|
||||
CMAKE_INSTALL_INFODIR
|
||||
CMAKE_INSTALL_LOCALEDIR
|
||||
CMAKE_INSTALL_MANDIR
|
||||
CMAKE_INSTALL_DOCDIR
|
||||
)
|
||||
|
||||
# Result directories
|
||||
#
|
||||
foreach(dir
|
||||
BINDIR
|
||||
SBINDIR
|
||||
LIBEXECDIR
|
||||
SYSCONFDIR
|
||||
SHAREDSTATEDIR
|
||||
LOCALSTATEDIR
|
||||
LIBDIR
|
||||
INCLUDEDIR
|
||||
OLDINCLUDEDIR
|
||||
DATAROOTDIR
|
||||
DATADIR
|
||||
INFODIR
|
||||
LOCALEDIR
|
||||
MANDIR
|
||||
DOCDIR
|
||||
)
|
||||
if(NOT IS_ABSOLUTE ${CMAKE_INSTALL_${dir}})
|
||||
set(CMAKE_INSTALL_FULL_${dir} "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_${dir}}")
|
||||
else()
|
||||
set(CMAKE_INSTALL_FULL_${dir} "${CMAKE_INSTALL_${dir}}")
|
||||
endif()
|
||||
endforeach()
|
@@ -28,8 +28,8 @@
|
||||
|
||||
; We use official release plugins
|
||||
; mingw32-vlc from obs misses a lot and has even broken ones probably
|
||||
!define VLC_PATH "${SOURCE_PATH}\admin\win\vlc\prefix" ; SIC! ^
|
||||
!define VLC_BIN "${VLC_PATH}\bin"
|
||||
!define VLC_PATH "${SOURCE_PATH}\admin\win\vlc\" ; SIC! ^
|
||||
!define VLC_BIN "${VLC_PATH}"
|
||||
!define VLC_PLUGIN_PATH "${VLC_BIN}\plugins"
|
||||
|
||||
!define NSI_PATH "${SOURCE_PATH}/admin/win/nsi"
|
||||
@@ -273,6 +273,9 @@ Section "Tomahawk Player" SEC_TOMAHAWK_PLAYER
|
||||
;Main executable.
|
||||
File "${INSTALL_PATH}\bin\tomahawk.exe"
|
||||
|
||||
File "${INSTALL_PATH}\bin\tomahawk_crash_reporter.exe"
|
||||
File "${INSTALL_PATH}\bin\libtomahawk_breakpad.dll"
|
||||
|
||||
File "${INSTALL_PATH}\bin\libqxtweb-standalone.dll"
|
||||
File "${INSTALL_PATH}\bin\libtomahawk_portfwd.dll"
|
||||
File "${INSTALL_PATH}\bin\libtomahawk_lastfm2.dll"
|
||||
@@ -283,6 +286,9 @@ Section "Tomahawk Player" SEC_TOMAHAWK_PLAYER
|
||||
;Main executable.
|
||||
File "${BUILD_PATH}\tomahawk.exe"
|
||||
|
||||
File "${BUILD_PATH}\tomahawk_crash_reporter.exe"
|
||||
File "${BUILD_PATH}\libtomahawk_breakpad.dll"
|
||||
|
||||
File "${BUILD_PATH}\libtomahawklib.dll"
|
||||
File "${BUILD_PATH}\libqxtweb-standalone.dll"
|
||||
File "${BUILD_PATH}\libtomahawk_portfwd.dll"
|
||||
@@ -299,8 +305,10 @@ Section "Tomahawk Player" SEC_TOMAHAWK_PLAYER
|
||||
File "${QT_DLL_PATH}\QtGui4.dll"
|
||||
File "${QT_DLL_PATH}\QtNetwork4.dll"
|
||||
File "${QT_DLL_PATH}\QtSql4.dll"
|
||||
File "${QT_DLL_PATH}\QtXml4.dll"
|
||||
File "${QT_DLL_PATH}\QtScript4.dll"
|
||||
File "${QT_DLL_PATH}\QtUiTools4.dll"
|
||||
File "${QT_DLL_PATH}\QtWebKit4.dll"
|
||||
File "${QT_DLL_PATH}\QtXml4.dll"
|
||||
|
||||
;SQLite driver
|
||||
SetOutPath "$INSTDIR\sqldrivers"
|
||||
@@ -321,31 +329,17 @@ Section "Tomahawk Player" SEC_TOMAHAWK_PLAYER
|
||||
File "${MING_BIN}\libstdc++-6.dll"
|
||||
|
||||
;Phonon stuff
|
||||
|
||||
;Fix the phonon build to not use Dbus
|
||||
File "${QT_DLL_PATH}\QtDbus4.dll"
|
||||
File "${MING_BIN}\libdbus-1-3.dll"
|
||||
File "${MING_BIN}\dbus-daemon.exe"
|
||||
|
||||
File "${VLC_BIN}\libphonon.dll"
|
||||
File "${MING_BIN}\libphonon.dll"
|
||||
SetOutPath "$INSTDIR\phonon_backend"
|
||||
File "${VLC_BIN}\phonon_backend\phonon_vlc.dll"
|
||||
SetOutPath "$INSTDIR"
|
||||
|
||||
;VLC
|
||||
;SetOutPath "$INSTDIR\phonon_backend"
|
||||
File "${VLC_BIN}\libvlc.dll"
|
||||
File "${VLC_BIN}\libvlccore.dll"
|
||||
SetOutPath "$INSTDIR\plugins"
|
||||
File /r "${VLC_PLUGIN_PATH}\*.dll"
|
||||
SetOutPath "$INSTDIR"
|
||||
File "${MING_BIN}\libmad-0.dll" ; MP3
|
||||
File "${MING_BIN}\libFLAC-8.dll" ; FLAC
|
||||
File "${MING_BIN}\libogg-0.dll" ; OGG, FLAC
|
||||
File "${MING_BIN}\libvorbis-0.dll" ; OGG
|
||||
File "${MING_BIN}\libvorbisenc-2.dll" ; OGG
|
||||
|
||||
|
||||
|
||||
; Other
|
||||
File "${MING_BIN}\libqjson.dll"
|
||||
@@ -356,6 +350,7 @@ Section "Tomahawk Player" SEC_TOMAHAWK_PLAYER
|
||||
|
||||
File "${MING_BIN}\libechonest.dll"
|
||||
File "${MING_BIN}\libQTweetLib.dll"
|
||||
File "${MING_BIN}\libquazip.dll"
|
||||
|
||||
; Jabber
|
||||
File "${MING_BIN}\libjreen.dll"
|
||||
@@ -370,6 +365,7 @@ Section "Tomahawk Player" SEC_TOMAHAWK_PLAYER
|
||||
File "${MING_LIB}\libclucene-shared.dll"
|
||||
|
||||
File "${MING_BIN}\libqtsparkle.dll"
|
||||
File "${MING_BIN}\libattica.dll"
|
||||
SectionEnd
|
||||
|
||||
SectionGroup "Shortcuts"
|
||||
@@ -459,7 +455,8 @@ Section -post
|
||||
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Tomahawk" "NoRepair" "1"
|
||||
|
||||
; Register tomahawk:// protocol handler
|
||||
WriteRegStr HKCR "tomahawk" "" "URL: Tomahawk Protocol"
|
||||
WriteRegStr HKCR "tomahawk" "" "URL:Tomahawk Protocol"
|
||||
WriteRegStr HKCR "tomahawk" "URL Protocol" ""
|
||||
WriteRegStr HKCR "tomahawk\DefaultIcon" "" $INSTDIR\tomahawk.exe,1
|
||||
WriteRegStr HKCR "tomahawk\shell" "" "open"
|
||||
WriteRegStr HKCR "tomahawk\shell\open\command" "" '"$INSTDIR\tomahawk.exe" "%1"'
|
||||
|
165
ChangeLog
@@ -1,6 +1,171 @@
|
||||
Version 0.4.2:
|
||||
* Updated translations for various languages.
|
||||
* Resuming playback restores correct volume settings.
|
||||
* Reduced CPU usage during playback.
|
||||
* Fixed not starting up due to case sensitivity issue on OS X.
|
||||
* Fixed volume issue (too quiet) on Windows.
|
||||
|
||||
Version 0.4.1:
|
||||
* Fixed various crashes.
|
||||
* Fixed issues with auto-updating XSPF playlists.
|
||||
* Double-clicking a playlist starts playing it.
|
||||
* Resolvers can now return disc number and album position for results.
|
||||
* Fixed sorting playlists by track number.
|
||||
* Fixed issues with changing proxy.
|
||||
* Fixed Twitter authentication issues.
|
||||
* Fixed Grooveshark support on Windows.
|
||||
|
||||
Version 0.4.0:
|
||||
* Added visual notification for database indexing job.
|
||||
* Fixed icons not appearing in resolvers list.
|
||||
* Fixed various UI glitches and stray error messages in stations.
|
||||
* Fixed bug where album page would resolve bottom-to-top.
|
||||
* Fixed bug where Footnotes would not update when changing selected album in Album View.
|
||||
* Fixed dragging albums and artists from charts, album, and artist views.
|
||||
* Fixed bug where filter text would be one step behind filter value.
|
||||
* Fixed bug where resolvers would enable themselves after auto-updating.
|
||||
* Fixed occasional crash when dropping tracks onto New Station item.
|
||||
* Added jump-to-current-track support for search results page.
|
||||
* Fixed non-resolving tracks when dragging from album view.
|
||||
* Fixed fetching album covers for albums with special characters.
|
||||
* Show errors and continue gracefully when resolved audio is not available.
|
||||
* Fixed various crashes on exit.
|
||||
* Added basic command-line options for playback control.
|
||||
* Bumped up web api timeouts to allow web clients to finish resolving.
|
||||
* Added filename suggestion when exporting a playlist.
|
||||
* Cleaned up highlighting of artist names in album view.
|
||||
* Cleaned up alignment of playlist items.
|
||||
* Fixed potential crash when searching.
|
||||
* Added support for disc number.
|
||||
* Added SoundCloudWall.com charts.
|
||||
* Added ability to "lock on" to a user when listening along, to skip along.
|
||||
* Fixed bug where loved tracks would be refreshed much too often.
|
||||
* Fixed some font size issues.
|
||||
* Sped up Tomahawk startup by moving chart loading into a separate thread.
|
||||
* Added support for parsing Grooveshark and Tinysong tracks and playlists.
|
||||
* Reorganized sidebar to follow more logical item groupings.
|
||||
* Added artist and album results to global searches.
|
||||
* Fixed style and contrast issues when using GTK styles.
|
||||
* Fixed paths to artwork when using MPRIS2 interface.
|
||||
* Fixed out of sync Show/Hide menu items on OS X when hidden with cmd-h.
|
||||
* Fixed /Volumes directory not showing up on OS X.
|
||||
* Fixed startup crash on OS X.
|
||||
|
||||
Version 0.3.3:
|
||||
* Automatically load Super Collection tracks when no official release
|
||||
information is available.
|
||||
* Fixed stations not fetching new tracks under certain circumstances.
|
||||
* Fixed Footnotes not always updating when selecting a new track.
|
||||
* Added support for ow.ly, fb.me, itun.es and tinyurl.com URL shorteners.
|
||||
* Fixed playback issues with non-latin filenames on Windows.
|
||||
* Fixed tomahawk:// protocol not working properly on Windows.
|
||||
* Fixed dupe menu entry appearing on OS X.
|
||||
* Fixed invisible sidebar items on Linux.
|
||||
|
||||
Version 0.3.2:
|
||||
* Improved syncing process, it's faster and more reliable now.
|
||||
* Fixed UPnP issues.
|
||||
* Fixed not updating collections and views after a collection changes.
|
||||
* Fixed not showing a source's proper name at all times.
|
||||
* Improved music scanner reliability.
|
||||
* Fixed various labels not being painted in the right color when selected.
|
||||
* Support .oga (ogg mimetype) files.
|
||||
* Fixed stuck Now Playing indicator icon.
|
||||
* Fixed sidebar width of settings dialog on Windows.
|
||||
* Fixed not always showing delete icon on hovered temporary pages.
|
||||
* Fixed inability to select externally mounted drives.
|
||||
* Fixed bug where speaker would be stuck next to a playlist.
|
||||
* Fixed bug where first startup would show a loading spinner in the
|
||||
Dashboard's "Recent Additions" forever.
|
||||
* Automatically upgrade resolvers when an update is found.
|
||||
* Fixed last played track of a friend never expiring.
|
||||
* Fixed parsing of rdio tracks.
|
||||
* Changed steering mechanism in stations to be user-friendlier.
|
||||
* Fixed loading biographies of artist names with special characters.
|
||||
* Fixed behaviour of dropping Spotify playlists on the sidebar.
|
||||
* Fixed hard to read source-name in the audio control area on OS X.
|
||||
* Fixed crashes when playing Grooveshark tracks.
|
||||
* Fixed bug where clicking the latch button would flicker and unlatch.
|
||||
* Fixed Jabber accounts not connecting properly when proxy is in use.
|
||||
|
||||
Version 0.3.1:
|
||||
* Fixed not resolving to local files.
|
||||
* Fixed shutdown crash on Windows.
|
||||
* Support more widget types in Javascript resolver configs.
|
||||
* Fixed bug where red headphone would be visible on My Collection
|
||||
when listened along to source went offline.
|
||||
* Draw author name as well as avatar in recently played playlists.
|
||||
* Fixed Tomahawk integration in Unity.
|
||||
* Fixed incorrect item selected in source tree when deleting temporary
|
||||
pages.
|
||||
* Fixed currently played label disappearing after 10 minutes regardless
|
||||
of length of track.
|
||||
* Fixed crash on Sparkle upgrade on OS X.
|
||||
|
||||
Version 0.3.0:
|
||||
* Make artist names in the album view clickable.
|
||||
* Don't start playing if a tomahawk:// link was clicked while Tomahawk
|
||||
is paused.
|
||||
* Make artist name clickable in header of Album pages.
|
||||
* Added a drop shadow to cover images, and put placeholder in jewel case.
|
||||
* Added shuffle and repeat support to tree view.
|
||||
* Draw a speaker next to the currently playing playlist.
|
||||
* Refresh station previews whenever a filter is changed.
|
||||
* Support and show official releases on album and track pages.
|
||||
* Filter out duplicates from station previews and upcoming tracks.
|
||||
* Added YouTube resolver.
|
||||
* Fixed bug where going offline then online would not re-connect to many
|
||||
peers.
|
||||
* Added support for auto-updating live XSPF playlists.
|
||||
* Don't show an age of 41 years for tracks that have no age information.
|
||||
* Show config UI for resolvers that have them as soon as you add them.
|
||||
* Add support for Echo Nest Personal Catalogs and User Radio. Synchronize
|
||||
your catalog with The Echo Nest and enable personal recommendations
|
||||
from you and your friends.
|
||||
* Added support for Grooveshark resolver (requires Grooveshark Anywhere).
|
||||
* Fixed re-resolving when resolvers or sources go off- / online.
|
||||
* Correctly sort recently played tracks on the Dashboard.
|
||||
* Show a Lion full-screen toggle button if running on Lion.
|
||||
* Show a list of users who are currently listening along to you.
|
||||
* Show headphone icon in source item to allow users to listen along; paint
|
||||
headphones red on a source if you are currently listening along to it.
|
||||
* Added new job status view in the bottom of the source list that displays
|
||||
current jobs such as resolving, parsing playlists, and loading from
|
||||
database.
|
||||
* Parse and convert a Spotify playlist URL when dropped anywhere on the
|
||||
sidebar.
|
||||
* Convert resolvers to use asynchronous calls to avoid blocking Tomahawk's
|
||||
UI, greatly increasing responsiveness of Tomahawk while resolving.
|
||||
* Fixed no playlists overlay not disappearing when playlists were added.
|
||||
* Add support for parsing itunes track, artist and album links.
|
||||
* Fixed crash when syncing playlists with peers.
|
||||
* Add support for browsing, downloading and rating resolvers from within
|
||||
Tomahawk directly.
|
||||
* Support multi-folder selection and scanning.
|
||||
* Fixed handling of special characters in tomahawk:// links
|
||||
* Improve sidebar performance by caching pixmaps and shrinking them.
|
||||
* Send updated playlists to peers when tracks are moved/copied.
|
||||
* Remove splitter handles in sidebar.
|
||||
* Fixed Tomahawk preventing system shutdown / logout.
|
||||
* Ignore leading 'The' when sorting artists.
|
||||
* Added Charts page, which shows various sources' top hits & artists.
|
||||
* The Collection tree-views can now be filtered.
|
||||
* Fixed crash when pressing enter in an empty playlist.
|
||||
* Moved the song queue to the bottom of the sidebar.
|
||||
* Added Footnotes, a contextual view that you can slide it.
|
||||
* Show recently added playlists in dashboard rather than recently opened
|
||||
playlists.
|
||||
* Fixed seek slider and give it some smooth animation between ticks.
|
||||
* Fixed Twitter issue where it would repeatedly send DMs to friends.
|
||||
* Add a new drag and drop menu when dropping items onto playlists,
|
||||
allowing users to drop the dragged tracks, the whole album, or
|
||||
the whole artists's tracks.
|
||||
* Bring Tomahawk window to the front when clicking a Tomahawk link.
|
||||
* Fixed crash in source list when initially syncing with remote sources.
|
||||
* Open temporary artist, album, and search playlists as temporary items
|
||||
in the sidebar.
|
||||
* Fixed sorting of playlists and items in the artist view.
|
||||
* Allow dragging and dropping albums and artists to playlists.
|
||||
* Added MPRIS 2.1 support.
|
||||
|
||||
Version 0.2.3:
|
||||
|
27
README
@@ -27,18 +27,25 @@ Doxygen Documentation
|
||||
Dependencies
|
||||
------------
|
||||
|
||||
CMake 2.8.0 http://www.cmake.org/
|
||||
Qt 4.7.0 http://qt.nokia.com/
|
||||
QJson 0.7.1 http://qjson.sourceforge.net/
|
||||
SQLite 3.6.22 http://www.sqlite.org/
|
||||
TagLib 1.6.2 http://developer.kde.org/~wheeler/taglib.html
|
||||
Boost 1.3x http://www.boost.org/
|
||||
CLucene 0.9.23 (0.9.21 will fail) http://clucene.sourceforge.net/download.shtml
|
||||
libechonest 1.1.8 http://projects.kde.org/projects/playground/libs/libechonest/
|
||||
CMake 2.8.0 - http://www.cmake.org/
|
||||
Qt 4.7.0 - http://qt.nokia.com/
|
||||
QJson 0.7.1 - http://qjson.sourceforge.net/
|
||||
SQLite 3.6.22 - http://www.sqlite.org/
|
||||
TagLib 1.6.2 - http://developer.kde.org/~wheeler/taglib.html
|
||||
Boost 1.3 - http://www.boost.org/
|
||||
CLucene 0.9.23 (0.9.21 will fail) - http://clucene.sourceforge.net/download.shtml
|
||||
libechonest 1.2.0 - http://projects.kde.org/projects/playground/libs/libechonest/
|
||||
|
||||
The following dependencies are optional, but recommended:
|
||||
|
||||
Attica 0.2.0 - ftp://ftp.kde.org/pub/kde/stable/attica/
|
||||
QuaZip 0.4.3 - http://quazip.sourceforge.net/
|
||||
Jreen 1.0.3 - https://github.com/euroelessar/jreen
|
||||
QTweetLib 0.5.0 - https://github.com/minimoog/QTweetLib
|
||||
|
||||
Third party libraries that we ship with our source:
|
||||
|
||||
MiniUPnP http://miniupnp.free.fr/
|
||||
liblastfm 0.4.0 http://github.com/jonocole/liblastfm/
|
||||
MiniUPnP 1.6 - http://miniupnp.free.fr/
|
||||
liblastfm 0.4.0 - http://github.com/jonocole/liblastfm/
|
||||
|
||||
Enjoy!
|
||||
|
@@ -1,3 +1,3 @@
|
||||
IF(WIN32)
|
||||
INSTALL(DIRECTORY win DESTINATION share/tomahawk/admin )
|
||||
ENDIF(WIN32)
|
||||
ENDIF(WIN32)
|
||||
|
5
admin/copy_syms.sh
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
DUMPID=`head -n1 $1 | cut -f4 -d' '`
|
||||
mkdir -p $2/$DUMPID
|
||||
cp $1 $2/$DUMPID/
|
@@ -41,7 +41,7 @@ VERSION=$1
|
||||
|
||||
header "Copying Sparkle framework"
|
||||
cp -R /Library/Frameworks/Sparkle.framework Contents/Frameworks
|
||||
|
||||
|
||||
header "Creating DMG"
|
||||
cd ..
|
||||
|
||||
|
@@ -207,7 +207,7 @@ TOMAHAWK_PLUGINS = [
|
||||
]
|
||||
|
||||
QT_PLUGINS_SEARCH_PATH=[
|
||||
'/usr/local/Cellar/qt/4.7.3/plugins',
|
||||
'/usr/local/Cellar/qt/4.7.4/plugins',
|
||||
]
|
||||
|
||||
|
||||
@@ -491,7 +491,7 @@ def FindVLCPlugin(name):
|
||||
FixBinary(binary)
|
||||
|
||||
for plugin in VLC_PLUGINS:
|
||||
FixVLCPlugin(FindVLCPlugin(plugin), '.')
|
||||
FixVLCPlugin(FindVLCPlugin(plugin), '../Frameworks/vlc/plugins')
|
||||
|
||||
for plugin in TOMAHAWK_PLUGINS:
|
||||
FixPlugin(plugin, '../MacOS')
|
||||
@@ -500,6 +500,11 @@ try:
|
||||
FixPlugin('spotify_tomahawkresolver', '../MacOS')
|
||||
except:
|
||||
print 'Failed to find spotify resolver'
|
||||
|
||||
try:
|
||||
FixPlugin('tomahawk_crash_reporter', '../MacOS')
|
||||
except:
|
||||
print 'Failed to find tomahawk_crash_reporter'
|
||||
|
||||
for plugin in QT_PLUGINS:
|
||||
FixPlugin(FindQtPlugin(plugin), os.path.dirname(plugin))
|
||||
|
@@ -4,8 +4,9 @@ Version=1.0
|
||||
Name=Tomahawk
|
||||
GenericName=Music Player
|
||||
TryExec=tomahawk
|
||||
Exec=tomahawk
|
||||
Exec=tomahawk %u
|
||||
Comment=Tomahawk - Social Music Player
|
||||
Icon=tomahawk
|
||||
Terminal=false
|
||||
Categories=Qt;AudioVideo;Audio;Player;
|
||||
MimeType=x-scheme-handler/tomahawk;
|
||||
|
@@ -3,9 +3,12 @@ SET(MINGW_PREFIX "i686-w64-mingw32")
|
||||
# this one is important
|
||||
SET(CMAKE_SYSTEM_NAME Windows)
|
||||
|
||||
|
||||
# specify the cross compiler
|
||||
SET(CMAKE_C_COMPILER ccache ${MINGW_PREFIX}-gcc)
|
||||
SET(CMAKE_C_FLAGS "-fno-keep-inline-dllexport")
|
||||
SET(CMAKE_CXX_COMPILER ccache ${MINGW_PREFIX}-g++)
|
||||
SET(CMAKE_CXX_FLAGS ${CMAKE_C_FLAGS})
|
||||
SET(CMAKE_RC_COMPILER /usr/bin/${MINGW_PREFIX}-windres)
|
||||
|
||||
# where is the target environment containing libraries
|
||||
@@ -15,13 +18,6 @@ SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
|
||||
|
||||
|
||||
# libs with broken find modules
|
||||
SET(TAGLIB_FOUND true)
|
||||
SET(TAGLIB_LIBRARIES ${CMAKE_FIND_ROOT_PATH}/lib/libtag.dll.a)
|
||||
SET(TAGLIB_INCLUDES ${CMAKE_FIND_ROOT_PATH}/include/taglib)
|
||||
|
||||
# configure qt variables
|
||||
SET(QT_LIBRARY_DIR /usr/${MINGW_PREFIX}/bin)
|
||||
SET(QT_PLUGINS_DIR ${CMAKE_FIND_ROOT_PATH}/lib/qt4/plugins/)
|
||||
SET(QT_QTUITOOLS_LIBRARY_RELEASE ${CMAKE_FIND_ROOT_PATH}/lib/libQtUiTools.a)
|
||||
SET(QT_QTUITOOLS_LIBRARY_DEBUG ${CMAKE_FIND_ROOT_PATH}/lib/libQtUiToolsd.a)
|
||||
SET(QT_QTUITOOLS_LIBRARY ${QT_QTUITOOLS_LIBRARY_RELEASE})
|
@@ -1,42 +1,52 @@
|
||||
#!/bin/bash
|
||||
echo "Remove old vlc dir..."
|
||||
|
||||
mkdir -p vlc/
|
||||
cd vlc/
|
||||
if [ "$1" = "-c" ] ; then
|
||||
echo "Continuing last download.."
|
||||
rm -rvf vlc/
|
||||
else
|
||||
echo "Update archive..."
|
||||
fi
|
||||
|
||||
#rm -vf vlc-*.7z
|
||||
#rm -rf vlc/
|
||||
rm -rvf vlc/
|
||||
|
||||
echo "Download specified binary..."
|
||||
#wget -c "http://downloads.sourceforge.net/project/vlc/1.1.9/win32/vlc-1.1.9-win32.7z?r=http%3A%2F%2Fwww.videolan.org%2Fvlc%2Fdownload-windows.html&ts=1306272584&use_mirror=leaseweb"
|
||||
#wget -c "http://download.tomahawk-player.org/tomahawk-vlc-0.1.zip"
|
||||
wget -c http://people.videolan.org/~jb/phonon/phonon-vlc-last.7z
|
||||
|
||||
echo "Download phonon archive..."
|
||||
# wget -c "http://downloads.sourceforge.net/project/vlc/1.1.9/win32/vlc-1.1.9-win32.7z?r=http%3A%2F%2Fwww.videolan.org%2Fvlc%2Fdownload-windows.html&ts=1306272584&use_mirror=leaseweb"
|
||||
# wget -c "http://download.tomahawk-player.org/tomahawk-vlc-0.1.zip"
|
||||
# wget -c http://people.videolan.org/~jb/phonon/phonon-vlc-last.7z
|
||||
# wget -c http://people.videolan.org/~jb/phonon/phonon_phonon-vlc_20111128.7z
|
||||
wget -c http://download.tomahawk-player.org/test/pvlc.tar.bz2
|
||||
|
||||
echo "Extract binary..."
|
||||
7z x phonon-vlc-last.7z
|
||||
#mv -v vlc-*/ vlc/
|
||||
#unzip tomahawk-vlc-0.1.zip
|
||||
# 7z x phonon*.7z
|
||||
# mv -v vlc-*/ vlc/
|
||||
# unzip tomahawk-vlc-0.1.zip
|
||||
tar xvjf pvlc.tar.bz2
|
||||
|
||||
echo "Strip unneeded plugins from vlc/plugins..."
|
||||
cd prefix/bin/plugins
|
||||
rm -rvf libold* libvcd* libdvd* liblibass* libx264* libschroe* liblibmpeg2* \
|
||||
libstream_out_* libmjpeg_plugin* libh264_plugin* libzvbi_plugin* lib*sub* \
|
||||
*qt4* *skins2* libaccess_bd_plugin.dll \
|
||||
libaudiobargraph_* libball_plugin.dll \
|
||||
libdirac_plugin.dll \
|
||||
libgnutls_plugin.dll \
|
||||
libcaca_plugin.dll \
|
||||
libfreetype_plugin.dll \
|
||||
libaccess_output_shout_plugin.dll \
|
||||
libremoteosd_plugin.dll \
|
||||
libsdl_image_plugin.dll \
|
||||
libvout_sdl_plugin.dll \
|
||||
libpng_plugin.dll \
|
||||
libgoom_plugin.dll \
|
||||
libatmo_plugin.dll \
|
||||
libmux_ts_plugin.dll \
|
||||
libkate_plugin.dll \
|
||||
libtaglib_plugin.dll
|
||||
# echo "Download phonon_vlc_no_video.dll..."
|
||||
# wget -c http://people.videolan.org/~jb/phonon/phonon_vlc_no_video.dll
|
||||
# cp -v phonon_vlc_no_video.dll prefix/bin/phonon_backend/phonon_vlc.dll
|
||||
|
||||
# echo "Strip unneeded plugins from vlc/plugins..."
|
||||
# cd prefix/bin/plugins
|
||||
# rm -rvf libold* libvcd* libdvd* liblibass* libx264* libschroe* liblibmpeg2* \
|
||||
# libstream_out_* libmjpeg_plugin* libh264_plugin* libzvbi_plugin* lib*sub* \
|
||||
# *qt4* *skins2* libaccess_bd_plugin.dll \
|
||||
# libaudiobargraph_* libball_plugin.dll \
|
||||
# libdirac_plugin.dll \
|
||||
# libgnutls_plugin.dll \
|
||||
# libcaca_plugin.dll \
|
||||
# libfreetype_plugin.dll \
|
||||
# libaccess_output_shout_plugin.dll \
|
||||
# libremoteosd_plugin.dll \
|
||||
# libsdl_image_plugin.dll \
|
||||
# libvout_sdl_plugin.dll \
|
||||
# libpng_plugin.dll \
|
||||
# libgoom_plugin.dll \
|
||||
# libatmo_plugin.dll \
|
||||
# libmux_ts_plugin.dll \
|
||||
# libkate_plugin.dll \
|
||||
# libtaglib_plugin.dll
|
||||
|
||||
|
||||
# this is for vlc-1.2
|
||||
|
Before Width: | Height: | Size: 1.9 MiB After Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 204 KiB |
BIN
data/images/apply-check.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 260 KiB After Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 4.4 KiB |
BIN
data/images/close.png
Normal file
After Width: | Height: | Size: 3.3 KiB |
BIN
data/images/closed-padlock.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
data/images/collapse.png
Normal file
After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 3.5 KiB |
BIN
data/images/downloading.png
Normal file
After Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 7.7 KiB |
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 260 KiB After Width: | Height: | Size: 3.4 KiB |
BIN
data/images/grooveshark.png
Normal file
After Width: | Height: | Size: 69 KiB |
BIN
data/images/headphones-bigger.png
Normal file
After Width: | Height: | Size: 3.8 KiB |
BIN
data/images/headphones-off.png
Normal file
After Width: | Height: | Size: 4.8 KiB |
BIN
data/images/headphones-sidebar.png
Normal file
After Width: | Height: | Size: 4.8 KiB |
BIN
data/images/headphones.png
Normal file
After Width: | Height: | Size: 3.8 KiB |
BIN
data/images/itunes.png
Normal file
After Width: | Height: | Size: 5.1 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 6.8 KiB |
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 15 KiB |
BIN
data/images/no-album-no-case.png
Normal file
After Width: | Height: | Size: 7.1 KiB |
Before Width: | Height: | Size: 91 KiB After Width: | Height: | Size: 12 KiB |
BIN
data/images/now-playing-speaker-dark.png
Normal file
After Width: | Height: | Size: 19 KiB |
BIN
data/images/open-padlock.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
data/images/open.png
Normal file
After Width: | Height: | Size: 3.2 KiB |
BIN
data/images/private-listening.png
Normal file
After Width: | Height: | Size: 4.2 KiB |
BIN
data/images/process-stop.png
Normal file
After Width: | Height: | Size: 5.1 KiB |
BIN
data/images/rdio.png
Normal file
After Width: | Height: | Size: 43 KiB |
Before Width: | Height: | Size: 1.2 MiB After Width: | Height: | Size: 5.1 KiB |
BIN
data/images/spotify-logo.png
Normal file
After Width: | Height: | Size: 53 KiB |
BIN
data/images/star-hover.png
Normal file
After Width: | Height: | Size: 19 KiB |
BIN
data/images/star-unstarred.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
data/images/starred.png
Normal file
After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 563 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 68 KiB |
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 3.8 KiB |
BIN
data/images/uploading.png
Normal file
After Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
@@ -2,7 +2,7 @@
|
||||
// if run in phantomjs add fake Tomahawk environment
|
||||
if(window.Tomahawk === undefined)
|
||||
{
|
||||
alert("PHANTOMJS ENVIRONMENT");
|
||||
// alert("PHANTOMJS ENVIRONMENT");
|
||||
var Tomahawk = {
|
||||
fakeEnv: function()
|
||||
{
|
||||
@@ -184,6 +184,21 @@ Tomahawk.syncRequest = function(url)
|
||||
}
|
||||
};
|
||||
|
||||
Tomahawk.asyncRequest = function(url, callback)
|
||||
{
|
||||
var xmlHttpRequest = new XMLHttpRequest();
|
||||
xmlHttpRequest.open('GET', url, true);
|
||||
xmlHttpRequest.onreadystatechange = function() {
|
||||
if (xmlHttpRequest.readyState == 4 && xmlHttpRequest.status == 200) {
|
||||
callback.call(window, xmlHttpRequest);
|
||||
} else if (xmlHttpRequest.readyState === 4) {
|
||||
Tomahawk.log("Failed to do GET request: to: " + url);
|
||||
Tomahawk.log("Status Code was: " + xmlHttpRequest.status);
|
||||
}
|
||||
}
|
||||
xmlHttpRequest.send(null);
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* Secure Hash Algorithm (SHA256)
|
||||
|
10
data/sql/dbmigrate-26_to_27.sql
Normal file
@@ -0,0 +1,10 @@
|
||||
-- Script to migate from db version 26 to 27
|
||||
-- Nothing to do
|
||||
|
||||
CREATE TABLE IF NOT EXISTS collection_attributes (
|
||||
id INTEGER REFERENCES source(id) ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE INITIALLY DEFERRED, -- source id, null for local source
|
||||
k TEXT NOT NULL,
|
||||
v TEXT NOT NULL
|
||||
);
|
||||
UPDATE settings SET v = '27' WHERE k == 'schema_version';
|
||||
|
7
data/sql/dbmigrate-27_to_28.sql
Normal file
@@ -0,0 +1,7 @@
|
||||
-- Script to migate from db version 27 to 28.
|
||||
-- Added albumartist and discnumber to file_join
|
||||
|
||||
ALTER TABLE file_join ADD COLUMN composer INTEGER REFERENCES artist(id) ON DELETE CASCADE ON UPDATE CASCADE DEFERRABLE INITIALLY DEFERRED;
|
||||
ALTER TABLE file_join ADD COLUMN discnumber INTEGER;
|
||||
|
||||
UPDATE settings SET v = '28' WHERE k == 'schema_version';
|
3541
lang/tomahawk_bg.ts
Normal file
3573
lang/tomahawk_de.ts
3541
lang/tomahawk_en.ts
Normal file
3532
lang/tomahawk_es.ts
Normal file
@@ -1,5 +1,11 @@
|
||||
<!DOCTYPE RCC><RCC version="1.0">
|
||||
<qresource prefix="/lang">
|
||||
<file>tomahawk_en.qm</file>
|
||||
<file>tomahawk_de.qm</file>
|
||||
<file>tomahawk_sv.qm</file>
|
||||
<file>tomahawk_es.qm</file>
|
||||
<file>tomahawk_bg.qm</file>
|
||||
<file>tomahawk_pl.qm</file>
|
||||
<file>tomahawk_pt_BR.qm</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
3530
lang/tomahawk_pl.ts
Normal file
3530
lang/tomahawk_pt_BR.ts
Normal file
3515
lang/tomahawk_sv.ts
Normal file
@@ -4,7 +4,6 @@
|
||||
<file>data/images/avatar-dude.png</file>
|
||||
<file>data/images/back-pressed.png</file>
|
||||
<file>data/images/back-rest.png</file>
|
||||
<file>data/images/cover-shadow.png</file>
|
||||
<file>data/images/filter.png</file>
|
||||
<file>data/images/loved.png</file>
|
||||
<file>data/images/not-loved.png</file>
|
||||
@@ -13,6 +12,7 @@
|
||||
<file>data/images/track-placeholder.png</file>
|
||||
<file>data/images/now-playing-panel.png</file>
|
||||
<file>data/images/now-playing-speaker.png</file>
|
||||
<file>data/images/now-playing-speaker-dark.png</file>
|
||||
<file>data/images/pause-pressed.png</file>
|
||||
<file>data/images/pause-rest.png</file>
|
||||
<file>data/images/play-pressed.png</file>
|
||||
@@ -72,6 +72,7 @@
|
||||
<file>data/images/music-icon.png</file>
|
||||
<file>data/images/configure.png</file>
|
||||
<file>data/images/create-playlist.png</file>
|
||||
<file>data/images/private-listening.png</file>
|
||||
<file>data/images/add.png</file>
|
||||
<file>data/images/recently-played.png</file>
|
||||
<file>data/images/supercollection.png</file>
|
||||
@@ -91,9 +92,13 @@
|
||||
<file>data/images/artist-icon.png</file>
|
||||
<file>data/images/album-icon.png</file>
|
||||
<file>data/images/search-icon.png</file>
|
||||
<file>data/images/star-hover.png</file>
|
||||
<file>data/images/starred.png</file>
|
||||
<file>data/images/star-unstarred.png</file>
|
||||
<file>data/images/track-icon-22x22.png</file>
|
||||
<file>data/images/track-icon-32x32.png</file>
|
||||
<file>data/images/track-icon-16x16.png</file>
|
||||
<file>data/images/apply-check.png</file>
|
||||
<file>data/stylesheets/topbar-radiobuttons.css</file>
|
||||
<file>data/icons/tomahawk-icon-16x16.png</file>
|
||||
<file>data/icons/tomahawk-icon-32x32.png</file>
|
||||
@@ -108,6 +113,7 @@
|
||||
<file>data/sql/dbmigrate-23_to_24.sql</file>
|
||||
<file>data/sql/dbmigrate-24_to_25.sql</file>
|
||||
<file>data/sql/dbmigrate-25_to_26.sql</file>
|
||||
<file>data/sql/dbmigrate-26_to_27.sql</file>
|
||||
<file>data/js/tomahawk.js</file>
|
||||
<file>data/images/avatar_frame.png</file>
|
||||
<file>data/images/drop-all-songs.png</file>
|
||||
@@ -115,5 +121,20 @@
|
||||
<file>data/images/drop-top-songs.png</file>
|
||||
<file>data/images/drop-song.png</file>
|
||||
<file>data/images/drop-album.png</file>
|
||||
<file>data/images/spotify-logo.png</file>
|
||||
<file>data/images/itunes.png</file>
|
||||
<file>data/images/uploading.png</file>
|
||||
<file>data/images/downloading.png</file>
|
||||
<file>data/images/headphones.png</file>
|
||||
<file>data/images/headphones-off.png</file>
|
||||
<file>data/images/headphones-sidebar.png</file>
|
||||
<file>data/images/closed-padlock.png</file>
|
||||
<file>data/images/open-padlock.png</file>
|
||||
<file>data/images/headphones-bigger.png</file>
|
||||
<file>data/images/no-album-no-case.png</file>
|
||||
<file>data/images/rdio.png</file>
|
||||
<file>data/images/grooveshark.png</file>
|
||||
<file>data/sql/dbmigrate-27_to_28.sql</file>
|
||||
<file>data/images/process-stop.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
@@ -1,15 +1,10 @@
|
||||
SET( OS_SPECIFIC_LINK_LIBRARIES
|
||||
${OS_SPECIFIC_LINK_LIBRARIES}
|
||||
tomahawklib
|
||||
)
|
||||
|
||||
FILE( GLOB _icons "${CMAKE_SOURCE_DIR}/data/icons/tomahawk-icon-*.png" )
|
||||
FOREACH( _file ${_icons} )
|
||||
STRING( REPLACE "${CMAKE_SOURCE_DIR}/data/icons/tomahawk-icon-" "" _res ${_file} )
|
||||
STRING( REPLACE ".png" "" _res ${_res} )
|
||||
INSTALL( FILES ${_file} RENAME tomahawk.png DESTINATION share/icons/hicolor/${_res}/apps )
|
||||
INSTALL( FILES ${_file} RENAME tomahawk.png DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/${_res}/apps )
|
||||
ENDFOREACH( _file )
|
||||
|
||||
INSTALL( FILES ${CMAKE_SOURCE_DIR}/data/icons/tomahawk-icon.svg RENAME tomahawk.svg DESTINATION share/icons/hicolor/scalable )
|
||||
INSTALL( FILES ${CMAKE_SOURCE_DIR}/data/icons/tomahawk-icon.svg RENAME tomahawk.svg DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/scalable/apps )
|
||||
|
||||
INSTALL( FILES ${CMAKE_SOURCE_DIR}/admin/unix/tomahawk.desktop DESTINATION share/applications )
|
||||
INSTALL( FILES ${CMAKE_SOURCE_DIR}/admin/unix/tomahawk.desktop DESTINATION ${CMAKE_INSTALL_DATADIR}/applications )
|
@@ -1,10 +1,11 @@
|
||||
SET( TOMAHAWK_LIBRARIES tomahawklib )
|
||||
SET( TOMAHAWK_LIBRARIES tomahawklib )
|
||||
|
||||
SET( OS_SPECIFIC_LINK_LIBRARIES
|
||||
${OS_SPECIFIC_LINK_LIBRARIES}
|
||||
${COREAUDIO_LIBRARY}
|
||||
${COREFOUNDATION_LIBRARY}
|
||||
|
||||
crypto
|
||||
SPMediaKeyTap
|
||||
|
||||
/System/Library/Frameworks/AppKit.framework
|
||||
@@ -26,12 +27,15 @@ if (APPLE)
|
||||
# Uses Darwin kernel version.
|
||||
# 9.8.0 -> 10.5/Leopard
|
||||
# 10.4.0 -> 10.6/Snow Leopard
|
||||
# 11.x.x -> Lion
|
||||
string(REGEX MATCH "[0-9]+" DARWIN_VERSION ${CMAKE_HOST_SYSTEM_VERSION})
|
||||
if (DARWIN_VERSION GREATER 9)
|
||||
if (DARWIN_VERSION GREATER 10)
|
||||
SET(LION 1)
|
||||
elseif (DARWIN_VERSION GREATER 9)
|
||||
SET(SNOW_LEOPARD 1)
|
||||
elseif (DARWIN_VERSION GREATER 8)
|
||||
SET(LEOPARD 1)
|
||||
endif (DARWIN_VERSION GREATER 9)
|
||||
endif (DARWIN_VERSION GREATER 10)
|
||||
|
||||
# Use two different sparkle update tracks for debug and release
|
||||
# We have to change the URL in the Info.plist file :-/
|
||||
@@ -54,4 +58,7 @@ if (APPLE)
|
||||
FILE(COPY ${CMAKE_SOURCE_DIR}/admin/mac/sparkle_pub.pem
|
||||
DESTINATION "${CMAKE_BINARY_DIR}/tomahawk.app/Contents/Resources")
|
||||
|
||||
FILE(COPY /usr/bin/SetFile DESTINATION "${CMAKE_BINARY_DIR}/tomahawk.app/Contents/MacOS")
|
||||
FILE(COPY /usr/bin/GetFileInfo DESTINATION "${CMAKE_BINARY_DIR}/tomahawk.app/Contents/MacOS")
|
||||
|
||||
endif (APPLE)
|
@@ -13,6 +13,8 @@ SET( QT_USE_QTNETWORK TRUE )
|
||||
SET( QT_USE_QTXML TRUE )
|
||||
SET( QT_USE_QTWEBKIT TRUE )
|
||||
|
||||
add_definitions( -DQT_SHAREDPOINTER_TRACK_POINTERS )
|
||||
|
||||
INCLUDE( ${QT_USE_FILE} )
|
||||
INCLUDE( AddAppIconMacro )
|
||||
|
||||
@@ -37,12 +39,10 @@ ENDIF()
|
||||
SET( tomahawkSources ${tomahawkSources}
|
||||
web/api_v1.cpp
|
||||
|
||||
resolvers/scriptresolver.cpp
|
||||
resolvers/qtscriptresolver.cpp
|
||||
|
||||
musicscanner.cpp
|
||||
shortcuthandler.cpp
|
||||
scanmanager.cpp
|
||||
ubuntuunityhack.cpp
|
||||
tomahawkapp.cpp
|
||||
main.cpp
|
||||
)
|
||||
@@ -60,14 +60,16 @@ SET( tomahawkSourcesGui ${tomahawkSourcesGui}
|
||||
sourcetree/sourcedelegate.cpp
|
||||
sourcetree/animationhelper.cpp
|
||||
sourcetree/items/sourcetreeitem.cpp
|
||||
sourcetree/items/collectionitem.cpp
|
||||
sourcetree/items/sourceitem.cpp
|
||||
sourcetree/items/playlistitems.cpp
|
||||
sourcetree/items/categoryitems.cpp
|
||||
sourcetree/items/genericpageitems.cpp
|
||||
sourcetree/items/temporarypageitem.cpp
|
||||
sourcetree/items/groupitem.cpp
|
||||
sourcetree/items/historyitem.cpp
|
||||
|
||||
breakpad/BreakPad.cpp
|
||||
|
||||
transferview.cpp
|
||||
PipelineStatusView.cpp
|
||||
tomahawktrayicon.cpp
|
||||
audiocontrols.cpp
|
||||
settingsdialog.cpp
|
||||
@@ -78,6 +80,7 @@ SET( tomahawkSourcesGui ${tomahawkSourcesGui}
|
||||
settingslistdelegate.cpp
|
||||
resolversmodel.cpp
|
||||
tomahawkwindow.cpp
|
||||
LoadXSPFDialog.cpp
|
||||
)
|
||||
|
||||
SET( tomahawkHeaders ${tomahawkHeaders}
|
||||
@@ -85,11 +88,9 @@ SET( tomahawkHeaders ${tomahawkHeaders}
|
||||
|
||||
web/api_v1.h
|
||||
|
||||
resolvers/scriptresolver.h
|
||||
resolvers/qtscriptresolver.h
|
||||
|
||||
musicscanner.h
|
||||
scanmanager.h
|
||||
ubuntuunityhack.h
|
||||
shortcuthandler.h
|
||||
)
|
||||
|
||||
@@ -99,6 +100,12 @@ IF(LIBLASTFM_FOUND)
|
||||
)
|
||||
ENDIF(LIBLASTFM_FOUND)
|
||||
|
||||
IF(LIBATTICA_FOUND)
|
||||
SET( tomahawkSourcesGui ${tomahawkSourcesGui} GetNewStuffDialog.cpp GetNewStuffDelegate.cpp GetNewStuffModel.cpp )
|
||||
SET( tomahawkHeadersGui ${tomahawkHeadersGui} GetNewStuffDialog.h GetNewStuffDelegate.h GetNewStuffModel.h )
|
||||
INCLUDE_DIRECTORIES( ${LIBATTICA_INCLUDE_DIR} )
|
||||
ENDIF(LIBATTICA_FOUND)
|
||||
|
||||
|
||||
SET( tomahawkHeadersGui ${tomahawkHeadersGui}
|
||||
sourcetree/sourcesmodel.h
|
||||
@@ -107,14 +114,14 @@ SET( tomahawkHeadersGui ${tomahawkHeadersGui}
|
||||
sourcetree/sourcedelegate.h
|
||||
sourcetree/animationhelper.h
|
||||
sourcetree/items/sourcetreeitem.h
|
||||
sourcetree/items/collectionitem.h
|
||||
sourcetree/items/sourceitem.h
|
||||
sourcetree/items/playlistitems.h
|
||||
sourcetree/items/categoryitems.h
|
||||
sourcetree/items/genericpageitems.h
|
||||
sourcetree/items/temporarypageitem.h
|
||||
sourcetree/items/groupitem.h
|
||||
sourcetree/items/historyitem.h
|
||||
|
||||
transferview.h
|
||||
PipelineStatusView.h
|
||||
tomahawktrayicon.h
|
||||
audiocontrols.h
|
||||
settingsdialog.h
|
||||
@@ -126,8 +133,7 @@ SET( tomahawkHeadersGui ${tomahawkHeadersGui}
|
||||
resolversmodel.h
|
||||
delegateconfigwrapper.h
|
||||
tomahawkwindow.h
|
||||
|
||||
Qocoa/qsearchfield.h
|
||||
LoadXSPFDialog.h
|
||||
)
|
||||
|
||||
SET( tomahawkUI ${tomahawkUI}
|
||||
@@ -137,6 +143,9 @@ SET( tomahawkUI ${tomahawkUI}
|
||||
proxydialog.ui
|
||||
|
||||
audiocontrols.ui
|
||||
|
||||
GetNewStuffDialog.ui
|
||||
LoadXSPFDialog.ui
|
||||
)
|
||||
|
||||
INCLUDE_DIRECTORIES(
|
||||
@@ -157,6 +166,7 @@ INCLUDE_DIRECTORIES(
|
||||
${THIRDPARTY_DIR}/qxt/qxtweb-standalone/qxtweb
|
||||
${THIRDPARTY_DIR}/qtweetlib/qtweetlib/src
|
||||
${THIRDPARTY_DIR}/qtweetlib/tomahawk-custom
|
||||
${THIRDPARTY_DIR}/breakpad
|
||||
|
||||
${TAGLIB_INCLUDES}
|
||||
${PHONON_INCLUDES}
|
||||
@@ -168,23 +178,21 @@ INCLUDE_DIRECTORIES(
|
||||
SET( OS_SPECIFIC_LINK_LIBRARIES "" )
|
||||
|
||||
IF( WIN32 )
|
||||
INCLUDE( "CMakeLists.win32.txt" )
|
||||
INCLUDE( "CMakeLists.win32.cmake" )
|
||||
ENDIF( WIN32 )
|
||||
IF( UNIX )
|
||||
INCLUDE( "CMakeLists.unix.txt" )
|
||||
INCLUDE( "CMakeLists.unix.cmake" )
|
||||
ENDIF( UNIX )
|
||||
|
||||
IF( APPLE )
|
||||
INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/thirdparty/SPMediaKeyTap )
|
||||
|
||||
SET( tomahawkHeaders ${tomahawkHeaders} mac/tomahawkapp_mac.h mac/macshortcuthandler.h )
|
||||
SET( tomahawkSources ${tomahawkSources} mac/tomahawkapp_mac.mm mac/macshortcuthandler.cpp Qocoa/qsearchfield_mac.mm )
|
||||
SET( tomahawkHeaders ${tomahawkHeaders} mac/tomahawkapp_mac.h mac/macshortcuthandler.h )
|
||||
SET( tomahawkSources ${tomahawkSources} mac/tomahawkapp_mac.mm mac/macshortcuthandler.cpp )
|
||||
|
||||
IF(HAVE_SPARKLE)
|
||||
SET( tomahawkHeaders ${tomahawkHeaders} ${SPARKLE}/Headers )
|
||||
ENDIF(HAVE_SPARKLE)
|
||||
ELSE( APPLE )
|
||||
SET( tomahawkSources ${tomahawkSources} Qocoa/qsearchfield.cpp )
|
||||
ENDIF( APPLE )
|
||||
|
||||
IF(GLOOX_FOUND)
|
||||
@@ -198,10 +206,7 @@ IF(QCA2_FOUND)
|
||||
INCLUDE_DIRECTORIES( ${QCA2_INCLUDE_DIR} )
|
||||
ENDIF(QCA2_FOUND)
|
||||
|
||||
kde4_add_app_icon( tomahawkSources "${CMAKE_SOURCE_DIR}/data/icons/tomahawk-icon-*.png" )
|
||||
qt4_add_resources( RC_SRCS "../resources.qrc" )
|
||||
qt4_wrap_cpp( tomahawkMoc ${tomahawkHeaders} )
|
||||
|
||||
INCLUDE(GNUInstallDirs)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/config.h)
|
||||
|
||||
@@ -209,13 +214,17 @@ include( ${CMAKE_SOURCE_DIR}/lang/translations.cmake )
|
||||
|
||||
SET( final_src ${final_src} ${tomahawkMoc} ${tomahawkSources} ${tomahawkHeaders} ${trans_outfile})
|
||||
|
||||
IF( "${gui}" STREQUAL "no" )
|
||||
ELSE()
|
||||
IF( BUILD_GUI )
|
||||
LIST(APPEND tomahawkHeaders ${tomahawkHeadersGui})
|
||||
LIST(APPEND tomahawkSources ${tomahawkSourcesGui})
|
||||
qt4_wrap_ui( tomahawkUI_H ${tomahawkUI} )
|
||||
qt4_wrap_cpp( tomahawkMocGui ${tomahawkHeadersGui} )
|
||||
SET( final_src ${final_src} ${tomahawkUI_H} ${tomahawkMocGui} ${tomahawkSourcesGui} ${RC_SRCS} )
|
||||
ENDIF()
|
||||
|
||||
kde4_add_app_icon( tomahawkSources "${CMAKE_SOURCE_DIR}/data/icons/tomahawk-icon-*.png" )
|
||||
qt4_add_resources( RC_SRCS "../resources.qrc" )
|
||||
qt4_wrap_cpp( tomahawkMoc ${tomahawkHeaders} )
|
||||
SET( final_src ${final_src} ${tomahawkUI_H} ${tomahawkMoc} ${tomahawkSources} ${RC_SRCS} )
|
||||
|
||||
IF( UNIX AND NOT APPLE )
|
||||
ADD_EXECUTABLE( tomahawk ${final_src} )
|
||||
ENDIF( UNIX AND NOT APPLE )
|
||||
@@ -237,12 +246,12 @@ ENDIF(LIBLASTFM_FOUND)
|
||||
IF(GLOOX_FOUND)
|
||||
SET(LINK_LIBRARIES ${LINK_LIBRARIES} ${GLOOX_LIBRARIES} )
|
||||
ENDIF(GLOOX_FOUND)
|
||||
|
||||
IF(QCA2_FOUND)
|
||||
SET(LINK_LIBRARIES ${LINK_LIBRARIES} ${QCA2_LIBRARIES} )
|
||||
ENDIF(QCA2_FOUND)
|
||||
|
||||
TARGET_LINK_LIBRARIES( tomahawk
|
||||
tomahawk_breakpad
|
||||
${LINK_LIBRARIES}
|
||||
${TOMAHAWK_LIBRARIES}
|
||||
${PHONON_LIBS}
|
||||
@@ -263,12 +272,12 @@ IF( APPLE )
|
||||
ENDIF(HAVE_SPARKLE)
|
||||
ENDIF( APPLE )
|
||||
|
||||
INSTALL( TARGETS tomahawk BUNDLE DESTINATION . RUNTIME DESTINATION bin )
|
||||
INSTALL( TARGETS tomahawk BUNDLE DESTINATION . RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} )
|
||||
|
||||
IF( UNIX AND NOT APPLE AND KDE4_INSTALLED ) #install protocol file
|
||||
IF( UNIX AND NOT APPLE AND KDE4_INSTALLED AND LEGACY_KDE_INTEGRATION ) #install protocol file
|
||||
FILE( READ ${CMAKE_SOURCE_DIR}/admin/unix/tomahawk.protocol protocol )
|
||||
STRING( REPLACE "/path/to/binary" # match this
|
||||
"${CMAKE_INSTALL_PREFIX}/bin/tomahawk" # this is linux (kde) so pretty safe I think
|
||||
"${CMAKE_INSTALL_FULL_BINDIR}/tomahawk" # this is linux (kde) so pretty safe I think
|
||||
edited_protocol # save in this variable
|
||||
"${protocol}" # from the contents of this var
|
||||
)
|
||||
@@ -276,7 +285,7 @@ IF( UNIX AND NOT APPLE AND KDE4_INSTALLED ) #install protocol file
|
||||
IF( ${SERVICES_INSTALL_DIR} )
|
||||
SET( PROTOCOL_INSTALL_DIR ${SERVICES_INSTALL_DIR} )
|
||||
ELSE()
|
||||
SET( PROTOCOL_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/share/kde4/services" )
|
||||
SET( PROTOCOL_INSTALL_DIR "${CMAKE_INSTALL_FULL_DATADIR}/kde4/services" )
|
||||
ENDIF()
|
||||
INSTALL( FILES ${CMAKE_BINARY_DIR}/tomahawk.protocol DESTINATION ${PROTOCOL_INSTALL_DIR} )
|
||||
ENDIF()
|
||||
|
@@ -4,12 +4,12 @@ ADD_DEFINITIONS( -g )
|
||||
ADD_DEFINITIONS( -fno-operator-names )
|
||||
ADD_DEFINITIONS( -fPIC )
|
||||
|
||||
SET( QXTWEB_LIBRARIES qxtweb-standalone )
|
||||
SET( QXTWEB_LIBRARIES qxtweb-standalone )
|
||||
|
||||
IF( APPLE )
|
||||
INCLUDE( "CMakeLists.osx.txt" )
|
||||
INCLUDE( "CMakeLists.osx.cmake" )
|
||||
ENDIF( APPLE )
|
||||
|
||||
IF( UNIX AND NOT APPLE )
|
||||
INCLUDE( "CMakeLists.linux.txt" )
|
||||
INCLUDE( "CMakeLists.linux.cmake" )
|
||||
ENDIF( UNIX AND NOT APPLE )
|
@@ -3,6 +3,7 @@ SET( CMAKE_BUILD_TYPE "Release" )
|
||||
ADD_DEFINITIONS( /DNOMINMAX )
|
||||
ADD_DEFINITIONS( /DWIN32_LEAN_AND_MEAN )
|
||||
ADD_DEFINITIONS( -static-libgcc )
|
||||
ADD_DEFINITIONS( -DUNICODE )
|
||||
|
||||
SET( QXTWEB_LIBRARIES qxtweb-standalone )
|
||||
|
323
src/GetNewStuffDelegate.cpp
Normal file
@@ -0,0 +1,323 @@
|
||||
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
||||
*
|
||||
* Copyright 2010-2011, Leo Franchi <lfranchi@kde.org>
|
||||
*
|
||||
* Tomahawk is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Tomahawk is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Tomahawk. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "GetNewStuffDelegate.h"
|
||||
|
||||
#include "GetNewStuffModel.h"
|
||||
#include "utils/tomahawkutils.h"
|
||||
#include "utils/logger.h"
|
||||
|
||||
#include <QtGui/QPainter>
|
||||
#include <QApplication>
|
||||
#include <QMouseEvent>
|
||||
#include "AtticaManager.h"
|
||||
|
||||
#define PADDING 4
|
||||
#define PADDING_BETWEEN_STARS 2
|
||||
#define STAR_SIZE 12
|
||||
|
||||
#ifdef Q_WS_MAC
|
||||
#define SIZEHINT_HEIGHT 70
|
||||
#else
|
||||
#define SIZEHINT_HEIGHT 60
|
||||
#endif
|
||||
|
||||
GetNewStuffDelegate::GetNewStuffDelegate( QObject* parent )
|
||||
: QStyledItemDelegate ( parent )
|
||||
, m_widestTextWidth( 0 )
|
||||
, m_hoveringOver( -1 )
|
||||
{
|
||||
m_defaultCover.load( RESPATH "images/sipplugin-online.png" );
|
||||
m_ratingStarPositive.load( RESPATH "images/starred.png" );
|
||||
m_ratingStarNegative.load( RESPATH "images/star-unstarred.png" );
|
||||
m_onHoverStar.load( RESPATH "images/star-hover.png" );
|
||||
|
||||
m_ratingStarPositive = m_ratingStarPositive.scaled( STAR_SIZE, STAR_SIZE, Qt::KeepAspectRatio, Qt::SmoothTransformation );
|
||||
m_ratingStarNegative = m_ratingStarNegative.scaled( STAR_SIZE, STAR_SIZE, Qt::KeepAspectRatio, Qt::SmoothTransformation );
|
||||
m_onHoverStar = m_onHoverStar.scaled( STAR_SIZE, STAR_SIZE, Qt::KeepAspectRatio, Qt::SmoothTransformation );
|
||||
|
||||
const int w = SIZEHINT_HEIGHT - 2*PADDING;
|
||||
m_defaultCover = m_defaultCover.scaled( w, w, Qt::KeepAspectRatio, Qt::SmoothTransformation );
|
||||
|
||||
// save the widest wifth
|
||||
QFont f( QApplication::font() );
|
||||
f.setPointSize( f.pointSize() - 1 );
|
||||
QFontMetrics fm( f );
|
||||
QStringList l = QStringList() << tr( "Installed" ) << tr( "Installing" ) << tr( "Failed" ) << tr( "Uninstalling" );
|
||||
foreach ( const QString& str, l )
|
||||
{
|
||||
if ( fm.width( str ) > m_widestTextWidth )
|
||||
m_widestTextWidth = fm.width( str );
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
GetNewStuffDelegate::paint( QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index ) const
|
||||
{
|
||||
QStyleOptionViewItemV4 opt = option;
|
||||
initStyleOption( &opt, index );
|
||||
|
||||
QApplication::style()->drawPrimitive( QStyle::PE_PanelItemViewItem, &opt, painter, opt.widget );
|
||||
|
||||
painter->setRenderHint( QPainter::Antialiasing );
|
||||
|
||||
QFont titleFont = opt.font;
|
||||
titleFont.setBold( true );
|
||||
titleFont.setPointSize( titleFont.pointSize() + 2 );
|
||||
QFontMetrics titleMetrics( titleFont );
|
||||
|
||||
QFont authorFont = opt.font;
|
||||
authorFont.setItalic( true );
|
||||
authorFont.setPointSize( authorFont.pointSize() - 1 );
|
||||
QFontMetrics authorMetrics( authorFont );
|
||||
|
||||
QFont descFont = authorFont;
|
||||
descFont.setItalic( false );
|
||||
QFontMetrics descMetrics( descFont );
|
||||
|
||||
QFont installFont = opt.font;
|
||||
installFont.setPointSize( installFont.pointSize() - 1 );
|
||||
QFontMetrics installMetrics( descFont );
|
||||
|
||||
const int height = opt.rect.height();
|
||||
const int center = height / 2 + opt.rect.top();
|
||||
|
||||
// Pixmap
|
||||
QPixmap p = index.data( Qt::DecorationRole ).value< QPixmap >();
|
||||
const int pixmapWidth = height - 2*PADDING;
|
||||
QRect pixmapRect( PADDING, PADDING + opt.rect.top(), pixmapWidth, pixmapWidth );
|
||||
if ( p.isNull() ) // default image... TODO
|
||||
p = m_defaultCover;
|
||||
else
|
||||
p = p.scaled( pixmapRect.size(), Qt::KeepAspectRatio, Qt::SmoothTransformation );
|
||||
|
||||
painter->drawPixmap( pixmapRect, p );
|
||||
|
||||
// Go from right edge now, stars, install button, and downloaded info
|
||||
|
||||
// install / status button
|
||||
AtticaManager::ResolverState state = static_cast< AtticaManager::ResolverState >( index.data( GetNewStuffModel::StateRole ).toInt() );
|
||||
QString actionText;
|
||||
switch( state )
|
||||
{
|
||||
case AtticaManager::Uninstalled:
|
||||
actionText = tr( "Install" );
|
||||
break;
|
||||
case AtticaManager::Installing:
|
||||
actionText = tr( "Installing" );
|
||||
break;
|
||||
case AtticaManager::Upgrading:
|
||||
actionText = tr( "Upgrading" );
|
||||
break;
|
||||
case AtticaManager::Failed:
|
||||
actionText = tr( "Failed" );
|
||||
break;
|
||||
case AtticaManager::Installed:
|
||||
actionText = tr( "Uninstall" );
|
||||
break;
|
||||
case AtticaManager::NeedsUpgrade:
|
||||
actionText = tr( "Upgrade" );
|
||||
break;
|
||||
}
|
||||
|
||||
const int btnWidth = m_widestTextWidth + 7;
|
||||
const int leftEdge = opt.rect.width() - PADDING - btnWidth - 3;
|
||||
const QRect btnRect( leftEdge, center - ( installMetrics.height() + 4 ) / 2, btnWidth, installMetrics.height() + 4 );
|
||||
m_cachedButtonRects[ QPair<int, int>(index.row(), index.column()) ] = btnRect;
|
||||
|
||||
QPen saved = painter->pen();
|
||||
painter->setPen( opt.palette.color( QPalette::Active, QPalette::AlternateBase ) );
|
||||
|
||||
QPainterPath btnPath;
|
||||
const int radius = 3;
|
||||
//btnPath.addRoundedRect( btnRect, 3, 3 );
|
||||
// draw top half gradient
|
||||
const int btnCenter = btnRect.bottom() - ( btnRect.height() / 2 );
|
||||
btnPath.moveTo( btnRect.left(), btnCenter );
|
||||
btnPath.lineTo( btnRect.left(), btnRect.top() + radius );
|
||||
btnPath.quadTo( QPoint( btnRect.topLeft() ), QPoint( btnRect.left() + radius, btnRect.top() ) );
|
||||
btnPath.lineTo( btnRect.right() - radius, btnRect.top() );
|
||||
btnPath.quadTo( QPoint( btnRect.topRight() ), QPoint( btnRect.right(), btnRect.top() + radius ) );
|
||||
btnPath.lineTo( btnRect.right(),btnCenter );
|
||||
btnPath.lineTo( btnRect.left(), btnCenter );
|
||||
|
||||
QLinearGradient g;
|
||||
g.setColorAt( 0, QColor(54, 127, 211) );
|
||||
g.setColorAt( 0.5, QColor(43, 104, 182) );
|
||||
//painter->setPen( bg.darker() );
|
||||
painter->fillPath( btnPath, g );
|
||||
//painter->drawPath( btnPath );
|
||||
|
||||
btnPath = QPainterPath();
|
||||
btnPath.moveTo( btnRect.left(), btnCenter );
|
||||
btnPath.lineTo( btnRect.left(), btnRect.bottom() - radius );
|
||||
btnPath.quadTo( QPoint( btnRect.bottomLeft() ), QPoint( btnRect.left() + radius, btnRect.bottom() ) );
|
||||
btnPath.lineTo( btnRect.right() - radius, btnRect.bottom() );
|
||||
btnPath.quadTo( QPoint( btnRect.bottomRight() ), QPoint( btnRect.right(), btnRect.bottom() - radius ) );
|
||||
btnPath.lineTo( btnRect.right(), btnCenter );
|
||||
btnPath.lineTo( btnRect.left(), btnCenter );
|
||||
|
||||
g.setColorAt( 0, QColor(34, 85, 159) );
|
||||
g.setColorAt( 0.5, QColor(35, 79, 147) );
|
||||
painter->fillPath( btnPath, g );
|
||||
|
||||
painter->setFont( installFont );
|
||||
painter->drawText( btnRect, Qt::AlignCenter, actionText );
|
||||
|
||||
painter->setPen( saved );
|
||||
|
||||
// rating stars
|
||||
int rating = index.data( GetNewStuffModel::RatingRole ).toInt();
|
||||
const int ratingWidth = 5 * ( m_ratingStarPositive.width() + PADDING_BETWEEN_STARS );
|
||||
int runningEdge = ( btnRect.right() - btnRect.width() / 2 ) - ratingWidth / 2;
|
||||
for ( int i = 1; i < 6; i++ )
|
||||
{
|
||||
QRect r( runningEdge, btnRect.top() - m_ratingStarPositive.height() - PADDING, m_ratingStarPositive.width(), m_ratingStarPositive.height() );
|
||||
if ( i == 1 )
|
||||
m_cachedStarRects[ QPair<int, int>(index.row(), index.column()) ] = r;
|
||||
|
||||
const bool userHasRated = index.data( GetNewStuffModel::UserHasRatedRole ).toBool();
|
||||
if ( !userHasRated && // Show on-hover animation if the user hasn't rated it yet, and is hovering over it
|
||||
m_hoveringOver > -1 &&
|
||||
m_hoveringItem == index )
|
||||
{
|
||||
if ( i <= m_hoveringOver ) // positive star
|
||||
painter->drawPixmap( r, m_onHoverStar );
|
||||
else
|
||||
painter->drawPixmap( r, m_ratingStarNegative );
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( i <= rating ) // positive or rated star
|
||||
{
|
||||
if ( userHasRated )
|
||||
painter->drawPixmap( r, m_onHoverStar );
|
||||
else
|
||||
painter->drawPixmap( r, m_ratingStarPositive );
|
||||
}
|
||||
else
|
||||
painter->drawPixmap( r, m_ratingStarNegative );
|
||||
}
|
||||
runningEdge += m_ratingStarPositive.width() + PADDING_BETWEEN_STARS;
|
||||
}
|
||||
|
||||
// downloaded num times, underneath button
|
||||
QString count = tr( "%1 downloads" ).arg( index.data( GetNewStuffModel::DownloadCounterRole ).toInt() );
|
||||
const QRect countRect( btnRect.left(), btnRect.bottom() + PADDING, btnRect.width(), opt.rect.bottom() - PADDING - btnRect.bottom() );
|
||||
QFont countFont = descFont;
|
||||
countFont.setPointSize( countFont.pointSize() - 2 );
|
||||
countFont.setBold( true );
|
||||
painter->setFont( countFont );
|
||||
painter->drawText( countRect, Qt::AlignCenter | Qt::TextWordWrap, count );
|
||||
|
||||
// author and version
|
||||
QString author = index.data( GetNewStuffModel::AuthorRole ).toString();
|
||||
const int authorWidth = authorMetrics.width( author );
|
||||
const int topTextLine = opt.rect.top() + PADDING;
|
||||
const QRect authorRect( btnRect.x() - 3*PADDING - authorWidth, topTextLine, authorWidth + 6, authorMetrics.height() );
|
||||
painter->setFont( authorFont );
|
||||
painter->drawText( authorRect, Qt::AlignCenter, author );
|
||||
|
||||
const QRect versionRect = authorRect.translated( 0, authorRect.height() );
|
||||
QString version = index.data( GetNewStuffModel::VersionRole ).toString();
|
||||
painter->drawText( versionRect, Qt::AlignCenter, version );
|
||||
|
||||
// title
|
||||
QString title = index.data( Qt::DisplayRole ).toString();
|
||||
const int rightTitleEdge = authorRect.left() - PADDING;
|
||||
const int leftTitleEdge = pixmapRect.right() + PADDING;
|
||||
const QRect textRect( leftTitleEdge, topTextLine, rightTitleEdge - leftTitleEdge, versionRect.bottom() - opt.rect.top() - PADDING );
|
||||
painter->setFont( titleFont );
|
||||
painter->drawText( textRect, Qt::AlignVCenter | Qt::AlignLeft, title );
|
||||
|
||||
// description
|
||||
QString desc = index.data( GetNewStuffModel::DescriptionRole ).toString();
|
||||
const int descWidth = btnRect.left() - leftTitleEdge - PADDING;
|
||||
const QRect descRect( leftTitleEdge, versionRect.bottom(), descWidth, opt.rect.bottom() - versionRect.bottom() + PADDING );
|
||||
painter->setFont( descFont );
|
||||
painter->drawText( descRect, Qt::AlignLeft | Qt::TextWordWrap, desc );
|
||||
}
|
||||
|
||||
|
||||
QSize
|
||||
GetNewStuffDelegate::sizeHint( const QStyleOptionViewItem& option, const QModelIndex& index ) const
|
||||
{
|
||||
Q_UNUSED( option );
|
||||
Q_UNUSED( index );
|
||||
return QSize( 200, SIZEHINT_HEIGHT );
|
||||
}
|
||||
|
||||
bool
|
||||
GetNewStuffDelegate::editorEvent( QEvent* event, QAbstractItemModel* model, const QStyleOptionViewItem& option, const QModelIndex& index )
|
||||
{
|
||||
Q_UNUSED( option );
|
||||
|
||||
if ( event->type() != QEvent::MouseButtonRelease &&
|
||||
event->type() != QEvent::MouseMove )
|
||||
return false;
|
||||
|
||||
if ( event->type() == QEvent::MouseButtonRelease && m_cachedButtonRects.contains( QPair<int, int>( index.row(), index.column() ) ) )
|
||||
{
|
||||
QRect rect = m_cachedButtonRects[ QPair<int, int>( index.row(), index.column() ) ];
|
||||
QMouseEvent* me = static_cast< QMouseEvent* >( event );
|
||||
|
||||
if ( rect.contains( me->pos() ) )
|
||||
{
|
||||
model->setData( index, true );
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if ( m_cachedStarRects.contains( QPair<int, int>( index.row(), index.column() ) ) )
|
||||
{
|
||||
QRect fullStars = m_cachedStarRects[ QPair<int, int>( index.row(), index.column() ) ];
|
||||
const int starsWidth = 5 * ( m_ratingStarPositive.width() + PADDING_BETWEEN_STARS );
|
||||
fullStars.setWidth( starsWidth );
|
||||
|
||||
QMouseEvent* me = static_cast< QMouseEvent* >( event );
|
||||
|
||||
if ( fullStars.contains( me->pos() ) )
|
||||
{
|
||||
const int eachStar = starsWidth / 5;
|
||||
const int clickOffset = me->pos().x() - fullStars.x();
|
||||
const int whichStar = (clickOffset / eachStar) + 1;
|
||||
|
||||
if ( event->type() == QEvent::MouseButtonRelease )
|
||||
{
|
||||
model->setData( index, whichStar, GetNewStuffModel::RatingRole );
|
||||
}
|
||||
else if ( event->type() == QEvent::MouseMove )
|
||||
{
|
||||
// 0-indexed
|
||||
m_hoveringOver = whichStar;
|
||||
m_hoveringItem = index;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if ( m_hoveringOver > -1 )
|
||||
{
|
||||
emit update( m_hoveringItem );
|
||||
m_hoveringOver = -1;
|
||||
m_hoveringItem = QPersistentModelIndex();
|
||||
}
|
||||
return false;
|
||||
}
|
50
src/GetNewStuffDelegate.h
Normal file
@@ -0,0 +1,50 @@
|
||||
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
||||
*
|
||||
* Copyright 2010-2011, Leo Franchi <lfranchi@kde.org>
|
||||
*
|
||||
* Tomahawk is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Tomahawk is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Tomahawk. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef GETNEWSTUFFDELEGATE_H
|
||||
#define GETNEWSTUFFDELEGATE_H
|
||||
|
||||
#include <QStyledItemDelegate>
|
||||
|
||||
|
||||
class
|
||||
GetNewStuffDelegate : public QStyledItemDelegate
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit GetNewStuffDelegate( QObject* parent = 0 );
|
||||
virtual void paint( QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index ) const;
|
||||
virtual QSize sizeHint( const QStyleOptionViewItem& option, const QModelIndex& index ) const;
|
||||
|
||||
signals:
|
||||
void update( const QModelIndex& idx );
|
||||
|
||||
protected:
|
||||
virtual bool editorEvent( QEvent* event, QAbstractItemModel* model, const QStyleOptionViewItem& option, const QModelIndex& index );
|
||||
|
||||
private:
|
||||
QPixmap m_defaultCover, m_onHoverStar, m_ratingStarPositive, m_ratingStarNegative;
|
||||
|
||||
int m_widestTextWidth;
|
||||
int m_hoveringOver;
|
||||
QPersistentModelIndex m_hoveringItem;
|
||||
mutable QHash< QPair<int, int>, QRect > m_cachedButtonRects;
|
||||
mutable QHash< QPair<int, int>, QRect > m_cachedStarRects;
|
||||
};
|
||||
|
||||
#endif // GETNEWSTUFFDELEGATE_H
|
54
src/GetNewStuffDialog.cpp
Normal file
@@ -0,0 +1,54 @@
|
||||
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
||||
*
|
||||
* Copyright 2011, Leo Franchi <lfranchi@kde.org>
|
||||
*
|
||||
* Tomahawk is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Tomahawk is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Tomahawk. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "GetNewStuffDialog.h"
|
||||
|
||||
#include "ui_GetNewStuffDialog.h"
|
||||
#include "GetNewStuffDelegate.h"
|
||||
#include "GetNewStuffModel.h"
|
||||
|
||||
GetNewStuffDialog::GetNewStuffDialog( QWidget* parent, Qt::WindowFlags f )
|
||||
: QDialog( parent, f )
|
||||
, ui( new Ui::GetNewStuffDialog )
|
||||
, m_model( new GetNewStuffModel( this ) )
|
||||
{
|
||||
ui->setupUi( this );
|
||||
|
||||
ui->listView->setModel( m_model );
|
||||
GetNewStuffDelegate* del = new GetNewStuffDelegate( ui->listView );
|
||||
connect( del, SIGNAL( update( QModelIndex ) ), ui->listView, SLOT( update( QModelIndex ) ) );
|
||||
ui->listView->setItemDelegate( del );
|
||||
ui->listView->setVerticalScrollMode( QAbstractItemView::ScrollPerPixel );
|
||||
|
||||
ui->listView->setMouseTracking( true );
|
||||
|
||||
setMinimumSize( 560, 350 );
|
||||
|
||||
#ifdef Q_WS_MAC
|
||||
setMaximumSize( 560, 350 );
|
||||
setSizeGripEnabled( false );
|
||||
|
||||
ui->listView->setAttribute( Qt::WA_MacShowFocusRect, false );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
GetNewStuffDialog::~GetNewStuffDialog()
|
||||
{
|
||||
delete ui;
|
||||
}
|
41
src/GetNewStuffDialog.h
Normal file
@@ -0,0 +1,41 @@
|
||||
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
||||
*
|
||||
* Copyright 2011, Leo Franchi <lfranchi@kde.org>
|
||||
*
|
||||
* Tomahawk is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Tomahawk is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Tomahawk. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef GETNEWSTUFFDIALOG_H
|
||||
#define GETNEWSTUFFDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
class GetNewStuffModel;
|
||||
namespace Ui {
|
||||
class GetNewStuffDialog;
|
||||
}
|
||||
|
||||
class GetNewStuffDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit GetNewStuffDialog( QWidget *parent = 0, Qt::WindowFlags f = 0 );
|
||||
~GetNewStuffDialog();
|
||||
|
||||
private:
|
||||
Ui::GetNewStuffDialog *ui;
|
||||
GetNewStuffModel* m_model;
|
||||
};
|
||||
|
||||
#endif // GETNEWSTUFFDIALOG_H
|
67
src/GetNewStuffDialog.ui
Normal file
@@ -0,0 +1,67 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>GetNewStuffDialog</class>
|
||||
<widget class="QDialog" name="GetNewStuffDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>449</width>
|
||||
<height>282</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Download New Resolvers</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QListView" name="listView"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>GetNewStuffDialog</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>248</x>
|
||||
<y>254</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>157</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>GetNewStuffDialog</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>316</x>
|
||||
<y>260</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>286</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
156
src/GetNewStuffModel.cpp
Normal file
@@ -0,0 +1,156 @@
|
||||
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
||||
*
|
||||
* Copyright 2010-2011, Leo Franchi <lfranchi@kde.org>
|
||||
*
|
||||
* Tomahawk is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Tomahawk is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Tomahawk. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "GetNewStuffModel.h"
|
||||
|
||||
#include "utils/tomahawkutils.h"
|
||||
#include "utils/logger.h"
|
||||
|
||||
#include <QPixmap>
|
||||
#include <QUrl>
|
||||
#include "AtticaManager.h"
|
||||
|
||||
GetNewStuffModel::GetNewStuffModel( QObject* parent )
|
||||
: QAbstractListModel ( parent )
|
||||
{
|
||||
|
||||
if ( AtticaManager::instance()->resolversLoaded() )
|
||||
m_contentList = AtticaManager::instance()->resolvers();
|
||||
|
||||
connect( AtticaManager::instance(), SIGNAL( resolversReloaded( Attica::Content::List ) ), this, SLOT( resolversReloaded( Attica::Content::List ) ) );
|
||||
connect( AtticaManager::instance(), SIGNAL( resolverStateChanged( QString ) ), this, SLOT( resolverStateChanged( QString ) ) );
|
||||
|
||||
}
|
||||
|
||||
GetNewStuffModel::~GetNewStuffModel()
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
GetNewStuffModel::resolversReloaded( const Attica::Content::List& resolvers )
|
||||
{
|
||||
beginResetModel();
|
||||
m_contentList = resolvers;
|
||||
endResetModel();
|
||||
}
|
||||
|
||||
void
|
||||
GetNewStuffModel::resolverStateChanged( const QString& resolverId )
|
||||
{
|
||||
for ( int i = 0; i < m_contentList.count(); i++ )
|
||||
{
|
||||
const Attica::Content resolver = m_contentList[ i ];
|
||||
if ( resolver.id() == resolverId )
|
||||
{
|
||||
QModelIndex idx = index( i, 0, QModelIndex() );
|
||||
emit dataChanged( idx, idx );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
QVariant
|
||||
GetNewStuffModel::data( const QModelIndex& index, int role ) const
|
||||
{
|
||||
if ( !index.isValid() || !hasIndex( index.row(), index.column(), index.parent() ) )
|
||||
return QVariant();
|
||||
|
||||
Attica::Content resolver = m_contentList[ index.row() ];
|
||||
switch ( role )
|
||||
{
|
||||
case Qt::DisplayRole:
|
||||
return resolver.name();
|
||||
case Qt::DecorationRole:
|
||||
return QVariant::fromValue< QPixmap >( AtticaManager::instance()->iconForResolver( resolver ) );
|
||||
case DownloadUrlRole:
|
||||
// TODO
|
||||
return QUrl();
|
||||
case RatingRole:
|
||||
return resolver.rating() / 20; // rating is out of 100
|
||||
case DownloadCounterRole:
|
||||
return resolver.downloads();
|
||||
case VersionRole:
|
||||
return resolver.version();
|
||||
case DescriptionRole:
|
||||
return resolver.description();
|
||||
case TypeRole:
|
||||
return ResolverType;
|
||||
case AuthorRole:
|
||||
return resolver.author();
|
||||
case StateRole:
|
||||
return (int)AtticaManager::instance()->resolverState( resolver );
|
||||
case UserHasRatedRole:
|
||||
return AtticaManager::instance()->userHasRated( resolver );
|
||||
}
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
int
|
||||
GetNewStuffModel::rowCount( const QModelIndex& parent ) const
|
||||
{
|
||||
Q_UNUSED( parent );
|
||||
return m_contentList.count();
|
||||
}
|
||||
|
||||
bool
|
||||
GetNewStuffModel::setData( const QModelIndex &index, const QVariant &value, int role )
|
||||
{
|
||||
Q_UNUSED( value );
|
||||
if ( !hasIndex( index.row(), index.column(), index.parent() ) )
|
||||
return false;
|
||||
|
||||
|
||||
Attica::Content resolver = m_contentList[ index.row() ];
|
||||
AtticaManager::ResolverState state = AtticaManager::instance()->resolverState( resolver );
|
||||
if ( role == Qt::EditRole )
|
||||
{
|
||||
switch( state )
|
||||
{
|
||||
case AtticaManager::Uninstalled:
|
||||
// install
|
||||
AtticaManager::instance()->installResolver( resolver );
|
||||
break;
|
||||
case AtticaManager::Installing:
|
||||
case AtticaManager::Upgrading:
|
||||
// Do nothing, busy
|
||||
break;
|
||||
case AtticaManager::Installed:
|
||||
// Uninstall
|
||||
AtticaManager::instance()->uninstallResolver( resolver );
|
||||
break;
|
||||
case AtticaManager::NeedsUpgrade:
|
||||
AtticaManager::instance()->upgradeResolver( resolver );
|
||||
break;
|
||||
default:
|
||||
//FIXME -- this handles e.g. Failed
|
||||
break;
|
||||
};
|
||||
} else if ( role == RatingRole )
|
||||
{
|
||||
// For now only allow rating if a resolver is installed!
|
||||
if ( state != AtticaManager::Installed && state != AtticaManager::NeedsUpgrade )
|
||||
return false;
|
||||
if ( AtticaManager::instance()->userHasRated( resolver ) )
|
||||
return false;
|
||||
m_contentList[ index.row() ].setRating( value.toInt() * 20 );
|
||||
AtticaManager::instance()->uploadRating( m_contentList[ index.row() ] );
|
||||
}
|
||||
emit dataChanged( index, index );
|
||||
|
||||
return true;
|
||||
}
|
64
src/GetNewStuffModel.h
Normal file
@@ -0,0 +1,64 @@
|
||||
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
||||
*
|
||||
* Copyright 2010-2011, Leo Franchi <lfranchi@kde.org>
|
||||
*
|
||||
* Tomahawk is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Tomahawk is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Tomahawk. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef GETNEWSTUFFMODEL_H
|
||||
#define GETNEWSTUFFMODEL_H
|
||||
|
||||
#include <QModelIndex>
|
||||
|
||||
#include <attica/content.h>
|
||||
#include <QPixmap>
|
||||
|
||||
class GetNewStuffModel: public QAbstractListModel
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
enum NewStuffRoles {
|
||||
// DisplayRole is title
|
||||
// DecorationRole is qicon for item
|
||||
DownloadUrlRole = Qt::UserRole + 1,
|
||||
RatingRole = Qt::UserRole + 2,
|
||||
DownloadCounterRole = Qt::UserRole + 3,
|
||||
VersionRole = Qt::UserRole + 4,
|
||||
DescriptionRole = Qt::UserRole + 5,
|
||||
TypeRole = Qt::UserRole + 6, // Category in attica-speak. What sort of item this is (resolver, etc).
|
||||
AuthorRole = Qt::UserRole + 7,
|
||||
StateRole = Qt::UserRole + 8,
|
||||
UserHasRatedRole = Qt::UserRole + 9
|
||||
};
|
||||
|
||||
enum Types {
|
||||
ResolverType = 0,
|
||||
};
|
||||
|
||||
explicit GetNewStuffModel( QObject* parent = 0 );
|
||||
virtual ~GetNewStuffModel();
|
||||
|
||||
virtual QVariant data( const QModelIndex& index, int role = Qt::DisplayRole ) const;
|
||||
virtual int rowCount( const QModelIndex& parent = QModelIndex() ) const;
|
||||
virtual bool setData( const QModelIndex &index, const QVariant &value, int role );
|
||||
|
||||
private slots:
|
||||
void resolversReloaded( const Attica::Content::List& );
|
||||
void resolverStateChanged( const QString& resolverId );
|
||||
|
||||
private:
|
||||
Attica::Content::List m_contentList;
|
||||
};
|
||||
|
||||
#endif // GETNEWSTUFFMODEL_H
|
61
src/LoadXSPFDialog.cpp
Normal file
@@ -0,0 +1,61 @@
|
||||
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
||||
*
|
||||
* Copyright 2010-2011, Leo Franchi <lfranchi@kde.org>
|
||||
*
|
||||
* Tomahawk is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Tomahawk is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Tomahawk. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "LoadXSPFDialog.h"
|
||||
|
||||
#include "ui_LoadXSPFDialog.h"
|
||||
#include <QFileDialog>
|
||||
|
||||
LoadXSPFDialog::LoadXSPFDialog( QWidget* parent, Qt::WindowFlags f )
|
||||
: QDialog( parent, f )
|
||||
, m_ui( new Ui_LoadXSPF )
|
||||
{
|
||||
m_ui->setupUi( this );
|
||||
|
||||
#ifdef Q_WS_MAC
|
||||
m_ui->horizontalLayout->setContentsMargins( 0, 0, 0, 0 );
|
||||
m_ui->horizontalLayout->setSpacing( 5 );
|
||||
m_ui->verticalLayout->setContentsMargins( 0, 10, 0, 0 );
|
||||
m_ui->verticalLayout->setSpacing( 0 );
|
||||
#endif
|
||||
|
||||
connect( m_ui->navigateButton, SIGNAL( clicked( bool ) ), this, SLOT( getLocalFile() ) );
|
||||
}
|
||||
|
||||
LoadXSPFDialog::~LoadXSPFDialog()
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
LoadXSPFDialog::getLocalFile()
|
||||
{
|
||||
QString url = QFileDialog::getOpenFileName( this, tr( "Load XSPF File" ), QDir::homePath(), tr( "XSPF Files (*.xspf)" ) );
|
||||
m_ui->lineEdit->setText( url );
|
||||
}
|
||||
|
||||
QString
|
||||
LoadXSPFDialog::xspfUrl() const
|
||||
{
|
||||
return m_ui->lineEdit->text();
|
||||
}
|
||||
|
||||
bool
|
||||
LoadXSPFDialog::autoUpdate() const
|
||||
{
|
||||
return m_ui->autoUpdate->isChecked();
|
||||
}
|
43
src/LoadXSPFDialog.h
Normal file
@@ -0,0 +1,43 @@
|
||||
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
||||
*
|
||||
* Copyright 2010-2011, Leo Franchi <lfranchi@kde.org>
|
||||
*
|
||||
* Tomahawk is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Tomahawk is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Tomahawk. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef LOADXSPFDIALOG_H
|
||||
#define LOADXSPFDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
class Ui_LoadXSPF;
|
||||
|
||||
class LoadXSPFDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit LoadXSPFDialog( QWidget* parent = 0, Qt::WindowFlags f = 0 );
|
||||
virtual ~LoadXSPFDialog();
|
||||
|
||||
QString xspfUrl() const;
|
||||
bool autoUpdate() const;
|
||||
|
||||
public slots:
|
||||
void getLocalFile();
|
||||
|
||||
private:
|
||||
Ui_LoadXSPF* m_ui;
|
||||
};
|
||||
|
||||
#endif // LOADXSPFDIALOG_H
|
102
src/LoadXSPFDialog.ui
Normal file
@@ -0,0 +1,102 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>LoadXSPF</class>
|
||||
<widget class="QDialog" name="LoadXSPF">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>444</width>
|
||||
<height>121</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Load XSPF</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Playlist Url</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit">
|
||||
<property name="placeholderText">
|
||||
<string>Enter URL...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="navigateButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="autoUpdate">
|
||||
<property name="text">
|
||||
<string>Automatically update</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>LoadXSPF</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>248</x>
|
||||
<y>254</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>157</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>LoadXSPF</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>316</x>
|
||||
<y>260</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>286</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
@@ -1,6 +1,7 @@
|
||||
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
||||
*
|
||||
* Copyright 2010-2011, Christian Muehlhaeuser <muesli@tomahawk-player.org>
|
||||
* Copyright 2011, Leo Franchi <lfranchi@kde.org>
|
||||
*
|
||||
* Tomahawk is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -16,7 +17,7 @@
|
||||
* along with Tomahawk. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "PipelineStatusView.h"
|
||||
#include "JobStatusView.h"
|
||||
|
||||
#include <QHeaderView>
|
||||
#include <QVBoxLayout>
|
||||
@@ -28,7 +29,7 @@
|
||||
using namespace Tomahawk;
|
||||
|
||||
|
||||
PipelineStatusView::PipelineStatusView( AnimatedSplitter* parent )
|
||||
JobStatusView::JobStatusView( AnimatedSplitter* parent )
|
||||
: AnimatedWidget( parent )
|
||||
, m_parent( parent )
|
||||
{
|
||||
@@ -76,7 +77,7 @@ PipelineStatusView::PipelineStatusView( AnimatedSplitter* parent )
|
||||
|
||||
|
||||
void
|
||||
PipelineStatusView::onPipelineUpdate( const query_ptr& query )
|
||||
JobStatusView::onPipelineUpdate( const query_ptr& query )
|
||||
{
|
||||
QTreeWidgetItem* ti = m_tree->invisibleRootItem()->child( 0 );
|
||||
|
||||
@@ -100,7 +101,7 @@ PipelineStatusView::onPipelineUpdate( const query_ptr& query )
|
||||
|
||||
|
||||
QSize
|
||||
PipelineStatusView::sizeHint() const
|
||||
JobStatusView::sizeHint() const
|
||||
{
|
||||
unsigned int y = 0;
|
||||
y += m_tree->header()->height();
|
||||
|
@@ -1,6 +1,7 @@
|
||||
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
||||
*
|
||||
* Copyright 2010-2011, Christian Muehlhaeuser <muesli@tomahawk-player.org>
|
||||
* Copyright 2011, Leo Franchi <lfranchi@kde.org>
|
||||
*
|
||||
* Tomahawk is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -16,23 +17,24 @@
|
||||
* along with Tomahawk. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef PIPELINESTATUSVIEW_H
|
||||
#define PIPELINESTATUSVIEW_H
|
||||
#ifndef JOBSTATUSVIEW_H
|
||||
#define JOBSTATUSVIEW_H
|
||||
|
||||
#include <QTreeWidget>
|
||||
|
||||
#include "typedefs.h"
|
||||
#include "utils/animatedsplitter.h"
|
||||
#include "widgets/animatedsplitter.h"
|
||||
#include "query.h"
|
||||
|
||||
class StreamConnection;
|
||||
|
||||
class PipelineStatusView : public AnimatedWidget
|
||||
class JobStatusView : public AnimatedWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit PipelineStatusView( AnimatedSplitter* parent );
|
||||
virtual ~PipelineStatusView()
|
||||
explicit JobStatusView( AnimatedSplitter* parent );
|
||||
virtual ~JobStatusView()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -42,8 +44,8 @@ private slots:
|
||||
void onPipelineUpdate( const Tomahawk::query_ptr& query = Tomahawk::query_ptr() );
|
||||
|
||||
private:
|
||||
QTreeWidget* m_tree;
|
||||
QTreeView* m_tree;
|
||||
AnimatedSplitter* m_parent;
|
||||
};
|
||||
|
||||
#endif // TRANSFERVIEW_H
|
||||
#endif // JOBSTATUSVIEW_H
|
||||
|
@@ -19,35 +19,30 @@
|
||||
#include "audiocontrols.h"
|
||||
#include "ui_audiocontrols.h"
|
||||
|
||||
#include <QNetworkReply>
|
||||
#include <QDropEvent>
|
||||
#include <QMouseEvent>
|
||||
#include <QtNetwork/QNetworkReply>
|
||||
#include <QtGui/QDropEvent>
|
||||
#include <QtGui/QMouseEvent>
|
||||
|
||||
#include "audio/audioengine.h"
|
||||
#include "viewmanager.h"
|
||||
#include "playlist/playlistview.h"
|
||||
#include "database/database.h"
|
||||
#include "database/databasecommand_socialaction.h"
|
||||
|
||||
#include "album.h"
|
||||
|
||||
#include "utils/imagebutton.h"
|
||||
#include "widgets/imagebutton.h"
|
||||
#include "utils/tomahawkutils.h"
|
||||
#include "utils/logger.h"
|
||||
#include <globalactionmanager.h>
|
||||
#include "album.h"
|
||||
#include "dropjob.h"
|
||||
#include "globalactionmanager.h"
|
||||
#include "viewmanager.h"
|
||||
|
||||
using namespace Tomahawk;
|
||||
|
||||
static QString s_acInfoIdentifier = QString( "AUDIOCONTROLS" );
|
||||
|
||||
|
||||
AudioControls::AudioControls( QWidget* parent )
|
||||
: QWidget( parent )
|
||||
, ui( new Ui::AudioControls )
|
||||
, m_repeatMode( PlaylistInterface::NoRepeat )
|
||||
, m_shuffled( false )
|
||||
, m_dropAreaExpanded( false )
|
||||
, m_lastSliderCheck( 0 )
|
||||
{
|
||||
ui->setupUi( this );
|
||||
setAcceptDrops( true );
|
||||
@@ -89,18 +84,23 @@ AudioControls::AudioControls( QWidget* parent )
|
||||
ui->loveButton->setPixmap( RESPATH "images/not-loved.png" );
|
||||
ui->loveButton->setCheckable( true );
|
||||
|
||||
#ifdef Q_WS_MAC
|
||||
ui->ownerLabel->setForegroundRole( QPalette::Text );
|
||||
#else
|
||||
ui->ownerLabel->setForegroundRole( QPalette::Dark );
|
||||
#endif
|
||||
ui->metaDataArea->setStyleSheet( "QWidget#metaDataArea {\nborder-width: 4px;\nborder-image: url(" RESPATH "images/now-playing-panel.png) 4 4 4 4 stretch stretch; }" );
|
||||
|
||||
|
||||
ui->seekSlider->setEnabled( true );
|
||||
ui->seekSlider->setTimeLine( &m_sliderTimeLine );
|
||||
ui->volumeSlider->setRange( 0, 100 );
|
||||
ui->volumeSlider->setValue( AudioEngine::instance()->volume() );
|
||||
|
||||
m_sliderTimeLine.setCurveShape( QTimeLine::LinearCurve );
|
||||
ui->seekSlider->setTimeLine( &m_sliderTimeLine );
|
||||
m_phononTickCheckTimer.setSingleShot( true );
|
||||
|
||||
connect( &m_phononTickCheckTimer, SIGNAL( timeout() ), SLOT( phononTickCheckTimeout() ) );
|
||||
connect( &m_sliderTimeLine, SIGNAL( frameChanged( int ) ), ui->seekSlider, SLOT( setValue( int ) ) );
|
||||
|
||||
|
||||
connect( ui->seekSlider, SIGNAL( valueChanged( int ) ), AudioEngine::instance(), SLOT( seek( int ) ) );
|
||||
connect( ui->volumeSlider, SIGNAL( valueChanged( int ) ), AudioEngine::instance(), SLOT( setVolume( int ) ) );
|
||||
connect( ui->prevButton, SIGNAL( clicked() ), AudioEngine::instance(), SLOT( previous() ) );
|
||||
@@ -110,8 +110,8 @@ AudioControls::AudioControls( QWidget* parent )
|
||||
connect( ui->volumeLowButton, SIGNAL( clicked() ), AudioEngine::instance(), SLOT( lowerVolume() ) );
|
||||
connect( ui->volumeHighButton, SIGNAL( clicked() ), AudioEngine::instance(), SLOT( raiseVolume() ) );
|
||||
|
||||
connect( ui->playPauseButton, SIGNAL( clicked() ), this, SIGNAL( playPressed() ) );
|
||||
connect( ui->pauseButton, SIGNAL( clicked() ), this, SIGNAL( pausePressed() ) );
|
||||
connect( ui->playPauseButton, SIGNAL( clicked() ), SIGNAL( playPressed() ) );
|
||||
connect( ui->pauseButton, SIGNAL( clicked() ), SIGNAL( pausePressed() ) );
|
||||
|
||||
connect( ui->repeatButton, SIGNAL( clicked() ), SLOT( onRepeatClicked() ) );
|
||||
connect( ui->shuffleButton, SIGNAL( clicked() ), SLOT( onShuffleClicked() ) );
|
||||
@@ -131,15 +131,6 @@ AudioControls::AudioControls( QWidget* parent )
|
||||
connect( AudioEngine::instance(), SIGNAL( timerMilliSeconds( qint64 ) ), SLOT( onPlaybackTimer( qint64 ) ) );
|
||||
connect( AudioEngine::instance(), SIGNAL( volumeChanged( int ) ), SLOT( onVolumeChanged( int ) ) );
|
||||
|
||||
m_defaultCover = QPixmap( RESPATH "images/no-album-art-placeholder.png" )
|
||||
.scaled( ui->coverImage->size(), Qt::IgnoreAspectRatio, Qt::SmoothTransformation );
|
||||
|
||||
connect( Tomahawk::InfoSystem::InfoSystem::instance(),
|
||||
SIGNAL( info( Tomahawk::InfoSystem::InfoRequestData, QVariant ) ),
|
||||
SLOT( infoSystemInfo( Tomahawk::InfoSystem::InfoRequestData, QVariant ) ) );
|
||||
|
||||
connect( Tomahawk::InfoSystem::InfoSystem::instance(), SIGNAL( finished( QString ) ), SLOT( infoSystemFinished( QString ) ) );
|
||||
|
||||
ui->buttonAreaLayout->setSpacing( 0 );
|
||||
ui->stackedLayout->setSpacing( 0 );
|
||||
ui->stackedLayout->setContentsMargins( 0, 0, 0, 0 );
|
||||
@@ -149,46 +140,6 @@ AudioControls::AudioControls( QWidget* parent )
|
||||
ui->stackedLayout->setSizeConstraint( QLayout::SetFixedSize );
|
||||
|
||||
onPlaybackStopped(); // initial state
|
||||
|
||||
|
||||
m_dragAnimation = new QPropertyAnimation( this, "dropAreaSize", this );
|
||||
m_dragAnimation->setStartValue( 0 );
|
||||
m_dragAnimation->setDuration( 300 );
|
||||
m_dragAnimation->setEasingCurve( QEasingCurve::Linear );
|
||||
connect( m_dragAnimation, SIGNAL( finished() ), SLOT(dragAnimationFinished()));
|
||||
|
||||
m_dropAreaCollapseTimer.setInterval( 300 );
|
||||
m_dropAreaCollapseTimer.setSingleShot( true );
|
||||
connect( &m_dropAreaCollapseTimer, SIGNAL( timeout() ), this, SLOT( collapseDropMenu() ) );
|
||||
|
||||
connect( ui->metaDataDropArea, SIGNAL( dropReceived( QDropEvent* ) ), this, SLOT( dropReceived( QDropEvent* ) ) );
|
||||
connect( ui->metaDataDropArea, SIGNAL( mouseLeft() ), &m_dropAreaCollapseTimer, SLOT( start() ) );
|
||||
|
||||
DropMenuEntry *trackEntry = new DropMenuEntry( QPixmap(":/data/images/drop-song.png" ).scaledToWidth( 32, Qt::SmoothTransformation ),
|
||||
"Track",
|
||||
DropJob::DropFlagTrack );
|
||||
ui->metaDataDropArea->addEntry( trackEntry, true );
|
||||
|
||||
DropMenuEntry *albumEntry = new DropMenuEntry( QPixmap(":/data/images/drop-album.png" ).scaledToWidth( 32, Qt::SmoothTransformation ),
|
||||
"Album",
|
||||
DropJob::DropFlagAlbum );
|
||||
ui->metaDataDropArea->addEntry( albumEntry );
|
||||
|
||||
DropMenuEntry *artistEntry = new DropMenuEntry( QPixmap(":/data/images/drop-all-songs.png" ).scaledToWidth( 32, Qt::SmoothTransformation ),
|
||||
"Artist",
|
||||
DropJob::DropFlagArtist );
|
||||
ui->metaDataDropArea->addEntry( artistEntry );
|
||||
|
||||
DropMenuEntry *localEntry = new DropMenuEntry( QPixmap(":/data/images/drop-local-songs.png" ).scaledToWidth( 32, Qt::SmoothTransformation ),
|
||||
"Local",
|
||||
DropJob::DropFlagAlbum | DropJob::DropFlagLocal );
|
||||
ui->metaDataDropArea->addEntry( localEntry );
|
||||
|
||||
DropMenuEntry *top10Entry = new DropMenuEntry( QPixmap(":/data/images/drop-top-songs.png" ).scaledToWidth( 32, Qt::SmoothTransformation ),
|
||||
"Top 10",
|
||||
DropJob::DropFlagArtist | DropJob::DropFlagTop10 );
|
||||
ui->metaDataDropArea->addEntry( top10Entry );
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -214,6 +165,13 @@ AudioControls::changeEvent( QEvent* e )
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
AudioControls::phononTickCheckTimeout()
|
||||
{
|
||||
onPlaybackTimer( m_lastSliderCheck );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
AudioControls::onVolumeChanged( int volume )
|
||||
{
|
||||
@@ -226,11 +184,9 @@ AudioControls::onVolumeChanged( int volume )
|
||||
void
|
||||
AudioControls::onPlaybackStarted( const Tomahawk::result_ptr& result )
|
||||
{
|
||||
tDebug( LOGEXTRA ) << Q_FUNC_INFO;
|
||||
|
||||
if ( result.isNull() )
|
||||
return;
|
||||
|
||||
|
||||
if ( m_currentTrack.isNull() || ( !m_currentTrack.isNull() && m_currentTrack.data()->id() != result.data()->id() ) )
|
||||
onPlaybackLoading( result );
|
||||
|
||||
@@ -238,117 +194,117 @@ AudioControls::onPlaybackStarted( const Tomahawk::result_ptr& result )
|
||||
|
||||
if ( duration == -1 )
|
||||
duration = result.data()->duration() * 1000;
|
||||
|
||||
|
||||
ui->seekSlider->setRange( 0, duration );
|
||||
ui->seekSlider->setValue( 0 );
|
||||
ui->seekSlider->setEnabled( AudioEngine::instance()->canSeek() );
|
||||
|
||||
m_phononTickCheckTimer.stop();
|
||||
|
||||
m_sliderTimeLine.stop();
|
||||
m_sliderTimeLine.setDuration( duration );
|
||||
m_sliderTimeLine.setFrameRange( 0, duration );
|
||||
m_sliderTimeLine.setCurrentTime( 0 );
|
||||
m_seekMsecs = -1;
|
||||
|
||||
ui->seekSlider->setVisible( true );
|
||||
|
||||
Tomahawk::InfoSystem::InfoCriteriaHash trackInfo;
|
||||
trackInfo["artist"] = result->artist()->name();
|
||||
trackInfo["album"] = result->album()->name();
|
||||
ui->seekSlider->setVisible( true );
|
||||
|
||||
Tomahawk::InfoSystem::InfoRequestData requestData;
|
||||
requestData.caller = s_acInfoIdentifier;
|
||||
requestData.type = Tomahawk::InfoSystem::InfoAlbumCoverArt;
|
||||
requestData.input = QVariant::fromValue< Tomahawk::InfoSystem::InfoCriteriaHash >( trackInfo );
|
||||
requestData.customData = QVariantMap();
|
||||
int updateRate = (double)1000 / ( (double)ui->seekSlider->contentsRect().width() / (double)( duration / 1000 ) );
|
||||
m_sliderTimeLine.setUpdateInterval( qBound( 40, updateRate, 500 ) );
|
||||
|
||||
Tomahawk::InfoSystem::InfoSystem::instance()->getInfo( requestData );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
AudioControls::infoSystemInfo( Tomahawk::InfoSystem::InfoRequestData requestData, QVariant output )
|
||||
{
|
||||
if ( requestData.caller != s_acInfoIdentifier || requestData.type != Tomahawk::InfoSystem::InfoAlbumCoverArt )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if ( m_currentTrack.isNull() )
|
||||
{
|
||||
tLog() << "Current track is null when trying to apply fetched cover art";
|
||||
return;
|
||||
}
|
||||
|
||||
if ( !output.canConvert< QVariantMap >() )
|
||||
{
|
||||
tDebug( LOGINFO ) << "Cannot convert fetched art from a QByteArray";
|
||||
return;
|
||||
}
|
||||
|
||||
QVariantMap returnedData = output.value< QVariantMap >();
|
||||
const QByteArray ba = returnedData["imgbytes"].toByteArray();
|
||||
if ( ba.length() )
|
||||
{
|
||||
QPixmap pm;
|
||||
pm.loadFromData( ba );
|
||||
|
||||
if ( pm.isNull() )
|
||||
ui->coverImage->setPixmap( m_defaultCover );
|
||||
else
|
||||
ui->coverImage->setPixmap( pm.scaled( ui->coverImage->size(), Qt::IgnoreAspectRatio, Qt::SmoothTransformation ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
AudioControls::infoSystemFinished( QString target )
|
||||
{
|
||||
Q_UNUSED( target );
|
||||
m_noTimeChange = false;
|
||||
m_lastSliderCheck = 0;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
AudioControls::onPlaybackLoading( const Tomahawk::result_ptr& result )
|
||||
{
|
||||
tDebug( LOGEXTRA ) << Q_FUNC_INFO;
|
||||
if ( !m_currentTrack.isNull() )
|
||||
{
|
||||
disconnect( m_currentTrack->album().data(), SIGNAL( updated() ), this, SLOT( onAlbumCoverUpdated() ) );
|
||||
disconnect( m_currentTrack->toQuery().data(), SIGNAL( socialActionsLoaded() ), this, SLOT( onSocialActionsLoaded() ) );
|
||||
}
|
||||
|
||||
m_currentTrack = result;
|
||||
connect( m_currentTrack->album().data(), SIGNAL( updated() ), SLOT( onAlbumCoverUpdated() ) );
|
||||
connect( m_currentTrack->toQuery().data(), SIGNAL( socialActionsLoaded() ), SLOT( onSocialActionsLoaded() ) );
|
||||
|
||||
ui->artistTrackLabel->setResult( result );
|
||||
ui->albumLabel->setResult( result );
|
||||
ui->ownerLabel->setText( result->friendlySource() );
|
||||
ui->coverImage->setPixmap( m_defaultCover );
|
||||
|
||||
const QString duration = TomahawkUtils::timeToString( result.data()->duration() );
|
||||
ui->timeLabel->setFixedWidth( ui->timeLabel->fontMetrics().width( QString( duration.length(), QChar( '0' ) ) ) );
|
||||
ui->timeLabel->setText( TomahawkUtils::timeToString( 0 ) );
|
||||
ui->timeLeftLabel->setText( "-" + TomahawkUtils::timeToString( result.data()->duration() ) );
|
||||
ui->timeLeftLabel->setFixedWidth( ui->timeLeftLabel->fontMetrics().width( QString( duration.length() + 1, QChar( '0' ) ) ) );
|
||||
ui->timeLeftLabel->setText( "-" + duration );
|
||||
m_lastTextSecondShown = 0;
|
||||
|
||||
ui->stackedLayout->setCurrentWidget( ui->pauseButton );
|
||||
|
||||
ui->loveButton->setEnabled( true );
|
||||
ui->loveButton->setVisible( true );
|
||||
|
||||
result->loadSocialActions();
|
||||
|
||||
connect( result.data(), SIGNAL( socialActionsLoaded() ), this, SLOT( socialActionsLoaded() ) );
|
||||
setAlbumCover();
|
||||
setSocialActions();
|
||||
}
|
||||
|
||||
void
|
||||
AudioControls::socialActionsLoaded()
|
||||
{
|
||||
Result* r = qobject_cast< Result* >( sender() );
|
||||
Q_ASSERT( r );
|
||||
|
||||
if ( m_currentTrack.data() == r )
|
||||
void
|
||||
AudioControls::onAlbumCoverUpdated()
|
||||
{
|
||||
Album* album = qobject_cast< Album* >( sender() );
|
||||
if ( !album || album != m_currentTrack->album().data() )
|
||||
return;
|
||||
|
||||
setAlbumCover();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
AudioControls::setAlbumCover()
|
||||
{
|
||||
if ( !m_currentTrack->album()->cover( ui->coverImage->size() ).isNull() )
|
||||
{
|
||||
if ( m_currentTrack->loved() )
|
||||
{
|
||||
ui->loveButton->setPixmap( RESPATH "images/loved.png" );
|
||||
ui->loveButton->setChecked( true );
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->loveButton->setPixmap( RESPATH "images/not-loved.png" );
|
||||
ui->loveButton->setChecked( false );
|
||||
}
|
||||
QPixmap cover;
|
||||
cover = m_currentTrack->album()->cover( ui->coverImage->size() );
|
||||
ui->coverImage->setPixmap( cover );
|
||||
}
|
||||
else
|
||||
ui->coverImage->setPixmap( TomahawkUtils::defaultPixmap( TomahawkUtils::DefaultAlbumCover, TomahawkUtils::ScaledCover, ui->coverImage->size() ) );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
AudioControls::onSocialActionsLoaded()
|
||||
{
|
||||
Query* query = qobject_cast< Query* >( sender() );
|
||||
if ( !query || !m_currentTrack || query != m_currentTrack->toQuery().data() )
|
||||
return;
|
||||
|
||||
query_ptr currentQuery = m_currentTrack->toQuery();
|
||||
if ( query->artist() == currentQuery->artist() &&
|
||||
query->track() == currentQuery->track() &&
|
||||
query->album() == currentQuery->album() )
|
||||
{
|
||||
setSocialActions();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
AudioControls::setSocialActions()
|
||||
{
|
||||
if ( m_currentTrack->toQuery()->loved() )
|
||||
{
|
||||
ui->loveButton->setPixmap( RESPATH "images/loved.png" );
|
||||
ui->loveButton->setChecked( true );
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->loveButton->setPixmap( RESPATH "images/not-loved.png" );
|
||||
ui->loveButton->setChecked( false );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -361,6 +317,7 @@ AudioControls::onPlaybackPaused()
|
||||
m_sliderTimeLine.setPaused( true );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
AudioControls::onPlaybackResumed()
|
||||
{
|
||||
@@ -377,6 +334,7 @@ AudioControls::onPlaybackSeeked( qint64 msec )
|
||||
tDebug( LOGEXTRA ) << Q_FUNC_INFO << " setting current timer to " << msec;
|
||||
m_sliderTimeLine.setPaused( true );
|
||||
m_sliderTimeLine.setCurrentTime( msec );
|
||||
m_lastSliderCheck = msec;
|
||||
m_seekMsecs = msec;
|
||||
}
|
||||
|
||||
@@ -406,32 +364,61 @@ AudioControls::onPlaybackStopped()
|
||||
void
|
||||
AudioControls::onPlaybackTimer( qint64 msElapsed )
|
||||
{
|
||||
//tDebug( LOGEXTRA ) << Q_FUNC_INFO << " msElapsed = " << msElapsed << " and timer current time = " << m_sliderTimeLine.currentTime() << " and m_seekMsecs = " << m_seekMsecs;
|
||||
if ( m_currentTrack.isNull() )
|
||||
const int seconds = msElapsed / 1000;
|
||||
if ( seconds != m_lastTextSecondShown && !m_currentTrack.isNull() )
|
||||
{
|
||||
ui->timeLabel->setText( TomahawkUtils::timeToString( seconds ) );
|
||||
ui->timeLeftLabel->setText( "-" + TomahawkUtils::timeToString( m_currentTrack->duration() - seconds ) );
|
||||
m_lastTextSecondShown = seconds;
|
||||
}
|
||||
|
||||
//tDebug( LOGEXTRA ) << Q_FUNC_INFO << "msElapsed =" << msElapsed << "and timer current time =" << m_sliderTimeLine.currentTime() << "and m_seekMsecs =" << m_seekMsecs;
|
||||
if ( msElapsed > 0 && msElapsed != m_lastSliderCheck && m_seekMsecs == -1 && msElapsed - 500 < m_lastSliderCheck )
|
||||
return;
|
||||
m_lastSliderCheck = msElapsed;
|
||||
|
||||
if ( m_currentTrack.isNull() )
|
||||
{
|
||||
m_sliderTimeLine.stop();
|
||||
return;
|
||||
}
|
||||
|
||||
ui->seekSlider->blockSignals( true );
|
||||
|
||||
const int seconds = msElapsed / 1000;
|
||||
ui->timeLabel->setText( TomahawkUtils::timeToString( seconds ) );
|
||||
ui->timeLeftLabel->setText( "-" + TomahawkUtils::timeToString( m_currentTrack->duration() - seconds ) );
|
||||
if ( sender() != &m_phononTickCheckTimer )
|
||||
m_phononTickCheckTimer.start( 1000 );
|
||||
|
||||
if ( m_sliderTimeLine.currentTime() > msElapsed || m_seekMsecs != -1 )
|
||||
int currentTime = m_sliderTimeLine.currentTime();
|
||||
if ( m_noTimeChange )
|
||||
{
|
||||
if ( currentTime != msElapsed )
|
||||
{
|
||||
m_sliderTimeLine.setPaused( true );
|
||||
m_noTimeChange = false;
|
||||
m_sliderTimeLine.setCurrentTime( msElapsed );
|
||||
m_seekMsecs = -1;
|
||||
m_sliderTimeLine.resume();
|
||||
}
|
||||
}
|
||||
else if ( currentTime >= msElapsed || m_seekMsecs != -1 )
|
||||
{
|
||||
m_sliderTimeLine.setPaused( true );
|
||||
|
||||
m_noTimeChange = false;
|
||||
if ( currentTime == msElapsed )
|
||||
m_noTimeChange = true;
|
||||
|
||||
m_sliderTimeLine.setCurrentTime( msElapsed );
|
||||
m_seekMsecs = -1;
|
||||
if ( AudioEngine::instance()->state() != AudioEngine::Paused )
|
||||
if ( AudioEngine::instance()->state() != AudioEngine::Paused && sender() != &m_phononTickCheckTimer )
|
||||
m_sliderTimeLine.resume();
|
||||
}
|
||||
else if ( m_sliderTimeLine.duration() > msElapsed && m_sliderTimeLine.state() == QTimeLine::NotRunning )
|
||||
else if ( m_sliderTimeLine.duration() > msElapsed && m_sliderTimeLine.state() == QTimeLine::NotRunning && AudioEngine::instance()->state() == AudioEngine::Playing )
|
||||
{
|
||||
ui->seekSlider->setEnabled( AudioEngine::instance()->canSeek() );
|
||||
m_sliderTimeLine.resume();
|
||||
m_sliderTimeLine.start();
|
||||
}
|
||||
else if ( m_sliderTimeLine.state() == QTimeLine::Paused && AudioEngine::instance()->state() != AudioEngine::Paused )
|
||||
{
|
||||
ui->seekSlider->setEnabled( AudioEngine::instance()->canSeek() );
|
||||
m_sliderTimeLine.resume();
|
||||
}
|
||||
|
||||
@@ -562,36 +549,7 @@ void
|
||||
AudioControls::dragEnterEvent( QDragEnterEvent* e )
|
||||
{
|
||||
if ( DropJob::acceptsMimeData( e->mimeData() ) )
|
||||
{
|
||||
e->acceptProposedAction();
|
||||
|
||||
m_dropAreaCollapseTimer.stop();
|
||||
|
||||
DropJob::DropFlags flags = DropJob::DropFlagsNone;
|
||||
|
||||
if ( e->mimeData()->hasFormat( "application/tomahawk.query.list" )
|
||||
|| e->mimeData()->hasFormat( "application/tomahawk.result.list" )
|
||||
|| e->mimeData()->hasFormat( "application/tomahawk.result" ) )
|
||||
flags = DropJob::DropFlagsAll;
|
||||
|
||||
if ( e->mimeData()->hasFormat( "application/tomahawk.metadata.album" ) )
|
||||
flags = DropJob::DropFlagAlbum | DropJob::DropFlagArtist | DropJob::DropFlagLocal | DropJob::DropFlagTop10;
|
||||
|
||||
if ( e->mimeData()->hasFormat( "application/tomahawk.metadata.artist" ) )
|
||||
flags = DropJob::DropFlagArtist | DropJob::DropFlagLocal | DropJob::DropFlagTop10;
|
||||
|
||||
ui->metaDataDropArea->setFilter( flags );
|
||||
|
||||
if( !m_dropAreaExpanded )
|
||||
{
|
||||
m_dragAnimation->stop();
|
||||
m_dragAnimation->setDirection( QAbstractAnimation::Forward );
|
||||
m_dragAnimation->setStartValue( dropAreaSize() );
|
||||
m_dragAnimation->setEndValue( ui->metaDataArea->height() );
|
||||
m_dragAnimation->start();
|
||||
m_dropAreaExpanded = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -603,32 +561,6 @@ AudioControls::dragMoveEvent( QDragMoveEvent* /* e */ )
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
AudioControls::dragLeaveEvent( QDragLeaveEvent * )
|
||||
{
|
||||
qDebug() << "******************************** dragLeaveEvent" << ui->metaDataDropArea->hovered();
|
||||
if( !ui->metaDataDropArea->hovered() )
|
||||
m_dropAreaCollapseTimer.start();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
AudioControls::collapseDropMenu()
|
||||
{
|
||||
// Check if the menu is hovered now...
|
||||
if( ui->metaDataDropArea->hovered() )
|
||||
return;
|
||||
|
||||
m_dropAreaExpanded = false;
|
||||
|
||||
m_dragAnimation->stop();
|
||||
// m_dragAnimation->setDirection( QAbstractAnimation::Backward );
|
||||
m_dragAnimation->setStartValue( dropAreaSize() );
|
||||
m_dragAnimation->setEndValue( 0 );
|
||||
m_dragAnimation->start();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
AudioControls::dropEvent( QDropEvent* e )
|
||||
{
|
||||
@@ -636,12 +568,10 @@ AudioControls::dropEvent( QDropEvent* e )
|
||||
if ( DropJob::acceptsMimeData( e->mimeData() ) )
|
||||
{
|
||||
DropJob *dj = new DropJob();
|
||||
dj->setDropAction( DropJob::Append );
|
||||
connect( dj, SIGNAL( tracks( QList<Tomahawk::query_ptr> ) ), this, SLOT( droppedTracks( QList<Tomahawk::query_ptr> ) ) );
|
||||
dj->setDropFlags( ui->metaDataDropArea->activeEntry()->dropFlags() );
|
||||
dj->tracksFromMimeData( e->mimeData() );
|
||||
|
||||
QTimer::singleShot( 0, this, SLOT( collapseDropMenu() ) );
|
||||
|
||||
e->accept();
|
||||
}
|
||||
}
|
||||
@@ -652,8 +582,8 @@ AudioControls::droppedTracks( QList< query_ptr > tracks )
|
||||
{
|
||||
if ( !tracks.isEmpty() )
|
||||
{
|
||||
// queue and play the first if nothign is playing
|
||||
GlobalActionManager::instance()->handleOpenTrack( tracks.first() );
|
||||
// queue and play the first no matter what
|
||||
GlobalActionManager::instance()->handlePlayTrack( tracks.first() );
|
||||
|
||||
// just queue the rest
|
||||
for ( int i = 1; i < tracks.size(); i++ )
|
||||
@@ -667,55 +597,17 @@ AudioControls::droppedTracks( QList< query_ptr > tracks )
|
||||
void
|
||||
AudioControls::onLoveButtonClicked( bool checked )
|
||||
{
|
||||
Tomahawk::InfoSystem::InfoCriteriaHash trackInfo;
|
||||
trackInfo["title"] = m_currentTrack->track();
|
||||
trackInfo["artist"] = m_currentTrack->artist()->name();
|
||||
trackInfo["album"] = m_currentTrack->album()->name();
|
||||
|
||||
if ( checked )
|
||||
{
|
||||
Tomahawk::InfoSystem::InfoSystem::instance()->pushInfo(
|
||||
s_acInfoIdentifier, Tomahawk::InfoSystem::InfoLove,
|
||||
QVariant::fromValue< Tomahawk::InfoSystem::InfoCriteriaHash >( trackInfo ) );
|
||||
|
||||
DatabaseCommand_SocialAction* cmd = new DatabaseCommand_SocialAction( m_currentTrack, QString( "Love" ), QString( "true") );
|
||||
Database::instance()->enqueue( QSharedPointer<DatabaseCommand>(cmd) );
|
||||
ui->loveButton->setPixmap( RESPATH "images/loved.png" );
|
||||
|
||||
m_currentTrack->toQuery()->setLoved( true );
|
||||
}
|
||||
else
|
||||
{
|
||||
Tomahawk::InfoSystem::InfoSystem::instance()->pushInfo(
|
||||
s_acInfoIdentifier, Tomahawk::InfoSystem::InfoUnLove,
|
||||
QVariant::fromValue< Tomahawk::InfoSystem::InfoCriteriaHash >( trackInfo ) );
|
||||
|
||||
DatabaseCommand_SocialAction* cmd = new DatabaseCommand_SocialAction( m_currentTrack, QString( "Love" ), QString( "false" ) );
|
||||
Database::instance()->enqueue( QSharedPointer<DatabaseCommand>(cmd) );
|
||||
ui->loveButton->setPixmap( RESPATH "images/not-loved.png" );
|
||||
|
||||
m_currentTrack->toQuery()->setLoved( false );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
AudioControls::dragAnimationFinished()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
int
|
||||
AudioControls::dropAreaSize()
|
||||
{
|
||||
return ui->metaDataDropArea->maximumHeight();
|
||||
}
|
||||
|
||||
void
|
||||
AudioControls::setDropAreaSize( int size )
|
||||
{
|
||||
ui->metaDataDropArea->setMaximumHeight( size );
|
||||
ui->metaDataInfoArea->setMaximumHeight( ui->metaDataArea->height() - size );
|
||||
}
|
||||
|
||||
void
|
||||
AudioControls::dropReceived( QDropEvent *event )
|
||||
{
|
||||
dropEvent( event );
|
||||
}
|
||||
|
@@ -19,19 +19,18 @@
|
||||
#ifndef AUDIOCONTROLS_H
|
||||
#define AUDIOCONTROLS_H
|
||||
|
||||
#include <QWidget>
|
||||
#include <QTimeLine>
|
||||
#include <QPropertyAnimation>
|
||||
#include <QTimer>
|
||||
#include <QtGui/QWidget>
|
||||
#include <QtCore/QTimer>
|
||||
#include <QtCore/QTimeLine>
|
||||
|
||||
#include "result.h"
|
||||
#include "playlistinterface.h"
|
||||
#include "infosystem/infosystem.h"
|
||||
#include "utils/dropmenu.h"
|
||||
#include "query.h"
|
||||
|
||||
class QDropEvent;
|
||||
class QDragEnterEvent;
|
||||
class QDragMoveEvent;
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
class AudioControls;
|
||||
@@ -40,7 +39,6 @@ namespace Ui
|
||||
class AudioControls : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PROPERTY( int dropAreaSize READ dropAreaSize WRITE setDropAreaSize )
|
||||
|
||||
public:
|
||||
AudioControls( QWidget* parent = 0 );
|
||||
@@ -53,18 +51,16 @@ signals:
|
||||
public slots:
|
||||
void onRepeatModeChanged( Tomahawk::PlaylistInterface::RepeatMode mode );
|
||||
void onShuffleModeChanged( bool enabled );
|
||||
|
||||
|
||||
protected:
|
||||
void changeEvent( QEvent* e );
|
||||
void dragEnterEvent ( QDragEnterEvent* );
|
||||
void dragMoveEvent ( QDragMoveEvent* );
|
||||
void dragLeaveEvent( QDragLeaveEvent * );
|
||||
void dropEvent ( QDropEvent* );
|
||||
|
||||
int dropAreaSize();
|
||||
void setDropAreaSize( int size );
|
||||
|
||||
private slots:
|
||||
void phononTickCheckTimeout();
|
||||
|
||||
void onPlaybackStarted( const Tomahawk::result_ptr& result );
|
||||
void onPlaybackLoading( const Tomahawk::result_ptr& result );
|
||||
void onPlaybackPaused();
|
||||
@@ -83,32 +79,28 @@ private slots:
|
||||
void onTrackClicked();
|
||||
void onLoveButtonClicked( bool );
|
||||
|
||||
void infoSystemInfo( Tomahawk::InfoSystem::InfoRequestData requestData, QVariant output );
|
||||
void infoSystemFinished( QString target );
|
||||
void onAlbumCoverUpdated();
|
||||
|
||||
void droppedTracks( QList<Tomahawk::query_ptr> );
|
||||
|
||||
void socialActionsLoaded();
|
||||
|
||||
void collapseDropMenu();
|
||||
void dragAnimationFinished();
|
||||
void dropReceived( QDropEvent *event );
|
||||
void onSocialActionsLoaded();
|
||||
|
||||
private:
|
||||
Ui::AudioControls *ui;
|
||||
void setAlbumCover();
|
||||
void setSocialActions();
|
||||
|
||||
QPixmap m_defaultCover;
|
||||
Ui::AudioControls *ui;
|
||||
|
||||
Tomahawk::result_ptr m_currentTrack;
|
||||
Tomahawk::PlaylistInterface::RepeatMode m_repeatMode;
|
||||
bool m_shuffled;
|
||||
|
||||
QTimer m_phononTickCheckTimer;
|
||||
QTimeLine m_sliderTimeLine;
|
||||
qint64 m_seekMsecs;
|
||||
|
||||
QPropertyAnimation *m_dragAnimation;
|
||||
bool m_dropAreaExpanded;
|
||||
QTimer m_dropAreaCollapseTimer;
|
||||
qint64 m_lastSliderCheck;
|
||||
bool m_noTimeChange;
|
||||
qint64 m_lastTextSecondShown;
|
||||
};
|
||||
|
||||
#endif // AUDIOCONTROLS_H
|
||||
|
@@ -28,9 +28,6 @@
|
||||
<height>80</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
@@ -84,14 +81,14 @@
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<item>
|
||||
<widget class="ImageButton" name="playPauseButton">
|
||||
<property name="text">
|
||||
<string>Play</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<item>
|
||||
<widget class="ImageButton" name="pauseButton">
|
||||
<property name="text">
|
||||
<string>Pause</string>
|
||||
@@ -125,269 +122,268 @@
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="metaDataArea" native="true">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<property name="margin">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>74</height>
|
||||
</size>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<property name="leftMargin">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>12</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="DropMenu" name="metaDataDropArea" native="true">
|
||||
<widget class="QLabel" name="coverImage">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>58</width>
|
||||
<height>58</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>0</height>
|
||||
<width>58</width>
|
||||
<height>58</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="metaDataInfoArea" native="true">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>74</height>
|
||||
</size>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="leftMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<property name="leftMargin">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>12</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="coverImage">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>58</width>
|
||||
<height>58</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>58</width>
|
||||
<height>58</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="leftMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2" stretch="1,0,0,0">
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="trackLabelLayout">
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QueryLabel" name="artistTrackLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="cursor">
|
||||
<cursorShape>PointingHandCursor</cursorShape>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Artist</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QueryLabel" name="albumLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="cursor">
|
||||
<cursorShape>PointingHandCursor</cursorShape>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Album</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>4</width>
|
||||
<height>8</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="ImageButton" name="loveButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="cursor">
|
||||
<cursorShape>PointingHandCursor</cursorShape>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>love</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>13</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="ownerLabel">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>7</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Owner</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>4</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="leftMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="timeLabel">
|
||||
<property name="text">
|
||||
<string>Time</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="SeekSlider" name="seekSlider">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="timeLeftLabel">
|
||||
<property name="text">
|
||||
<string>Time Left</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<property name="topMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2" stretch="1,0,0">
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="trackLabelLayout">
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QueryLabel" name="artistTrackLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="cursor">
|
||||
<cursorShape>PointingHandCursor</cursorShape>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Artist</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QueryLabel" name="albumLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="cursor">
|
||||
<cursorShape>PointingHandCursor</cursorShape>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Album</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>4</width>
|
||||
<height>8</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="ownerLabel">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>7</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Owner</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTop</set>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="socialLayout">
|
||||
<item>
|
||||
<spacer name="socialSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>1</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="ImageButton" name="loveButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="cursor">
|
||||
<cursorShape>PointingHandCursor</cursorShape>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>love</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>1</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>4</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="leftMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="timeLabel">
|
||||
<property name="text">
|
||||
<string>Time</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="SeekSlider" name="seekSlider">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="timeLeftLabel">
|
||||
<property name="text">
|
||||
<string>Time Left</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
<zorder>metaDataInfoArea</zorder>
|
||||
<zorder>metaDataDropArea</zorder>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
@@ -558,18 +554,12 @@
|
||||
<customwidget>
|
||||
<class>ImageButton</class>
|
||||
<extends>QPushButton</extends>
|
||||
<header>utils/imagebutton.h</header>
|
||||
<header>widgets/imagebutton.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>QueryLabel</class>
|
||||
<extends>QLabel</extends>
|
||||
<header>utils/querylabel.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>DropMenu</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>utils/dropmenu.h</header>
|
||||
<container>1</container>
|
||||
<header>widgets/querylabel.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
|
179
src/breakpad/BreakPad.cpp
Normal file
@@ -0,0 +1,179 @@
|
||||
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
||||
*
|
||||
* Copyright 2010-2011, Christian Muehlhaeuser <muesli@tomahawk-player.org>
|
||||
*
|
||||
* Tomahawk is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Tomahawk is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Tomahawk. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "BreakPad.h"
|
||||
|
||||
#include "config.h"
|
||||
#include "utils/logger.h"
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QString>
|
||||
#include <QFileInfo>
|
||||
#include <string.h>
|
||||
|
||||
#define CRASH_REPORTER_BINARY "tomahawk_crash_reporter"
|
||||
|
||||
bool s_active = true;
|
||||
|
||||
#ifndef WIN32
|
||||
#include <unistd.h>
|
||||
|
||||
|
||||
static bool
|
||||
LaunchUploader( const char* dump_dir, const char* minidump_id, void* that, bool succeeded )
|
||||
{
|
||||
// DON'T USE THE HEAP!!!
|
||||
// So that indeed means, no QStrings, no qDebug(), no QAnything, seriously!
|
||||
|
||||
if ( !succeeded )
|
||||
return false;
|
||||
|
||||
const char* crashReporter = static_cast<BreakPad*>(that)->crashReporter();
|
||||
if ( !s_active || strlen( crashReporter ) == 0 )
|
||||
return false;
|
||||
|
||||
pid_t pid = fork();
|
||||
if ( pid == -1 ) // fork failed
|
||||
return false;
|
||||
if ( pid == 0 )
|
||||
{
|
||||
// we are the fork
|
||||
execl( crashReporter,
|
||||
crashReporter,
|
||||
dump_dir,
|
||||
minidump_id,
|
||||
minidump_id,
|
||||
(char*) 0 );
|
||||
|
||||
// execl replaces this process, so no more code will be executed
|
||||
// unless it failed. If it failed, then we should return false.
|
||||
printf( "Error: Can't launch CrashReporter!\n" );
|
||||
return false;
|
||||
}
|
||||
|
||||
// we called fork()
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
BreakPad::BreakPad( const QString& path, bool active )
|
||||
#ifdef Q_OS_LINUX
|
||||
: google_breakpad::ExceptionHandler( path.toStdString(), 0, LaunchUploader, this, true )
|
||||
#else
|
||||
: google_breakpad::ExceptionHandler( path.toStdString(), 0, LaunchUploader, this, true, 0 )
|
||||
#endif
|
||||
{
|
||||
s_active = active;
|
||||
|
||||
QString reporter;
|
||||
QString localReporter = QString( "%1/%2" ).arg( qApp->applicationDirPath() ).arg( CRASH_REPORTER_BINARY );
|
||||
QString globalReporter = QString( "%1/%2" ).arg( CMAKE_INSTALL_FULL_LIBEXECDIR ).arg( CRASH_REPORTER_BINARY );
|
||||
|
||||
if ( QFileInfo( localReporter ).exists() )
|
||||
reporter = localReporter;
|
||||
else if ( QFileInfo( globalReporter ).exists() )
|
||||
reporter = globalReporter;
|
||||
else
|
||||
tLog() << "Could not find \"" CRASH_REPORTER_BINARY "\" in \"" CMAKE_INSTALL_FULL_LIBEXECDIR "\" or application path";
|
||||
|
||||
char* creporter;
|
||||
std::string sreporter = reporter.toStdString();
|
||||
creporter = new char[ sreporter.size() + 1 ];
|
||||
strcpy( creporter, sreporter.c_str() );
|
||||
|
||||
m_crashReporter = creporter;
|
||||
}
|
||||
|
||||
|
||||
#else
|
||||
|
||||
|
||||
static bool
|
||||
LaunchUploader( const wchar_t* dump_dir, const wchar_t* minidump_id, void* that, EXCEPTION_POINTERS *exinfo, MDRawAssertionInfo *assertion, bool succeeded )
|
||||
{
|
||||
if ( !succeeded )
|
||||
return false;
|
||||
|
||||
// DON'T USE THE HEAP!!!
|
||||
// So that indeed means, no QStrings, no qDebug(), no QAnything, seriously!
|
||||
|
||||
// broken in mingw, hardcode it for now
|
||||
|
||||
// const char* productName = static_cast<BreakPad*>(that)->productName();s
|
||||
// convert productName to widechars, which sadly means the product name must be Latin1
|
||||
|
||||
wchar_t product_name[ 256 ] = L"tomahawk";;
|
||||
|
||||
// char* out = (char*)product_name;
|
||||
// const char* in = productName - 1;
|
||||
// do {
|
||||
// *out++ = *++in; //latin1 chars fit in first byte of each wchar
|
||||
// *out++ = '\0'; //every second byte is NULL
|
||||
// }
|
||||
// while (*in);
|
||||
|
||||
wchar_t command[MAX_PATH * 3 + 6];
|
||||
wcscpy( command, CRASH_REPORTER_BINARY L" \"" );
|
||||
wcscat( command, dump_dir );
|
||||
wcscat( command, L"\" \"" );
|
||||
wcscat( command, minidump_id );
|
||||
wcscat( command, L"\" \"" );
|
||||
wcscat( command, product_name );
|
||||
wcscat( command, L"\"" );
|
||||
|
||||
STARTUPINFO si;
|
||||
PROCESS_INFORMATION pi;
|
||||
|
||||
ZeroMemory( &si, sizeof( si ) );
|
||||
si.cb = sizeof(si);
|
||||
si.dwFlags = STARTF_USESHOWWINDOW;
|
||||
si.wShowWindow = SW_SHOWNORMAL;
|
||||
ZeroMemory( &pi, sizeof(pi) );
|
||||
|
||||
if ( CreateProcess( NULL, command, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi ) )
|
||||
{
|
||||
CloseHandle( pi.hProcess );
|
||||
CloseHandle( pi.hThread );
|
||||
TerminateProcess( GetCurrentProcess(), 1 );
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
BreakPad::BreakPad( const QString& path, bool active )
|
||||
: google_breakpad::ExceptionHandler( path.toStdWString(), 0, LaunchUploader, this, true )
|
||||
{
|
||||
s_active = active;
|
||||
}
|
||||
|
||||
#endif // WIN32
|
||||
|
||||
|
||||
void
|
||||
BreakPad::setActive( bool enabled )
|
||||
{
|
||||
s_active = enabled;
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
BreakPad::isActive()
|
||||
{
|
||||
return s_active;
|
||||
}
|
50
src/breakpad/BreakPad.h
Normal file
@@ -0,0 +1,50 @@
|
||||
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
||||
*
|
||||
* Copyright 2010-2011, Christian Muehlhaeuser <muesli@tomahawk-player.org>
|
||||
*
|
||||
* Tomahawk is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Tomahawk is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Tomahawk. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <QString>
|
||||
|
||||
#ifdef __APPLE__
|
||||
# include "client/mac/handler/exception_handler.h"
|
||||
#elif defined WIN32
|
||||
# include "client/windows/handler/exception_handler.h"
|
||||
#elif defined __linux__
|
||||
# include "client/linux/handler/exception_handler.h"
|
||||
#endif
|
||||
|
||||
class BreakPad : public google_breakpad::ExceptionHandler
|
||||
{
|
||||
const char* m_productName; // yes! It MUST be const char[]
|
||||
const char* m_crashReporter; // again, const char[]
|
||||
|
||||
public:
|
||||
BreakPad( const QString& dump_write_dirpath, bool active );
|
||||
|
||||
~BreakPad()
|
||||
{}
|
||||
|
||||
static void setActive( bool enabled );
|
||||
static bool isActive();
|
||||
|
||||
void setProductName( const char* s ) { m_productName = s; };
|
||||
const char* productName() const { return m_productName; }
|
||||
|
||||
void setCrashReporter( const char* s ) { m_crashReporter = s; };
|
||||
const char* crashReporter() const { return m_crashReporter; }
|
||||
};
|
||||
|
||||
#undef char
|
24
src/breakpad/CrashReporter/CMakeLists.txt
Normal file
@@ -0,0 +1,24 @@
|
||||
PROJECT( CrashReporter )
|
||||
|
||||
|
||||
FIND_PACKAGE( Qt4 REQUIRED )
|
||||
SET( QT_USE_QTNETWORK TRUE )
|
||||
|
||||
|
||||
SET( crashreporter_SOURCES main.cpp CrashReporter.cpp )
|
||||
SET( crashreporter_HEADERS CrashReporter.h )
|
||||
SET( crashreporter_UI CrashReporter.ui )
|
||||
SET( crashreporter_RC ../../../resources.qrc )
|
||||
|
||||
QT4_WRAP_CPP( crashreporter_HEADERS_MOC ${crashreporter_HEADERS} )
|
||||
QT4_WRAP_UI( crashreporter_UI_HEADERS ${crashreporter_UI} )
|
||||
QT4_ADD_RESOURCES( crashreporter_RC_RCC ${crashreporter_RC} )
|
||||
|
||||
INCLUDE( ${QT_USE_FILE} )
|
||||
INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/src ../../libtomahawk )
|
||||
ADD_DEFINITIONS( ${QT_DEFINITIONS} )
|
||||
|
||||
ADD_EXECUTABLE( tomahawk_crash_reporter WIN32 ${crashreporter_SOURCES} ${crashreporter_HEADERS_MOC} ${crashreporter_UI_HEADERS} ${crashreporter_RC_RCC} )
|
||||
TARGET_LINK_LIBRARIES( tomahawk_crash_reporter ${QT_LIBRARIES} tomahawklib )
|
||||
|
||||
install(TARGETS tomahawk_crash_reporter RUNTIME DESTINATION ${CMAKE_INSTALL_LIBEXECDIR})
|
186
src/breakpad/CrashReporter/CrashReporter.cpp
Normal file
@@ -0,0 +1,186 @@
|
||||
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
||||
*
|
||||
* Copyright 2010-2011, Christian Muehlhaeuser <muesli@tomahawk-player.org>
|
||||
*
|
||||
* Tomahawk is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Tomahawk is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Tomahawk. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "CrashReporter.h"
|
||||
|
||||
#include <QIcon>
|
||||
#include <QDebug>
|
||||
#include <QTimer>
|
||||
#include <QDir>
|
||||
#include <QDateTime>
|
||||
#include <QHttp>
|
||||
|
||||
#include "utils/tomahawkutils.h"
|
||||
|
||||
#define LOGFILE TomahawkUtils::appLogDir().filePath( "Tomahawk.log" ).toLocal8Bit()
|
||||
#define RESPATH ":/data/"
|
||||
|
||||
|
||||
CrashReporter::CrashReporter( const QStringList& args )
|
||||
{
|
||||
setWindowIcon( QIcon( RESPATH "icons/tomahawk-icon-128x128.png" ) );
|
||||
|
||||
ui.setupUi( this );
|
||||
|
||||
ui.logoLabel->setPixmap( QPixmap( RESPATH "icons/tomahawk-icon-128x128.png" ).scaled( QSize( 55, 55 ), Qt::KeepAspectRatio, Qt::SmoothTransformation ) );
|
||||
ui.progressBar->setRange( 0, 100 );
|
||||
ui.progressBar->setValue( 0 );
|
||||
ui.progressLabel->setPalette( Qt::gray );
|
||||
|
||||
#ifdef Q_WS_MAC
|
||||
QFont f = ui.bottomLabel->font();
|
||||
f.setPointSize( 10 );
|
||||
ui.bottomLabel->setFont( f );
|
||||
f.setPointSize( 11 );
|
||||
ui.progressLabel->setFont( f );
|
||||
ui.progressLabel->setIndent( 3 );
|
||||
#else
|
||||
ui.vboxLayout->setSpacing( 16 );
|
||||
ui.progressBar->setTextVisible( false );
|
||||
ui.progressLabel->setIndent( 1 );
|
||||
ui.bottomLabel->setDisabled( true );
|
||||
ui.bottomLabel->setIndent( 1 );
|
||||
|
||||
// adjust the spacer since we adjusted the spacing above
|
||||
for ( int x = 0; x < ui.vboxLayout->count(); ++x )
|
||||
{
|
||||
if ( QSpacerItem* spacer = ui.vboxLayout->itemAt( x )->spacerItem() )
|
||||
{
|
||||
spacer->changeSize( 6, 2, QSizePolicy::Minimum, QSizePolicy::Fixed );
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif //Q_WS_MAC
|
||||
|
||||
m_http = new QHttp( "oops.tomahawk-player.org", 80, this );
|
||||
|
||||
connect( m_http, SIGNAL( done( bool ) ), SLOT( onDone() ), Qt::QueuedConnection );
|
||||
connect( m_http, SIGNAL( dataSendProgress( int, int ) ), SLOT( onProgress( int, int ) ) );
|
||||
|
||||
m_dir = args.value( 1 );
|
||||
m_minidump = m_dir + '/' + args.value( 2 ) + ".dmp";
|
||||
m_product_name = args.value( 3 );
|
||||
|
||||
setFixedSize( sizeHint() );
|
||||
|
||||
QTimer::singleShot( 0, this, SLOT( send() ) );
|
||||
}
|
||||
|
||||
|
||||
static QByteArray
|
||||
contents( const QString& path )
|
||||
{
|
||||
QFile f( path );
|
||||
f.open( QFile::ReadOnly );
|
||||
return f.readAll();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
CrashReporter::send()
|
||||
{
|
||||
QByteArray body;
|
||||
|
||||
// socorro expects a 10 digit build id
|
||||
QRegExp rx( "(\\d+\\.\\d+\\.\\d+).(\\d+)" );
|
||||
rx.exactMatch( TomahawkUtils::appFriendlyVersion() );
|
||||
QString const version = rx.cap( 1 );
|
||||
QString const buildId = rx.cap( 2 ).leftJustified( 10, '0' );
|
||||
|
||||
// add parameters
|
||||
typedef QPair<QByteArray, QByteArray> Pair;
|
||||
QList<Pair> pairs;
|
||||
pairs << Pair( "BuildID", buildId.toUtf8() )
|
||||
<< Pair( "ProductName", m_product_name.toUtf8() )
|
||||
<< Pair( "Version", TomahawkUtils::appFriendlyVersion().toLocal8Bit() )
|
||||
<< Pair( "Vendor", "Tomahawk" )
|
||||
<< Pair( "timestamp", QByteArray::number( QDateTime::currentDateTime().toTime_t() ) );
|
||||
|
||||
foreach ( Pair const pair, pairs )
|
||||
{
|
||||
body += "--thkboundary\r\n";
|
||||
body += "Content-Disposition: form-data; name=\"" +
|
||||
pair.first + "\"\r\n\r\n" +
|
||||
pair.second + "\r\n";
|
||||
}
|
||||
|
||||
// add minidump file
|
||||
body += "--thkboundary\r\n";
|
||||
body += "Content-Disposition: form-data; name=\"upload_file_minidump\"; filename=\""
|
||||
+ QFileInfo( m_minidump ).fileName() + "\"\r\n";
|
||||
body += "Content-Type: application/octet-stream\r\n";
|
||||
body += "\r\n";
|
||||
body += contents( m_minidump );
|
||||
body += "\r\n";
|
||||
|
||||
// add logfile
|
||||
body += "--thkboundary\r\n";
|
||||
body += "Content-Disposition: form-data; name=\"upload_file_tomahawklog\"; filename=\"Tomahawk.log\"\r\n";
|
||||
body += "Content-Type: application/x-gzip\r\n";
|
||||
body += "\r\n";
|
||||
body += qCompress( contents( LOGFILE ) );
|
||||
body += "\r\n";
|
||||
body += "--thkboundary--\r\n";
|
||||
|
||||
QHttpRequestHeader header( "POST", "/addreport.php" );
|
||||
header.setContentType( "multipart/form-data; boundary=thkboundary" );
|
||||
header.setValue( "HOST", "oops.tomahawk-player.org" );
|
||||
|
||||
m_http->request( header, body );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
CrashReporter::onProgress( int done, int total )
|
||||
{
|
||||
if ( total )
|
||||
{
|
||||
QString const msg = tr( "Uploaded %L1 of %L2 KB." ).arg( done / 1024 ).arg( total / 1024 );
|
||||
|
||||
ui.progressBar->setMaximum( total );
|
||||
ui.progressBar->setValue( done );
|
||||
ui.progressLabel->setText( msg );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
CrashReporter::onDone()
|
||||
{
|
||||
QByteArray data = m_http->readAll();
|
||||
ui.progressBar->setValue( ui.progressBar->maximum() );
|
||||
ui.button->setText( tr( "Close" ) );
|
||||
|
||||
QString const response = QString::fromUtf8( data );
|
||||
|
||||
if ( m_http->error() != QHttp::NoError || !response.startsWith( "CrashID=" ) )
|
||||
{
|
||||
onFail( m_http->error(), m_http->errorString() );
|
||||
}
|
||||
else
|
||||
ui.progressLabel->setText( tr( "Sent! <b>Many thanks</b>." ) );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
CrashReporter::onFail( int error, const QString& errorString )
|
||||
{
|
||||
ui.button->setText( tr( "Close" ) );
|
||||
ui.progressLabel->setText( tr( "Failed to send crash info." ) );
|
||||
qDebug() << "Error:" << error << errorString;
|
||||
}
|