Compare commits
762 Commits
twitterfix
...
0.5.4
Author | SHA1 | Date | |
---|---|---|---|
|
e19423e08f | ||
|
e041ce87fc | ||
|
6eacdf808e | ||
|
b6d5c86952 | ||
|
b7fb9a03bf | ||
|
37fad49393 | ||
|
fa83fde05e | ||
|
b3b34cacbd | ||
|
d0f697cd4b | ||
|
c144a0142f | ||
|
318866d37a | ||
|
70e93faa3f | ||
|
89e21289a6 | ||
|
fe0d2d87fc | ||
|
8531ca2234 | ||
|
8d5082fe2c | ||
|
7672c7caec | ||
|
bf2139824d | ||
|
eb749b1e44 | ||
|
53226f37c2 | ||
|
20032a40b2 | ||
|
a6d1bbb91e | ||
|
f7240a5d39 | ||
|
2142a04fda | ||
|
0406b38f1c | ||
|
8e2174baf1 | ||
|
7caeaddc21 | ||
|
f4a01ec6aa | ||
|
ed81799294 | ||
|
0283d534f0 | ||
|
4a00ff4d24 | ||
|
b98c535247 | ||
|
fbcffed27b | ||
|
e521150d33 | ||
|
2a0aa602b6 | ||
|
cf37aae430 | ||
|
292f395c47 | ||
|
047f3cc2d4 | ||
|
97681ace31 | ||
|
6be5257bc0 | ||
|
8cfbe1f38b | ||
|
8db8e42ec4 | ||
|
9492055fc6 | ||
|
3dc624858b | ||
|
f154c2bbcd | ||
|
e9127ae3ec | ||
|
c7d9d8e5b7 | ||
|
e525291213 | ||
|
44269ee8f6 | ||
|
53c4a2d675 | ||
|
ebfc53e009 | ||
|
190845a86e | ||
|
25af4f4275 | ||
|
bca64a70ed | ||
|
10462ee257 | ||
|
ba4532593b | ||
|
c84fd28dd2 | ||
|
dbbb491a81 | ||
|
bab5e27673 | ||
|
17f71bd366 | ||
|
e96bbc11e1 | ||
|
d492ba0317 | ||
|
b6466a6027 | ||
|
6b5d391cde | ||
|
0680dec5df | ||
|
a4e8f4216c | ||
|
355c95e068 | ||
|
da07361ec0 | ||
|
aafe8797ad | ||
|
95343ca024 | ||
|
f85bcc1c64 | ||
|
e53e51aefc | ||
|
d22b33bc50 | ||
|
c36414bb4c | ||
|
a78349f9f1 | ||
|
fa41b96260 | ||
|
7f2bf85663 | ||
|
85fe824df3 | ||
|
c37bbb4deb | ||
|
1a9bf84ab4 | ||
|
a283ea1ed0 | ||
|
d27dd0785a | ||
|
5e1f808d28 | ||
|
aba78c7a24 | ||
|
f45e92a24d | ||
|
5ae04043d4 | ||
|
5f521a6cf5 | ||
|
a4b30dcecd | ||
|
700394a054 | ||
|
819ee17b74 | ||
|
79c55f1699 | ||
|
f42696de23 | ||
|
adfaf5ce53 | ||
|
32aca98a97 | ||
|
294809debb | ||
|
e4593079f3 | ||
|
cfa4210854 | ||
|
91084885fb | ||
|
0b7f420bef | ||
|
046237f009 | ||
|
85d9755a47 | ||
|
98bd7b1857 | ||
|
37510fc2d7 | ||
|
a91ad7dd5f | ||
|
2cc85c8f4f | ||
|
19625fffd4 | ||
|
a98cab55b7 | ||
|
ec7b98e589 | ||
|
1262dcb60a | ||
|
fc9c6e6017 | ||
|
fa4463dc88 | ||
|
3fb403c695 | ||
|
fdb1d1b621 | ||
|
127da50144 | ||
|
5640923d51 | ||
|
4a2ef91638 | ||
|
012556ca0a | ||
|
8d0a51cc64 | ||
|
253120a35c | ||
|
671bd5361b | ||
|
3dc969a31f | ||
|
64a70f5073 | ||
|
1911d4b8a0 | ||
|
92229ce3e2 | ||
|
7df3f867ea | ||
|
6e66c4a192 | ||
|
49fe0f945e | ||
|
0d915513b9 | ||
|
6c69edd0e7 | ||
|
23c2c77869 | ||
|
cd7c64ac0a | ||
|
0637ee7338 | ||
|
7765aa116b | ||
|
c46ed53930 | ||
|
22105d448a | ||
|
4f4efdfbab | ||
|
686730e27c | ||
|
fdfe4d12d4 | ||
|
669e7550f2 | ||
|
d4a2294963 | ||
|
66b0ecc846 | ||
|
c3563a2449 | ||
|
05efe29a67 | ||
|
3480690479 | ||
|
a1fb66e024 | ||
|
02e9f99ce4 | ||
|
95c74fe370 | ||
|
358226bdb1 | ||
|
a2d81d0099 | ||
|
292e97fcee | ||
|
6dafcf3c80 | ||
|
ee1b13aee6 | ||
|
ce8eecd40f | ||
|
f674b3b751 | ||
|
44cd64a8b6 | ||
|
a9418fc8aa | ||
|
44546763b9 | ||
|
66a74ad6e2 | ||
|
6aae2dd96f | ||
|
ffd2cee2ff | ||
|
438f8444c3 | ||
|
b55be311b4 | ||
|
7a4d113af6 | ||
|
ba24e57896 | ||
|
bf3cbb4fbe | ||
|
e3cb3a1c10 | ||
|
e2cc678daa | ||
|
966445a465 | ||
|
607042b865 | ||
|
5d9685ba5c | ||
|
bfd7433647 | ||
|
19ced2239c | ||
|
f35ca66fb7 | ||
|
9c8807302b | ||
|
54e7fbdd5d | ||
|
c9bbd96fa6 | ||
|
f299d0b923 | ||
|
2c91365cbb | ||
|
f91d9f30ce | ||
|
a7c3cce720 | ||
|
82794ed207 | ||
|
6572f9820a | ||
|
707a8cb280 | ||
|
23d87d9824 | ||
|
53f4569d11 | ||
|
45b10435df | ||
|
6ce38cb986 | ||
|
e6af7b03d7 | ||
|
f8ea0667d4 | ||
|
2c6f26e36b | ||
|
e3783b58e4 | ||
|
a1146fbe53 | ||
|
6cfc4eeb51 | ||
|
b61ee3ff1a | ||
|
68f2802214 | ||
|
51b70e1e6e | ||
|
1a67ca0e7e | ||
|
8148a18b32 | ||
|
0dc1d6664a | ||
|
408bc713d7 | ||
|
6b6ccee575 | ||
|
199dd1afc7 | ||
|
d659a1f339 | ||
|
5cce01d346 | ||
|
b6545f7d5c | ||
|
d46889706b | ||
|
cccd5db05a | ||
|
b5bc3bca45 | ||
|
2acae2fd45 | ||
|
33b8608668 | ||
|
eb9786e08d | ||
|
9ad3e053e7 | ||
|
ed58392e04 | ||
|
55537ce5f8 | ||
|
d687bdb54f | ||
|
0c613cbcbe | ||
|
03c3c3d29a | ||
|
024392140e | ||
|
b53a9b6d67 | ||
|
5dfe460f9d | ||
|
ba897efada | ||
|
c2dd22ed40 | ||
|
6cd80cf047 | ||
|
859d1cbf7d | ||
|
3e0068b83c | ||
|
052759dce5 | ||
|
ae6fda4cc8 | ||
|
056213bc27 | ||
|
faf6374967 | ||
|
dce0615a28 | ||
|
27ea1ea793 | ||
|
6fd839c237 | ||
|
fba255cc13 | ||
|
64837d8a0c | ||
|
e0a635b310 | ||
|
3f0cb9baf6 | ||
|
11d4c38386 | ||
|
5f799ea5d5 | ||
|
3b87444cd9 | ||
|
7bb61f1a38 | ||
|
a7642d12d1 | ||
|
61d766be11 | ||
|
2603a7d28b | ||
|
6e46b03f86 | ||
|
269ffb3508 | ||
|
c9841985a1 | ||
|
63c64de455 | ||
|
3b40b9b4a9 | ||
|
f2989dd4d9 | ||
|
8f7a6de801 | ||
|
8abc08c5a9 | ||
|
8558cdfc8e | ||
|
1e0a00dbe2 | ||
|
0f6b903139 | ||
|
7e2266e001 | ||
|
df11500305 | ||
|
2f5e2b231a | ||
|
ccebc6b9f9 | ||
|
bb44c9a2e9 | ||
|
fda615f0ab | ||
|
da17f467cf | ||
|
cec2eb738f | ||
|
46bd366643 | ||
|
4aadb95f5d | ||
|
8a61e89d83 | ||
|
4a8710ce7f | ||
|
09882283d1 | ||
|
7b05ad29e6 | ||
|
b88be39f54 | ||
|
0383378385 | ||
|
3ab01c1b46 | ||
|
167d71539a | ||
|
df269ae7a6 | ||
|
7896d15536 | ||
|
4a1adbfb8a | ||
|
a82a8b2abe | ||
|
f1a0de0f53 | ||
|
8603667270 | ||
|
2c28325ae3 | ||
|
4f1579274e | ||
|
259e4f3da9 | ||
|
554cb5d7a1 | ||
|
9d9fae75b5 | ||
|
1fe28714cb | ||
|
a8f0053fc8 | ||
|
7b8136a36e | ||
|
c1d678e2b1 | ||
|
ee8d3e6a92 | ||
|
52752cd234 | ||
|
7bec03560a | ||
|
e56f2f7ee0 | ||
|
69b56e0836 | ||
|
8c48af423c | ||
|
3f2906d4d1 | ||
|
cd3eeb2951 | ||
|
75eb35397d | ||
|
8c6af48358 | ||
|
acd6e75a10 | ||
|
89ab3344d4 | ||
|
b1b9ee46db | ||
|
a53ef7370c | ||
|
bc6cd4008d | ||
|
1d5e199d89 | ||
|
2290da1648 | ||
|
3b885aa730 | ||
|
c15e4062b2 | ||
|
3b5ca53539 | ||
|
b2ebd1adcb | ||
|
e103a202eb | ||
|
63da02bc27 | ||
|
10858d0a6b | ||
|
69cec1b28e | ||
|
bae8de0ca5 | ||
|
867761f449 | ||
|
5e0748a1f9 | ||
|
7b89645718 | ||
|
d1c41f4ad0 | ||
|
8a3c962779 | ||
|
5d297808da | ||
|
9b89f36387 | ||
|
fe8149ee8a | ||
|
e1b0125a46 | ||
|
44bf61adc0 | ||
|
9849a8ee58 | ||
|
89cd75a2ed | ||
|
eef2c0a89a | ||
|
288f20a8f1 | ||
|
5ff36d670f | ||
|
264095d351 | ||
|
11d1fce78f | ||
|
45a65e219a | ||
|
10bb33590b | ||
|
285498d638 | ||
|
805a942cf6 | ||
|
7f2f7d642b | ||
|
6870cc6f88 | ||
|
9d5d6b7360 | ||
|
cf4ea429f6 | ||
|
e18594994c | ||
|
514841cf1c | ||
|
181bff132f | ||
|
f20b8db56a | ||
|
4189f370a6 | ||
|
b2becc6287 | ||
|
2f6b08948a | ||
|
7552ef4cce | ||
|
18bd293074 | ||
|
87dd871c6c | ||
|
4fad494630 | ||
|
848721902c | ||
|
7abd653b31 | ||
|
c41c7eaa94 | ||
|
96d89e230c | ||
|
6d79fc2ab8 | ||
|
bb57108182 | ||
|
5d890582c7 | ||
|
26733aa85f | ||
|
5b98bc9c75 | ||
|
c2363e0967 | ||
|
a1874a941d | ||
|
a512d85672 | ||
|
6c725e72e7 | ||
|
d4dff8809a | ||
|
c99df9257c | ||
|
9bea6b8709 | ||
|
e831ba9c46 | ||
|
ab5fe146d4 | ||
|
7b1a586a8b | ||
|
9c9dbb33c4 | ||
|
2656c4f3f3 | ||
|
e3aefb78f7 | ||
|
236fe91646 | ||
|
52dcf924a4 | ||
|
1a52b99d4f | ||
|
339e9a3869 | ||
|
9935aca127 | ||
|
0bb74d949f | ||
|
274d85216b | ||
|
d18439b4ae | ||
|
8401befe6b | ||
|
14d7b882fa | ||
|
a00c931192 | ||
|
bcd7d82654 | ||
|
833a9f59d3 | ||
|
3456f5d038 | ||
|
e72062b05c | ||
|
ecc8634209 | ||
|
8cf7f0bb2b | ||
|
f2503afd69 | ||
|
b3ebcb59c0 | ||
|
d0a8f2d1b9 | ||
|
82febe8da3 | ||
|
6a8edd688b | ||
|
fa4ef44e4a | ||
|
aeeaaadcd2 | ||
|
4acf96429e | ||
|
35a25c3971 | ||
|
f7d3c48b25 | ||
|
2bb175860b | ||
|
caaec5c1c8 | ||
|
745ccd34ff | ||
|
9c1f200905 | ||
|
13c22e0c72 | ||
|
9093068504 | ||
|
a1ef4c252c | ||
|
6c94e25286 | ||
|
5e731953a3 | ||
|
cc320a99f2 | ||
|
3b7a057dbb | ||
|
14ab48ae36 | ||
|
88ea5f7855 | ||
|
695feed2b6 | ||
|
eae9194aa8 | ||
|
a9a86f8043 | ||
|
d16c608610 | ||
|
4f261b1711 | ||
|
d77c9eb3eb | ||
|
6f9a79404d | ||
|
22bca7ed12 | ||
|
31f4c4f656 | ||
|
26729f6f87 | ||
|
36bbeb9d5a | ||
|
5a534954cc | ||
|
9218488409 | ||
|
c114657f81 | ||
|
60f8241305 | ||
|
4bc703b477 | ||
|
99d84c6489 | ||
|
37d1c88b42 | ||
|
bdd809cc30 | ||
|
2462c27f05 | ||
|
ee76eb3dee | ||
|
f520217f51 | ||
|
c02edee100 | ||
|
b908854d59 | ||
|
e9a1157e00 | ||
|
eecf2c38d2 | ||
|
320182427f | ||
|
973436a09b | ||
|
1abe69079f | ||
|
13945286ac | ||
|
53dd69e2f3 | ||
|
ce19d8c70b | ||
|
c9edf98dd2 | ||
|
7af7a8784f | ||
|
e0d6d5ef6b | ||
|
59ab945f0b | ||
|
224b46f5b0 | ||
|
69ed522954 | ||
|
e36ea3b263 | ||
|
658f919104 | ||
|
171f0e314b | ||
|
8d125f128c | ||
|
1272973b52 | ||
|
aadd7fea2b | ||
|
2389770d8a | ||
|
7dabdc0a68 | ||
|
f174afbd56 | ||
|
197dda1ff7 | ||
|
145d95166d | ||
|
5f473a0c5c | ||
|
f5aeeeb9c8 | ||
|
f89f119078 | ||
|
07660c3f81 | ||
|
530a420fb4 | ||
|
ff50bcb545 | ||
|
96e12a0f90 | ||
|
18a1ed4c7d | ||
|
0d85d15002 | ||
|
1b743b0e9d | ||
|
f1226cd7e4 | ||
|
acc4fa8c9a | ||
|
8ba433afa5 | ||
|
8c9d209940 | ||
|
077409ae7e | ||
|
14ee71e665 | ||
|
9443992ff9 | ||
|
25ef791afc | ||
|
1df157976a | ||
|
f57c0c5b74 | ||
|
e550ffe2b0 | ||
|
94a8aaced7 | ||
|
0fd008ba41 | ||
|
8c9deaf4ac | ||
|
6d48ffc298 | ||
|
447536958e | ||
|
43d2bb7716 | ||
|
06d79cd788 | ||
|
d481ffbd90 | ||
|
d8c3006cb4 | ||
|
872d8a3da5 | ||
|
2dc73d04af | ||
|
28e15122ea | ||
|
89c0e71874 | ||
|
338a39fe5b | ||
|
c001acffee | ||
|
a8ff291a37 | ||
|
8ba4cb66ea | ||
|
0401c4c88c | ||
|
ff0d4bcc26 | ||
|
a2082bbb44 | ||
|
722e1c3d57 | ||
|
fc5fa6d4ea | ||
|
2b3f850259 | ||
|
2fefdf8118 | ||
|
2425ec34e5 | ||
|
93a062c07f | ||
|
6fa0f8a140 | ||
|
f35821b3b5 | ||
|
95dd12aaea | ||
|
c1885fa6d9 | ||
|
72c6b009ff | ||
|
a3545712ca | ||
|
393d3370d3 | ||
|
707c2a93d0 | ||
|
4efafaede1 | ||
|
ba82de45b5 | ||
|
efc8616a17 | ||
|
eff7669dd2 | ||
|
ba7556b078 | ||
|
3928a2d084 | ||
|
8ca0cfa917 | ||
|
494df4e9a0 | ||
|
11e1a410e8 | ||
|
2aa71d130f | ||
|
43c1c498d6 | ||
|
137fce3445 | ||
|
5ee92afb36 | ||
|
1da5ea8ae7 | ||
|
83e073fc7c | ||
|
6695372639 | ||
|
0d63fb97f7 | ||
|
27e7186b98 | ||
|
218098e1ff | ||
|
0a7b6c9a22 | ||
|
d713dec19d | ||
|
3a47a5f9c8 | ||
|
4634f95b4c | ||
|
4a47f6dd22 | ||
|
161b860359 | ||
|
18183c512f | ||
|
1d1b3ff382 | ||
|
0abc1a4be9 | ||
|
d97b83557b | ||
|
59fb1fefa0 | ||
|
75991dca18 | ||
|
a61f602855 | ||
|
6d9b41dc02 | ||
|
35fd077d01 | ||
|
bdab8bc1c8 | ||
|
8c5fbcd7c7 | ||
|
e197231fe6 | ||
|
872ccc5305 | ||
|
175b413584 | ||
|
fad3c6d12a | ||
|
f5bdc3a30b | ||
|
faf8cf1539 | ||
|
690c80db60 | ||
|
062e7a5a3e | ||
|
65710f9d51 | ||
|
b62b9c3531 | ||
|
497c0f01c2 | ||
|
c3570e8e53 | ||
|
8841fa48bf | ||
|
f74e49b99b | ||
|
bb1800d27f | ||
|
c829752b7e | ||
|
7ab04deb12 | ||
|
d5d969e058 | ||
|
3467a9e47d | ||
|
77b4e62918 | ||
|
657b4b18f8 | ||
|
a42f19f07e | ||
|
7409f65874 | ||
|
644f6a714a | ||
|
0f6f58373e | ||
|
68bf96f924 | ||
|
d17783ef6e | ||
|
14f6647471 | ||
|
a62a9d50fe | ||
|
54612b3512 | ||
|
a2f8a2ae11 | ||
|
cd198db31d | ||
|
088ff60339 | ||
|
bf9052bb1b | ||
|
2a4f2d3802 | ||
|
98de149eec | ||
|
1c4fabed2b | ||
|
790120836d | ||
|
b14985bf81 | ||
|
fee2f3a01b | ||
|
6d057732b5 | ||
|
bc982f0ca5 | ||
|
811cd200d0 | ||
|
c6ba3bcc15 | ||
|
16736a2afd | ||
|
713b076929 | ||
|
172a4a8d77 | ||
|
2860bfc704 | ||
|
3e8d131c16 | ||
|
72528ab089 | ||
|
7bdc5ea4f2 | ||
|
7a8818ae94 | ||
|
ca3b01362c | ||
|
bff7f01e22 | ||
|
751f029564 | ||
|
623850a281 | ||
|
5c1763e847 | ||
|
602cf294d0 | ||
|
ac9064dcbc | ||
|
f9e7ddfb86 | ||
|
9be74e001c | ||
|
d655d66e96 | ||
|
2ac0be98d3 | ||
|
2820774220 | ||
|
62f041cc2a | ||
|
9fe91d6af1 | ||
|
2a5d061dee | ||
|
5f385753c3 | ||
|
c5138bfd76 | ||
|
a3cfdae7e8 | ||
|
7cebabf7f2 | ||
|
4082395d4b | ||
|
4113389cb5 | ||
|
96132ef9c6 | ||
|
1528095de2 | ||
|
7cf307080b | ||
|
e06f58eb29 | ||
|
22d65b7364 | ||
|
84c40dc590 | ||
|
fac2e2fc5b | ||
|
ab86a48ef7 | ||
|
3b04498661 | ||
|
c8afb7a7c6 | ||
|
0980044ef6 | ||
|
7cacc42737 | ||
|
9d26f342d3 | ||
|
bea23d7dbe | ||
|
684f33a99f | ||
|
be52d81248 | ||
|
e9aaf56b3d | ||
|
40051b82cb | ||
|
c258f1897f | ||
|
c9f287590c | ||
|
f3164635e0 | ||
|
04ce453687 | ||
|
f7a46de38e | ||
|
c2814bdabb | ||
|
b3f2478d6d | ||
|
49a4dddd88 | ||
|
9af174a198 | ||
|
13befb9d6f | ||
|
401d52d6f0 | ||
|
aee7dcd008 | ||
|
d2f876b6f3 | ||
|
70fa4b73d4 | ||
|
d8c5dcc6ba | ||
|
74af29054a | ||
|
4d281b645c | ||
|
5e0d8d2292 | ||
|
8830593f1d | ||
|
8d57ec3283 | ||
|
d67f4827a8 | ||
|
418f12743f | ||
|
b811b12e77 | ||
|
f24d11b41a | ||
|
c5f6c25e93 | ||
|
9d064f7689 | ||
|
33cae66d95 | ||
|
b2b7fc4a4e | ||
|
f75531da79 | ||
|
13920ce25d | ||
|
05ea3065f8 | ||
|
ae958cb124 | ||
|
23ef32ffee | ||
|
5e820ee0a8 | ||
|
ecd4aeb965 | ||
|
a55c1c0f08 | ||
|
9f7c6b2380 | ||
|
bd9a1aab8e | ||
|
d846c8a693 | ||
|
da82f398be | ||
|
cfa63049e2 | ||
|
f947005666 | ||
|
ac46b080fe | ||
|
3710d617a1 | ||
|
9bdeed232e | ||
|
075d5e74f8 | ||
|
3cac235232 | ||
|
873b8dab91 | ||
|
37b59126f6 | ||
|
098183ddca | ||
|
fb5d21e401 | ||
|
26036a2021 | ||
|
9521ed3fde | ||
|
da3bf8d43f | ||
|
1c55f56777 | ||
|
2af0d9a027 | ||
|
63843416cf | ||
|
81949ee0a0 | ||
|
3b5f48926c | ||
|
677944d403 | ||
|
9294b73c57 | ||
|
052093f1ea | ||
|
216e43a502 | ||
|
e571050758 | ||
|
d14e14d25a | ||
|
fde130ef9f | ||
|
305b69b229 | ||
|
ca41b8b7d3 | ||
|
ac26378914 | ||
|
1845bbbd65 | ||
|
0af1cc6e20 | ||
|
a150697f49 | ||
|
ca7db4ff99 | ||
|
c574dfeff3 | ||
|
4b059293d1 | ||
|
cbda055c89 | ||
|
c036c147a7 | ||
|
8abf255b27 | ||
|
b51e7390ba | ||
|
3225407118 | ||
|
606fb9cae5 | ||
|
41d0c9b153 | ||
|
b0a99ad1ad | ||
|
6b1aa6e9cd | ||
|
8aec11c0e9 | ||
|
1dd053dc0f | ||
|
608d0c30d0 | ||
|
ac06dbdbef | ||
|
c685ba7c03 | ||
|
e5b697801a | ||
|
56d93f1201 | ||
|
76f463b81a | ||
|
d09145b06f | ||
|
d7a925d110 | ||
|
91024493ee | ||
|
3159cfd840 | ||
|
0fb1511904 | ||
|
7af615dbf8 | ||
|
ab602b2072 | ||
|
bc0e3810d7 | ||
|
e2ab7d834b | ||
|
2673645907 | ||
|
3e1a5c15c5 | ||
|
5d0a54ce8b | ||
|
ff70417891 | ||
|
f160947ddc | ||
|
a3d11225a3 | ||
|
92ec403f7c | ||
|
af50be9ef8 | ||
|
a538553d17 | ||
|
982945107e | ||
|
b66e191078 | ||
|
47254de796 | ||
|
8f4b160ae9 | ||
|
067138b9ac | ||
|
a36693bd4c | ||
|
a3bcf52529 | ||
|
456d6f74bb | ||
|
261aa7b677 | ||
|
4fcfbf8e06 |
@@ -12,8 +12,8 @@ SET( TOMAHAWK_APPLICATION_NAME "Tomahawk" )
|
||||
SET( TOMAHAWK_DESCRIPTION_SUMMARY "The social media player" )
|
||||
|
||||
SET( TOMAHAWK_VERSION_MAJOR 0 )
|
||||
SET( TOMAHAWK_VERSION_MINOR 4 )
|
||||
SET( TOMAHAWK_VERSION_PATCH 99 )
|
||||
SET( TOMAHAWK_VERSION_MINOR 5 )
|
||||
SET( TOMAHAWK_VERSION_PATCH 4 )
|
||||
|
||||
#SET( TOMAHAWK_VERSION_RC 0 )
|
||||
|
||||
@@ -25,6 +25,7 @@ option(BUILD_GUI "Build Tomahawk with GUI" ON)
|
||||
option(BUILD_RELEASE "Generate TOMAHAWK_VERSION without GIT info" OFF)
|
||||
option(WITH_BREAKPAD "Build with breakpad integration" ON)
|
||||
option(WITH_CRASHREPORTER "Build with CrashReporter" ON)
|
||||
option(WITH_BINARY_ATTICA "Enable support for downloading binary resolvers automatically" ON)
|
||||
option(LEGACY_KDE_INTEGRATION "Install tomahawk.protocol file, deprecated since 4.6.0" OFF)
|
||||
|
||||
IF( CMAKE_SYSTEM_PROCESSOR MATCHES "arm" )
|
||||
@@ -34,8 +35,11 @@ IF( CMAKE_SYSTEM_PROCESSOR MATCHES "arm" )
|
||||
ENDIF()
|
||||
|
||||
# add definitions based on build options
|
||||
IF(WITH_BREAKPAD)
|
||||
IF( WITH_BREAKPAD )
|
||||
message(STATUS "Build with support for breakpad.")
|
||||
IF( CMAKE_COMPILER_IS_GNUCXX )
|
||||
ADD_DEFINITIONS( -DSTDC_HEADERS -std=gnu++98 )
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
# generate version string
|
||||
@@ -68,7 +72,7 @@ SET( CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" )
|
||||
SET( CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" )
|
||||
|
||||
# make predefined install dirs available everywhere
|
||||
INCLUDE(GNUInstallDirs)
|
||||
INCLUDE( GNUInstallDirs )
|
||||
|
||||
# installer creation
|
||||
INCLUDE( TomahawkCPack.cmake )
|
||||
@@ -100,8 +104,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.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(LibEchonest 1.2.1)
|
||||
macro_log_feature(LIBECHONEST_FOUND "Echonest" "Qt library for communicating with The Echo Nest" "http://projects.kde.org/libechonest" TRUE "" "libechonest 1.2.1 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")
|
||||
@@ -120,7 +124,7 @@ 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_optional_find_package(LibAttica 0.4.0)
|
||||
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" TRUE "" "")
|
||||
|
||||
macro_optional_find_package(QuaZip)
|
||||
@@ -132,11 +136,8 @@ macro_log_feature(JREEN_FOUND "Jreen" "Qt XMPP Library" "http://qutim.org/jreen
|
||||
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")
|
||||
|
||||
# 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)
|
||||
macro_optional_find_package(LibLastFm 1.0.0)
|
||||
macro_log_feature(LIBLASTFM_FOUND "liblastfm" "Qt library for the Last.fm webservices" "https://github.com/eartle/liblastfm" TRUE "" "liblastfm is needed for scrobbling tracks to Last.fm and fetching cover artwork")
|
||||
|
||||
#### submodules start
|
||||
# automatically init submodules here, don't delete this code we may add submodules again
|
||||
@@ -159,8 +160,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)
|
||||
|
@@ -1,23 +0,0 @@
|
||||
# - Try to find GLOOX
|
||||
# Find GLOOX headers, libraries and the answer to all questions.
|
||||
#
|
||||
# GLOOX_FOUND True if gloox got found
|
||||
# GLOOX_INCLUDE_DIR Location of gloox headers
|
||||
# GLOOX_LIBRARIES List of libaries to use gloox
|
||||
#
|
||||
# Copyright (c) 2009 Nigmatullin Ruslan <euroelessar@gmail.com>
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the New
|
||||
# BSD license.
|
||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||
#
|
||||
|
||||
FIND_PATH( GLOOX_INCLUDE_DIR "gloox/gloox.h" )
|
||||
FIND_LIBRARY( GLOOX_LIBRARIES gloox )
|
||||
|
||||
if( GLOOX_LIBRARIES AND GLOOX_INCLUDE_DIR )
|
||||
message( STATUS "Found gloox: ${GLOOX_LIBRARIES}" )
|
||||
set( GLOOX_FOUND 1 )
|
||||
else( GLOOX_LIBRARIES AND GLOOX_INCLUDE_DIR )
|
||||
message( STATUS "Could NOT find gloox" )
|
||||
endif( GLOOX_LIBRARIES AND GLOOX_INCLUDE_DIR )
|
@@ -30,7 +30,6 @@ ENDIF()
|
||||
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Jreen
|
||||
REQUIRED_VARS JREEN_LIBRARIES JREEN_INCLUDE_DIR
|
||||
VERSION_VAR PC_JREEN_VERSION)
|
||||
REQUIRED_VARS JREEN_LIBRARIES JREEN_INCLUDE_DIR)
|
||||
|
||||
MARK_AS_ADVANCED(JREEN_INCLUDE_DIR JREEN_LIBRARIES)
|
||||
|
@@ -1,42 +1,34 @@
|
||||
# - Find LibLastFM
|
||||
# Find the liblastfm includes and the liblastfm libraries
|
||||
# This module defines
|
||||
# LIBLASTFM_INCLUDE_DIR, root lastfm include dir
|
||||
# LIBLASTFM_LIBRARY, the path to liblastfm
|
||||
# LIBLASTFM_FOUND, whether liblastfm was found
|
||||
# - Try to find LibLastFm
|
||||
#
|
||||
# LIBLASTFM_FOUND - system has liblastfm
|
||||
# LIBLASTFM_INCLUDE_DIRS - the liblastfm include directories
|
||||
# LIBLASTFM_LIBRARIES - link these to use liblastfm
|
||||
#
|
||||
# (c) Dominik Schmidt <dev@dominik-schmidt.de>
|
||||
#
|
||||
|
||||
# Dependencies
|
||||
if(NOT QT4_FOUND)
|
||||
find_package(Qt4 REQUIRED)
|
||||
endif()
|
||||
|
||||
find_path(LIBLASTFM_INCLUDE_DIR NAMES Audioscrobbler
|
||||
HINTS
|
||||
~/usr/include
|
||||
/opt/local/include
|
||||
/usr/local/include
|
||||
/usr/include
|
||||
/opt/kde4/include
|
||||
${KDE4_INCLUDE_DIR}
|
||||
PATH_SUFFIXES lastfm
|
||||
# Include dir
|
||||
find_path(LIBLASTFM_INCLUDE_DIR
|
||||
# Track.h doesn't exist in liblastfm-0.3.1, was called Track back then
|
||||
NAMES lastfm/Track.h
|
||||
PATHS ${KDE4_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
find_library( LIBLASTFM_LIBRARY NAMES lastfm
|
||||
PATHS
|
||||
~/usr/lib
|
||||
/opt/local/lib
|
||||
/usr/local/lib
|
||||
/usr/lib
|
||||
/usr/lib64
|
||||
/opt/kde4/lib
|
||||
${KDE4_LIB_DIR}
|
||||
# Finally the library itself
|
||||
find_library(LIBLASTFM_LIBRARY
|
||||
NAMES lastfm
|
||||
PATHS ${KDE4_LIB_DIR}
|
||||
)
|
||||
|
||||
set(LIBLASTFM_LIBRARIES ${LIBLASTFM_LIBRARY})
|
||||
set(LIBLASTFM_INCLUDE_DIRS ${LIBLASTFM_INCLUDE_DIR})
|
||||
|
||||
if(LIBLASTFM_INCLUDE_DIR AND LIBLASTFM_LIBRARY)
|
||||
set(LIBLASTFM_FOUND TRUE)
|
||||
message(STATUS "Found liblastfm: ${LIBLASTFM_INCLUDE_DIR}, ${LIBLASTFM_LIBRARY}")
|
||||
else(LIBLASTFM_INCLUDE_DIR AND LIBLASTFM_LIBRARY)
|
||||
set(LIBLASTFM_FOUND FALSE)
|
||||
if (LIBLASTFM_FIND_REQUIRED)
|
||||
message(FATAL_ERROR "Could NOT find required package LibLastFm")
|
||||
endif(LIBLASTFM_FIND_REQUIRED)
|
||||
endif(LIBLASTFM_INCLUDE_DIR AND LIBLASTFM_LIBRARY)
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(LibLastFm DEFAULT_MSG LIBLASTFM_LIBRARIES LIBLASTFM_INCLUDE_DIRS)
|
||||
|
||||
mark_as_advanced(LIBLASTFM_INCLUDE_DIR LIBLASTFM_LIBRARY)
|
||||
mark_as_advanced(LIBLASTFM_LIBRARIES LIBLASTFM_INCLUDE_DIRS)
|
||||
|
@@ -278,7 +278,6 @@ Section "Tomahawk Player" SEC_TOMAHAWK_PLAYER
|
||||
|
||||
File "${INSTALL_PATH}\bin\libqxtweb-standalone.dll"
|
||||
File "${INSTALL_PATH}\bin\libtomahawk_portfwd.dll"
|
||||
File "${INSTALL_PATH}\bin\libtomahawk_lastfm2.dll"
|
||||
File "${INSTALL_PATH}\bin\libtomahawklib.dll"
|
||||
; plugins
|
||||
File "${INSTALL_PATH}\lib\libtomahawk_*_*.dll"
|
||||
@@ -293,7 +292,6 @@ Section "Tomahawk Player" SEC_TOMAHAWK_PLAYER
|
||||
File "${BUILD_PATH}\libtomahawklib.dll"
|
||||
File "${BUILD_PATH}\libqxtweb-standalone.dll"
|
||||
File "${BUILD_PATH}\libtomahawk_portfwd.dll"
|
||||
File "${BUILD_PATH}\libtomahawk_lastfm2.dll"
|
||||
; plugins
|
||||
File "${BUILD_PATH}\libtomahawk_*_*.dll"
|
||||
!endif
|
||||
@@ -351,6 +349,7 @@ Section "Tomahawk Player" SEC_TOMAHAWK_PLAYER
|
||||
File "${MING_BIN}\zlib1.dll"
|
||||
|
||||
File "${MING_BIN}\libechonest.dll"
|
||||
File "${MING_BIN}\liblastfm.dll"
|
||||
File "${MING_BIN}\libQTweetLib.dll"
|
||||
File "${MING_BIN}\libquazip.dll"
|
||||
|
||||
|
55
ChangeLog
@@ -1,12 +1,51 @@
|
||||
Version 0.5.4:
|
||||
* Improved stability.
|
||||
* Added support for Spotify album lookups.
|
||||
* Fixed not always updating the database index after scanning.
|
||||
* Fixed connection issue between Tomahawk peers.
|
||||
|
||||
Version 0.5.3:
|
||||
* Fixed broken artist names when importing Last.fm playback history.
|
||||
* Fixed crash when filtering collections.
|
||||
|
||||
Version 0.5.2:
|
||||
* Fixed a crash when invalid results are coming back from a resolver or
|
||||
are found in a playlist.
|
||||
|
||||
Version 0.5.1:
|
||||
* Fixed a few issues with automatic downloading and launching
|
||||
of the Spotify account.
|
||||
* Show an error message when not able to resolve a requested song.
|
||||
* Fixed a few crash and freeze issues.
|
||||
* Better detection of local networks for the Local Network connector.
|
||||
* Don't prompt for access permission for your own accounts.
|
||||
* (OS X) Fixed not being able to connect to Last.fm.
|
||||
|
||||
Version 0.5.0:
|
||||
* Added "Stop playback after this track" context menu items.
|
||||
* SOCKS5 proxy support improvements for resolvers and more.
|
||||
* Initial Access Control support, allowing users to define who is able to
|
||||
access and stream from their collection.
|
||||
* Priortize resolution of a track on double-click.
|
||||
* Spotify Resolver can now be easily installed on-demand from the settings.
|
||||
* You can now sync selected playlists (and updates) with Spotify.
|
||||
* Support .aiff (AIFF mimetype) files.
|
||||
* Cleaned up Diagnostics window.
|
||||
* You can tell Tomahawk to stop playback after a certain track finished.
|
||||
* Double-clicking a playlist name (in the sidebar) will start the playlist.
|
||||
* You can now import your entire Last.fm playback history into Tomahawk.
|
||||
* Fixed sorting of related artists.
|
||||
* Support for multimedia keys (Play, Pause, Next etc.) on Windows & Linux.
|
||||
* When listening privately scrobbling to Last.fm is now disabled.
|
||||
* When listening privately scrobbling to Last.fm and Adium is now disabled.
|
||||
* Added a toolbar with page back / forward buttons and the global search.
|
||||
* New grid view with direct playback controls.
|
||||
* Added a track page showing a song's lyrics and other similar tracks.
|
||||
* New grid-like view with direct playback controls.
|
||||
* You can now browse new releases (by genre).
|
||||
* Added social sharing widget, which allows you to tweet about a song.
|
||||
* Added a track page showing a song's similar tracks and statistics.
|
||||
* Separate Loved Tracks and Recently Played views per source.
|
||||
* Combine an artist's albums into a single aggregated view.
|
||||
* Added translations for Arabic, French, Bulgarian, Spanish and more.
|
||||
* Fixed XSPF auto-updating.
|
||||
* New Tomahawk logo and icon.
|
||||
|
||||
Version 0.4.2:
|
||||
* Fix ZeroConf protocol showing IP addresses instead of host names.
|
||||
@@ -36,7 +75,7 @@ Version 0.4.0:
|
||||
* 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.
|
||||
* 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.
|
||||
@@ -61,7 +100,7 @@ Version 0.4.0:
|
||||
* 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.
|
||||
@@ -73,7 +112,7 @@ Version 0.3.3:
|
||||
* Fixed dupe menu entry appearing on OS X.
|
||||
* Fixed invisible sidebar items on Linux.
|
||||
|
||||
Version 0.3.2:
|
||||
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.
|
||||
@@ -127,7 +166,7 @@ Version 0.3.0:
|
||||
* 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.
|
||||
* 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
|
||||
|
10
README
@@ -17,7 +17,7 @@ Detailed building instructions for Ubuntu
|
||||
|
||||
Detailed building instructions for OS X
|
||||
---------------------------------------
|
||||
See: http://wiki.tomahawk-player.org/mediawiki/index.php/Building_OS_X_Application_Bundle_on_Snow_Leopard_(10.6)
|
||||
See: http://wiki.tomahawk-player.org/mediawiki/index.php/Building_OS_X_Application_Bundle_on_Snow_Leopard_(10.6)_and_Lion_(10.7)
|
||||
|
||||
Doxygen Documentation
|
||||
---------------------
|
||||
@@ -34,18 +34,18 @@ Dependencies
|
||||
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/
|
||||
libechonest 1.2.1 - http://projects.kde.org/projects/playground/libs/libechonest/
|
||||
Attica 0.4.0 - ftp://ftp.kde.org/pub/kde/stable/attica/
|
||||
QuaZip 0.4.3 - http://quazip.sourceforge.net/
|
||||
|
||||
The following dependencies are optional, but recommended:
|
||||
|
||||
Attica 0.3.0 - ftp://ftp.kde.org/pub/kde/stable/attica/
|
||||
QuaZip 0.4.3 - http://quazip.sourceforge.net/
|
||||
Jreen 1.0.5 - http://qutim.org/jreen / https://github.com/euroelessar/jreen
|
||||
QTweetLib 0.5.0 - https://github.com/minimoog/QTweetLib
|
||||
liblastfm 1.0.1 - http://github.com/eartle/liblastfm/
|
||||
|
||||
Third party libraries that we ship with our source:
|
||||
|
||||
MiniUPnP 1.6 - http://miniupnp.free.fr/
|
||||
liblastfm 0.4.0 - http://github.com/jonocole/liblastfm/
|
||||
|
||||
Enjoy!
|
||||
|
@@ -18,6 +18,7 @@
|
||||
import os
|
||||
import re
|
||||
import subprocess
|
||||
import commands
|
||||
import sys
|
||||
|
||||
FRAMEWORK_SEARCH_PATH=[
|
||||
@@ -27,161 +28,160 @@ FRAMEWORK_SEARCH_PATH=[
|
||||
|
||||
LIBRARY_SEARCH_PATH=['/usr/local/lib', '/usr/local/Cellar/gettext/0.18.1.1/lib', '.']
|
||||
|
||||
|
||||
VLC_PLUGINS=[
|
||||
'access/libaccess_attachment_plugin.dylib',
|
||||
#'access/libaccess_avio_plugin.dylib',
|
||||
'access/libaccess_fake_plugin.dylib',
|
||||
'access/libaccess_ftp_plugin.dylib',
|
||||
'access/libaccess_http_plugin.dylib',
|
||||
'access/libaccess_imem_plugin.dylib',
|
||||
'access/libaccess_mmap_plugin.dylib',
|
||||
'access/libaccess_mms_plugin.dylib',
|
||||
'access/libaccess_realrtsp_plugin.dylib',
|
||||
'access/libaccess_tcp_plugin.dylib',
|
||||
'access/libaccess_udp_plugin.dylib',
|
||||
'access/libcdda_plugin.dylib',
|
||||
'access/libfilesystem_plugin.dylib',
|
||||
'access/libqtcapture_plugin.dylib',
|
||||
'access/librtp_plugin.dylib',
|
||||
'access/libzip_plugin.dylib',
|
||||
'access_output/libaccess_output_dummy_plugin.dylib',
|
||||
'access_output/libaccess_output_file_plugin.dylib',
|
||||
'access_output/libaccess_output_http_plugin.dylib',
|
||||
'access_output/libaccess_output_shout_plugin.dylib',
|
||||
'access_output/libaccess_output_udp_plugin.dylib',
|
||||
'audio_filter/liba52tofloat32_plugin.dylib',
|
||||
'audio_filter/liba52tospdif_plugin.dylib',
|
||||
'audio_filter/libaudio_format_plugin.dylib',
|
||||
'audio_filter/libaudiobargraph_a_plugin.dylib',
|
||||
'audio_filter/libchorus_flanger_plugin.dylib',
|
||||
'audio_filter/libconverter_fixed_plugin.dylib',
|
||||
'audio_filter/libdolby_surround_decoder_plugin.dylib',
|
||||
'audio_filter/libdtstofloat32_plugin.dylib',
|
||||
'audio_filter/libdtstospdif_plugin.dylib',
|
||||
'audio_filter/libequalizer_plugin.dylib',
|
||||
'audio_filter/libheadphone_channel_mixer_plugin.dylib',
|
||||
'audio_filter/libmono_plugin.dylib',
|
||||
'audio_filter/libmpgatofixed32_plugin.dylib',
|
||||
'audio_filter/libnormvol_plugin.dylib',
|
||||
'audio_filter/libparam_eq_plugin.dylib',
|
||||
'audio_filter/libscaletempo_plugin.dylib',
|
||||
'audio_filter/libsimple_channel_mixer_plugin.dylib',
|
||||
'audio_filter/libspatializer_plugin.dylib',
|
||||
'audio_filter/libtrivial_channel_mixer_plugin.dylib',
|
||||
'audio_filter/libugly_resampler_plugin.dylib',
|
||||
'audio_mixer/libfloat32_mixer_plugin.dylib',
|
||||
'audio_mixer/libspdif_mixer_plugin.dylib',
|
||||
'audio_mixer/libtrivial_mixer_plugin.dylib',
|
||||
'audio_output/libaout_file_plugin.dylib',
|
||||
'audio_output/libauhal_plugin.dylib',
|
||||
'codec/liba52_plugin.dylib',
|
||||
'codec/libadpcm_plugin.dylib',
|
||||
'codec/libaes3_plugin.dylib',
|
||||
'codec/libaraw_plugin.dylib',
|
||||
'codec/libavcodec_plugin.dylib',
|
||||
'codec/libcc_plugin.dylib',
|
||||
'codec/libcdg_plugin.dylib',
|
||||
'codec/libdts_plugin.dylib',
|
||||
'codec/libfaad_plugin.dylib',
|
||||
'codec/libfake_plugin.dylib',
|
||||
'codec/libflac_plugin.dylib',
|
||||
'codec/libfluidsynth_plugin.dylib',
|
||||
'codec/libinvmem_plugin.dylib',
|
||||
'codec/liblpcm_plugin.dylib',
|
||||
'codec/libmpeg_audio_plugin.dylib',
|
||||
'codec/libpng_plugin.dylib',
|
||||
'codec/librawvideo_plugin.dylib',
|
||||
'codec/libspeex_plugin.dylib',
|
||||
'codec/libspudec_plugin.dylib',
|
||||
'codec/libtheora_plugin.dylib',
|
||||
'codec/libtwolame_plugin.dylib',
|
||||
'codec/libvorbis_plugin.dylib',
|
||||
'control/libgestures_plugin.dylib',
|
||||
'control/libhotkeys_plugin.dylib',
|
||||
'control/libmotion_plugin.dylib',
|
||||
'control/libnetsync_plugin.dylib',
|
||||
'control/libsignals_plugin.dylib',
|
||||
'demux/libaiff_plugin.dylib',
|
||||
'demux/libasf_plugin.dylib',
|
||||
'demux/libau_plugin.dylib',
|
||||
#'demux/libavformat_plugin.dylib',
|
||||
'demux/libavi_plugin.dylib',
|
||||
'demux/libdemux_cdg_plugin.dylib',
|
||||
'demux/libdemuxdump_plugin.dylib',
|
||||
'demux/libdirac_plugin.dylib',
|
||||
'demux/libes_plugin.dylib',
|
||||
'demux/libflacsys_plugin.dylib',
|
||||
'demux/liblive555_plugin.dylib',
|
||||
'demux/libmkv_plugin.dylib',
|
||||
'demux/libmod_plugin.dylib',
|
||||
'demux/libmp4_plugin.dylib',
|
||||
'demux/libmpc_plugin.dylib',
|
||||
'demux/libmpgv_plugin.dylib',
|
||||
'demux/libnsc_plugin.dylib',
|
||||
'demux/libnsv_plugin.dylib',
|
||||
'demux/libnuv_plugin.dylib',
|
||||
'demux/libogg_plugin.dylib',
|
||||
'demux/libplaylist_plugin.dylib',
|
||||
'demux/libps_plugin.dylib',
|
||||
'demux/libpva_plugin.dylib',
|
||||
'demux/librawaud_plugin.dylib',
|
||||
'demux/librawdv_plugin.dylib',
|
||||
'demux/librawvid_plugin.dylib',
|
||||
'demux/libreal_plugin.dylib',
|
||||
'demux/libsmf_plugin.dylib',
|
||||
'demux/libts_plugin.dylib',
|
||||
'demux/libtta_plugin.dylib',
|
||||
'demux/libty_plugin.dylib',
|
||||
'demux/libvc1_plugin.dylib',
|
||||
'demux/libvoc_plugin.dylib',
|
||||
'demux/libwav_plugin.dylib',
|
||||
'demux/libxa_plugin.dylib',
|
||||
'meta_engine/libfolder_plugin.dylib',
|
||||
'meta_engine/libtaglib_plugin.dylib',
|
||||
'misc/libaudioscrobbler_plugin.dylib',
|
||||
'misc/libdummy_plugin.dylib',
|
||||
'misc/libexport_plugin.dylib',
|
||||
'misc/libfreetype_plugin.dylib',
|
||||
'misc/libgnutls_plugin.dylib',
|
||||
'misc/liblogger_plugin.dylib',
|
||||
'misc/liblua_plugin.dylib',
|
||||
'misc/libosd_parser_plugin.dylib',
|
||||
'misc/libquartztext_plugin.dylib',
|
||||
'misc/libstats_plugin.dylib',
|
||||
'misc/libvod_rtsp_plugin.dylib',
|
||||
'misc/libxml_plugin.dylib',
|
||||
'misc/libxtag_plugin.dylib',
|
||||
'mmx/libi420_rgb_mmx_plugin.dylib',
|
||||
'mmx/libi420_yuy2_mmx_plugin.dylib',
|
||||
'mmx/libi422_yuy2_mmx_plugin.dylib',
|
||||
'mmx/libmemcpymmx_plugin.dylib',
|
||||
'mmxext/libmemcpymmxext_plugin.dylib',
|
||||
'mux/libmux_asf_plugin.dylib',
|
||||
'mux/libmux_avi_plugin.dylib',
|
||||
'mux/libmux_dummy_plugin.dylib',
|
||||
'mux/libmux_mp4_plugin.dylib',
|
||||
'mux/libmux_mpjpeg_plugin.dylib',
|
||||
'mux/libmux_ogg_plugin.dylib',
|
||||
'mux/libmux_ps_plugin.dylib',
|
||||
'mux/libmux_ts_plugin.dylib',
|
||||
'mux/libmux_wav_plugin.dylib',
|
||||
'packetizer/libpacketizer_copy_plugin.dylib',
|
||||
'packetizer/libpacketizer_dirac_plugin.dylib',
|
||||
'packetizer/libpacketizer_flac_plugin.dylib',
|
||||
'packetizer/libpacketizer_h264_plugin.dylib',
|
||||
'packetizer/libpacketizer_mlp_plugin.dylib',
|
||||
'packetizer/libpacketizer_mpeg4audio_plugin.dylib',
|
||||
'packetizer/libpacketizer_mpeg4video_plugin.dylib',
|
||||
'packetizer/libpacketizer_mpegvideo_plugin.dylib',
|
||||
'packetizer/libpacketizer_vc1_plugin.dylib',
|
||||
'sse2/libi420_rgb_sse2_plugin.dylib',
|
||||
'sse2/libi420_yuy2_sse2_plugin.dylib',
|
||||
'sse2/libi422_yuy2_sse2_plugin.dylib',
|
||||
'stream_filter/libdecomp_plugin.dylib',
|
||||
'stream_filter/libstream_filter_rar_plugin.dylib',
|
||||
'stream_filter/libstream_filter_record_plugin.dylib',
|
||||
'visualization/libvisual_plugin.dylib',
|
||||
'libaccess_attachment_plugin.dylib',
|
||||
#'libaccess_avio_plugin.dylib',
|
||||
#'libaccess_fake_plugin.dylib',
|
||||
'libaccess_ftp_plugin.dylib',
|
||||
'libaccess_http_plugin.dylib',
|
||||
'libaccess_imem_plugin.dylib',
|
||||
#'libaccess_mmap_plugin.dylib',
|
||||
'libaccess_mms_plugin.dylib',
|
||||
'libaccess_realrtsp_plugin.dylib',
|
||||
'libaccess_tcp_plugin.dylib',
|
||||
'libaccess_udp_plugin.dylib',
|
||||
'libcdda_plugin.dylib',
|
||||
'libfilesystem_plugin.dylib',
|
||||
'libqtcapture_plugin.dylib',
|
||||
'librtp_plugin.dylib',
|
||||
'libzip_plugin.dylib',
|
||||
'libaccess_output_dummy_plugin.dylib',
|
||||
'libaccess_output_file_plugin.dylib',
|
||||
'libaccess_output_http_plugin.dylib',
|
||||
'libaccess_output_shout_plugin.dylib',
|
||||
'libaccess_output_udp_plugin.dylib',
|
||||
'liba52tofloat32_plugin.dylib',
|
||||
'liba52tospdif_plugin.dylib',
|
||||
'libaudio_format_plugin.dylib',
|
||||
'libaudiobargraph_a_plugin.dylib',
|
||||
'libchorus_flanger_plugin.dylib',
|
||||
'libconverter_fixed_plugin.dylib',
|
||||
'libdolby_surround_decoder_plugin.dylib',
|
||||
'libdtstofloat32_plugin.dylib',
|
||||
'libdtstospdif_plugin.dylib',
|
||||
'libequalizer_plugin.dylib',
|
||||
'libheadphone_channel_mixer_plugin.dylib',
|
||||
'libmono_plugin.dylib',
|
||||
'libmpgatofixed32_plugin.dylib',
|
||||
'libnormvol_plugin.dylib',
|
||||
'libparam_eq_plugin.dylib',
|
||||
'libscaletempo_plugin.dylib',
|
||||
'libsimple_channel_mixer_plugin.dylib',
|
||||
'libspatializer_plugin.dylib',
|
||||
'libtrivial_channel_mixer_plugin.dylib',
|
||||
'libugly_resampler_plugin.dylib',
|
||||
'libfloat32_mixer_plugin.dylib',
|
||||
#'libspdif_mixer_plugin.dylib',
|
||||
#'libtrivial_mixer_plugin.dylib',
|
||||
'libaout_file_plugin.dylib',
|
||||
'libauhal_plugin.dylib',
|
||||
'liba52_plugin.dylib',
|
||||
'libadpcm_plugin.dylib',
|
||||
'libaes3_plugin.dylib',
|
||||
'libaraw_plugin.dylib',
|
||||
'libavcodec_plugin.dylib',
|
||||
'libcc_plugin.dylib',
|
||||
'libcdg_plugin.dylib',
|
||||
'libdts_plugin.dylib',
|
||||
'libfaad_plugin.dylib',
|
||||
#'libfake_plugin.dylib',
|
||||
'libflac_plugin.dylib',
|
||||
'libfluidsynth_plugin.dylib',
|
||||
#'libinvmem_plugin.dylib',
|
||||
'liblpcm_plugin.dylib',
|
||||
'libmpeg_audio_plugin.dylib',
|
||||
'libpng_plugin.dylib',
|
||||
'librawvideo_plugin.dylib',
|
||||
'libspeex_plugin.dylib',
|
||||
'libspudec_plugin.dylib',
|
||||
'libtheora_plugin.dylib',
|
||||
'libtwolame_plugin.dylib',
|
||||
'libvorbis_plugin.dylib',
|
||||
'libgestures_plugin.dylib',
|
||||
'libhotkeys_plugin.dylib',
|
||||
'libmotion_plugin.dylib',
|
||||
'libnetsync_plugin.dylib',
|
||||
#'libsignals_plugin.dylib',
|
||||
'libaiff_plugin.dylib',
|
||||
'libasf_plugin.dylib',
|
||||
'libau_plugin.dylib',
|
||||
#'libavformat_plugin.dylib',
|
||||
'libavi_plugin.dylib',
|
||||
'libdemux_cdg_plugin.dylib',
|
||||
'libdemuxdump_plugin.dylib',
|
||||
'libdirac_plugin.dylib',
|
||||
'libes_plugin.dylib',
|
||||
'libflacsys_plugin.dylib',
|
||||
'liblive555_plugin.dylib',
|
||||
'libmkv_plugin.dylib',
|
||||
'libmod_plugin.dylib',
|
||||
'libmp4_plugin.dylib',
|
||||
'libmpc_plugin.dylib',
|
||||
'libmpgv_plugin.dylib',
|
||||
'libnsc_plugin.dylib',
|
||||
'libnsv_plugin.dylib',
|
||||
'libnuv_plugin.dylib',
|
||||
'libogg_plugin.dylib',
|
||||
'libplaylist_plugin.dylib',
|
||||
'libps_plugin.dylib',
|
||||
'libpva_plugin.dylib',
|
||||
'librawaud_plugin.dylib',
|
||||
'librawdv_plugin.dylib',
|
||||
'librawvid_plugin.dylib',
|
||||
'libreal_plugin.dylib',
|
||||
'libsmf_plugin.dylib',
|
||||
'libts_plugin.dylib',
|
||||
'libtta_plugin.dylib',
|
||||
'libty_plugin.dylib',
|
||||
'libvc1_plugin.dylib',
|
||||
'libvoc_plugin.dylib',
|
||||
'libwav_plugin.dylib',
|
||||
'libxa_plugin.dylib',
|
||||
'libfolder_plugin.dylib',
|
||||
'libtaglib_plugin.dylib',
|
||||
'libaudioscrobbler_plugin.dylib',
|
||||
'libdummy_plugin.dylib',
|
||||
'libexport_plugin.dylib',
|
||||
'libfreetype_plugin.dylib',
|
||||
'libgnutls_plugin.dylib',
|
||||
'liblogger_plugin.dylib',
|
||||
'liblua_plugin.dylib',
|
||||
'libosd_parser_plugin.dylib',
|
||||
'libquartztext_plugin.dylib',
|
||||
'libstats_plugin.dylib',
|
||||
'libvod_rtsp_plugin.dylib',
|
||||
'libxml_plugin.dylib',
|
||||
#'libxtag_plugin.dylib',
|
||||
'libi420_rgb_mmx_plugin.dylib',
|
||||
'libi420_yuy2_mmx_plugin.dylib',
|
||||
'libi422_yuy2_mmx_plugin.dylib',
|
||||
'libmemcpymmx_plugin.dylib',
|
||||
'libmemcpymmxext_plugin.dylib',
|
||||
'libmux_asf_plugin.dylib',
|
||||
'libmux_avi_plugin.dylib',
|
||||
'libmux_dummy_plugin.dylib',
|
||||
'libmux_mp4_plugin.dylib',
|
||||
'libmux_mpjpeg_plugin.dylib',
|
||||
'libmux_ogg_plugin.dylib',
|
||||
'libmux_ps_plugin.dylib',
|
||||
'libmux_ts_plugin.dylib',
|
||||
'libmux_wav_plugin.dylib',
|
||||
'libpacketizer_copy_plugin.dylib',
|
||||
'libpacketizer_dirac_plugin.dylib',
|
||||
'libpacketizer_flac_plugin.dylib',
|
||||
'libpacketizer_h264_plugin.dylib',
|
||||
'libpacketizer_mlp_plugin.dylib',
|
||||
'libpacketizer_mpeg4audio_plugin.dylib',
|
||||
'libpacketizer_mpeg4video_plugin.dylib',
|
||||
'libpacketizer_mpegvideo_plugin.dylib',
|
||||
'libpacketizer_vc1_plugin.dylib',
|
||||
'libi420_rgb_sse2_plugin.dylib',
|
||||
'libi420_yuy2_sse2_plugin.dylib',
|
||||
'libi422_yuy2_sse2_plugin.dylib',
|
||||
'libdecomp_plugin.dylib',
|
||||
'libstream_filter_rar_plugin.dylib',
|
||||
'libstream_filter_record_plugin.dylib',
|
||||
'libvisual_plugin.dylib',
|
||||
]
|
||||
|
||||
VLC_SEARCH_PATH=[
|
||||
@@ -203,10 +203,20 @@ TOMAHAWK_PLUGINS = [
|
||||
'libtomahawk_account_google.so',
|
||||
'libtomahawk_account_twitter.so',
|
||||
'libtomahawk_account_zeroconf.so',
|
||||
'libtomahawk_infoplugin_adium.so',
|
||||
'libtomahawk_infoplugin_charts.so',
|
||||
'libtomahawk_infoplugin_discogs.so',
|
||||
'libtomahawk_infoplugin_echonest.so',
|
||||
'libtomahawk_infoplugin_hypem.so',
|
||||
'libtomahawk_infoplugin_musicbrainz.so',
|
||||
'libtomahawk_infoplugin_musixmatch.so',
|
||||
'libtomahawk_infoplugin_newreleases.so',
|
||||
'libtomahawk_infoplugin_rovi.so',
|
||||
'libtomahawk_infoplugin_spotify.so',
|
||||
]
|
||||
|
||||
QT_PLUGINS_SEARCH_PATH=[
|
||||
'/usr/local/Cellar/qt/4.7.4/plugins',
|
||||
'/usr/local/Cellar/qt/4.8.2/plugins',
|
||||
]
|
||||
|
||||
|
||||
@@ -249,7 +259,7 @@ frameworks_dir = os.path.join(bundle_dir, 'Contents', 'Frameworks')
|
||||
commands.append(['mkdir', '-p', frameworks_dir])
|
||||
resources_dir = os.path.join(bundle_dir, 'Contents', 'Resources')
|
||||
commands.append(['mkdir', '-p', resources_dir])
|
||||
plugins_dir = os.path.join(bundle_dir, 'Contents', 'PlugIns')
|
||||
plugins_dir = os.path.join(bundle_dir, 'Contents', 'qt-plugins')
|
||||
binary = os.path.join(bundle_dir, 'Contents', 'MacOS', bundle_name)
|
||||
|
||||
fixed_libraries = []
|
||||
@@ -363,8 +373,7 @@ def FixVLCPlugin(abs_path, subdir):
|
||||
FixAllLibraries(broken_libs)
|
||||
|
||||
#print "Copying plugin....%s %s %s" % (plugins_dir, subdir, os.path.join(abs_path.split('/')[-2:]))
|
||||
plugindir = abs_path.split('/')[-2]
|
||||
new_path = os.path.join(plugins_dir, subdir, plugindir, os.path.basename(abs_path))
|
||||
new_path = os.path.join(plugins_dir, subdir, os.path.basename(abs_path))
|
||||
args = ['mkdir', '-p', os.path.dirname(new_path)]
|
||||
commands.append(args)
|
||||
args = ['ditto', '--arch=i386', '--arch=x86_64', abs_path, new_path]
|
||||
@@ -490,7 +499,7 @@ def FindVLCPlugin(name):
|
||||
FixBinary(binary)
|
||||
|
||||
for plugin in VLC_PLUGINS:
|
||||
FixVLCPlugin(FindVLCPlugin(plugin), '../Frameworks/vlc/plugins')
|
||||
FixVLCPlugin(FindVLCPlugin(plugin), '../plugins')
|
||||
|
||||
for plugin in TOMAHAWK_PLUGINS:
|
||||
FixPlugin(plugin, '../MacOS')
|
||||
|
@@ -1,2 +1,2 @@
|
||||
[Paths]
|
||||
Plugins = PlugIns
|
||||
Plugins = qt-plugins
|
||||
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 151 KiB After Width: | Height: | Size: 151 KiB |
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 68 KiB |
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 68 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 260 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 7.3 KiB |
Before Width: | Height: | Size: 110 KiB After Width: | Height: | Size: 1.0 MiB |
Before Width: | Height: | Size: 6.9 KiB After Width: | Height: | Size: 19 KiB |
@@ -1,304 +1,80 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 15.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
width="600px" height="600px" viewBox="0 0 600 600" enable-background="new 0 0 600 600" xml:space="preserve">
|
||||
<path fill="#010101" d="M543.773,253.359c0-49.962-19.305-86.572-54.194-104.54C477.84,71.133,405.027,13.418,316.568,13.418
|
||||
c-86.917,0-159.483,56.481-172.605,132.58c-38.049,16.818-59.889,55.24-59.889,107.361c0,27.029,7.188,51.824,20.321,71.749
|
||||
c-1.816,1.565-3.444,3.282-4.77,5.239c0,0,2.582,2.359,3.689,3.373c-4.262,2.123-8.22,4.322-11.555,6.67
|
||||
c0,0,3.021,7.355,5.896,14.353c-11.991,9.688-21.312,18.92-27.553,27.51c0,0,1.611,1.789,2.011,2.225
|
||||
c-12.354,9.158-22.133,18.205-28.528,27.021c0,0,6.927,7.35,12.408,13.166c-17.824,28.76-43.348,74.85-43.348,102.988
|
||||
c0,3.278,0.346,6.315,1.093,9.053c1.764,6.443,5.752,11.438,11.229,14.059c15.255,7.312,39.646-6.362,72.589-40.434
|
||||
c-0.828,8.287-1.457,16.662-1.457,24.736c0,16.805,2.266,32.069,8.77,41.25c4.887,6.895,10.898,9.067,15.084,9.682
|
||||
c6.723,0.99,26.375,3.797,57.992-61.295c2.678,0.705,5.421,1.178,8.235,1.178c8.798,0,17.065-3.424,23.287-9.639
|
||||
c4.284-4.287,7.133-9.584,8.562-15.312c7.516-2.129,14.555-6.701,20.779-13.19c19.562,24.86,44.779,37.643,75.38,37.643
|
||||
c7.317,0,14.474-0.754,21.281-2.242c0.392-0.073,2.555-0.623,2.555-0.623l0.62-0.166c23.05-5.823,42.463-20.409,58-43.254
|
||||
c7.2,9.23,15.731,15.994,24.849,19.457c1.141,6.658,4.226,12.808,9.102,17.691c6.22,6.213,14.487,9.639,23.288,9.639
|
||||
c8.798,0,17.063-3.426,23.285-9.639c6.221-6.229,9.647-14.494,9.647-23.293c0-8.797-3.429-17.066-9.647-23.293
|
||||
c-2.988-2.988-6.478-5.297-10.248-6.924c0.275-2.947,0.611-5.849,0.611-9.009c0-10.028-1.398-20.979-4.19-31.897
|
||||
c-1.196-4.672-2.757-8.746-4.513-12.568c2.84-6.467,4.807-13.268,4.807-20.426c0-7.316-1.74-14.422-4.706-21.01
|
||||
C509.263,358.345,543.773,313.068,543.773,253.359z M451.232,150.998c-33.396-54.619-88.048-93.359-134.569-85.472
|
||||
c-49.022-7.864-102.775,30.64-135.326,85.018c-2.646,0.208-5.276,0.497-7.875,0.88c8.694-54.414,69.431-111.108,143.107-111.108
|
||||
c74.113,0,135.142,57.197,143.271,112.08C457.013,151.799,454.137,151.348,451.232,150.998z"/>
|
||||
<path fill="#010101" stroke="#FFFFFF" stroke-width="4.8437" d="M110.937,367.38c-72.03,93.07-97.843,163.349-81.865,170.996
|
||||
c15.97,7.654,74.912-46.055,139.701-143.287c45.751-68.647,60.797-94.43,45.68-95.922l20.614-43.357l-10.687-6.644l-33.91,33.371
|
||||
C179.323,272.615,166.073,296.146,110.937,367.38z"/>
|
||||
<path fill="#010101" stroke="#FFFFFF" stroke-width="4.8437" d="M140.932,379.755c-39.101,113.041-39.738,189.89-20.813,192.654
|
||||
c18.912,2.787,59.039-67.617,89.306-182.603c21.383-81.178,27.257-111.029,11.438-108l5.133-48.806l-13.207-3.354l-22.192,42.936
|
||||
C175.736,266.142,170.865,293.244,140.932,379.755z"/>
|
||||
<circle fill="none" stroke="#010101" stroke-width="4.8437" cx="410.28" cy="388.832" r="37.801"/>
|
||||
<path fill="#ED2224" stroke="#010101" stroke-width="4.8437" d="M475.237,157.792c-7.115-73.197-76.231-130.645-160.495-130.645
|
||||
c-83.402,0-152.009,56.27-160.306,128.393c-39.811,13.607-58.455,52.219-58.455,97.818c0,56.946,34.681,103.108,89.925,103.108
|
||||
c35.784,0,67.089-19.432,84.771-48.551c14.01,3.533,28.776,5.463,44.064,5.463c13.16,0,25.934-1.438,38.173-4.076
|
||||
c17.966,28.357,49.108,47.164,84.604,47.164c55.665,0,90.696-46.162,90.696-103.108
|
||||
C528.218,210.073,512.209,173.073,475.237,157.792z M314.742,274.908c-10.501,0-20.723-0.878-30.584-2.506
|
||||
c1.125-6.177,1.778-12.527,1.778-19.043c0-56.941-44.786-103.104-100.03-103.104c-4.858,0-9.597,0.478-14.271,1.169
|
||||
c8.692-54.414,69.43-111.108,143.105-111.108c74.113,0,135.144,57.197,143.27,112.08c-6.617-1.398-13.473-2.141-20.49-2.141
|
||||
c-55.675,0-100.801,46.163-100.801,103.104c0,6.852,0.687,13.536,1.931,20.013C330.872,274.364,322.888,274.908,314.742,274.908z"/>
|
||||
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="-1087.6663" y1="191.4385" x2="-992.1917" y2="191.4385" gradientTransform="matrix(-0.3782 -0.8348 1.083 -0.4907 -423.9551 -476.2263)">
|
||||
<stop offset="0" style="stop-color:#010101"/>
|
||||
<stop offset="0.2606" style="stop-color:#3E221C"/>
|
||||
<stop offset="0.7732" style="stop-color:#B03126"/>
|
||||
<stop offset="1" style="stop-color:#ED2224"/>
|
||||
</linearGradient>
|
||||
<path fill="url(#SVGID_1_)" d="M153.69,260.35c31.322-14.19,65.739-18.887,77.129,6.254c11.391,25.14-4.763,57.026-36.091,71.214
|
||||
c-31.323,14.192-65.948,5.311-77.338-19.83C106,292.849,122.366,274.543,153.69,260.35z"/>
|
||||
<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="-1275.886" y1="215.5034" x2="-1180.4114" y2="215.5034" gradientTransform="matrix(-0.9008 -0.3607 0.555 -1.386 -752.6548 131.7681)">
|
||||
<stop offset="0" style="stop-color:#B11F24"/>
|
||||
<stop offset="0.1017" style="stop-color:#B62024"/>
|
||||
<stop offset="1" style="stop-color:#ED2224"/>
|
||||
</linearGradient>
|
||||
<path fill="url(#SVGID_2_)" d="M427.738,265.165c16.043-40.085,41.342-74.985,68.475-64.122
|
||||
c27.121,10.86,36.109,52.165,20.056,92.248c-16.053,40.089-51.062,63.773-78.189,52.912
|
||||
C410.95,335.343,411.683,305.253,427.738,265.165z"/>
|
||||
<path fill="#010101" stroke="#010101" stroke-width="4.8437" d="M448.219,425.226c7.774,30.396,3.98,62.357-14.521,62.357
|
||||
c-16.301,0-34.904-17.332-42.675-47.732c-7.777-30.399,4.243-75.016,14.521-62.364C423.584,399.707,440.442,394.826,448.219,425.226
|
||||
z"/>
|
||||
<linearGradient id="SVGID_3_" gradientUnits="userSpaceOnUse" x1="-639.5422" y1="548.502" x2="-691.4051" y2="458.673" gradientTransform="matrix(0.9868 0.0515 0.0515 0.7987 840.2104 72.6462)">
|
||||
<stop offset="0" style="stop-color:#5B3E1D"/>
|
||||
<stop offset="0.1121" style="stop-color:#42301B"/>
|
||||
<stop offset="0.2377" style="stop-color:#2E2316"/>
|
||||
<stop offset="0.3753" style="stop-color:#1D1710"/>
|
||||
<stop offset="0.5292" style="stop-color:#0E0C08"/>
|
||||
<stop offset="0.7122" style="stop-color:#030302"/>
|
||||
<stop offset="1" style="stop-color:#000000"/>
|
||||
</linearGradient>
|
||||
<path fill="url(#SVGID_3_)" stroke="#010101" stroke-width="4.8437" d="M184.076,437.859c-6.111,23.875,1.745,46.508,17.54,50.549
|
||||
c15.79,4.039,33.552-12.045,39.658-35.924c6.101-23.882-9.153-57.129-24.947-61.17C200.537,387.275,190.178,413.972,184.076,437.859
|
||||
z"/>
|
||||
<path fill="#010101" stroke="#010101" stroke-width="4.8437" d="M314.837,65.525c72.757-12.333,165.505,89.311,165.505,187.528
|
||||
c0,98.213-74.307,162.833-165.707,162.833"/>
|
||||
<linearGradient id="SVGID_4_" gradientUnits="userSpaceOnUse" x1="-664.3811" y1="374.0068" x2="-500.546" y2="90.2362" gradientTransform="matrix(1 0 0 1 858.79 0.3506)">
|
||||
<stop offset="0" style="stop-color:#000000"/>
|
||||
<stop offset="1" style="stop-color:#5B3E1D"/>
|
||||
</linearGradient>
|
||||
<path fill="url(#SVGID_4_)" stroke="#010101" stroke-width="4.8437" d="M314.635,415.888c-91.402,0-165.299-64.619-165.299-162.833
|
||||
c0-98.218,88.615-199.862,165.5-187.528"/>
|
||||
<linearGradient id="SVGID_5_" gradientUnits="userSpaceOnUse" x1="-760.302" y1="-37.9087" x2="-639.3506" y2="-247.4027" gradientTransform="matrix(-0.6092 0.7802 -0.4118 -0.3216 -240.6183 671.6459)">
|
||||
<stop offset="0" style="stop-color:#8B654B"/>
|
||||
<stop offset="1" style="stop-color:#000000"/>
|
||||
</linearGradient>
|
||||
<path fill="url(#SVGID_5_)" d="M169.611,266.578c-27.578-21.539-16.863-81.354,23.935-133.604
|
||||
c40.804-52.245,93.81-72.894,126.21-59.689c26.672,10.864,14.476,85.434-26.326,137.681
|
||||
C252.63,263.215,197.193,288.112,169.611,266.578z"/>
|
||||
<circle fill="#010101" cx="214.367" cy="388.832" r="34.682"/>
|
||||
<g>
|
||||
<path fill="#F4DFED" d="M131.831,427.708c-23.973,79.734-18.741,132.268-9.011,135.459c10.854,3.564,43.561-47.223,60.839-128.324
|
||||
c12.189-57.264,11.729-83.75,0.009-81.625l3.505-31.108l-8.899-2.435l-14.271,32.445
|
||||
C152.554,347.564,150.184,366.689,131.831,427.708z"/>
|
||||
|
||||
<linearGradient id="SVGID_6_" gradientUnits="userSpaceOnUse" x1="-710.6404" y1="319.3252" x2="-710.6405" y2="562.8164" gradientTransform="matrix(1 0 0 1 858.79 0.3506)">
|
||||
<stop offset="0" style="stop-color:#571A54"/>
|
||||
<stop offset="0.2641" style="stop-color:#7C5378"/>
|
||||
<stop offset="0.528" style="stop-color:#A78AA3"/>
|
||||
<stop offset="0.7459" style="stop-color:#CDBCCB"/>
|
||||
<stop offset="0.9095" style="stop-color:#EAE1E8"/>
|
||||
<stop offset="1" style="stop-color:#F9F3F8"/>
|
||||
</linearGradient>
|
||||
<path fill="url(#SVGID_6_)" d="M146.41,479.117l-22.914,19.186l35.325-65.182l4.683-17.371c0,0,3.1-26.758-24.228,14.713
|
||||
c16.962-56.432,32.317-62.998,32.317-62.998l11.402-46.658l-4.725-1.131l-14.702,30.23c-11.429-4.588-13.859,14.521-32.392,75.483
|
||||
c-24.226,79.656-20.501,124.087-8.358,137.777L146.41,479.117z"/>
|
||||
|
||||
<linearGradient id="SVGID_7_" gradientUnits="userSpaceOnUse" x1="-789.3508" y1="444.1797" x2="-821.2424" y2="531.975" gradientTransform="matrix(0.9399 -0.3414 0.3414 0.9399 754.2939 -277.891)">
|
||||
<stop offset="0" style="stop-color:#802986"/>
|
||||
<stop offset="0.2641" style="stop-color:#9D66A2"/>
|
||||
<stop offset="0.528" style="stop-color:#BE9BC2"/>
|
||||
<stop offset="0.7459" style="stop-color:#DBC8DE"/>
|
||||
<stop offset="0.9095" style="stop-color:#F0E6F1"/>
|
||||
<stop offset="1" style="stop-color:#F9F3F8"/>
|
||||
</linearGradient>
|
||||
<path fill="url(#SVGID_7_)" d="M147.332,501.478l31.839-92.399c0,0,6.608,60.69-7.474,93.406
|
||||
c1.438-44.879-2.328-36.951-9.176-25.257C159.71,482.031,147.332,501.478,147.332,501.478z"/>
|
||||
|
||||
<linearGradient id="SVGID_8_" gradientUnits="userSpaceOnUse" x1="-764.8928" y1="411.2344" x2="-797.3259" y2="500.5203" gradientTransform="matrix(0.9399 -0.3414 0.3414 0.9399 754.2939 -277.891)">
|
||||
<stop offset="0" style="stop-color:#802986"/>
|
||||
<stop offset="0.2641" style="stop-color:#9D66A2"/>
|
||||
<stop offset="0.528" style="stop-color:#BE9BC2"/>
|
||||
<stop offset="0.7459" style="stop-color:#DBC8DE"/>
|
||||
<stop offset="0.9095" style="stop-color:#F0E6F1"/>
|
||||
<stop offset="1" style="stop-color:#F9F3F8"/>
|
||||
</linearGradient>
|
||||
<path fill="url(#SVGID_8_)" d="M156.286,463.716l38.825-93.953c0,0,2.251,62.279-11.831,94.992
|
||||
c-0.298-44.25-5.388-28.09-8.538-23.508C165.662,454.416,156.286,463.716,156.286,463.716z"/>
|
||||
|
||||
<linearGradient id="SVGID_9_" gradientUnits="userSpaceOnUse" x1="-872.7551" y1="422.8174" x2="-924.3751" y2="475.0038" gradientTransform="matrix(0.711 -0.7032 0.7032 0.711 517.3177 -556.6326)">
|
||||
<stop offset="0" style="stop-color:#571A54"/>
|
||||
<stop offset="0.2641" style="stop-color:#7C5378"/>
|
||||
<stop offset="0.528" style="stop-color:#A78AA3"/>
|
||||
<stop offset="0.7459" style="stop-color:#CDBCCB"/>
|
||||
<stop offset="0.9095" style="stop-color:#EAE1E8"/>
|
||||
<stop offset="1" style="stop-color:#F9F3F8"/>
|
||||
</linearGradient>
|
||||
<path fill="url(#SVGID_9_)" d="M180.916,431.115l9.787-73.404c0,0,18.589,43.111,16.428,71.426
|
||||
c-11.771-30.424-13.671-21.049-17.576-14.961C187.396,417.539,180.916,431.115,180.916,431.115z"/>
|
||||
<path fill="#1E3D73" d="M174.914,335.556L158.76,362.31l-23.24,76.646c0,0,1.211-8.172,1.788-15.883l-18.783,50.772
|
||||
c0,0,8.386-31.227,3.607-28.383c-4.775,2.84,4.227-21.91-23.102,13.73c5.316-18.517,20.495-39.511,33.324-54.9
|
||||
c-2.172,0.473-7.102,4.787-18.388,18.373c4.381-15.232,14.956-32.934,25.357-47.898c-1.159-2.682-5.151-3.889-21.234,5.224
|
||||
C134.366,356.718,174.914,335.556,174.914,335.556z"/>
|
||||
</g>
|
||||
<g>
|
||||
<path fill="#F4DFED" d="M94.453,401.164c-49.752,66.752-62.779,117.912-54.719,124.242c8.987,7.059,57.062-29.513,100.989-99.847
|
||||
c31.011-49.655,39.62-74.709,27.879-76.713l13.916-28.053l-7.539-5.318l-24.483,25.623
|
||||
C141.291,332.912,132.531,350.072,94.453,401.164z"/>
|
||||
<path fill="#656B84" d="M90.603,454.464l-28.088,10.205l55.456-49.201l10.331-14.729c0,0,12.047-24.097-27.796,5.559
|
||||
c35.213-47.256,51.892-48.182,51.892-48.182l26.641-39.957l-4.058-2.683l-24.133,23.4c-9.179-8.223-17.989,8.91-56.226,59.885
|
||||
c-49.96,66.601-61.634,109.635-54.889,126.646L90.603,454.464z"/>
|
||||
|
||||
<linearGradient id="SVGID_10_" gradientUnits="userSpaceOnUse" x1="-752.551" y1="484.6816" x2="-736.7991" y2="395.3488" gradientTransform="matrix(1 0 0 1 858.79 0.3506)">
|
||||
<stop offset="0" style="stop-color:#571A54"/>
|
||||
<stop offset="0.2641" style="stop-color:#7C5378"/>
|
||||
<stop offset="0.528" style="stop-color:#A78AA3"/>
|
||||
<stop offset="0.7459" style="stop-color:#CDBCCB"/>
|
||||
<stop offset="0.9095" style="stop-color:#EAE1E8"/>
|
||||
<stop offset="1" style="stop-color:#F9F3F8"/>
|
||||
</linearGradient>
|
||||
<path fill="url(#SVGID_10_)" d="M83.829,475.791l61.476-75.98c0,0-14.509,59.306-38.916,85.248
|
||||
c16.678-41.694,12.058-33.366,0-26.873C101.491,460.822,83.829,475.791,83.829,475.791z"/>
|
||||
|
||||
<linearGradient id="SVGID_11_" gradientUnits="userSpaceOnUse" x1="-727.8064" y1="453.3486" x2="-711.9149" y2="363.2233" gradientTransform="matrix(1 0 0 1 858.79 0.3506)">
|
||||
<stop offset="0" style="stop-color:#571A54"/>
|
||||
<stop offset="0.2641" style="stop-color:#7C5378"/>
|
||||
<stop offset="0.528" style="stop-color:#A78AA3"/>
|
||||
<stop offset="0.7459" style="stop-color:#CDBCCB"/>
|
||||
<stop offset="0.9095" style="stop-color:#EAE1E8"/>
|
||||
<stop offset="1" style="stop-color:#F9F3F8"/>
|
||||
</linearGradient>
|
||||
<path fill="url(#SVGID_11_)" d="M105.143,443.357l68.562-75.052c0,0-19.143,59.297-43.551,85.248
|
||||
c14.824-41.7,10.567-27.994,0-25.022C124.802,430.041,105.143,443.357,105.143,443.357z"/>
|
||||
<path fill="#656B84" d="M139.423,421.125l34.262-65.654c0,0,2.748,46.867-8.945,72.74c-0.676-32.615-3.041-28.432-11.413-20.061
|
||||
C150.5,410.974,139.423,421.125,139.423,421.125z"/>
|
||||
<path fill="#656B84" d="M166.408,329.255l-24.322,19.631l-48.011,64.111c0,0,3.931-7.273,7.104-14.322L66.185,439.99
|
||||
c0,0,18.552-26.484,13.089-25.449c-5.464,1.041,11.451-19.148-26.399,5.02c11.313-15.588,32.751-30.137,50.064-40.227
|
||||
c-2.205-0.299-8.316,2.076-23.552,10.988c9.312-12.818,25.302-25.842,40.183-36.357c-0.175-2.918-3.515-5.416-21.74-2.346
|
||||
C121.065,335.3,166.408,329.255,166.408,329.255z"/>
|
||||
</g>
|
||||
<g>
|
||||
<path fill="#D9AF82" d="M315.05,115.063c-50.514,0-83.218,15.021-109.641,64.839c-2.502,4.713-0.23,14.337-2.796,19.152
|
||||
c-13.845,26.007-37.089,48.236-37.089,71.707c0,34.335,19.1,65.637,42.505,89.296c12.185,71.646,34.7,151.595,104.339,151.595"/>
|
||||
<path fill="#010101" d="M203.271,178.766c-1.521,2.855-1.59,6.774-1.656,10.562c-0.062,3.283-0.123,6.677-1.14,8.588
|
||||
c-4.537,8.519-10.146,16.707-15.577,24.624c-11.21,16.353-21.797,31.798-21.797,48.221c0,30.307,15.166,62.38,42.666,90.412
|
||||
c12.578,73.607,36.113,150.479,106.6,150.479v-1.547c-67.084,0-89.722-78.556-101.95-150.453l-0.127-0.748l-0.54-0.549
|
||||
c-26.957-27.257-41.805-58.361-41.805-87.594c0-14.923,10.174-29.766,20.949-45.482c5.501-8.027,11.19-16.327,15.855-25.087
|
||||
c1.562-2.935,1.638-6.92,1.707-10.773c0.059-3.221,0.118-6.551,1.088-8.381c24.258-45.734,54.398-65.974,107.503-65.974v-2.422
|
||||
C259.849,112.641,228.506,131.181,203.271,178.766z"/>
|
||||
</g>
|
||||
<path fill="#8B654B" d="M312.368,511.65c72.045,0,92.163-79.949,104.338-151.595c23.405-23.657,42.514-54.959,42.514-89.296
|
||||
c0-37.004-22.588-49.51-38.609-77.154c-5.681-9.798-1.496-24.634-8.084-33.382c-26.905-35.728-53.772-45.162-97.477-45.162"/>
|
||||
<ellipse fill="#D9AF82" cx="313.792" cy="343.947" rx="21.906" ry="68.144"/>
|
||||
<path fill="#8B654B" d="M342.916,373.455c0,7.812-14.979,12.535-27.273,12.535c-12.293,0-27.81-4.736-27.81-12.549
|
||||
c3.432-3.433,15.246,4.885,27.544,4.885C334.789,378.326,342.916,312.496,342.916,373.455z"/>
|
||||
<path fill="#D9AF82" d="M335.697,435.216c0,37.637-9.81,68.832-21.91,68.832c-12.096,0-21.899-31.195-21.899-68.832
|
||||
c0-37.639,9.882-50.258,21.977-50.258C325.962,384.958,335.697,397.578,335.697,435.216z"/>
|
||||
<path opacity="0.36" fill="#8A644B" enable-background="new " d="M328.365,281.605c-1.826,24.682-14.186-7.573-34.757,20.975
|
||||
c-8.672,12.025-23.23,10.877-38.845,10.877c-39.61,0-66.544-26.031-67.859-38.869c-2.517-24.557,29.024-39.586,71.464-39.586
|
||||
C297.028,235.002,329.255,269.622,328.365,281.605z"/>
|
||||
<linearGradient id="SVGID_12_" gradientUnits="userSpaceOnUse" x1="-644.0354" y1="340.7031" x2="-568.3508" y2="340.7031" gradientTransform="matrix(1 0 0 1 858.79 0.3506)">
|
||||
<stop offset="0" style="stop-color:#D9AF82"/>
|
||||
<stop offset="0.0786" style="stop-color:#DFB791"/>
|
||||
<stop offset="0.2053" style="stop-color:#E7C1A5"/>
|
||||
<stop offset="0.345" style="stop-color:#EDC9B5"/>
|
||||
<stop offset="0.5023" style="stop-color:#F1CFC0"/>
|
||||
<stop offset="0.6917" style="stop-color:#F4D3C7"/>
|
||||
<stop offset="1" style="stop-color:#F5D4C9"/>
|
||||
</linearGradient>
|
||||
<path opacity="0.36" fill="url(#SVGID_12_)" enable-background="new " d="M272.246,361.529
|
||||
c-28.722,19.461-56.346-24.299-57.491-43.314c15.913,13.822,62.032,18.457,75.685-2.516L272.246,361.529z"/>
|
||||
<path opacity="0.36" fill="#8A644B" enable-background="new " d="M313.706,461.212c-38.167,0-61.229-13.68-61.229-31.629
|
||||
c0-6.049,15.649-24.078,37.318-49.365c5.952-3.699,7.464,10.037,14.958,4.73C331.61,392.044,328.318,461.212,313.706,461.212z"/>
|
||||
<g>
|
||||
<path fill="#8A644B" d="M260.464,472.117c8.341,23.938,32.817,36.465,52.688,36.465v-4.844
|
||||
C294.99,503.738,268.056,493.921,260.464,472.117L260.464,472.117z"/>
|
||||
</g>
|
||||
<g>
|
||||
<path fill="#8A644B" d="M180.954,271.658c0,21.359,5.388,36.679,27.101,48.222c0.587,1.121,7.021,13.387,7.021,13.387
|
||||
c8.916,16.375,19.021,34.939,19.021,54.406h4.844c0-20.699-10.416-39.84-19.612-56.725l-7.586-14.455l-0.709-0.426
|
||||
C190.51,305.4,180.954,291.289,180.954,271.658L180.954,271.658z"/>
|
||||
</g>
|
||||
<g>
|
||||
<path fill="#010101" d="M208.814,230.649l-0.104-0.97c-3.106-15.25-3.226-33.651-0.312-49.217l-4.764-0.889
|
||||
C200.613,195.722,205.583,214.815,208.814,230.649z"/>
|
||||
</g>
|
||||
<linearGradient id="SVGID_13_" gradientUnits="userSpaceOnUse" x1="-667.7327" y1="310.1709" x2="-407.218" y2="310.1709" gradientTransform="matrix(1 0 0 1 858.79 0.3506)">
|
||||
<stop offset="0" style="stop-color:#5B3E1D"/>
|
||||
<stop offset="1" style="stop-color:#010101"/>
|
||||
</linearGradient>
|
||||
<path fill="url(#SVGID_13_)" d="M423.943,199.054c-3.983-11.059-0.737-20.853-8.062-31.231
|
||||
c-19.885-28.185-51.07-56.271-108.998-52.618l5.214,140.363c0,0-122.733-25.589-121.021,15.935c0.229,5.387,40.188,2.88,63.46,4.428
|
||||
c-26.092,4.566-32.185,5.898-32.185,8.838c0,6.206,21.861,0.683,25.106,2.467c4.978,2.739-43.139,7.052-34.351,8.757
|
||||
c10.057,1.951,44.474,3.086,57.442,3.086c28.931,0,41.077-25.413,41.077-4.485c7.348,27.894,14.739,59.239,13.974,69.882
|
||||
c-1.477,20.661-19.62,20.188-19.62,20.188l5.089,24.285c-8.557,0.438-6.245-1.324-13.85-0.549c-14.429,0-32.354,13.03-32.354,16.055
|
||||
l39.989,0.434c0,0-29.081,13.771-22.977,22.931c4.765,7.143,20.316,13.377,31.093,13.424c0,0,3.271,8.549,3.271,22.352
|
||||
c0,13.812-4.035,22.564-4.035,22.564c46.171,0,67.49-49.035,80.324-118.445c6.083-32.877,20.018-58.104,36.034-71.658
|
||||
c15.742-13.319,23.008-26.64,23.008-52.07C451.577,249.847,443.574,230.354,423.943,199.054z"/>
|
||||
<path fill="#D9AF82" d="M325.395,252.416l-13.297,4.328c0,0-65.85-96.356-46.493-121.312c12.682-16.357,24.609-18.136,40.046-19.238
|
||||
c13.519-0.965,21.294,16.525,27.302,24.271C350.375,162.927,325.395,252.416,325.395,252.416z"/>
|
||||
<linearGradient id="SVGID_14_" gradientUnits="userSpaceOnUse" x1="-629.0159" y1="50.6562" x2="-540.175" y2="50.6562" gradientTransform="matrix(0.676 0.6564 -0.9247 0.9523 711.8302 511.1852)">
|
||||
<stop offset="0" style="stop-color:#FFFFFF"/>
|
||||
<stop offset="0.0769" style="stop-color:#F4E9DD"/>
|
||||
<stop offset="0.1814" style="stop-color:#EBD6BF"/>
|
||||
<stop offset="0.2951" style="stop-color:#E5C7A8"/>
|
||||
<stop offset="0.419" style="stop-color:#DFBC96"/>
|
||||
<stop offset="0.5585" style="stop-color:#DCB58B"/>
|
||||
<stop offset="0.7265" style="stop-color:#DAB084"/>
|
||||
<stop offset="1" style="stop-color:#D9AF82"/>
|
||||
</linearGradient>
|
||||
<path fill="url(#SVGID_14_)" d="M305.253,199.27c-26.745,27.542-70.168,41.961-81.281,24.357
|
||||
c-14.515-22.972-12.896-47.545,13.854-75.082c26.74-27.547,64.922-33.847,85.28-14.081
|
||||
C343.464,154.233,332.003,171.726,305.253,199.27z"/>
|
||||
<linearGradient id="SVGID_15_" gradientUnits="userSpaceOnUse" x1="-617.7107" y1="401.4551" x2="-617.7107" y2="317.8633" gradientTransform="matrix(1 0 0 1 858.79 0.3506)">
|
||||
<stop offset="0" style="stop-color:#D9AF82"/>
|
||||
<stop offset="0.1127" style="stop-color:#BD936E"/>
|
||||
<stop offset="0.2679" style="stop-color:#A57C5E"/>
|
||||
<stop offset="0.4437" style="stop-color:#966E53"/>
|
||||
<stop offset="0.6554" style="stop-color:#8D664D"/>
|
||||
<stop offset="1" style="stop-color:#8A644B"/>
|
||||
</linearGradient>
|
||||
<path fill="url(#SVGID_15_)" d="M272.246,361.529c0,46.272-35.419,42.799-45.104,36.896c0-45.752-17.229-80.211-17.229-80.211
|
||||
S249.882,354.22,272.246,361.529z"/>
|
||||
<linearGradient id="SVGID_16_" gradientUnits="userSpaceOnUse" x1="-925.8547" y1="344.666" x2="-972.7458" y2="361.7328" gradientTransform="matrix(-1 0 0 1 -562.3931 0.3506)">
|
||||
<stop offset="0" style="stop-color:#382815"/>
|
||||
<stop offset="0.4081" style="stop-color:#553E2B"/>
|
||||
<stop offset="1" style="stop-color:#8B654B"/>
|
||||
</linearGradient>
|
||||
<path fill="url(#SVGID_16_)" d="M359.338,356.349c0,46.271,21.506,44.033,31.073,44.033c7.488-45.135,35.671-81.516,35.671-81.516
|
||||
S381.703,349.044,359.338,356.349z"/>
|
||||
<path fill="none" stroke="#010101" stroke-width="4.8437" d="M173.934,294.978"/>
|
||||
<g>
|
||||
<path fill="#010101" d="M311.507,115.089c53.106,0,83.247,20.214,107.505,65.948c0.902,1.702,0.902,4.883,0.902,7.96
|
||||
c-0.005,4.146-0.005,8.432,2.029,11.419c16.157,23.757,31.934,48.809,31.934,70.969c0,32.38-12.817,62.458-37.073,86.969
|
||||
l-0.541,0.551l-0.13,0.748c-12.222,71.897-36.672,150.451-103.765,150.451v1.518c70.499,0,95.847-76.844,108.416-150.455
|
||||
c24.803-25.336,37.937-56.355,37.937-89.781c0-23.537-16.19-49.311-32.774-73.694c-1.151-1.698-1.19-5.061-1.19-8.37
|
||||
c0-0.109,0.004-0.537,0.004-0.646c0-3.567-0.041-7.221-1.471-9.91C398.053,131.18,366.71,112.64,311.51,112.64v2.449H311.507
|
||||
L311.507,115.089z"/>
|
||||
</g>
|
||||
<polygon fill="#010101" points="339.974,84.79 334.59,115.675 300.608,113.719 312.435,66.413 "/>
|
||||
<circle fill="#010101" stroke="#010101" stroke-width="4.8437" cx="452.06" cy="492.948" r="19.204"/>
|
||||
<g>
|
||||
|
||||
<linearGradient id="SVGID_17_" gradientUnits="userSpaceOnUse" x1="-749.6116" y1="335.9512" x2="-687.9983" y2="335.9512" gradientTransform="matrix(1 0 0 1 858.79 0.3506)">
|
||||
<stop offset="0" style="stop-color:#571A54"/>
|
||||
<stop offset="0.2641" style="stop-color:#7C5378"/>
|
||||
<stop offset="0.528" style="stop-color:#A78AA3"/>
|
||||
<stop offset="0.7459" style="stop-color:#CDBCCB"/>
|
||||
<stop offset="0.9095" style="stop-color:#EAE1E8"/>
|
||||
<stop offset="1" style="stop-color:#F9F3F8"/>
|
||||
</linearGradient>
|
||||
<path fill="url(#SVGID_17_)" d="M109.178,338.035c9.592-7.824,34.694,4.861,34.833,4.861l26.78-8.396
|
||||
C170.211,334.501,120.246,321.648,109.178,338.035z"/>
|
||||
</g>
|
||||
<linearGradient id="SVGID_18_" gradientUnits="userSpaceOnUse" x1="-1081.0227" y1="320.6133" x2="-1063.3801" y2="320.6133" gradientTransform="matrix(-0.0113 -0.7169 1.2476 -0.0198 -98.6661 -397.1379)">
|
||||
<stop offset="0" style="stop-color:#D9AF82"/>
|
||||
<stop offset="0.0786" style="stop-color:#DFB791"/>
|
||||
<stop offset="0.2053" style="stop-color:#E7C1A5"/>
|
||||
<stop offset="0.345" style="stop-color:#EDC9B5"/>
|
||||
<stop offset="0.5023" style="stop-color:#F1CFC0"/>
|
||||
<stop offset="0.6917" style="stop-color:#F4D3C7"/>
|
||||
<stop offset="1" style="stop-color:#F5D4C9"/>
|
||||
</linearGradient>
|
||||
<path opacity="0.36" fill="url(#SVGID_18_)" enable-background="new " d="M313.352,358.851c6.074-0.1,11.045,2.654,11.102,6.15
|
||||
c0.06,3.49-4.829,6.398-10.907,6.498c-6.076,0.1-11.045-2.658-11.105-6.154C302.388,361.853,307.269,358.947,313.352,358.851z"/>
|
||||
<path fill="#483218" d="M397.109,309.378c15.699-3.76,26.445-18.402,20.099-27.063c-38.738,19.354-75.295,11.369-85.529,9.147
|
||||
C368.014,309.492,371.117,315.595,397.109,309.378z"/>
|
||||
<path fill="#B4B4B4" d="M310.92,73.714c-38.372,0-93.116,22.758-117.549,74.944c-6.089,12.999-6.656,32.87,0.64,45.014
|
||||
c0,0,18.604-81.43,108.229-86.494"/>
|
||||
</svg>
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
version="1.1"
|
||||
id="Layer_1"
|
||||
x="0px"
|
||||
y="0px"
|
||||
width="606.2478"
|
||||
height="595.49866"
|
||||
viewBox="0 0 606.24779 595.49863"
|
||||
enable-background="new 0 0 841.89 595.28"
|
||||
xml:space="preserve"
|
||||
inkscape:version="0.48.2 r9819"
|
||||
sodipodi:docname="tomahawk-icon.svg"><metadata
|
||||
id="metadata15"><rdf:RDF><cc:Work
|
||||
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
|
||||
id="defs13" /><sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1440"
|
||||
inkscape:window-height="794"
|
||||
id="namedview11"
|
||||
showgrid="false"
|
||||
inkscape:zoom="1"
|
||||
inkscape:cx="431.12548"
|
||||
inkscape:cy="336.94553"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="Layer_1"
|
||||
inkscape:snap-page="false"
|
||||
fit-margin-top="0"
|
||||
fit-margin-left="0"
|
||||
fit-margin-right="0"
|
||||
fit-margin-bottom="0"><sodipodi:guide
|
||||
position="-3.5728101e-05,-1.501866e-05"
|
||||
orientation="0,841.89001"
|
||||
id="guide2994" /><sodipodi:guide
|
||||
position="841.88997,-1.501866e-05"
|
||||
orientation="-595.28003,0"
|
||||
id="guide2996" /><sodipodi:guide
|
||||
position="841.88997,595.28001"
|
||||
orientation="0,-841.89001"
|
||||
id="guide2998" /><sodipodi:guide
|
||||
position="-3.5728101e-05,595.28001"
|
||||
orientation="595.28003,0"
|
||||
id="guide3000" /></sodipodi:namedview>
|
||||
<g
|
||||
id="g3"
|
||||
transform="matrix(7.3080643,0,0,7.1790074,-2773.1692,-1839.0104)">
|
||||
<g
|
||||
id="g5">
|
||||
<path
|
||||
d="m 420.947,265.168 c -17.911,0 -32.477,14.565 -32.477,32.472 0,17.906 14.565,32.476 32.477,32.476 2.568,0 5.06,-0.318 7.459,-0.888 v -28.011 l -22.338,15.806 c -0.198,0.135 -0.444,0.213 -0.681,0.213 -0.184,0 -0.372,-0.039 -0.541,-0.136 -0.396,-0.202 -0.642,-0.608 -0.642,-1.043 v -37.053 c 0,-0.435 0.246,-0.845 0.642,-1.053 0.396,-0.193 0.864,-0.159 1.222,0.092 l 22.338,15.807 v -16.028 h 0.951 8.945 v 47.234 c 9.076,-5.764 15.121,-15.888 15.121,-27.417 10e-4,-17.905 -14.569,-32.471 -32.476,-32.471 z"
|
||||
id="path7"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:none" />
|
||||
<path
|
||||
d="m 420.947,256.165 c -22.874,0 -41.48,18.606 -41.48,41.475 0,22.87 18.606,41.475 41.48,41.475 22.869,0 41.476,-18.605 41.476,-41.475 0,-22.869 -18.607,-41.475 -41.476,-41.475 z m 17.356,68.892 v -47.234 h -8.945 -0.951 v 16.028 l -22.338,-15.807 c -0.357,-0.251 -0.826,-0.285 -1.222,-0.092 -0.396,0.208 -0.642,0.618 -0.642,1.053 v 37.053 c 0,0.435 0.246,0.841 0.642,1.043 0.169,0.097 0.357,0.136 0.541,0.136 0.236,0 0.482,-0.078 0.681,-0.213 l 22.338,-15.806 v 28.011 c -2.399,0.569 -4.891,0.888 -7.459,0.888 -17.911,0 -32.477,-14.57 -32.477,-32.476 0,-17.906 14.565,-32.472 32.477,-32.472 17.906,0 32.477,14.565 32.477,32.472 -0.001,11.528 -6.046,21.652 -15.122,27.416 z"
|
||||
id="path9"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#e63e30" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 260 KiB |
Before Width: | Height: | Size: 356 KiB After Width: | Height: | Size: 260 KiB |
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 68 KiB |
BIN
data/images/scrollbar-horizontal-handle.png
Normal file
After Width: | Height: | Size: 397 B |
BIN
data/images/scrollbar-vertical-handle.png
Normal file
After Width: | Height: | Size: 376 B |
BIN
data/images/track-icon-sidebar.png
Normal file
After Width: | Height: | Size: 5.1 KiB |
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 68 KiB |
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 68 KiB |
@@ -43,8 +43,8 @@
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<a href="http://www.playdar.org/" title="Tomahawk - Powered by Playdar" id="head">
|
||||
<img alt="Tomahawk - Powered by Playdar" src="/staticdata/tomahawk_auth_logo.png" width="196" height="45"/>
|
||||
<a href="http://www.tomahawk-player.org" title="Tomahawk - Powered by Playdar" id="head">
|
||||
<img alt="Tomahawk - Powered by Playdar" src="/staticdata/tomahawk_auth_logo.png" width="200" height="30">
|
||||
</a>
|
||||
|
||||
<div id="content">
|
||||
|
@@ -32,8 +32,8 @@
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<a href="http://www.gettomahawk.com/" title="Tomahawk - Powered by Playdar" id="head">
|
||||
<img alt="Tomahawk - Powered by Playdar" src="/staticdata/tomahawk_auth_logo.png" width="196" height="45"/>
|
||||
<a href="http://www.tomahawk-player.org" title="Tomahawk - Powered by Playdar" id="head">
|
||||
<img alt="Tomahawk - Powered by Playdar" src="/staticdata/tomahawk_auth_logo.png" width="200" height="30">
|
||||
</a>
|
||||
|
||||
<div id="content">
|
||||
|
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 27 KiB |
2461
lang/tomahawk_ar.ts
1609
lang/tomahawk_bg.ts
1611
lang/tomahawk_ca.ts
1736
lang/tomahawk_de.ts
1577
lang/tomahawk_en.ts
1567
lang/tomahawk_es.ts
1733
lang/tomahawk_fr.ts
@@ -10,5 +10,6 @@
|
||||
<file>tomahawk_es.qm</file>
|
||||
<file>tomahawk_sv.qm</file>
|
||||
<file>tomahawk_ja.qm</file>
|
||||
<file>tomahawk_ar.qm</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
2069
lang/tomahawk_ja.ts
1563
lang/tomahawk_pl.ts
1636
lang/tomahawk_ru.ts
1607
lang/tomahawk_sv.ts
1551
lang/tomahawk_tr.ts
@@ -1,25 +1,48 @@
|
||||
FILE (GLOB TS_FILES ${CMAKE_SOURCE_DIR}/lang/*.ts)
|
||||
QT4_ADD_TRANSLATION(QM_FILES ${TS_FILES})
|
||||
macro(add_tomahawk_translations language)
|
||||
list(APPEND TOMAHAWK_LANGUAGES ${ARGV})
|
||||
|
||||
## HACK HACK HACK - around rcc limitations to allow out of source-tree building
|
||||
SET( trans_file tomahawk_i18n )
|
||||
SET( trans_srcfile ${CMAKE_SOURCE_DIR}/lang/${trans_file}.qrc)
|
||||
SET( trans_infile ${CMAKE_CURRENT_BINARY_DIR}/${trans_file}.qrc)
|
||||
SET( trans_outfile ${CMAKE_CURRENT_BINARY_DIR}/qrc_${trans_file}.cxx)
|
||||
set(tomahawk_i18n_qrc_content "<!DOCTYPE RCC><RCC version=\"1.0\">\n")
|
||||
|
||||
# Copy the QRC file to the output directory
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT ${trans_infile}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${trans_srcfile} ${trans_infile}
|
||||
MAIN_DEPENDENCY ${trans_srcfile}
|
||||
)
|
||||
# tomahawk and qt language files
|
||||
set(tomahawk_i18n_qrc_content "${tomahawk_i18n_qrc_content}<qresource prefix=\"/lang\">\n")
|
||||
foreach(lang ${TOMAHAWK_LANGUAGES})
|
||||
set(tomahawk_i18n_qrc_content "${tomahawk_i18n_qrc_content}<file>tomahawk_${lang}.qm</file>\n")
|
||||
if(NOT lang STREQUAL "en" AND EXISTS ${QT_TRANSLATIONS_DIR}/qt_${lang}.qm)
|
||||
file(COPY ${QT_TRANSLATIONS_DIR}/qt_${lang}.qm DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
|
||||
set(tomahawk_i18n_qrc_content "${tomahawk_i18n_qrc_content}<file>qt_${lang}.qm</file>\n")
|
||||
endif()
|
||||
|
||||
# Run the resource compiler (rcc_options should already be set)
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT ${trans_outfile}
|
||||
COMMAND ${QT_RCC_EXECUTABLE}
|
||||
ARGS ${rcc_options} -name ${trans_file} -o ${trans_outfile} ${trans_infile}
|
||||
MAIN_DEPENDENCY ${trans_infile}
|
||||
DEPENDS ${QM_FILES}
|
||||
)
|
||||
# build explicitly enabled languages
|
||||
list(APPEND TS_FILES "${CMAKE_SOURCE_DIR}/lang/tomahawk_${lang}.ts")
|
||||
endforeach()
|
||||
|
||||
set(tomahawk_i18n_qrc_content "${tomahawk_i18n_qrc_content}</qresource>\n")
|
||||
set(tomahawk_i18n_qrc_content "${tomahawk_i18n_qrc_content}</RCC>\n")
|
||||
|
||||
file(WRITE ${CMAKE_BINARY_DIR}/lang/tomahawk_i18n.qrc "${tomahawk_i18n_qrc_content}" )
|
||||
|
||||
QT4_ADD_TRANSLATION(QM_FILES ${TS_FILES})
|
||||
|
||||
## HACK HACK HACK - around rcc limitations to allow out of source-tree building
|
||||
SET( trans_file tomahawk_i18n )
|
||||
SET( trans_srcfile ${CMAKE_BINARY_DIR}/lang/${trans_file}.qrc)
|
||||
SET( trans_infile ${CMAKE_CURRENT_BINARY_DIR}/${trans_file}.qrc)
|
||||
SET( trans_outfile ${CMAKE_CURRENT_BINARY_DIR}/qrc_${trans_file}.cxx)
|
||||
|
||||
# Copy the QRC file to the output directory
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT ${trans_infile}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${trans_srcfile} ${trans_infile}
|
||||
MAIN_DEPENDENCY ${trans_srcfile}
|
||||
)
|
||||
|
||||
# Run the resource compiler (rcc_options should already be set)
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT ${trans_outfile}
|
||||
COMMAND ${QT_RCC_EXECUTABLE}
|
||||
ARGS ${rcc_options} -name ${trans_file} -o ${trans_outfile} ${trans_infile}
|
||||
MAIN_DEPENDENCY ${trans_infile}
|
||||
DEPENDS ${QM_FILES}
|
||||
)
|
||||
endmacro()
|
||||
|
||||
|
@@ -141,6 +141,10 @@
|
||||
<file>data/images/process-stop.png</file>
|
||||
<file>data/icons/tomahawk-icon-128x128-grayscale.png</file>
|
||||
<file>data/images/collection.png</file>
|
||||
<file>data/misc/tomahawk_pubkey.pem</file>
|
||||
<file>data/misc/tomahawk_pubkey.pem</file>
|
||||
<file>data/images/track-icon-sidebar.png</file>
|
||||
<file>data/images/jump-link.png</file>
|
||||
<file>data/images/scrollbar-vertical-handle.png</file>
|
||||
<file>data/images/scrollbar-horizontal-handle.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
@@ -28,13 +28,14 @@
|
||||
#include "playlist/PlaylistView.h"
|
||||
#include "database/Database.h"
|
||||
#include "widgets/ImageButton.h"
|
||||
#include "utils/TomahawkUtils.h"
|
||||
#include "utils/TomahawkUtilsGui.h"
|
||||
#include "utils/Logger.h"
|
||||
#include "Album.h"
|
||||
#include "DropJob.h"
|
||||
#include "SocialWidget.h"
|
||||
#include "GlobalActionManager.h"
|
||||
#include "ViewManager.h"
|
||||
#include "Source.h"
|
||||
|
||||
using namespace Tomahawk;
|
||||
|
||||
@@ -53,13 +54,10 @@ AudioControls::AudioControls( QWidget* parent )
|
||||
QFont font( ui->artistTrackLabel->font() );
|
||||
font.setPixelSize( 12 );
|
||||
|
||||
#ifdef Q_WS_MAC
|
||||
font.setPixelSize( font.pixelSize() - 2 );
|
||||
#endif
|
||||
|
||||
ui->artistTrackLabel->setFont( font );
|
||||
ui->artistTrackLabel->setElideMode( Qt::ElideMiddle );
|
||||
ui->artistTrackLabel->setType( QueryLabel::ArtistAndTrack );
|
||||
ui->artistTrackLabel->setJumpLinkVisible( true );
|
||||
|
||||
ui->albumLabel->setFont( font );
|
||||
ui->albumLabel->setType( QueryLabel::Album );
|
||||
@@ -88,6 +86,9 @@ AudioControls::AudioControls( QWidget* parent )
|
||||
ui->loveButton->setPixmap( RESPATH "images/not-loved.png" );
|
||||
ui->loveButton->setCheckable( true );
|
||||
|
||||
ui->socialButton->setFixedSize( QSize( 20, 20 ) );
|
||||
ui->loveButton->setFixedSize( QSize( 20, 20 ) );
|
||||
|
||||
#ifdef Q_WS_MAC
|
||||
ui->ownerLabel->setForegroundRole( QPalette::Text );
|
||||
#else
|
||||
@@ -351,7 +352,7 @@ AudioControls::onPlaybackStopped()
|
||||
ui->ownerLabel->setText( "" );
|
||||
ui->timeLabel->setText( "" );
|
||||
ui->timeLeftLabel->setText( "" );
|
||||
ui->coverImage->setPixmap( QPixmap(), true );
|
||||
ui->coverImage->setPixmap( QPixmap(), false );
|
||||
ui->seekSlider->setVisible( false );
|
||||
m_sliderTimeLine.stop();
|
||||
m_sliderTimeLine.setCurrentTime( 0 );
|
||||
@@ -545,7 +546,6 @@ void
|
||||
AudioControls::onTrackClicked()
|
||||
{
|
||||
ViewManager::instance()->show( m_currentTrack->toQuery() );
|
||||
// ViewManager::instance()->showCurrentTrack();
|
||||
}
|
||||
|
||||
|
||||
@@ -588,7 +588,7 @@ AudioControls::droppedTracks( QList< query_ptr > tracks )
|
||||
{
|
||||
// queue and play the first no matter what
|
||||
GlobalActionManager::instance()->handlePlayTrack( tracks.first() );
|
||||
ViewManager::instance()->queue()->model()->append( tracks );
|
||||
ViewManager::instance()->queue()->model()->appendQueries( tracks );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -596,10 +596,13 @@ AudioControls::droppedTracks( QList< query_ptr > tracks )
|
||||
void
|
||||
AudioControls::onSocialButtonClicked()
|
||||
{
|
||||
SocialWidget* sw = new SocialWidget( m_parent );
|
||||
sw->setPosition( QCursor::pos() );
|
||||
sw->setQuery( m_currentTrack->toQuery() );
|
||||
sw->show();
|
||||
if ( !m_socialWidget.isNull() )
|
||||
return;
|
||||
|
||||
m_socialWidget = new SocialWidget( m_parent );
|
||||
m_socialWidget.data()->setPosition( m_socialWidget.data()->mapFromGlobal( QCursor::pos() ) );
|
||||
m_socialWidget.data()->setQuery( m_currentTrack->toQuery() );
|
||||
m_socialWidget.data()->show();
|
||||
}
|
||||
|
||||
|
||||
|
@@ -31,6 +31,7 @@
|
||||
class QDropEvent;
|
||||
class QDragEnterEvent;
|
||||
class QDragMoveEvent;
|
||||
class SocialWidget;
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
@@ -91,6 +92,8 @@ private:
|
||||
void setSocialActions();
|
||||
|
||||
Ui::AudioControls* ui;
|
||||
|
||||
QWeakPointer<SocialWidget> m_socialWidget;
|
||||
|
||||
Tomahawk::result_ptr m_currentTrack;
|
||||
Tomahawk::PlaylistModes::RepeatMode m_repeatMode;
|
||||
|
@@ -177,6 +177,9 @@
|
||||
<property name="bottomMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2" stretch="1,0,0">
|
||||
<property name="topMargin">
|
||||
@@ -185,6 +188,12 @@
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="trackLabelLayout">
|
||||
<property name="topMargin">
|
||||
@@ -193,6 +202,15 @@
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QueryLabel" name="artistTrackLabel">
|
||||
<property name="sizePolicy">
|
||||
@@ -207,9 +225,6 @@
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="cursor">
|
||||
<cursorShape>PointingHandCursor</cursorShape>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Artist</string>
|
||||
</property>
|
||||
@@ -229,9 +244,6 @@
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="cursor">
|
||||
<cursorShape>PointingHandCursor</cursorShape>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Album</string>
|
||||
</property>
|
||||
@@ -356,6 +368,15 @@
|
||||
<property name="leftMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="timeLabel">
|
||||
<property name="text">
|
||||
@@ -432,6 +453,9 @@
|
||||
<property name="rightMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
|
@@ -13,8 +13,6 @@ 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 )
|
||||
|
||||
@@ -68,27 +66,13 @@ SET( tomahawkSourcesGui ${tomahawkSourcesGui}
|
||||
sourcetree/items/GroupItem.cpp
|
||||
sourcetree/items/HistoryItem.cpp
|
||||
|
||||
utils/GuiHelpers.cpp
|
||||
|
||||
accounts/lastfm/LastFmAccount.cpp
|
||||
accounts/lastfm/LastFmConfig.cpp
|
||||
accounts/lastfm/LastFmInfoPlugin.cpp
|
||||
|
||||
accounts/spotify/SpotifyAccount.cpp
|
||||
accounts/spotify/SpotifyAccountConfig.cpp
|
||||
accounts/spotify/SpotifyPlaylistUpdater.cpp
|
||||
|
||||
TomahawkTrayIcon.cpp
|
||||
AudioControls.cpp
|
||||
SettingsDialog.cpp
|
||||
DiagnosticsDialog.cpp
|
||||
AccountDelegate.cpp
|
||||
SettingsListDelegate.cpp
|
||||
DelegateConfigWrapper.cpp
|
||||
TomahawkWindow.cpp
|
||||
LoadXSPFDialog.cpp
|
||||
AccountFactoryWrapper.cpp
|
||||
AccountFactoryWrapperDelegate.cpp
|
||||
SocialWidget.cpp
|
||||
)
|
||||
|
||||
@@ -102,19 +86,14 @@ SET( tomahawkUI ${tomahawkUI}
|
||||
StackedSettingsDialog.ui
|
||||
ProxyDialog.ui
|
||||
|
||||
accounts/lastfm/LastFmConfig.ui
|
||||
accounts/spotify/SpotifyAccountConfig.ui
|
||||
|
||||
AudioControls.ui
|
||||
LoadXSPFDialog.ui
|
||||
AccountFactoryWrapper.ui
|
||||
SocialWidget.ui
|
||||
)
|
||||
|
||||
INCLUDE_DIRECTORIES(
|
||||
.
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_BINARY_DIR}/thirdparty/liblastfm2/src
|
||||
|
||||
audio
|
||||
database
|
||||
@@ -122,7 +101,6 @@ INCLUDE_DIRECTORIES(
|
||||
network
|
||||
sourcetree
|
||||
topbar
|
||||
utils
|
||||
libtomahawk
|
||||
mac
|
||||
|
||||
@@ -137,6 +115,8 @@ INCLUDE_DIRECTORIES(
|
||||
${LIBATTICA_INCLUDE_DIR}
|
||||
${LIBECHONEST_INCLUDE_DIR}
|
||||
${LIBECHONEST_INCLUDE_DIR}/..
|
||||
${LIBLASTFM_INCLUDE_DIRS}
|
||||
${LIBLASTFM_INCLUDE_DIRS}/..
|
||||
)
|
||||
|
||||
SET( OS_SPECIFIC_LINK_LIBRARIES "" )
|
||||
@@ -149,16 +129,13 @@ IF( UNIX )
|
||||
ENDIF( UNIX )
|
||||
|
||||
IF( APPLE )
|
||||
SET( CMAKE_LINKER_FLAGS "-headerpad_max_install_names ${CMAKE_LINKER_FLAGS}" )
|
||||
|
||||
INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/thirdparty/SPMediaKeyTap )
|
||||
|
||||
SET( tomahawkSources ${tomahawkSources} mac/TomahawkApp_Mac.mm mac/MacShortcutHandler.cpp )
|
||||
ENDIF( APPLE )
|
||||
|
||||
IF(GLOOX_FOUND)
|
||||
INCLUDE_DIRECTORIES( ${GLOOX_INCLUDE_DIR} )
|
||||
SET( tomahawkSources ${tomahawkSources} xmppbot/XmppBot.cpp )
|
||||
ENDIF(GLOOX_FOUND)
|
||||
|
||||
ADD_SUBDIRECTORY( accounts )
|
||||
ADD_SUBDIRECTORY( infoplugins )
|
||||
|
||||
@@ -170,7 +147,9 @@ INCLUDE(GNUInstallDirs)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Config.h.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/config.h)
|
||||
|
||||
# translations
|
||||
include( ${CMAKE_SOURCE_DIR}/lang/translations.cmake )
|
||||
add_tomahawk_translations(ar bg ca de en es fr ja pl pt_BR ru sv tr zh_CN zh_TW)
|
||||
|
||||
SET( final_src ${final_src} ${tomahawkMoc} ${tomahawkSources} ${trans_outfile})
|
||||
|
||||
@@ -205,16 +184,13 @@ MESSAGE( STATUS "OS_SPECIFIC_LINK_LIBRARIES: ${OS_SPECIFIC_LINK_LIBRARIES}" )
|
||||
|
||||
SET(LINK_LIBRARIES "")
|
||||
IF(LIBLASTFM_FOUND)
|
||||
SET(LINK_LIBRARIES ${LINK_LIBRARIES} tomahawk_lastfm2 )
|
||||
SET( LINK_LIBRARIES ${LINK_LIBRARIES} ${LIBLASTFM_LIBRARIES} )
|
||||
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} )
|
||||
SET( LINK_LIBRARIES ${LINK_LIBRARIES} ${QCA2_LIBRARIES} )
|
||||
ENDIF(QCA2_FOUND)
|
||||
IF(WITH_BREAKPAD)
|
||||
SET(LINK_LIBRARIES ${LINK_LIBRARIES} tomahawk_breakpad)
|
||||
SET( LINK_LIBRARIES ${LINK_LIBRARIES} tomahawk_breakpad )
|
||||
ENDIF()
|
||||
|
||||
TARGET_LINK_LIBRARIES( tomahawk
|
||||
|
@@ -19,9 +19,10 @@
|
||||
|
||||
#cmakedefine WITH_BREAKPAD
|
||||
#cmakedefine WITH_CRASHREPORTER
|
||||
#cmakedefine WITH_BINARY_ATTICA
|
||||
|
||||
|
||||
#cmakedefine LIBLASTFM_FOUND
|
||||
#cmakedefine GLOOX_FOUND
|
||||
#cmakedefine QCA2_FOUND
|
||||
|
||||
#endif // CONFIG_H_IN
|
||||
|
@@ -22,18 +22,21 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "accounts/AccountManager.h"
|
||||
#include "network/Servent.h"
|
||||
#include "SourceList.h"
|
||||
|
||||
#include <QLabel>
|
||||
#include <QTextEdit>
|
||||
#include <QDialogButtonBox>
|
||||
#include <QPushButton>
|
||||
#include <QApplication>
|
||||
#include <QClipboard>
|
||||
#include <QDebug>
|
||||
|
||||
#include "accounts/AccountManager.h"
|
||||
#include "network/Servent.h"
|
||||
#include "SourceList.h"
|
||||
|
||||
#include "utils/Logger.h"
|
||||
#include "sip/SipHandler.h"
|
||||
#include "utils/TomahawkUtilsGui.h"
|
||||
#include "utils/Logger.h"
|
||||
|
||||
|
||||
DiagnosticsDialog::DiagnosticsDialog( QWidget *parent )
|
||||
@@ -42,33 +45,24 @@ DiagnosticsDialog::DiagnosticsDialog( QWidget *parent )
|
||||
{
|
||||
ui->setupUi( this );
|
||||
|
||||
connect( ui->updateButton, SIGNAL( clicked() ), this, SLOT( updateLogView() ) );
|
||||
connect( ui->clipboardButton, SIGNAL( clicked() ), this, SLOT( copyToClipboard() ) );
|
||||
connect( ui->buttonBox, SIGNAL( rejected() ), this, SLOT( reject() ) );
|
||||
connect( ui->clipboardButton, SIGNAL( clicked() ), SLOT( copyToClipboard() ) );
|
||||
connect( ui->logfileButton, SIGNAL( clicked() ), SLOT( openLogfile() ) );
|
||||
connect( ui->buttonBox, SIGNAL( rejected() ), SLOT( reject() ) );
|
||||
|
||||
updateLogView();
|
||||
}
|
||||
|
||||
void DiagnosticsDialog::updateLogView()
|
||||
|
||||
void
|
||||
DiagnosticsDialog::updateLogView()
|
||||
{
|
||||
QString log;
|
||||
|
||||
log.append(
|
||||
QString("TOMAHAWK DIAGNOSTICS LOG -%1 \n\n")
|
||||
.arg( QDateTime::currentDateTime().toString() )
|
||||
);
|
||||
log.append( QString( "TOMAHAWK DIAGNOSTICS LOG -%1 \n\n" ).arg( QDateTime::currentDateTime().toString() ) );
|
||||
log.append( "TOMAHAWK-VERSION: " TOMAHAWK_VERSION "\n\n" );
|
||||
log.append( "NETWORK:\n General:\n" );
|
||||
|
||||
// network
|
||||
log.append(
|
||||
"TOMAHAWK-VERSION: " TOMAHAWK_VERSION "\n\n\n"
|
||||
);
|
||||
|
||||
// network
|
||||
log.append(
|
||||
"NETWORK:\n"
|
||||
" General:\n"
|
||||
);
|
||||
if( Servent::instance()->visibleExternally() )
|
||||
if ( Servent::instance()->visibleExternally() )
|
||||
{
|
||||
log.append(
|
||||
QString(
|
||||
@@ -83,17 +77,11 @@ void DiagnosticsDialog::updateLogView()
|
||||
}
|
||||
else
|
||||
{
|
||||
log.append(
|
||||
QString(
|
||||
" visible: false"
|
||||
)
|
||||
);
|
||||
log.append( " visible: false" );
|
||||
}
|
||||
log.append("\n\n");
|
||||
|
||||
log.append( "ACCOUNTS:\n" );
|
||||
|
||||
// Peers / Accounts, TODO
|
||||
log.append("ACCOUNTS:\n");
|
||||
const QList< Tomahawk::source_ptr > sources = SourceList::instance()->sources( true );
|
||||
const QList< Tomahawk::Accounts::Account* > accounts = Tomahawk::Accounts::AccountManager::instance()->accounts( Tomahawk::Accounts::SipType );
|
||||
foreach ( Tomahawk::Accounts::Account* account, accounts )
|
||||
@@ -102,79 +90,98 @@ void DiagnosticsDialog::updateLogView()
|
||||
if ( !account || !account->sipPlugin() )
|
||||
continue;
|
||||
|
||||
QString stateString;
|
||||
switch( account->connectionState() )
|
||||
{
|
||||
case Tomahawk::Accounts::Account::Connecting:
|
||||
stateString = "Connecting";
|
||||
break;
|
||||
case Tomahawk::Accounts::Account::Connected:
|
||||
stateString = "Connected";
|
||||
break;
|
||||
connect( account, SIGNAL( connectionStateChanged( Tomahawk::Accounts::Account::ConnectionState ) ), SLOT( updateLogView() ), Qt::UniqueConnection );
|
||||
connect( account, SIGNAL( error( int, QString ) ), SLOT( updateLogView() ), Qt::UniqueConnection );
|
||||
connect( account->sipPlugin(), SIGNAL( peerOnline( QString ) ), SLOT( updateLogView() ), Qt::UniqueConnection );
|
||||
connect( account->sipPlugin(), SIGNAL( peerOffline( QString ) ), SLOT( updateLogView() ), Qt::UniqueConnection );
|
||||
connect( account->sipPlugin(), SIGNAL( sipInfoReceived( QString, SipInfo ) ), SLOT( updateLogView() ), Qt::UniqueConnection );
|
||||
connect( account->sipPlugin(), SIGNAL( softwareVersionReceived( QString, QString ) ), SLOT( updateLogView() ), Qt::UniqueConnection );
|
||||
|
||||
case Tomahawk::Accounts::Account::Disconnected:
|
||||
stateString = "Disconnected";
|
||||
break;
|
||||
case Tomahawk::Accounts::Account::Disconnecting:
|
||||
stateString = "Disconnecting";
|
||||
}
|
||||
log.append(
|
||||
QString( " %2 (%1): %3 (%4)\n" )
|
||||
.arg( account->accountServiceName() )
|
||||
.arg( account->sipPlugin()->friendlyName() )
|
||||
.arg( account->accountFriendlyName())
|
||||
.arg( stateString )
|
||||
);
|
||||
|
||||
foreach( const QString &peerId, account->sipPlugin()->peersOnline() )
|
||||
{
|
||||
/* enable this again, when we check the Source.has this peerId
|
||||
bool connected = false;
|
||||
Q_FOREACH( const Tomahawk::source_ptr &source, sources )
|
||||
{
|
||||
if( source->controlConnection() )
|
||||
{
|
||||
connected = true;
|
||||
break;
|
||||
}
|
||||
}*/
|
||||
|
||||
QString versionString = SipHandler::instance()->versionString( peerId );
|
||||
SipInfo sipInfo = SipHandler::instance()->sipInfo( peerId );
|
||||
if( !sipInfo.isValid() )
|
||||
log.append(
|
||||
QString(" %1: %2 %3" /*"(%4)"*/ "\n")
|
||||
.arg( peerId )
|
||||
.arg( "sipinfo invalid" )
|
||||
.arg( versionString )
|
||||
// .arg( connected ? "connected" : "not connected")
|
||||
);
|
||||
else if( sipInfo.isVisible() )
|
||||
log.append(
|
||||
QString(" %1: %2:%3 %4" /*" (%5)"*/ "\n")
|
||||
.arg( peerId )
|
||||
.arg( sipInfo.host().hostName() )
|
||||
.arg( sipInfo.port() )
|
||||
.arg( versionString )
|
||||
// .arg( connected ? "connected" : "not connected")
|
||||
|
||||
);
|
||||
else
|
||||
log.append(
|
||||
QString(" %1: visible: false %2" /*" (%3)"*/ "\n")
|
||||
.arg( peerId )
|
||||
.arg( versionString )
|
||||
// .arg( connected ? "connected" : "not connected")
|
||||
|
||||
);
|
||||
}
|
||||
log.append("\n");
|
||||
log.append( accountLog( account ) + "\n" );
|
||||
}
|
||||
ui->logView->setPlainText(log);
|
||||
|
||||
ui->text->setText( log );
|
||||
}
|
||||
|
||||
void DiagnosticsDialog::copyToClipboard()
|
||||
|
||||
void
|
||||
DiagnosticsDialog::copyToClipboard()
|
||||
{
|
||||
QApplication::clipboard()->setText( ui->logView->toPlainText() );
|
||||
QApplication::clipboard()->setText( ui->text->toPlainText() );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
DiagnosticsDialog::openLogfile()
|
||||
{
|
||||
TomahawkUtils::openUrl( Logger::logFile() );
|
||||
}
|
||||
|
||||
|
||||
QString
|
||||
DiagnosticsDialog::accountLog( Tomahawk::Accounts::Account* account )
|
||||
{
|
||||
QString accountInfo;
|
||||
QString stateString;
|
||||
switch( account->connectionState() )
|
||||
{
|
||||
case Tomahawk::Accounts::Account::Connecting:
|
||||
stateString = "Connecting";
|
||||
break;
|
||||
case Tomahawk::Accounts::Account::Connected:
|
||||
stateString = "Connected";
|
||||
break;
|
||||
|
||||
case Tomahawk::Accounts::Account::Disconnected:
|
||||
stateString = "Disconnected";
|
||||
break;
|
||||
case Tomahawk::Accounts::Account::Disconnecting:
|
||||
stateString = "Disconnecting";
|
||||
}
|
||||
accountInfo.append(
|
||||
QString( " %2 (%1): %3 (%4)\n" )
|
||||
.arg( account->accountServiceName() )
|
||||
.arg( account->sipPlugin()->friendlyName() )
|
||||
.arg( account->accountFriendlyName())
|
||||
.arg( stateString )
|
||||
);
|
||||
|
||||
foreach( const QString& peerId, account->sipPlugin()->peersOnline() )
|
||||
{
|
||||
QString versionString = SipHandler::instance()->versionString( peerId );
|
||||
SipInfo sipInfo = SipHandler::instance()->sipInfo( peerId );
|
||||
if ( !sipInfo.isValid() )
|
||||
{
|
||||
accountInfo.append(
|
||||
QString(" %1: %2 %3" /*"(%4)"*/ "\n")
|
||||
.arg( peerId )
|
||||
.arg( "sipinfo invalid" )
|
||||
.arg( versionString )
|
||||
// .arg( connected ? "connected" : "not connected")
|
||||
);
|
||||
}
|
||||
else if ( sipInfo.isVisible() )
|
||||
{
|
||||
accountInfo.append(
|
||||
QString(" %1: %2:%3 %4" /*" (%5)"*/ "\n")
|
||||
.arg( peerId )
|
||||
.arg( sipInfo.host() )
|
||||
.arg( sipInfo.port() )
|
||||
.arg( versionString )
|
||||
// .arg( connected ? "connected" : "not connected")
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
accountInfo.append(
|
||||
QString(" %1: visible: false %2" /*" (%3)"*/ "\n")
|
||||
.arg( peerId )
|
||||
.arg( versionString )
|
||||
// .arg( connected ? "connected" : "not connected")
|
||||
);
|
||||
}
|
||||
}
|
||||
accountInfo.append( "\n" );
|
||||
|
||||
return accountInfo;
|
||||
}
|
@@ -19,7 +19,15 @@
|
||||
#ifndef DIGANOSTICSDIALOG_H
|
||||
#define DIAGNOSTICSDIALOG_H
|
||||
|
||||
#include "accounts/Account.h"
|
||||
|
||||
#include <QDialog>
|
||||
#include <QMap>
|
||||
|
||||
|
||||
class QLabel;
|
||||
|
||||
class SipInfo;
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
@@ -37,6 +45,9 @@ public:
|
||||
private slots:
|
||||
void updateLogView();
|
||||
void copyToClipboard();
|
||||
void openLogfile();
|
||||
|
||||
QString accountLog( Tomahawk::Accounts::Account* );
|
||||
|
||||
private:
|
||||
Ui::DiagnosticsDialog* ui;
|
||||
|
@@ -26,23 +26,27 @@
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QTextEdit" name="logView"/>
|
||||
<widget class="QTextBrowser" name="text">
|
||||
<property name="lineWrapMode">
|
||||
<enum>QTextEdit::NoWrap</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QPushButton" name="updateButton">
|
||||
<widget class="QPushButton" name="clipboardButton">
|
||||
<property name="text">
|
||||
<string>Update</string>
|
||||
<string>&Copy to Clipboard</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="clipboardButton">
|
||||
<widget class="QPushButton" name="logfileButton">
|
||||
<property name="text">
|
||||
<string>Copy to Clipboard</string>
|
||||
<string>Open &Log-file</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@@ -106,15 +106,17 @@ MusicScanner::MusicScanner( const QStringList& dirs, quint32 bs )
|
||||
, m_batchsize( bs )
|
||||
, m_dirListerThreadController( 0 )
|
||||
{
|
||||
m_ext2mime.insert( "mp3", TomahawkUtils::extensionToMimetype( "mp3" ) );
|
||||
m_ext2mime.insert( "ogg", TomahawkUtils::extensionToMimetype( "ogg" ) );
|
||||
m_ext2mime.insert( "oga", TomahawkUtils::extensionToMimetype( "oga" ) );
|
||||
m_ext2mime.insert( "mpc", TomahawkUtils::extensionToMimetype( "mpc" ) );
|
||||
m_ext2mime.insert( "wma", TomahawkUtils::extensionToMimetype( "wma" ) );
|
||||
m_ext2mime.insert( "aac", TomahawkUtils::extensionToMimetype( "aac" ) );
|
||||
m_ext2mime.insert( "m4a", TomahawkUtils::extensionToMimetype( "m4a" ) );
|
||||
m_ext2mime.insert( "mp4", TomahawkUtils::extensionToMimetype( "mp4" ) );
|
||||
m_ext2mime.insert( "mp3", TomahawkUtils::extensionToMimetype( "mp3" ) );
|
||||
m_ext2mime.insert( "ogg", TomahawkUtils::extensionToMimetype( "ogg" ) );
|
||||
m_ext2mime.insert( "oga", TomahawkUtils::extensionToMimetype( "oga" ) );
|
||||
m_ext2mime.insert( "mpc", TomahawkUtils::extensionToMimetype( "mpc" ) );
|
||||
m_ext2mime.insert( "wma", TomahawkUtils::extensionToMimetype( "wma" ) );
|
||||
m_ext2mime.insert( "aac", TomahawkUtils::extensionToMimetype( "aac" ) );
|
||||
m_ext2mime.insert( "m4a", TomahawkUtils::extensionToMimetype( "m4a" ) );
|
||||
m_ext2mime.insert( "mp4", TomahawkUtils::extensionToMimetype( "mp4" ) );
|
||||
m_ext2mime.insert( "flac", TomahawkUtils::extensionToMimetype( "flac" ) );
|
||||
m_ext2mime.insert( "aiff", TomahawkUtils::extensionToMimetype( "aiff" ) );
|
||||
m_ext2mime.insert( "aif", TomahawkUtils::extensionToMimetype( "aif" ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -199,18 +201,17 @@ MusicScanner::listerFinished()
|
||||
foreach( const QString& key, m_filemtimes.keys() )
|
||||
m_filesToDelete << m_filemtimes[ key ].keys().first();
|
||||
|
||||
tDebug() << "Lister finished: to delete:" << m_filesToDelete;
|
||||
tDebug( LOGINFO ) << "Scanning complete, saving to database. ( deleted" << m_filesToDelete.count() << "- scanned" << m_scanned << "- skipped" << m_skipped << ")";
|
||||
tDebug( LOGEXTRA ) << "Skipped the following files (no tags / no valid audio):";
|
||||
foreach ( const QString& s, m_skippedFiles )
|
||||
tDebug( LOGEXTRA ) << s;
|
||||
|
||||
if ( m_filesToDelete.length() || m_scannedfiles.length() )
|
||||
{
|
||||
SourceList::instance()->getLocal()->updateIndexWhenSynced();
|
||||
commitBatch( m_scannedfiles, m_filesToDelete );
|
||||
m_scannedfiles.clear();
|
||||
m_filesToDelete.clear();
|
||||
|
||||
tDebug( LOGINFO ) << "Scanning complete, saving to database. ( scanned" << m_scanned << "skipped" << m_skipped << ")";
|
||||
tDebug( LOGEXTRA ) << "Skipped the following files (no tags / no valid audio):";
|
||||
foreach ( const QString& s, m_skippedFiles )
|
||||
tDebug( LOGEXTRA ) << s;
|
||||
}
|
||||
else
|
||||
cleanup();
|
||||
@@ -287,7 +288,7 @@ MusicScanner::scanFile( const QFileInfo& fi )
|
||||
m_filemtimes.remove( "file://" + fi.canonicalFilePath() );
|
||||
}
|
||||
|
||||
tDebug( LOGVERBOSE ) << Q_FUNC_INFO << "Scanning file:" << fi.canonicalFilePath();
|
||||
//tDebug( LOGVERBOSE ) << Q_FUNC_INFO << "Scanning file:" << fi.canonicalFilePath();
|
||||
QVariant m = readFile( fi );
|
||||
if ( m.toMap().isEmpty() )
|
||||
return;
|
||||
@@ -337,7 +338,6 @@ MusicScanner::readFile( const QFileInfo& fi )
|
||||
int duration = 0;
|
||||
|
||||
Tag *tag = Tag::fromFile( f );
|
||||
|
||||
if ( f.audioProperties() )
|
||||
{
|
||||
TagLib::AudioProperties *properties = f.audioProperties();
|
||||
@@ -345,10 +345,14 @@ MusicScanner::readFile( const QFileInfo& fi )
|
||||
bitrate = properties->bitrate();
|
||||
}
|
||||
|
||||
QString artist = tag->artist().trimmed();
|
||||
QString album = tag->album().trimmed();
|
||||
QString track = tag->title().trimmed();
|
||||
if ( artist.isEmpty() || track.isEmpty() )
|
||||
QString artist, album, track;
|
||||
if ( tag )
|
||||
{
|
||||
artist = tag->artist().trimmed();
|
||||
album = tag->album().trimmed();
|
||||
track = tag->title().trimmed();
|
||||
}
|
||||
if ( !tag || artist.isEmpty() || track.isEmpty() )
|
||||
{
|
||||
// FIXME: do some clever filename guessing
|
||||
m_skippedFiles << fi.canonicalFilePath();
|
||||
|
@@ -1,117 +0,0 @@
|
||||
/* === 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
|
||||
* 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 "JobStatusView.h"
|
||||
|
||||
#include <QHeaderView>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
#include "libtomahawk/Pipeline.h"
|
||||
|
||||
#include "utils/Logger.h"
|
||||
|
||||
using namespace Tomahawk;
|
||||
|
||||
|
||||
JobStatusView::JobStatusView( AnimatedSplitter* parent )
|
||||
: AnimatedWidget( parent )
|
||||
, m_parent( parent )
|
||||
{
|
||||
setHiddenSize( QSize( 0, 0 ) );
|
||||
setLayout( new QVBoxLayout() );
|
||||
m_tree = new QTreeWidget( this );
|
||||
|
||||
layout()->setMargin( 0 );
|
||||
layout()->addWidget( m_tree );
|
||||
|
||||
QStringList headers;
|
||||
headers << tr( "Searching For" ) << tr( "Pending" );
|
||||
m_tree->setHeaderLabels( headers );
|
||||
|
||||
m_tree->setHorizontalScrollBarPolicy( Qt::ScrollBarAlwaysOff );
|
||||
m_tree->setSizePolicy( QSizePolicy::Preferred, QSizePolicy::Ignored );
|
||||
m_tree->setColumnCount( 2 );
|
||||
m_tree->setColumnWidth( 0, 200 );
|
||||
m_tree->setColumnWidth( 1, 50 );
|
||||
|
||||
m_tree->header()->setStretchLastSection( true );
|
||||
m_tree->setRootIsDecorated( false );
|
||||
|
||||
m_tree->setFrameShape( QFrame::NoFrame );
|
||||
m_tree->setAttribute( Qt::WA_MacShowFocusRect, 0 );
|
||||
|
||||
new QTreeWidgetItem( m_tree );
|
||||
|
||||
connect( Pipeline::instance(), SIGNAL( resolving( Tomahawk::query_ptr ) ), SLOT( onPipelineUpdate( Tomahawk::query_ptr ) ) );
|
||||
connect( Pipeline::instance(), SIGNAL( idle() ), SLOT( onPipelineUpdate() ) );
|
||||
|
||||
#ifndef Q_WS_WIN
|
||||
QFont f = font();
|
||||
f.setPointSize( f.pointSize() - 1 );
|
||||
setFont( f );
|
||||
#endif
|
||||
|
||||
#ifdef Q_WS_MAC
|
||||
f.setPointSize( f.pointSize() - 2 );
|
||||
setFont( f );
|
||||
#endif
|
||||
|
||||
onPipelineUpdate();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
JobStatusView::onPipelineUpdate( const query_ptr& query )
|
||||
{
|
||||
QTreeWidgetItem* ti = m_tree->invisibleRootItem()->child( 0 );
|
||||
|
||||
if ( Pipeline::instance()->activeQueryCount() && !query.isNull() )
|
||||
{
|
||||
ti->setText( 0, QString( "%1 - %2" ).arg( query->artist() ).arg( query->track() ) );
|
||||
ti->setText( 1, QString( "%1" ).arg( Pipeline::instance()->activeQueryCount() + Pipeline::instance()->pendingQueryCount() ) );
|
||||
|
||||
if ( isHidden() )
|
||||
emit showWidget();
|
||||
}
|
||||
else
|
||||
{
|
||||
ti->setText( 0, tr( "Idle" ) );
|
||||
ti->setText( 1, QString( "None" ) );
|
||||
|
||||
if ( !isHidden() )
|
||||
emit hideWidget();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
QSize
|
||||
JobStatusView::sizeHint() const
|
||||
{
|
||||
unsigned int y = 0;
|
||||
y += m_tree->header()->height();
|
||||
y += m_tree->contentsMargins().top() + m_tree->contentsMargins().bottom();
|
||||
|
||||
if ( m_tree->invisibleRootItem()->childCount() )
|
||||
{
|
||||
unsigned int rowheight = m_tree->sizeHintForRow( 0 );
|
||||
y += rowheight * m_tree->invisibleRootItem()->childCount() + 2;
|
||||
}
|
||||
|
||||
return QSize( 0, y );
|
||||
}
|
@@ -1,51 +0,0 @@
|
||||
/* === 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
|
||||
* 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 JOBSTATUSVIEW_H
|
||||
#define JOBSTATUSVIEW_H
|
||||
|
||||
#include <QTreeWidget>
|
||||
|
||||
#include "Typedefs.h"
|
||||
#include "widgets/AnimatedSplitter.h"
|
||||
#include "Query.h"
|
||||
|
||||
class StreamConnection;
|
||||
|
||||
class JobStatusView : public AnimatedWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit JobStatusView( AnimatedSplitter* parent );
|
||||
virtual ~JobStatusView()
|
||||
{
|
||||
}
|
||||
|
||||
QSize sizeHint() const;
|
||||
|
||||
private slots:
|
||||
void onPipelineUpdate( const Tomahawk::query_ptr& query = Tomahawk::query_ptr() );
|
||||
|
||||
private:
|
||||
QTreeView* m_tree;
|
||||
AnimatedSplitter* m_parent;
|
||||
};
|
||||
|
||||
#endif // JOBSTATUSVIEW_H
|
@@ -44,8 +44,8 @@ Scrobbler::Scrobbler( QObject* parent )
|
||||
SLOT( engineTick( unsigned int ) ), Qt::QueuedConnection );
|
||||
|
||||
connect( Tomahawk::InfoSystem::InfoSystem::instance(),
|
||||
SIGNAL( info( Tomahawk::InfoSystem::InfoRequestData, QVariant ) ),
|
||||
SLOT( infoSystemInfo( Tomahawk::InfoSystem::InfoRequestData, QVariant ) ) );
|
||||
SIGNAL( info( Tomahawk::InfoSystem::InfoRequestData, QVariant ) ),
|
||||
SLOT( infoSystemInfo( Tomahawk::InfoSystem::InfoRequestData, QVariant ) ) );
|
||||
|
||||
connect( AudioEngine::instance(), SIGNAL( started( const Tomahawk::result_ptr& ) ),
|
||||
SLOT( trackStarted( const Tomahawk::result_ptr& ) ), Qt::QueuedConnection );
|
||||
@@ -72,16 +72,13 @@ void
|
||||
Scrobbler::trackStarted( const Tomahawk::result_ptr& track )
|
||||
{
|
||||
Q_ASSERT( QThread::currentThread() == thread() );
|
||||
// qDebug() << Q_FUNC_INFO;
|
||||
|
||||
if( m_reachedScrobblePoint )
|
||||
if ( m_reachedScrobblePoint )
|
||||
{
|
||||
m_reachedScrobblePoint = false;
|
||||
scrobble();
|
||||
}
|
||||
|
||||
QVariantMap playInfo;
|
||||
|
||||
Tomahawk::InfoSystem::InfoStringHash trackInfo;
|
||||
trackInfo["title"] = track->track();
|
||||
trackInfo["artist"] = track->artist()->name();
|
||||
@@ -89,6 +86,7 @@ Scrobbler::trackStarted( const Tomahawk::result_ptr& track )
|
||||
trackInfo["duration"] = QString::number( track->duration() );
|
||||
trackInfo["albumpos"] = QString::number( track->albumpos() );
|
||||
|
||||
QVariantMap playInfo;
|
||||
playInfo["trackinfo"] = QVariant::fromValue< Tomahawk::InfoSystem::InfoStringHash >( trackInfo );
|
||||
playInfo["private"] = TomahawkSettings::instance()->privateListeningMode();
|
||||
|
||||
@@ -101,9 +99,9 @@ Scrobbler::trackStarted( const Tomahawk::result_ptr& track )
|
||||
|
||||
// liblastfm forces 0-length tracks to scrobble after 4 minutes, stupid.
|
||||
if ( track->duration() == 0 )
|
||||
m_scrobblePoint = ScrobblePoint( 30 );
|
||||
m_scrobblePoint = lastfm::ScrobblePoint( 30 );
|
||||
else
|
||||
m_scrobblePoint = ScrobblePoint( track->duration() / 2 );
|
||||
m_scrobblePoint = lastfm::ScrobblePoint( track->duration() / 2 );
|
||||
}
|
||||
|
||||
|
||||
@@ -126,7 +124,7 @@ Scrobbler::trackStopped()
|
||||
{
|
||||
Q_ASSERT( QThread::currentThread() == thread() );
|
||||
|
||||
if( m_reachedScrobblePoint )
|
||||
if ( m_reachedScrobblePoint )
|
||||
{
|
||||
m_reachedScrobblePoint = false;
|
||||
scrobble();
|
||||
|
@@ -20,7 +20,7 @@
|
||||
#ifndef TOMAHAWK_SCROBBLER_H
|
||||
#define TOMAHAWK_SCROBBLER_H
|
||||
|
||||
#include "lastfm/ScrobblePoint"
|
||||
#include "lastfm/ScrobblePoint.h"
|
||||
#include "Result.h"
|
||||
#include "infosystem/InfoSystem.h"
|
||||
|
||||
@@ -51,7 +51,7 @@ private:
|
||||
void scrobble();
|
||||
|
||||
bool m_reachedScrobblePoint;
|
||||
ScrobblePoint m_scrobblePoint;
|
||||
lastfm::ScrobblePoint m_scrobblePoint;
|
||||
};
|
||||
|
||||
|
||||
|
@@ -30,18 +30,19 @@
|
||||
#include <QtGui/QSizeGrip>
|
||||
|
||||
#include "AtticaManager.h"
|
||||
#include "AclRegistry.h"
|
||||
#include "TomahawkApp.h"
|
||||
#include "TomahawkSettings.h"
|
||||
#include "DelegateConfigWrapper.h"
|
||||
#include "accounts/DelegateConfigWrapper.h"
|
||||
#include "MusicScanner.h"
|
||||
#include "Pipeline.h"
|
||||
#include "Resolver.h"
|
||||
#include "ExternalResolverGui.h"
|
||||
#include "utils/TomahawkUtilsGui.h"
|
||||
#include "GuiHelpers.h"
|
||||
#include "utils/GuiHelpers.h"
|
||||
#include "ScanManager.h"
|
||||
#include "SettingsListDelegate.h"
|
||||
#include "AccountDelegate.h"
|
||||
#include "accounts/AccountDelegate.h"
|
||||
#include "database/Database.h"
|
||||
#include "network/Servent.h"
|
||||
#include "utils/AnimatedSpinner.h"
|
||||
@@ -51,7 +52,7 @@
|
||||
#include <accounts/AccountModelFilterProxy.h>
|
||||
#include <accounts/ResolverAccount.h>
|
||||
#include "utils/Logger.h"
|
||||
#include "AccountFactoryWrapper.h"
|
||||
#include "accounts/AccountFactoryWrapper.h"
|
||||
#include "accounts/spotify/SpotifyAccount.h"
|
||||
|
||||
#include "ui_ProxyDialog.h"
|
||||
@@ -98,6 +99,8 @@ SettingsDialog::SettingsDialog( QWidget *parent )
|
||||
ui->enableProxyCheckBox->setChecked( useProxy );
|
||||
ui->proxyButton->setEnabled( useProxy );
|
||||
|
||||
ui->aclEntryClearButton->setEnabled( TomahawkSettings::instance()->aclEntries().size() > 0 );
|
||||
connect( ui->aclEntryClearButton, SIGNAL( clicked( bool ) ), this, SLOT( aclEntryClearButtonClicked() ) );
|
||||
|
||||
createIcons();
|
||||
#ifdef Q_WS_X11
|
||||
@@ -497,6 +500,24 @@ SettingsDialog::installFromFile()
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
SettingsDialog::aclEntryClearButtonClicked()
|
||||
{
|
||||
QMessageBox::StandardButton button = QMessageBox::question(
|
||||
ui->stackedWidget,
|
||||
tr( "Delete all Access Control entries?" ),
|
||||
tr( "Do you really want to delete all Access Control entries? You will be asked for a decision again for each peer that you connect to." ),
|
||||
QMessageBox::Ok | QMessageBox::Cancel,
|
||||
QMessageBox::Ok
|
||||
);
|
||||
if ( button == QMessageBox::Ok )
|
||||
{
|
||||
ACLRegistry::instance()->wipeEntries();
|
||||
ui->aclEntryClearButton->setEnabled( false );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
SettingsDialog::scrollTo( const QModelIndex& idx )
|
||||
{
|
||||
|
@@ -97,6 +97,8 @@ private slots:
|
||||
void changePage( QListWidgetItem*, QListWidgetItem* );
|
||||
void serventReady();
|
||||
|
||||
void aclEntryClearButtonClicked();
|
||||
|
||||
void requiresRestart();
|
||||
|
||||
private:
|
||||
|
@@ -30,7 +30,7 @@
|
||||
#define CORNER_ROUNDNESS 8.0
|
||||
#define FADING_DURATION 500
|
||||
#define FONT_SIZE 16
|
||||
#define OPACITY 0.70
|
||||
#define OPACITY 0.85
|
||||
|
||||
|
||||
SocialWidget::SocialWidget( QWidget* parent )
|
||||
@@ -54,18 +54,24 @@ SocialWidget::SocialWidget( QWidget* parent )
|
||||
setFont( f );
|
||||
#endif
|
||||
|
||||
ui->charsLeftLabel->setForegroundRole( QPalette::HighlightedText );
|
||||
|
||||
ui->charsLeftLabel->setForegroundRole( QPalette::BrightText );
|
||||
|
||||
ui->buttonBox->button( QDialogButtonBox::Ok )->setText( tr( "Tweet" ) );
|
||||
|
||||
m_parent->installEventFilter( this );
|
||||
|
||||
connect( ui->buttonBox, SIGNAL( accepted() ), SLOT( accept() ) );
|
||||
connect( ui->buttonBox, SIGNAL( rejected() ), SLOT( deleteLater() ) );
|
||||
connect( ui->buttonBox, SIGNAL( rejected() ), SLOT( close() ) );
|
||||
connect( ui->textEdit, SIGNAL( textChanged() ), SLOT( onChanged() ) );
|
||||
connect( ui->facebookButton, SIGNAL( clicked( bool ) ), SLOT( onChanged() ) );
|
||||
connect( ui->twitterButton, SIGNAL( clicked( bool ) ), SLOT( onChanged() ) );
|
||||
connect( GlobalActionManager::instance(), SIGNAL( shortLinkReady( QUrl, QUrl, QVariant ) ), SLOT( onShortLinkReady( QUrl, QUrl, QVariant ) ) );
|
||||
|
||||
onChanged();
|
||||
|
||||
ui->twitterButton->setChecked( true );
|
||||
ui->twitterButton->setVisible( false );
|
||||
ui->facebookButton->setVisible( false );
|
||||
}
|
||||
|
||||
|
||||
@@ -83,6 +89,7 @@ SocialWidget::setOpacity( qreal opacity )
|
||||
if ( m_opacity == 0.00 && !isHidden() )
|
||||
{
|
||||
QWidget::hide();
|
||||
emit hidden();
|
||||
}
|
||||
else if ( m_opacity > 0.00 && isHidden() )
|
||||
{
|
||||
@@ -197,9 +204,9 @@ SocialWidget::onShortLinkReady( const QUrl& longUrl, const QUrl& shortUrl, const
|
||||
Q_UNUSED( callbackObj );
|
||||
|
||||
if ( m_query->album().isEmpty() )
|
||||
ui->textEdit->setText( tr( "Listening to \"%1\" by %2 and loving it! %3" ).arg( m_query->track() ).arg( m_query->artist() ).arg( shortUrl.toString() ) );
|
||||
ui->textEdit->setText( tr( "Listening to \"%1\" by %2. %3" ).arg( m_query->track() ).arg( m_query->artist() ).arg( shortUrl.toString() ) );
|
||||
else
|
||||
ui->textEdit->setText( tr( "Listening to \"%1\" by %2 on \"%3\" and loving it! %4" ).arg( m_query->track() ).arg( m_query->artist() ).arg( m_query->album() ).arg( shortUrl.toString() ) );
|
||||
ui->textEdit->setText( tr( "Listening to \"%1\" by %2 on \"%3\". %4" ).arg( m_query->track() ).arg( m_query->artist() ).arg( m_query->album() ).arg( shortUrl.toString() ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -229,7 +236,29 @@ void
|
||||
SocialWidget::accept()
|
||||
{
|
||||
tDebug() << "Sharing social link!";
|
||||
|
||||
QVariantMap shareInfo;
|
||||
Tomahawk::InfoSystem::InfoStringHash trackInfo;
|
||||
|
||||
trackInfo["title"] = m_query->track();
|
||||
trackInfo["artist"] = m_query->artist();
|
||||
trackInfo["album"] = m_query->album();
|
||||
|
||||
shareInfo["trackinfo"] = QVariant::fromValue< Tomahawk::InfoSystem::InfoStringHash >( trackInfo );
|
||||
shareInfo["message"] = ui->textEdit->toPlainText();
|
||||
shareInfo["accountlist"] = QStringList( "all" );
|
||||
|
||||
Tomahawk::InfoSystem::InfoPushData pushData( uuid(), Tomahawk::InfoSystem::InfoShareTrack, shareInfo, Tomahawk::InfoSystem::PushNoFlag );
|
||||
Tomahawk::InfoSystem::InfoSystem::instance()->pushInfo( pushData );
|
||||
|
||||
deleteLater();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
SocialWidget::close()
|
||||
{
|
||||
QWidget::hide();
|
||||
deleteLater();
|
||||
}
|
||||
|
||||
|
@@ -50,6 +50,9 @@ public:
|
||||
|
||||
bool shown() const;
|
||||
|
||||
signals:
|
||||
void hidden();
|
||||
|
||||
public slots:
|
||||
void show( int timeoutSecs = 0 );
|
||||
void hide();
|
||||
@@ -65,6 +68,7 @@ private slots:
|
||||
void onShortLinkReady( const QUrl& longUrl, const QUrl& shortUrl, const QVariant& callbackObj );
|
||||
|
||||
void onGeometryUpdate();
|
||||
void close();
|
||||
|
||||
private:
|
||||
unsigned int charsAvailable() const;
|
||||
|
@@ -418,6 +418,30 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="aclEntryClearLayout">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="aclEntryClearButton">
|
||||
<property name="text">
|
||||
<string>Clear All Access Control Entries</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
@@ -29,6 +29,7 @@
|
||||
#include <QtNetwork/QNetworkReply>
|
||||
#include <QtCore/QFile>
|
||||
#include <QtCore/QFileInfo>
|
||||
#include <QTranslator>
|
||||
|
||||
#include "Artist.h"
|
||||
#include "Album.h"
|
||||
@@ -83,11 +84,6 @@
|
||||
#include <TomahawkSettingsGui.h>
|
||||
#endif
|
||||
|
||||
// should go to a plugin actually
|
||||
#ifdef GLOOX_FOUND
|
||||
#include "xmppbot/XmppBot.h"
|
||||
#endif
|
||||
|
||||
#ifdef Q_WS_MAC
|
||||
#include "mac/MacShortcutHandler.h"
|
||||
|
||||
@@ -125,6 +121,9 @@ using namespace Tomahawk;
|
||||
|
||||
TomahawkApp::TomahawkApp( int& argc, char *argv[] )
|
||||
: TOMAHAWK_APPLICATION( argc, argv )
|
||||
#ifndef ENABLE_HEADLESS
|
||||
, m_mainwindow( 0 )
|
||||
#endif
|
||||
, m_headless( false )
|
||||
, m_loaded( false )
|
||||
{
|
||||
@@ -134,6 +133,43 @@ TomahawkApp::TomahawkApp( int& argc, char *argv[] )
|
||||
setApplicationVersion( QLatin1String( TOMAHAWK_VERSION ) );
|
||||
|
||||
registerMetaTypes();
|
||||
installTranslator();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
TomahawkApp::installTranslator()
|
||||
{
|
||||
QString locale = QLocale::system().name();
|
||||
if ( locale == "C" )
|
||||
locale = "en";
|
||||
|
||||
// Tomahawk translations
|
||||
QTranslator* translator = new QTranslator( this );
|
||||
if ( translator->load( QString( ":/lang/tomahawk_" ) + locale ) )
|
||||
{
|
||||
tDebug() << "Translation: Tomahawk: Using system locale:" << locale;
|
||||
}
|
||||
else
|
||||
{
|
||||
tDebug() << "Translation: Tomahawk: Using default locale, system locale one not found:" << locale;
|
||||
translator->load( QString( ":/lang/tomahawk_en" ) );
|
||||
}
|
||||
|
||||
TOMAHAWK_APPLICATION::installTranslator( translator );
|
||||
|
||||
// Qt translations
|
||||
translator = new QTranslator( this );
|
||||
if ( translator->load( QString( ":/lang/qt_" ) + locale ) )
|
||||
{
|
||||
tDebug() << "Translation: Qt: Using system locale:" << locale;
|
||||
}
|
||||
else
|
||||
{
|
||||
tDebug() << "Translation: Qt: Using default locale, system locale one not found:" << locale;
|
||||
}
|
||||
|
||||
TOMAHAWK_APPLICATION::installTranslator( translator );
|
||||
}
|
||||
|
||||
|
||||
@@ -155,7 +191,6 @@ TomahawkApp::init()
|
||||
#ifdef ENABLE_HEADLESS
|
||||
m_headless = true;
|
||||
#else
|
||||
m_mainwindow = 0;
|
||||
m_headless = arguments().contains( "--headless" );
|
||||
setWindowIcon( QIcon( RESPATH "icons/tomahawk-icon-128x128.png" ) );
|
||||
setQuitOnLastWindowClosed( false );
|
||||
@@ -166,6 +201,8 @@ TomahawkApp::init()
|
||||
TomahawkUtils::setHeaderHeight( fm.height() + 8 );
|
||||
#endif
|
||||
|
||||
TomahawkUtils::setHeadless( m_headless );
|
||||
|
||||
TomahawkSettings* s = TomahawkSettings::instance();
|
||||
|
||||
tDebug( LOGINFO ) << "Setting NAM.";
|
||||
@@ -173,11 +210,18 @@ TomahawkApp::init()
|
||||
Q_UNUSED( TomahawkUtils::nam() );
|
||||
|
||||
m_audioEngine = QWeakPointer<AudioEngine>( new AudioEngine );
|
||||
m_scanManager = QWeakPointer<ScanManager>( new ScanManager( this ) );
|
||||
|
||||
// init pipeline and resolver factories
|
||||
new Pipeline();
|
||||
|
||||
m_servent = QWeakPointer<Servent>( new Servent( this ) );
|
||||
connect( m_servent.data(), SIGNAL( ready() ), SLOT( initSIP() ) );
|
||||
|
||||
tDebug() << "Init Database.";
|
||||
initDatabase();
|
||||
|
||||
m_scanManager = QWeakPointer<ScanManager>( new ScanManager( this ) );
|
||||
|
||||
#ifndef ENABLE_HEADLESS
|
||||
Pipeline::instance()->addExternalResolverFactory( boost::bind( &QtScriptResolver::factory, _1 ) );
|
||||
Pipeline::instance()->addExternalResolverFactory( boost::bind( &ScriptResolver::factory, _1 ) );
|
||||
@@ -186,12 +230,6 @@ TomahawkApp::init()
|
||||
connect( ActionCollection::instance()->getAction( "quit" ), SIGNAL( triggered() ), SLOT( quit() ), Qt::UniqueConnection );
|
||||
#endif
|
||||
|
||||
m_servent = QWeakPointer<Servent>( new Servent( this ) );
|
||||
connect( m_servent.data(), SIGNAL( ready() ), SLOT( initSIP() ) );
|
||||
|
||||
tDebug() << "Init Database.";
|
||||
initDatabase();
|
||||
|
||||
QByteArray magic = QByteArray::fromBase64( enApiSecret );
|
||||
QByteArray wand = QByteArray::fromBase64( QCoreApplication::applicationName().toLatin1() );
|
||||
int length = magic.length(), n2 = wand.length();
|
||||
@@ -309,9 +347,9 @@ TomahawkApp::init()
|
||||
connect( r, SIGNAL( finished() ), this, SLOT( spotifyApiCheckFinished() ) );
|
||||
#endif
|
||||
|
||||
#ifdef Q_WS_MAC
|
||||
#ifdef Q_OS_MAC
|
||||
// Make sure to do this after main window is inited
|
||||
Tomahawk::enableFullscreen();
|
||||
Tomahawk::enableFullscreen( m_mainwindow );
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -322,34 +360,48 @@ TomahawkApp::~TomahawkApp()
|
||||
|
||||
if ( !m_session.isNull() )
|
||||
delete m_session.data();
|
||||
tLog() << "Deleting connector";
|
||||
if ( !m_connector.isNull() )
|
||||
delete m_connector.data();
|
||||
|
||||
Pipeline::instance()->stop();
|
||||
tLog() << "Stopping pipeline";
|
||||
if ( Pipeline::instance() )
|
||||
Pipeline::instance()->stop();
|
||||
|
||||
tLog() << "Deleting servent";
|
||||
if ( !m_servent.isNull() )
|
||||
delete m_servent.data();
|
||||
tLog() << "Deleting ScanManager";
|
||||
if ( !m_scanManager.isNull() )
|
||||
delete m_scanManager.data();
|
||||
|
||||
tLog() << "Deleting AudioEngine";
|
||||
if ( !m_audioEngine.isNull() )
|
||||
delete m_audioEngine.data();
|
||||
|
||||
tLog() << "Deleting AccountManager";
|
||||
delete Tomahawk::Accounts::AccountManager::instance();
|
||||
delete TomahawkUtils::Cache::instance();
|
||||
|
||||
#ifndef ENABLE_HEADLESS
|
||||
delete m_mainwindow;
|
||||
tLog() << "Deleting AtticaManager";
|
||||
delete AtticaManager::instance();
|
||||
tLog() << "Deleting Window";
|
||||
delete m_mainwindow;
|
||||
#endif
|
||||
|
||||
tLog() << "Deleting database";
|
||||
if ( !m_database.isNull() )
|
||||
delete m_database.data();
|
||||
|
||||
tLog() << "Deleting Pipeline";
|
||||
delete Pipeline::instance();
|
||||
|
||||
tLog() << "Deleting InfoSystem";
|
||||
if ( !m_infoSystem.isNull() )
|
||||
delete m_infoSystem.data();
|
||||
|
||||
tLog() << "Deleting Cache";
|
||||
delete TomahawkUtils::Cache::instance();
|
||||
|
||||
tLog() << "Finished shutdown.";
|
||||
}
|
||||
@@ -426,6 +478,7 @@ TomahawkApp::registerMetaTypes()
|
||||
qRegisterMetaType<Tomahawk::ModelMode>("Tomahawk::ModelMode");
|
||||
|
||||
// Extra definition for namespaced-versions of signals/slots required
|
||||
qRegisterMetaType< Tomahawk::Resolver* >("Tomahawk::Resolver*");
|
||||
qRegisterMetaType< Tomahawk::source_ptr >("Tomahawk::source_ptr");
|
||||
qRegisterMetaType< Tomahawk::collection_ptr >("Tomahawk::collection_ptr");
|
||||
qRegisterMetaType< Tomahawk::result_ptr >("Tomahawk::result_ptr");
|
||||
@@ -593,10 +646,6 @@ TomahawkApp::initSIP()
|
||||
//FIXME: jabber autoconnect is really more, now that there is sip -- should be renamed and/or split out of jabber-specific settings
|
||||
if ( !arguments().contains( "--nosip" ) )
|
||||
{
|
||||
#ifdef GLOOX_FOUND
|
||||
m_xmppBot = QWeakPointer<XMPPBot>( new XMPPBot( this ) );
|
||||
#endif
|
||||
|
||||
tDebug( LOGINFO ) << "Connecting SIP classes";
|
||||
Accounts::AccountManager::instance()->initSIP();
|
||||
}
|
||||
|
@@ -64,7 +64,7 @@ namespace Tomahawk
|
||||
}
|
||||
|
||||
#ifdef LIBLASTFM_FOUND
|
||||
#include <lastfm/NetworkAccessManager>
|
||||
#include <lastfm/NetworkAccessManager.h>
|
||||
#include "Scrobbler.h"
|
||||
#endif
|
||||
|
||||
@@ -98,7 +98,7 @@ public:
|
||||
virtual bool loadUrl( const QString& url );
|
||||
|
||||
bool isTomahawkLoaded() const { return m_loaded; }
|
||||
|
||||
|
||||
signals:
|
||||
void tomahawkLoaded();
|
||||
|
||||
@@ -115,6 +115,7 @@ private slots:
|
||||
void accountManagerReady();
|
||||
|
||||
private:
|
||||
void installTranslator();
|
||||
void registerMetaTypes();
|
||||
|
||||
void printHelp();
|
||||
|
@@ -40,8 +40,14 @@ TomahawkTrayIcon::TomahawkTrayIcon( QObject* parent )
|
||||
, m_currentAnimationFrame( 0 )
|
||||
, m_showWindowAction( 0 )
|
||||
, m_stopContinueAfterTrackAction( 0 )
|
||||
, m_loveTrackAction( 0 )
|
||||
{
|
||||
#ifdef Q_WS_MAC
|
||||
QIcon icon( RESPATH "icons/tomahawk-icon-128x128-grayscale.png" );
|
||||
#else
|
||||
QIcon icon( RESPATH "icons/tomahawk-icon-128x128.png" );
|
||||
#endif
|
||||
|
||||
setIcon( icon );
|
||||
|
||||
refreshToolTip();
|
||||
@@ -49,12 +55,14 @@ TomahawkTrayIcon::TomahawkTrayIcon( QObject* parent )
|
||||
m_contextMenu = new QMenu();
|
||||
setContextMenu( m_contextMenu );
|
||||
|
||||
m_loveTrackAction = new QAction( this );
|
||||
m_stopContinueAfterTrackAction = new QAction( this );
|
||||
onStopContinueAfterTrackChanged();
|
||||
|
||||
ActionCollection *ac = ActionCollection::instance();
|
||||
m_contextMenu->addAction( ac->getAction( "playPause" ) );
|
||||
m_contextMenu->addAction( ac->getAction( "stop" ) );
|
||||
m_contextMenu->addSeparator();
|
||||
m_contextMenu->addAction( m_loveTrackAction );
|
||||
m_contextMenu->addAction( m_stopContinueAfterTrackAction );
|
||||
m_contextMenu->addSeparator();
|
||||
m_contextMenu->addAction( ac->getAction( "previousTrack" ) );
|
||||
@@ -62,8 +70,6 @@ TomahawkTrayIcon::TomahawkTrayIcon( QObject* parent )
|
||||
m_contextMenu->addSeparator();
|
||||
m_contextMenu->addAction( ActionCollection::instance()->getAction( "togglePrivacy" ) );
|
||||
|
||||
connect( m_stopContinueAfterTrackAction, SIGNAL( triggered() ), SLOT( stopContinueAfterTrackActionTriggered() ) );
|
||||
|
||||
#ifdef Q_WS_MAC
|
||||
// On mac you can close the windows while leaving the app open. We then need a way to show the main window again
|
||||
m_contextMenu->addSeparator();
|
||||
@@ -77,6 +83,9 @@ TomahawkTrayIcon::TomahawkTrayIcon( QObject* parent )
|
||||
m_contextMenu->addSeparator();
|
||||
m_contextMenu->addAction( ac->getAction( "quit" ) );
|
||||
|
||||
connect( m_loveTrackAction, SIGNAL( triggered() ), SLOT( loveTrackTriggered() ) );
|
||||
connect( m_stopContinueAfterTrackAction, SIGNAL( triggered() ), SLOT( stopContinueAfterTrackActionTriggered() ) );
|
||||
|
||||
connect( AudioEngine::instance(), SIGNAL( loading( Tomahawk::result_ptr ) ), SLOT( setResult( Tomahawk::result_ptr ) ) );
|
||||
connect( AudioEngine::instance(), SIGNAL( started( Tomahawk::result_ptr ) ), SLOT( onPlay() ) );
|
||||
connect( AudioEngine::instance(), SIGNAL( resumed() ), SLOT( onResume() ) );
|
||||
@@ -87,6 +96,7 @@ TomahawkTrayIcon::TomahawkTrayIcon( QObject* parent )
|
||||
connect( &m_animationTimer, SIGNAL( timeout() ), SLOT( onAnimationTimer() ) );
|
||||
connect( this, SIGNAL( activated( QSystemTrayIcon::ActivationReason ) ), SLOT( onActivated( QSystemTrayIcon::ActivationReason ) ) );
|
||||
|
||||
onStop();
|
||||
show();
|
||||
}
|
||||
|
||||
@@ -146,8 +156,29 @@ TomahawkTrayIcon::menuAboutToShow()
|
||||
void
|
||||
TomahawkTrayIcon::setResult( const Tomahawk::result_ptr& result )
|
||||
{
|
||||
if ( m_currentTrack )
|
||||
{
|
||||
disconnect( m_currentTrack->toQuery().data(), SIGNAL( socialActionsLoaded() ), this, SLOT( onSocialActionsLoaded() ) );
|
||||
}
|
||||
|
||||
m_currentTrack = result;
|
||||
refreshToolTip();
|
||||
|
||||
if ( result )
|
||||
connect( result->toQuery().data(), SIGNAL( socialActionsLoaded() ), SLOT( onSocialActionsLoaded() ), Qt::UniqueConnection );
|
||||
|
||||
onSocialActionsLoaded();
|
||||
onStopContinueAfterTrackChanged();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
TomahawkTrayIcon::onStopContinueAfterTrackChanged()
|
||||
{
|
||||
if ( m_currentTrack && m_currentTrack->toQuery()->equals( AudioEngine::instance()->stopAfterTrack() ) )
|
||||
m_stopContinueAfterTrackAction->setText( tr( "&Continue Playback after current Track" ) );
|
||||
else
|
||||
m_stopContinueAfterTrackAction->setText( tr( "&Stop Playback after current Track" ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -235,16 +266,20 @@ TomahawkTrayIcon::onPause()
|
||||
void
|
||||
TomahawkTrayIcon::onPlay()
|
||||
{
|
||||
m_loveTrackAction->setEnabled( true );
|
||||
m_stopContinueAfterTrackAction->setEnabled( true );
|
||||
|
||||
onResume();
|
||||
onStopContinueAfterTrackChanged();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
TomahawkTrayIcon::onStop()
|
||||
{
|
||||
m_loveTrackAction->setEnabled( false );
|
||||
m_stopContinueAfterTrackAction->setEnabled( false );
|
||||
|
||||
setResult( Tomahawk::result_ptr() );
|
||||
onPause();
|
||||
}
|
||||
|
||||
@@ -257,26 +292,41 @@ TomahawkTrayIcon::onResume()
|
||||
|
||||
|
||||
void
|
||||
TomahawkTrayIcon::onStopContinueAfterTrackChanged()
|
||||
TomahawkTrayIcon::loveTrackTriggered()
|
||||
{
|
||||
if ( !AudioEngine::instance()->currentTrack().isNull() )
|
||||
{
|
||||
if ( AudioEngine::instance()->currentTrack()->toQuery()->equals( AudioEngine::instance()->stopAfterTrack() ) )
|
||||
m_stopContinueAfterTrackAction->setText( tr( "&Continue Playback after current Track" ) );
|
||||
else
|
||||
m_stopContinueAfterTrackAction->setText( tr( "&Stop Playback after current Track" ) );
|
||||
}
|
||||
if ( !m_currentTrack )
|
||||
return;
|
||||
|
||||
m_currentTrack->toQuery()->setLoved( !m_currentTrack->toQuery()->loved() );
|
||||
}
|
||||
|
||||
|
||||
void TomahawkTrayIcon::stopContinueAfterTrackActionTriggered()
|
||||
void
|
||||
TomahawkTrayIcon::stopContinueAfterTrackActionTriggered()
|
||||
{
|
||||
if ( !AudioEngine::instance()->currentTrack().isNull() )
|
||||
if ( !m_currentTrack )
|
||||
return;
|
||||
|
||||
if ( !m_currentTrack->toQuery()->equals( AudioEngine::instance()->stopAfterTrack() ) )
|
||||
AudioEngine::instance()->setStopAfterTrack( m_currentTrack->toQuery() );
|
||||
else
|
||||
AudioEngine::instance()->setStopAfterTrack( Tomahawk::query_ptr() );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
TomahawkTrayIcon::onSocialActionsLoaded()
|
||||
{
|
||||
m_loveTrackAction->setText( tr( "&Love" ) );
|
||||
m_loveTrackAction->setIcon( QIcon( RESPATH "images/loved.png" ) );
|
||||
|
||||
if ( !m_currentTrack )
|
||||
return;
|
||||
|
||||
if ( m_currentTrack->toQuery()->loved() )
|
||||
{
|
||||
if ( !AudioEngine::instance()->currentTrack()->toQuery()->equals( AudioEngine::instance()->stopAfterTrack() ) )
|
||||
AudioEngine::instance()->setStopAfterTrack( AudioEngine::instance()->currentTrack()->toQuery() );
|
||||
else
|
||||
AudioEngine::instance()->setStopAfterTrack( Tomahawk::query_ptr() );
|
||||
m_loveTrackAction->setText( tr( "Un-&Love" ) );
|
||||
m_loveTrackAction->setIcon( QIcon( RESPATH "images/not-loved.png" ) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -302,4 +352,3 @@ TomahawkTrayIcon::event( QEvent* e )
|
||||
|
||||
return QSystemTrayIcon::event( e );
|
||||
}
|
||||
|
||||
|
@@ -49,10 +49,13 @@ private slots:
|
||||
void onStop();
|
||||
void onResume();
|
||||
|
||||
void onSocialActionsLoaded();
|
||||
void onStopContinueAfterTrackChanged();
|
||||
void stopContinueAfterTrackActionTriggered();
|
||||
void loveTrackTriggered();
|
||||
|
||||
void menuAboutToShow();
|
||||
|
||||
private:
|
||||
void refreshToolTip();
|
||||
~TomahawkTrayIcon();
|
||||
@@ -67,6 +70,7 @@ private:
|
||||
|
||||
QAction* m_showWindowAction;
|
||||
QAction* m_stopContinueAfterTrackAction;
|
||||
QAction* m_loveTrackAction;
|
||||
};
|
||||
|
||||
#endif // TOMAHAWK_TRAYICON_H
|
||||
|
@@ -23,6 +23,7 @@
|
||||
|
||||
#include <QAction>
|
||||
#include <QCloseEvent>
|
||||
#include <QDesktopServices>
|
||||
#include <QShowEvent>
|
||||
#include <QHideEvent>
|
||||
#include <QInputDialog>
|
||||
@@ -35,14 +36,12 @@
|
||||
#include <QTimer>
|
||||
#include <QToolBar>
|
||||
|
||||
#include "Playlist.h"
|
||||
#include "Query.h"
|
||||
#include "Artist.h"
|
||||
#include "ViewManager.h"
|
||||
#include "accounts/AccountManager.h"
|
||||
#include "sourcetree/SourceTreeView.h"
|
||||
#include "network/Servent.h"
|
||||
#include "utils/TomahawkUtilsGui.h"
|
||||
#include "utils/ProxyStyle.h"
|
||||
#include "utils/WidgetDragFilter.h"
|
||||
#include "widgets/AnimatedSplitter.h"
|
||||
#include "widgets/NewPlaylistWidget.h"
|
||||
#include "widgets/SearchWidget.h"
|
||||
@@ -52,27 +51,31 @@
|
||||
#include "playlist/PlaylistModel.h"
|
||||
#include "playlist/PlaylistView.h"
|
||||
#include "playlist/QueueView.h"
|
||||
#include "jobview/JobStatusView.h"
|
||||
#include "jobview/JobStatusModel.h"
|
||||
#include "jobview/ErrorStatusMessage.h"
|
||||
#include "jobview/JobStatusModel.h"
|
||||
|
||||
#include "Playlist.h"
|
||||
#include "Query.h"
|
||||
#include "Artist.h"
|
||||
#include "ViewManager.h"
|
||||
#include "ActionCollection.h"
|
||||
#include "AudioControls.h"
|
||||
#include "SettingsDialog.h"
|
||||
#include "DiagnosticsDialog.h"
|
||||
#include "TomahawkSettings.h"
|
||||
#include "SourceList.h"
|
||||
#include "jobview/JobStatusView.h"
|
||||
#include "jobview/JobStatusModel.h"
|
||||
#include "jobview/ErrorStatusMessage.h"
|
||||
#include "TomahawkTrayIcon.h"
|
||||
#include "ScanManager.h"
|
||||
#include "TomahawkApp.h"
|
||||
#include "LoadXSPFDialog.h"
|
||||
|
||||
#ifdef Q_WS_WIN
|
||||
#include <qtsparkle/Updater>
|
||||
#endif
|
||||
|
||||
#include "utils/Logger.h"
|
||||
#include "jobview/JobStatusModel.h"
|
||||
#include "LoadXSPFDialog.h"
|
||||
#include <ActionCollection.h>
|
||||
|
||||
using namespace Tomahawk;
|
||||
using namespace Accounts;
|
||||
@@ -118,6 +121,8 @@ TomahawkWindow::TomahawkWindow( QWidget* parent )
|
||||
|
||||
// set initial state
|
||||
onAccountDisconnected();
|
||||
audioStopped();
|
||||
|
||||
vm->setQueue( m_queueView );
|
||||
vm->showWelcomePage();
|
||||
}
|
||||
@@ -156,11 +161,12 @@ TomahawkWindow::loadSettings()
|
||||
restoreState( s->mainWindowState() );
|
||||
if ( !s->mainWindowSplitterState().isEmpty() )
|
||||
ui->splitter->restoreState( s->mainWindowSplitterState() );
|
||||
else
|
||||
{
|
||||
ui->splitter->setStretchFactor( 0, 0 );
|
||||
ui->splitter->setStretchFactor( 1, 1 );
|
||||
}
|
||||
|
||||
// Always set stretch factor. If user hasn't manually set splitter sizes,
|
||||
// this will ensure a sane default on all startups. If the user has, the manual
|
||||
// size will override the default stretching
|
||||
ui->splitter->setStretchFactor( 0, 0 );
|
||||
ui->splitter->setStretchFactor( 1, 1 );
|
||||
|
||||
#ifdef QT_MAC_USE_COCOA
|
||||
if ( workaround )
|
||||
@@ -191,7 +197,7 @@ TomahawkWindow::applyPlatformTweaks()
|
||||
if ( !QString( qApp->style()->metaObject()->className() ).toLower().contains( "qtcurve" ) )
|
||||
qApp->setStyle( new ProxyStyle() );
|
||||
|
||||
#ifdef Q_WS_MAC
|
||||
#ifdef Q_OS_MAC
|
||||
setUnifiedTitleAndToolBarOnMac( true );
|
||||
delete ui->hline1;
|
||||
delete ui->hline2;
|
||||
@@ -211,7 +217,12 @@ TomahawkWindow::setupToolBar()
|
||||
toolbar->setFloatable( false );
|
||||
toolbar->setIconSize( QSize( 22, 22 ) );
|
||||
toolbar->setToolButtonStyle( Qt::ToolButtonIconOnly );
|
||||
|
||||
toolbar->setStyleSheet( "border-bottom: 0px" );
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
toolbar->installEventFilter( new WidgetDragFilter( toolbar ) );
|
||||
#endif
|
||||
|
||||
m_backAction = toolbar->addAction( QIcon( RESPATH "images/back.png" ), tr( "Back" ), ViewManager::instance(), SLOT( historyBack() ) );
|
||||
m_backAction->setToolTip( tr( "Go back one page" ) );
|
||||
m_forwardAction = toolbar->addAction( QIcon( RESPATH "images/forward.png" ), tr( "Forward" ), ViewManager::instance(), SLOT( historyForward() ) );
|
||||
@@ -251,10 +262,6 @@ TomahawkWindow::setupSideBar()
|
||||
jobsView->setModel( m_jobsModel );
|
||||
|
||||
m_queueView = new QueueView( m_sidebar );
|
||||
m_queueModel = new PlaylistModel( m_queueView );
|
||||
m_queueModel->setStyle( PlaylistModel::Short );
|
||||
m_queueView->queue()->setPlaylistModel( m_queueModel );
|
||||
m_queueView->queue()->playlistModel()->setReadOnly( false );
|
||||
AudioEngine::instance()->setQueue( m_queueView->queue()->proxyModel()->playlistInterface() );
|
||||
|
||||
m_sidebar->addWidget( m_sourcetree );
|
||||
@@ -271,7 +278,7 @@ TomahawkWindow::setupSideBar()
|
||||
sidebarWidget->layout()->setContentsMargins( 0, 0, 0, 0 );
|
||||
sidebarWidget->layout()->setMargin( 0 );
|
||||
|
||||
#ifndef Q_WS_MAC
|
||||
#ifndef Q_OS_MAC
|
||||
sidebarWidget->layout()->setSpacing( 0 );
|
||||
#endif
|
||||
|
||||
@@ -286,11 +293,11 @@ TomahawkWindow::setupSideBar()
|
||||
void
|
||||
TomahawkWindow::setupUpdateCheck()
|
||||
{
|
||||
#ifndef Q_WS_MAC
|
||||
#ifndef Q_OS_MAC
|
||||
ui->menu_Help->insertSeparator( ui->actionAboutTomahawk );
|
||||
#endif
|
||||
|
||||
#if defined( Q_WS_MAC ) && defined( HAVE_SPARKLE )
|
||||
#if defined( Q_OS_MAC ) && defined( HAVE_SPARKLE )
|
||||
QAction* checkForUpdates = ui->menu_Help->addAction( tr( "Check For Updates..." ) );
|
||||
checkForUpdates->setMenuRole( QAction::ApplicationSpecificRole );
|
||||
connect( checkForUpdates, SIGNAL( triggered( bool ) ), SLOT( checkForUpdates() ) );
|
||||
@@ -328,13 +335,14 @@ TomahawkWindow::setupSignals()
|
||||
connect( AudioEngine::instance(), SIGNAL( loading( const Tomahawk::result_ptr& ) ), SLOT( onPlaybackLoading( const Tomahawk::result_ptr& ) ) );
|
||||
connect( AudioEngine::instance(), SIGNAL( started( Tomahawk::result_ptr ) ), SLOT( audioStarted() ) );
|
||||
connect( AudioEngine::instance(), SIGNAL( resumed()), SLOT( audioStarted() ) );
|
||||
connect( AudioEngine::instance(), SIGNAL( paused() ), SLOT( audioStopped() ) );
|
||||
connect( AudioEngine::instance(), SIGNAL( paused() ), SLOT( audioPaused() ) );
|
||||
connect( AudioEngine::instance(), SIGNAL( stopped() ), SLOT( audioStopped() ) );
|
||||
|
||||
// <Menu Items>
|
||||
// connect( ui->actionAddPeerManually, SIGNAL( triggered() ), SLOT( addPeerManually() ) );
|
||||
connect( ui->actionPreferences, SIGNAL( triggered() ), SLOT( showSettingsDialog() ) );
|
||||
connect( ui->actionDiagnostics, SIGNAL( triggered() ), SLOT( showDiagnosticsDialog() ) );
|
||||
connect( ui->actionLegalInfo, SIGNAL( triggered() ), SLOT( legalInfo() ) );
|
||||
connect( ui->actionToggleConnect, SIGNAL( triggered() ), AccountManager::instance(), SLOT( toggleAccountsConnected() ) );
|
||||
connect( ui->actionUpdateCollection, SIGNAL( triggered() ), SLOT( updateCollectionManually() ) );
|
||||
connect( ui->actionRescanCollection, SIGNAL( triggered() ), SLOT( rescanCollectionManually() ) );
|
||||
@@ -349,7 +357,7 @@ TomahawkWindow::setupSignals()
|
||||
connect( ui->actionNext, SIGNAL( triggered() ), AudioEngine::instance(), SLOT( next() ) );
|
||||
connect( ui->actionPrevious, SIGNAL( triggered() ), AudioEngine::instance(), SLOT( previous() ) );
|
||||
|
||||
#if defined( Q_WS_MAC )
|
||||
#if defined( Q_OS_MAC )
|
||||
connect( ui->actionMinimize, SIGNAL( triggered() ), SLOT( minimize() ) );
|
||||
connect( ui->actionZoom, SIGNAL( triggered() ), SLOT( maximize() ) );
|
||||
#else
|
||||
@@ -398,7 +406,7 @@ TomahawkWindow::changeEvent( QEvent* e )
|
||||
void
|
||||
TomahawkWindow::closeEvent( QCloseEvent* e )
|
||||
{
|
||||
#ifndef Q_WS_MAC
|
||||
#ifndef Q_OS_MAC
|
||||
if ( e->spontaneous() && QSystemTrayIcon::isSystemTrayAvailable() )
|
||||
{
|
||||
hide();
|
||||
@@ -418,7 +426,7 @@ TomahawkWindow::showEvent( QShowEvent* e )
|
||||
{
|
||||
QMainWindow::showEvent( e );
|
||||
|
||||
#if defined( Q_WS_MAC )
|
||||
#if defined( Q_OS_MAC )
|
||||
ui->actionMinimize->setDisabled( false );
|
||||
ui->actionZoom->setDisabled( false );
|
||||
#endif
|
||||
@@ -430,7 +438,7 @@ TomahawkWindow::hideEvent( QHideEvent* e )
|
||||
{
|
||||
QMainWindow::hideEvent( e );
|
||||
|
||||
#if defined( Q_WS_MAC )
|
||||
#if defined( Q_OS_MAC )
|
||||
ui->actionMinimize->setDisabled( true );
|
||||
ui->actionZoom->setDisabled( true );
|
||||
#endif
|
||||
@@ -441,7 +449,7 @@ void
|
||||
TomahawkWindow::keyPressEvent( QKeyEvent* e )
|
||||
{
|
||||
bool accept = true;
|
||||
#if ! defined ( Q_WS_MAC )
|
||||
#if ! defined ( Q_OS_MAC )
|
||||
#define KEY_PRESSED Q_FUNC_INFO << "Multimedia Key Pressed:"
|
||||
switch( e->key() )
|
||||
{
|
||||
@@ -506,13 +514,21 @@ TomahawkWindow::showSettingsDialog()
|
||||
}
|
||||
|
||||
|
||||
void TomahawkWindow::showDiagnosticsDialog()
|
||||
void
|
||||
TomahawkWindow::showDiagnosticsDialog()
|
||||
{
|
||||
DiagnosticsDialog win;
|
||||
win.exec();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
TomahawkWindow::legalInfo()
|
||||
{
|
||||
QDesktopServices::openUrl( QUrl( "http://www.tomahawk-player.org/legal.html" ) );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
TomahawkWindow::updateCollectionManually()
|
||||
{
|
||||
@@ -589,11 +605,25 @@ TomahawkWindow::showOfflineSources()
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
TomahawkWindow::fullScreenEntered()
|
||||
{
|
||||
statusBar()->setSizeGripEnabled( false );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
TomahawkWindow::fullScreenExited()
|
||||
{
|
||||
statusBar()->setSizeGripEnabled( true );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
TomahawkWindow::loadSpiff()
|
||||
{
|
||||
LoadXSPFDialog* diag = new LoadXSPFDialog( this, Qt::Sheet );
|
||||
#ifdef Q_WS_MAC
|
||||
#ifdef Q_OS_MAC
|
||||
connect( diag, SIGNAL( finished( int ) ), this, SLOT( loadXspfFinished( int ) ) );
|
||||
diag->show();
|
||||
#else
|
||||
@@ -679,18 +709,18 @@ TomahawkWindow::onAudioEngineError( AudioEngine::AudioErrorCode /* error */ )
|
||||
void
|
||||
TomahawkWindow::createAutomaticPlaylist( QString playlistName )
|
||||
{
|
||||
QString name = playlistName;
|
||||
|
||||
if ( name.isEmpty() )
|
||||
if ( playlistName.isEmpty() )
|
||||
return;
|
||||
|
||||
source_ptr author = SourceList::instance()->getLocal();
|
||||
QString id = uuid();
|
||||
QString info = ""; // FIXME
|
||||
QString creator = "someone"; // FIXME
|
||||
dynplaylist_ptr playlist = DynamicPlaylist::create( author, id, name, info, creator, Static, false );
|
||||
|
||||
dynplaylist_ptr playlist = DynamicPlaylist::create( author, id, playlistName, info, creator, Static, false );
|
||||
playlist->setMode( Static );
|
||||
playlist->createNewRevision( uuid(), playlist->currentrevision(), playlist->type(), playlist->generator()->controls(), playlist->entries() );
|
||||
|
||||
ViewManager::instance()->show( playlist );
|
||||
}
|
||||
|
||||
@@ -698,18 +728,36 @@ TomahawkWindow::createAutomaticPlaylist( QString playlistName )
|
||||
void
|
||||
TomahawkWindow::createStation()
|
||||
{
|
||||
QString title = tr( "Station" );
|
||||
bool ok;
|
||||
QString name = QInputDialog::getText( this, tr( "Create New Station" ), tr( "Name:" ), QLineEdit::Normal, tr( "New Station" ), &ok );
|
||||
if ( !ok || name.isEmpty() )
|
||||
QString playlistName = QInputDialog( this, Qt::Sheet ).getText( this, tr( "Create New Station" ), tr( "Name:" ), QLineEdit::Normal, title, &ok );
|
||||
if ( !ok )
|
||||
return;
|
||||
|
||||
if ( playlistName.isEmpty() || playlistName == title )
|
||||
{
|
||||
QList< dynplaylist_ptr > pls = SourceList::instance()->getLocal()->collection()->stations();
|
||||
QStringList titles;
|
||||
foreach ( const playlist_ptr& pl, pls )
|
||||
titles << pl->title();
|
||||
|
||||
playlistName = title;
|
||||
int i = 2;
|
||||
while ( titles.contains( playlistName ) )
|
||||
{
|
||||
playlistName = QString( "%1 (%2)" ).arg( title ).arg( i++ );
|
||||
}
|
||||
}
|
||||
|
||||
source_ptr author = SourceList::instance()->getLocal();
|
||||
QString id = uuid();
|
||||
QString info = ""; // FIXME
|
||||
QString creator = "someone"; // FIXME
|
||||
dynplaylist_ptr playlist = DynamicPlaylist::create( author, id, name, info, creator, OnDemand, false );
|
||||
|
||||
dynplaylist_ptr playlist = DynamicPlaylist::create( author, id, playlistName, info, creator, OnDemand, false );
|
||||
playlist->setMode( OnDemand );
|
||||
playlist->createNewRevision( uuid(), playlist->currentrevision(), playlist->type(), playlist->generator()->controls() );
|
||||
|
||||
ViewManager::instance()->show( playlist );
|
||||
}
|
||||
|
||||
@@ -718,11 +766,12 @@ void
|
||||
TomahawkWindow::createPlaylist()
|
||||
{
|
||||
PlaylistTypeSelectorDlg* playlistSelectorDlg = new PlaylistTypeSelectorDlg( TomahawkApp::instance()->mainWindow(), Qt::Sheet );
|
||||
#ifndef Q_WS_MAC
|
||||
|
||||
#ifndef Q_OS_MAC
|
||||
playlistSelectorDlg->setModal( true );
|
||||
#endif
|
||||
connect( playlistSelectorDlg, SIGNAL( finished( int ) ), this, SLOT( playlistCreateDialogFinished( int ) ) );
|
||||
|
||||
connect( playlistSelectorDlg, SIGNAL( finished( int ) ), SLOT( playlistCreateDialogFinished( int ) ) );
|
||||
playlistSelectorDlg->show();
|
||||
}
|
||||
|
||||
@@ -734,17 +783,50 @@ TomahawkWindow::playlistCreateDialogFinished( int ret )
|
||||
Q_ASSERT( playlistSelectorDlg );
|
||||
|
||||
QString playlistName = playlistSelectorDlg->playlistName();
|
||||
if ( playlistName.isEmpty() )
|
||||
playlistName = tr( "New Playlist" );
|
||||
|
||||
if ( !playlistSelectorDlg->playlistTypeIsAuto() && ret ) {
|
||||
if ( !playlistSelectorDlg->playlistTypeIsAuto() && ret )
|
||||
{
|
||||
if ( playlistName.isEmpty() )
|
||||
{
|
||||
QList< playlist_ptr > pls = SourceList::instance()->getLocal()->collection()->playlists();
|
||||
QStringList titles;
|
||||
foreach ( const playlist_ptr& pl, pls )
|
||||
titles << pl->title();
|
||||
|
||||
QString title = tr( "Playlist" );
|
||||
playlistName = title;
|
||||
int i = 2;
|
||||
while ( titles.contains( playlistName ) )
|
||||
{
|
||||
playlistName = QString( "%1 (%2)" ).arg( title ).arg( i++ );
|
||||
}
|
||||
}
|
||||
|
||||
playlist_ptr playlist = Tomahawk::Playlist::create( SourceList::instance()->getLocal(), uuid(), playlistName, "", "", false, QList< query_ptr>() );
|
||||
ViewManager::instance()->show( playlist );
|
||||
} else if ( playlistSelectorDlg->playlistTypeIsAuto() && ret ) {
|
||||
}
|
||||
else if ( playlistSelectorDlg->playlistTypeIsAuto() && ret )
|
||||
{
|
||||
// create Auto Playlist
|
||||
if ( playlistName.isEmpty() )
|
||||
{
|
||||
QList< dynplaylist_ptr > pls = SourceList::instance()->getLocal()->collection()->autoPlaylists();
|
||||
QStringList titles;
|
||||
foreach ( const dynplaylist_ptr& pl, pls )
|
||||
titles << pl->title();
|
||||
|
||||
QString title = tr( "Automatic Playlist" );
|
||||
playlistName = title;
|
||||
int i = 2;
|
||||
while ( titles.contains( playlistName ) )
|
||||
{
|
||||
playlistName = QString( "%1 (%2)" ).arg( title ).arg( i++ );
|
||||
}
|
||||
}
|
||||
|
||||
createAutomaticPlaylist( playlistName );
|
||||
}
|
||||
|
||||
playlistSelectorDlg->deleteLater();
|
||||
}
|
||||
|
||||
@@ -753,21 +835,27 @@ void
|
||||
TomahawkWindow::audioStarted()
|
||||
{
|
||||
m_audioRetryCounter = 0;
|
||||
|
||||
ui->actionPlay->setText( tr( "Pause" ) );
|
||||
ActionCollection::instance()->getAction( "stop" )->setEnabled( true );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
TomahawkWindow::audioPaused()
|
||||
{
|
||||
ui->actionPlay->setText( tr( "Play" ) );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
TomahawkWindow::audioStopped()
|
||||
{
|
||||
ui->actionPlay->setText( tr( "Play" ) );
|
||||
audioPaused();
|
||||
ActionCollection::instance()->getAction( "stop" )->setEnabled( false );
|
||||
|
||||
tDebug() << Q_FUNC_INFO << AudioEngine::instance()->isStopped();
|
||||
if ( AudioEngine::instance()->isStopped() )
|
||||
{
|
||||
m_currentTrack = result_ptr();
|
||||
setWindowTitle( m_windowTitle );
|
||||
}
|
||||
m_currentTrack = result_ptr();
|
||||
setWindowTitle( m_windowTitle );
|
||||
}
|
||||
|
||||
|
||||
@@ -847,8 +935,13 @@ TomahawkWindow::showAboutTomahawk()
|
||||
.arg( TomahawkUtils::appFriendlyVersion() );
|
||||
#endif
|
||||
|
||||
desc = tr( "Copyright 2010 - 2012<br/>Christian Muehlhaeuser <muesli@tomahawk-player.org><br/><br/>"
|
||||
"Thanks to: Leo Franchi, Jeff Mitchell, Dominik Schmidt, Jason Herskowitz, Alejandro Wainzinger, Hugo Lindström, Michael Zanetti, Harald Sitter and Steve Robertson" );
|
||||
const QString copyright( tr( "Copyright 2010 - 2012" ) );
|
||||
const QString thanksto( tr( "Thanks to:" ) );
|
||||
|
||||
desc = QString( "%1<br/>Christian Muehlhaeuser <muesli@tomahawk-player.org><br/><br/>"
|
||||
"%2 Leo Franchi, Jeff Mitchell, Dominik Schmidt, Jason Herskowitz, Alejandro Wainzinger, Hugo Lindström, Syd Lawrence, Michael Zanetti, Harald Sitter, Steve Robertson" )
|
||||
.arg( copyright )
|
||||
.arg( thanksto );
|
||||
|
||||
QMessageBox::about( this, tr( "About Tomahawk" ), head + desc );
|
||||
}
|
||||
@@ -857,7 +950,7 @@ TomahawkWindow::showAboutTomahawk()
|
||||
void
|
||||
TomahawkWindow::checkForUpdates()
|
||||
{
|
||||
#ifdef Q_WS_MAC
|
||||
#ifdef Q_OS_MAC
|
||||
Tomahawk::checkForUpdates();
|
||||
#endif
|
||||
}
|
||||
|
@@ -82,12 +82,16 @@ public slots:
|
||||
void loadSpiff();
|
||||
void showSettingsDialog();
|
||||
void showDiagnosticsDialog();
|
||||
void legalInfo();
|
||||
void updateCollectionManually();
|
||||
void rescanCollectionManually();
|
||||
void pluginMenuAdded(QMenu*);
|
||||
void pluginMenuRemoved(QMenu*);
|
||||
void showOfflineSources();
|
||||
|
||||
void fullScreenEntered();
|
||||
void fullScreenExited();
|
||||
|
||||
private slots:
|
||||
void onAccountAdded( Tomahawk::Accounts::Account* account );
|
||||
void onAccountConnected();
|
||||
@@ -107,6 +111,7 @@ private slots:
|
||||
void onPlaybackLoading( const Tomahawk::result_ptr& result );
|
||||
|
||||
void audioStarted();
|
||||
void audioPaused();
|
||||
void audioStopped();
|
||||
|
||||
void showAboutTomahawk();
|
||||
@@ -144,7 +149,6 @@ private:
|
||||
SourceTreeView* m_sourcetree;
|
||||
QPushButton* m_statusButton;
|
||||
QPushButton* m_queueButton;
|
||||
PlaylistModel* m_queueModel;
|
||||
QueueView* m_queueView;
|
||||
AnimatedSplitter* m_sidebar;
|
||||
JobStatusModel* m_jobsModel;
|
||||
|
@@ -115,6 +115,7 @@
|
||||
</property>
|
||||
<addaction name="actionDiagnostics"/>
|
||||
<addaction name="actionAboutTomahawk"/>
|
||||
<addaction name="actionLegalInfo"/>
|
||||
</widget>
|
||||
<addaction name="menuApp"/>
|
||||
<addaction name="menuNetwork"/>
|
||||
@@ -217,6 +218,14 @@
|
||||
<string>Meta+Ctrl+Z</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionLegalInfo">
|
||||
<property name="text">
|
||||
<string>&Legal Info...</string>
|
||||
</property>
|
||||
<property name="menuRole">
|
||||
<enum>QAction::ApplicationSpecificRole</enum>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionDiagnostics">
|
||||
<property name="text">
|
||||
<string>Diagnostics...</string>
|
||||
|
@@ -130,7 +130,6 @@ TwitterAccount::authenticateSlot()
|
||||
{
|
||||
infoPlugin().data()->moveToThread( Tomahawk::InfoSystem::InfoSystem::instance()->workerThread().data() );
|
||||
Tomahawk::InfoSystem::InfoSystem::instance()->addInfoPlugin( infoPlugin() );
|
||||
QMetaObject::invokeMethod( infoPlugin().data(), "init", Qt::QueuedConnection );
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -24,6 +24,7 @@
|
||||
#include "TomahawkSettings.h"
|
||||
#include "utils/TomahawkUtils.h"
|
||||
#include "database/Database.h"
|
||||
#include "database/DatabaseImpl.h"
|
||||
#include "Source.h"
|
||||
|
||||
#include "TomahawkOAuthTwitter.h"
|
||||
@@ -241,7 +242,7 @@ TwitterConfigWidget::postGotTomahawkStatusAuthVerifyReply( const QTweetUser &use
|
||||
connect( statUpdate, SIGNAL( postedStatus(const QTweetStatus &) ), SLOT( postGotTomahawkStatusUpdateReply(const QTweetStatus &) ) );
|
||||
connect( statUpdate, SIGNAL( error(QTweetNetBase::ErrorCode, const QString&) ), SLOT( postGotTomahawkStatusUpdateError(QTweetNetBase::ErrorCode, const QString &) ) );
|
||||
QString uuid = QUuid::createUuid();
|
||||
QString message = QString( "Got Tomahawk? {" ) + Database::instance()->dbid() + QString( "} (" ) + uuid.mid( 1, 8 ) + QString( ")" ) + QString( " http://gettomahawk.com" );
|
||||
QString message = QString( "Got Tomahawk? {" ) + Database::instance()->impl()->dbid() + QString( "} (" ) + uuid.mid( 1, 8 ) + QString( ")" ) + QString( " http://gettomahawk.com" );
|
||||
if ( m_postGTtype == "@Mention" )
|
||||
{
|
||||
QString user = m_ui->twitterUserTweetLineEdit->text();
|
||||
@@ -257,7 +258,7 @@ TwitterConfigWidget::postGotTomahawkStatusAuthVerifyReply( const QTweetUser &use
|
||||
connect( statUpdate, SIGNAL( parsedDirectMessage(const QTweetDMStatus &)), SLOT( postGotTomahawkDirectMessageReply(const QTweetDMStatus &) ) );
|
||||
connect( statUpdate, SIGNAL( error(QTweetNetBase::ErrorCode, const QString&) ), SLOT( postGotTomahawkStatusUpdateError(QTweetNetBase::ErrorCode, const QString &) ) );
|
||||
QString uuid = QUuid::createUuid();
|
||||
QString message = QString( "Got Tomahawk? {" ) + Database::instance()->dbid() + QString( "} (" ) + uuid.mid( 1, 8 ) + QString( ")" ) + QString( " http://gettomahawk.com" );
|
||||
QString message = QString( "Got Tomahawk? {" ) + Database::instance()->impl()->dbid() + QString( "} (" ) + uuid.mid( 1, 8 ) + QString( ")" ) + QString( " http://gettomahawk.com" );
|
||||
QString user = m_ui->twitterUserTweetLineEdit->text();
|
||||
if ( user.startsWith( "@" ) )
|
||||
user.remove( 0, 1 );
|
||||
|
@@ -76,15 +76,15 @@ TwitterInfoPlugin::~TwitterInfoPlugin()
|
||||
bool
|
||||
TwitterInfoPlugin::refreshTwitterAuth()
|
||||
{
|
||||
tDebug() << Q_FUNC_INFO << " begin" << this;
|
||||
if( !m_twitterAuth.isNull() )
|
||||
tDebug() << Q_FUNC_INFO << "begin" << this;
|
||||
if ( !m_twitterAuth.isNull() )
|
||||
delete m_twitterAuth.data();
|
||||
|
||||
Q_ASSERT( TomahawkUtils::nam() != 0 );
|
||||
tDebug() << Q_FUNC_INFO << " with nam " << TomahawkUtils::nam() << this;
|
||||
tDebug() << Q_FUNC_INFO << "with nam" << TomahawkUtils::nam() << this;
|
||||
m_twitterAuth = QWeakPointer< TomahawkOAuthTwitter >( new TomahawkOAuthTwitter( TomahawkUtils::nam(), this ) );
|
||||
|
||||
if( m_twitterAuth.isNull() )
|
||||
if ( m_twitterAuth.isNull() )
|
||||
return false;
|
||||
|
||||
m_twitterAuth.data()->setOAuthToken( m_account->credentials()[ "oauthtoken" ].toString().toLatin1() );
|
||||
@@ -138,7 +138,8 @@ TwitterInfoPlugin::pushInfo( Tomahawk::InfoSystem::InfoPushData pushData )
|
||||
return;
|
||||
}
|
||||
|
||||
if ( !map[ "accountlist" ].toStringList().contains( m_account->accountId() ) )
|
||||
const QStringList accountList = map[ "accountlist" ].toStringList();
|
||||
if ( !accountList.contains( "all" ) && !accountList.contains( m_account->accountId() ) )
|
||||
{
|
||||
tLog( LOGVERBOSE ) << Q_FUNC_INFO << "Our account not in the list, not tweeting out";
|
||||
return;
|
||||
@@ -168,7 +169,7 @@ TwitterInfoPlugin::pushInfo( Tomahawk::InfoSystem::InfoPushData pushData )
|
||||
QTweetStatusUpdate *statUpdate = new QTweetStatusUpdate( m_twitterAuth.data(), this );
|
||||
connect( statUpdate, SIGNAL( postedStatus(const QTweetStatus &) ), SLOT( postLovedStatusUpdateReply(const QTweetStatus &) ) );
|
||||
connect( statUpdate, SIGNAL( error(QTweetNetBase::ErrorCode, const QString&) ), SLOT( postLovedStatusUpdateError(QTweetNetBase::ErrorCode, const QString &) ) );
|
||||
tDebug() << Q_FUNC_INFO << "Posting message: " << msg;
|
||||
tDebug() << Q_FUNC_INFO << "Posting message:" << msg;
|
||||
statUpdate->post( msg );
|
||||
}
|
||||
|
||||
|
@@ -44,7 +44,6 @@ namespace Tomahawk {
|
||||
virtual ~TwitterInfoPlugin();
|
||||
|
||||
public slots:
|
||||
void init();
|
||||
void notInCacheSlot( const Tomahawk::InfoSystem::InfoStringHash criteria, Tomahawk::InfoSystem::InfoRequestData requestData )
|
||||
{
|
||||
Q_UNUSED( criteria );
|
||||
@@ -52,6 +51,7 @@ namespace Tomahawk {
|
||||
}
|
||||
|
||||
protected slots:
|
||||
void init();
|
||||
void pushInfo( Tomahawk::InfoSystem::InfoPushData pushData );
|
||||
void getInfo( Tomahawk::InfoSystem::InfoRequestData requestData )
|
||||
{
|
||||
|
@@ -36,6 +36,7 @@
|
||||
#include <utils/TomahawkUtils.h>
|
||||
#include <TomahawkSettings.h>
|
||||
#include <database/Database.h>
|
||||
#include <database/DatabaseImpl.h>
|
||||
#include <network/Servent.h>
|
||||
#include "Source.h"
|
||||
|
||||
@@ -63,10 +64,10 @@ TwitterSipPlugin::TwitterSipPlugin( Tomahawk::Accounts::Account* account )
|
||||
|
||||
m_configuration = account->configuration();
|
||||
qDebug() << "SIP configuration:" << m_configuration << m_configuration[ "cachedpeers" ];
|
||||
if ( Database::instance()->dbid() != m_account->configuration()[ "saveddbid" ].toString() )
|
||||
if ( Database::instance()->impl()->dbid() != m_account->configuration()[ "saveddbid" ].toString() )
|
||||
{
|
||||
m_configuration[ "cachedpeers" ] = QVariantHash();
|
||||
m_configuration[ "saveddbid" ] = Database::instance()->dbid();
|
||||
m_configuration[ "saveddbid" ] = Database::instance()->impl()->dbid();
|
||||
syncConfig();
|
||||
}
|
||||
|
||||
@@ -137,8 +138,8 @@ TwitterSipPlugin::disconnectPlugin()
|
||||
m_checkTimer.stop();
|
||||
m_connectTimer.stop();
|
||||
m_dmPollTimer.stop();
|
||||
if( !m_homeTimeline.isNull() )
|
||||
delete m_homeTimeline.data();
|
||||
if( !m_friendsTimeline.isNull() )
|
||||
delete m_friendsTimeline.data();
|
||||
if( !m_mentions.isNull() )
|
||||
delete m_mentions.data();
|
||||
if( !m_directMessages.isNull() )
|
||||
@@ -167,12 +168,12 @@ TwitterSipPlugin::accountAuthenticated( const QWeakPointer< TomahawkOAuthTwitter
|
||||
|
||||
m_cachedTwitterAuth = twitterAuth;
|
||||
|
||||
m_homeTimeline = QWeakPointer<QTweetHomeTimeline>( new QTweetHomeTimeline( m_cachedTwitterAuth.data(), this ) );
|
||||
m_friendsTimeline = QWeakPointer<QTweetFriendsTimeline>( new QTweetFriendsTimeline( m_cachedTwitterAuth.data(), this ) );
|
||||
m_mentions = QWeakPointer<QTweetMentions>( new QTweetMentions( m_cachedTwitterAuth.data(), this ) );
|
||||
m_directMessages = QWeakPointer<QTweetDirectMessages>( new QTweetDirectMessages( m_cachedTwitterAuth.data(), this ) );
|
||||
m_directMessageNew = QWeakPointer<QTweetDirectMessageNew>( new QTweetDirectMessageNew( m_cachedTwitterAuth.data(), this ) );
|
||||
m_directMessageDestroy = QWeakPointer<QTweetDirectMessageDestroy>( new QTweetDirectMessageDestroy( m_cachedTwitterAuth.data(), this ) );
|
||||
connect( m_homeTimeline.data(), SIGNAL( parsedStatuses(const QList< QTweetStatus > &) ), SLOT( friendsTimelineStatuses(const QList<QTweetStatus> &) ) );
|
||||
connect( m_friendsTimeline.data(), SIGNAL( parsedStatuses(const QList< QTweetStatus > &) ), SLOT( friendsTimelineStatuses(const QList<QTweetStatus> &) ) );
|
||||
connect( m_mentions.data(), SIGNAL( parsedStatuses(const QList< QTweetStatus > &) ), SLOT( mentionsStatuses(const QList<QTweetStatus> &) ) );
|
||||
connect( m_directMessages.data(), SIGNAL( parsedDirectMessages(const QList<QTweetDMStatus> &)), SLOT( directMessages(const QList<QTweetDMStatus> &) ) );
|
||||
connect( m_directMessageNew.data(), SIGNAL( parsedDirectMessage(const QTweetDMStatus &)), SLOT( directMessagePosted(const QTweetDMStatus &) ) );
|
||||
@@ -203,8 +204,8 @@ TwitterSipPlugin::checkTimerFired()
|
||||
|
||||
qDebug() << "TwitterSipPlugin looking at friends timeline since id " << m_cachedFriendsSinceId;
|
||||
|
||||
if ( !m_homeTimeline.isNull() )
|
||||
m_homeTimeline.data()->fetch( m_cachedFriendsSinceId, 0, 800 );
|
||||
if ( !m_friendsTimeline.isNull() )
|
||||
m_friendsTimeline.data()->fetch( m_cachedFriendsSinceId, 0, 800 );
|
||||
|
||||
if ( m_cachedMentionsSinceId == 0 )
|
||||
m_cachedMentionsSinceId = m_configuration[ "cachedmentionssinceid" ].toLongLong();
|
||||
@@ -226,7 +227,7 @@ TwitterSipPlugin::registerOffers( const QStringList &peerList )
|
||||
{
|
||||
QVariantHash peerData = m_cachedPeers[screenName].toHash();
|
||||
|
||||
if ( peerData.contains( "onod" ) && peerData["onod"] != Database::instance()->dbid() )
|
||||
if ( peerData.contains( "onod" ) && peerData["onod"] != Database::instance()->impl()->dbid() )
|
||||
{
|
||||
m_cachedPeers.remove( screenName );
|
||||
m_configuration[ "cachedpeers" ] = m_cachedPeers;
|
||||
@@ -313,7 +314,7 @@ TwitterSipPlugin::parseGotTomahawk( const QRegExp ®ex, const QString &screenN
|
||||
else
|
||||
qDebug() << "TwitterSipPlugin parsed node " << node << " out of the tweet";
|
||||
|
||||
if ( node == Database::instance()->dbid() )
|
||||
if ( node == Database::instance()->impl()->dbid() )
|
||||
{
|
||||
qDebug() << "My dbid found; ignoring";
|
||||
return;
|
||||
@@ -489,7 +490,7 @@ TwitterSipPlugin::directMessages( const QList< QTweetDMStatus > &messages )
|
||||
|
||||
QMetaObject::invokeMethod( this, "registerOffer", Q_ARG( QString, status.senderScreenName() ), Q_ARG( QVariantHash, peerData ) );
|
||||
|
||||
if ( Database::instance()->dbid().startsWith( splitNode[1] ) )
|
||||
if ( Database::instance()->impl()->dbid().startsWith( splitNode[1] ) )
|
||||
{
|
||||
qDebug() << "TwitterSipPlugin found message destined for this node; destroying it";
|
||||
if ( !m_directMessageDestroy.isNull() )
|
||||
@@ -533,12 +534,12 @@ TwitterSipPlugin::registerOffer( const QString &screenName, const QVariantHash &
|
||||
|
||||
if ( !_peerData.contains( "okey" ) ||
|
||||
!_peerData.contains( "onod" ) ||
|
||||
( _peerData.contains( "onod" ) && _peerData["onod"] != Database::instance()->dbid() ) )
|
||||
( _peerData.contains( "onod" ) && _peerData["onod"] != Database::instance()->impl()->dbid() ) )
|
||||
{
|
||||
QString okey = QUuid::createUuid().toString().split( '-' ).last();
|
||||
okey.chop( 1 );
|
||||
_peerData["okey"] = QVariant::fromValue< QString >( okey );
|
||||
_peerData["onod"] = QVariant::fromValue< QString >( Database::instance()->dbid() );
|
||||
_peerData["onod"] = QVariant::fromValue< QString >( Database::instance()->impl()->dbid() );
|
||||
peersChanged = true;
|
||||
needToAddToCache = true;
|
||||
needToSend = true;
|
||||
@@ -593,7 +594,7 @@ TwitterSipPlugin::sendOffer( const QString &screenName, const QVariantHash &peer
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
QString offerString = QString( "TOMAHAWKPEER:Host=%1:Port=%2:Node=%3*%4:PKey=%5" ).arg( peerData["ohst"].toString() )
|
||||
.arg( peerData["oprt"].toString() )
|
||||
.arg( Database::instance()->dbid() )
|
||||
.arg( Database::instance()->impl()->dbid() )
|
||||
.arg( peerData["node"].toString().left( 8 ) )
|
||||
.arg( peerData["okey"].toString() );
|
||||
qDebug() << "TwitterSipPlugin sending message to " << screenName << ": " << offerString;
|
||||
|
@@ -27,10 +27,10 @@
|
||||
|
||||
#include <QTweetLib/qtweetuser.h>
|
||||
#include <QTweetLib/qtweetnetbase.h>
|
||||
#include <QTweetLib/qtweetfriendstimeline.h>
|
||||
#include <QTweetLib/qtweetdirectmessages.h>
|
||||
#include <QTweetLib/qtweetdirectmessagenew.h>
|
||||
#include <QTweetLib/qtweetdirectmessagedestroy.h>
|
||||
#include <QTweetLib/qtweethometimeline.h>
|
||||
#include <QTweetLib/qtweetmentions.h>
|
||||
#include <QTweetLib/qtweetdmstatus.h>
|
||||
|
||||
@@ -59,10 +59,10 @@ public slots:
|
||||
void disconnectPlugin();
|
||||
void configurationChanged();
|
||||
|
||||
void sendMsg( const QString& to, const QString& msg )
|
||||
void sendMsg( const QString& peerId, const SipInfo& info )
|
||||
{
|
||||
Q_UNUSED( to );
|
||||
Q_UNUSED( msg );
|
||||
Q_UNUSED( peerId );
|
||||
Q_UNUSED( info );
|
||||
}
|
||||
|
||||
void broadcastMsg( const QString &msg )
|
||||
@@ -70,9 +70,9 @@ public slots:
|
||||
Q_UNUSED( msg );
|
||||
}
|
||||
|
||||
void addContact( const QString &jid, const QString& msg = QString() )
|
||||
void addContact( const QString &peerId, const QString& msg = QString() )
|
||||
{
|
||||
Q_UNUSED( jid );
|
||||
Q_UNUSED( peerId );
|
||||
Q_UNUSED( msg );
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ private:
|
||||
|
||||
QWeakPointer< TomahawkOAuthTwitter > m_cachedTwitterAuth;
|
||||
|
||||
QWeakPointer< QTweetHomeTimeline > m_homeTimeline;
|
||||
QWeakPointer< QTweetFriendsTimeline > m_friendsTimeline;
|
||||
QWeakPointer< QTweetMentions > m_mentions;
|
||||
QWeakPointer< QTweetDirectMessages > m_directMessages;
|
||||
QWeakPointer< QTweetDirectMessageNew > m_directMessageNew;
|
||||
|
@@ -42,10 +42,10 @@ namespace Tomahawk {
|
||||
void publishTune( QUrl url, Tomahawk::InfoSystem::InfoStringHash trackInfo );
|
||||
|
||||
public slots:
|
||||
void init();
|
||||
void notInCacheSlot( const Tomahawk::InfoSystem::InfoStringHash criteria, Tomahawk::InfoSystem::InfoRequestData requestData );
|
||||
|
||||
protected slots:
|
||||
void init();
|
||||
void pushInfo( Tomahawk::InfoSystem::InfoPushData pushData );
|
||||
void getInfo( Tomahawk::InfoSystem::InfoRequestData requestData );
|
||||
|
||||
|
@@ -33,47 +33,51 @@
|
||||
#include "utils/Logger.h"
|
||||
|
||||
|
||||
AvatarManager::AvatarManager(Jreen::Client *client) :
|
||||
m_cacheDir(TomahawkUtils::appDataDir().absolutePath().append("/jreen/"))
|
||||
AvatarManager::AvatarManager( Jreen::Client* client )
|
||||
: m_cacheDir( TomahawkUtils::appDataDir().absolutePath().append( "/jreen/" ) )
|
||||
{
|
||||
m_client = client;
|
||||
|
||||
m_cachedAvatars = m_cacheDir.entryList();
|
||||
|
||||
connect(m_client, SIGNAL(serverFeaturesReceived(QSet<QString>)), SLOT(onNewConnection()));
|
||||
connect(m_client, SIGNAL(presenceReceived(Jreen::Presence)), SLOT(onNewPresence(Jreen::Presence)));
|
||||
connect(m_client, SIGNAL(iqReceived(Jreen::IQ)), SLOT(onNewIq(Jreen::IQ)));
|
||||
connect( m_client, SIGNAL( serverFeaturesReceived( QSet<QString> ) ), SLOT( onNewConnection() ) );
|
||||
connect( m_client, SIGNAL( presenceReceived( Jreen::Presence ) ), SLOT( onNewPresence( Jreen::Presence ) ) );
|
||||
connect( m_client, SIGNAL( iqReceived( Jreen::IQ ) ), SLOT( onNewIq( Jreen::IQ ) ) );
|
||||
|
||||
connect(this, SIGNAL(newAvatar(QString)), SLOT(onNewAvatar(QString)));
|
||||
connect( this, SIGNAL( newAvatar( QString ) ), SLOT( onNewAvatar( QString ) ) );
|
||||
}
|
||||
|
||||
|
||||
AvatarManager::~AvatarManager()
|
||||
{
|
||||
}
|
||||
|
||||
void AvatarManager::onNewConnection()
|
||||
|
||||
void
|
||||
AvatarManager::onNewConnection()
|
||||
{
|
||||
fetchVCard( m_client->jid().bare() );
|
||||
}
|
||||
|
||||
|
||||
void AvatarManager::fetchVCard(const QString &jid)
|
||||
void
|
||||
AvatarManager::fetchVCard( const QString& jid )
|
||||
{
|
||||
// qDebug() << Q_FUNC_INFO;
|
||||
Jreen::IQ iq( Jreen::IQ::Get, jid );
|
||||
iq.addExtension( new Jreen::VCard() );
|
||||
Jreen::IQReply *reply = m_client->send( iq );
|
||||
|
||||
Jreen::IQ iq(Jreen::IQ::Get, jid );
|
||||
iq.addExtension(new Jreen::VCard());
|
||||
Jreen::IQReply *reply = m_client->send(iq);
|
||||
connect(reply, SIGNAL(received(Jreen::IQ)), SLOT(onNewIq(Jreen::IQ)));
|
||||
connect( reply, SIGNAL( received( Jreen::IQ ) ), SLOT( onNewIq( Jreen::IQ ) ) );
|
||||
}
|
||||
|
||||
void AvatarManager::onNewPresence(const Jreen::Presence& presence)
|
||||
|
||||
void
|
||||
AvatarManager::onNewPresence( const Jreen::Presence& presence )
|
||||
{
|
||||
Jreen::VCardUpdate::Ptr update = presence.payload<Jreen::VCardUpdate>();
|
||||
if(update)
|
||||
if ( update )
|
||||
{
|
||||
// qDebug() << "vcard: found update for" << presence.from().full();
|
||||
if(!isCached(update->photoHash()))
|
||||
if ( !isCached( update->photoHash() ) )
|
||||
{
|
||||
// qDebug() << presence.from().full() << "vcard: photo not cached, starting request..." << update->photoHash();
|
||||
fetchVCard( presence.from().bare() );
|
||||
@@ -84,78 +88,72 @@ void AvatarManager::onNewPresence(const Jreen::Presence& presence)
|
||||
m_JidsAvatarHashes.insert( update->photoHash(), presence.from().bare() );
|
||||
|
||||
if ( !this->avatar( presence.from().bare() ).isNull() )
|
||||
emit newAvatar(presence.from().bare());
|
||||
emit newAvatar( presence.from().bare() );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// qDebug() << Q_FUNC_INFO << presence.from().full() << "got no statusupdateextension";
|
||||
|
||||
//TODO: do we want this? might fetch avatars for broken clients
|
||||
fetchVCard( presence.from().bare() );
|
||||
}
|
||||
}
|
||||
|
||||
void AvatarManager::onNewIq(const Jreen::IQ& iq)
|
||||
|
||||
void
|
||||
AvatarManager::onNewIq( const Jreen::IQ& iq )
|
||||
{
|
||||
Jreen::VCard::Ptr vcard = iq.payload<Jreen::VCard>();
|
||||
if(vcard)
|
||||
if ( vcard )
|
||||
{
|
||||
iq.accept();
|
||||
|
||||
// qDebug() << Q_FUNC_INFO << "Got vcard from " << iq.from().full();
|
||||
|
||||
QString id = iq.from().full();
|
||||
QString avatarHash;
|
||||
|
||||
const Jreen::VCard::Photo &photo = vcard->photo();
|
||||
if (!photo.data().isEmpty()) {
|
||||
if ( !photo.data().isEmpty() )
|
||||
{
|
||||
// qDebug() << "vcard: got photo data" << id;
|
||||
|
||||
avatarHash = QCryptographicHash::hash(photo.data(), QCryptographicHash::Sha1).toHex();
|
||||
avatarHash = QCryptographicHash::hash( photo.data(), QCryptographicHash::Sha1 ).toHex();
|
||||
|
||||
if (!m_cacheDir.exists())
|
||||
if ( !m_cacheDir.exists() )
|
||||
m_cacheDir.mkpath( avatarDir( avatarHash ).absolutePath() );
|
||||
|
||||
|
||||
QFile file(avatarPath(avatarHash));
|
||||
if (file.open(QIODevice::WriteOnly)) {
|
||||
file.write(photo.data());
|
||||
QFile file( avatarPath( avatarHash ) );
|
||||
if ( file.open( QIODevice::WriteOnly ) )
|
||||
{
|
||||
file.write( photo.data() );
|
||||
file.close();
|
||||
}
|
||||
|
||||
m_cachedAvatars.append(avatarHash);
|
||||
m_cachedAvatars.append( avatarHash );
|
||||
m_JidsAvatarHashes.insert( avatarHash, iq.from().bare() );
|
||||
|
||||
Q_ASSERT(!this->avatar(iq.from().bare()).isNull());
|
||||
emit newAvatar(iq.from().bare());
|
||||
}
|
||||
else
|
||||
{
|
||||
// qDebug() << "vcard: got no photo data" << id;
|
||||
Q_ASSERT( !this->avatar( iq.from().bare() ).isNull() );
|
||||
emit newAvatar( iq.from().bare() );
|
||||
}
|
||||
|
||||
// got own presence
|
||||
if ( m_client->jid().bare() == id )
|
||||
{
|
||||
// qDebug() << Q_FUNC_INFO << "got own vcard";
|
||||
|
||||
Jreen::Presence presence = m_client->presence();
|
||||
Jreen::VCardUpdate::Ptr update = presence.payload<Jreen::VCardUpdate>();
|
||||
if (update->photoHash() != avatarHash)
|
||||
if ( update->photoHash() != avatarHash )
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO << "Updating own presence...";
|
||||
|
||||
update->setPhotoHash(avatarHash);
|
||||
m_client->send(presence);
|
||||
update->setPhotoHash( avatarHash );
|
||||
m_client->send( presence );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
QPixmap AvatarManager::avatar(const QString &jid) const
|
||||
|
||||
QPixmap
|
||||
AvatarManager::avatar( const QString& jid ) const
|
||||
{
|
||||
if( isCached( avatarHash( jid ) ) )
|
||||
if ( isCached( avatarHash( jid ) ) )
|
||||
{
|
||||
return QPixmap( avatarPath( avatarHash( jid ) ) );
|
||||
}
|
||||
@@ -165,29 +163,39 @@ QPixmap AvatarManager::avatar(const QString &jid) const
|
||||
}
|
||||
}
|
||||
|
||||
QString AvatarManager::avatarHash(const QString &jid) const
|
||||
|
||||
QString
|
||||
AvatarManager::avatarHash( const QString& jid ) const
|
||||
{
|
||||
//qDebug() << Q_FUNC_INFO << jid << m_JidsAvatarHashes.key(jid);
|
||||
return m_JidsAvatarHashes.key(jid);
|
||||
//qDebug() << Q_FUNC_INFO << jid << m_JidsAvatarHashes.key( jid );
|
||||
return m_JidsAvatarHashes.key( jid );
|
||||
}
|
||||
|
||||
QDir AvatarManager::avatarDir(const QString&) const
|
||||
|
||||
QDir
|
||||
AvatarManager::avatarDir( const QString& /* avatarHash */ ) const
|
||||
{
|
||||
return m_cacheDir;
|
||||
}
|
||||
|
||||
QString AvatarManager::avatarPath(const QString &avatarHash) const
|
||||
|
||||
QString
|
||||
AvatarManager::avatarPath( const QString& avatarHash ) const
|
||||
{
|
||||
Q_ASSERT(!avatarHash.contains("@"));
|
||||
return avatarDir(avatarHash).absoluteFilePath(avatarHash);
|
||||
Q_ASSERT( !avatarHash.contains( "@" ) );
|
||||
return avatarDir( avatarHash ).absoluteFilePath( avatarHash );
|
||||
}
|
||||
|
||||
bool AvatarManager::isCached(const QString &avatarHash) const
|
||||
|
||||
bool
|
||||
AvatarManager::isCached( const QString& avatarHash ) const
|
||||
{
|
||||
return m_cachedAvatars.contains( avatarHash );
|
||||
}
|
||||
|
||||
void AvatarManager::onNewAvatar(const QString&)
|
||||
|
||||
void
|
||||
AvatarManager::onNewAvatar( const QString& /* jid */ )
|
||||
{
|
||||
// qDebug() << Q_FUNC_INFO << "Found new Avatar..." << jid;
|
||||
}
|
||||
|
@@ -32,32 +32,32 @@ class ACCOUNTDLLEXPORT AvatarManager : public QObject
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
AvatarManager(Jreen::Client *client);
|
||||
AvatarManager(Jreen::Client* client);
|
||||
virtual ~AvatarManager();
|
||||
|
||||
QPixmap avatar(const QString &jid) const;
|
||||
QPixmap avatar(const QString& jid) const;
|
||||
|
||||
signals:
|
||||
void newAvatar( const QString &jid );
|
||||
void newAvatar( const QString& jid );
|
||||
|
||||
private slots:
|
||||
void onNewPresence( const Jreen::Presence& presence );
|
||||
void onNewIq(const Jreen::IQ &iq);
|
||||
void onNewIq(const Jreen::IQ& iq);
|
||||
void onNewConnection();
|
||||
void onNewAvatar( const QString &jid );
|
||||
void onNewAvatar( const QString& jid );
|
||||
|
||||
private:
|
||||
void fetchVCard( const QString &jid);
|
||||
QString avatarHash(const QString &jid) const;
|
||||
QString avatarPath(const QString &avatarHash) const;
|
||||
void fetchVCard( const QString& jid );
|
||||
QString avatarHash( const QString& jid ) const;
|
||||
QString avatarPath( const QString& avatarHash ) const;
|
||||
|
||||
QDir avatarDir(const QString &avatarHash) const;
|
||||
bool isCached(const QString &avatarHash) const;
|
||||
QDir avatarDir( const QString& avatarHash ) const;
|
||||
bool isCached( const QString& avatarHash ) const;
|
||||
|
||||
Jreen::Client *m_client;
|
||||
Jreen::Client* m_client;
|
||||
QStringList m_cachedAvatars;
|
||||
QDir m_cacheDir;
|
||||
QMap<QString, QString> m_JidsAvatarHashes;
|
||||
QMap< QString, QString > m_JidsAvatarHashes;
|
||||
};
|
||||
|
||||
#endif // AVATARMANAGER_H
|
||||
|
@@ -65,27 +65,32 @@ using namespace Accounts;
|
||||
// instead of simply copying this function for another thirdparty lib
|
||||
// please make it a meta-function or a macro and put it in Logger.h. kthxbbq
|
||||
#define JREEN_LOG_INFIX "Jreen"
|
||||
#define TOMAHAWK_FEATURE QLatin1String( "tomahawk:sip:v1" )
|
||||
#define TOMAHAWK_CAP_NODE_NAME QLatin1String( "http://tomahawk-player.org/" )
|
||||
|
||||
|
||||
void
|
||||
JreenMessageHandler(QtMsgType type, const char *msg)
|
||||
JreenMessageHandler( QtMsgType type, const char *msg )
|
||||
{
|
||||
switch (type)
|
||||
switch ( type )
|
||||
{
|
||||
case QtDebugMsg:
|
||||
tDebug(LOGTHIRDPARTY).nospace() << JREEN_LOG_INFIX << ": " << "Debug: " << msg;
|
||||
tDebug( LOGTHIRDPARTY ).nospace() << JREEN_LOG_INFIX << ": " << "Debug: " << msg;
|
||||
break;
|
||||
case QtWarningMsg:
|
||||
tDebug(LOGTHIRDPARTY).nospace() << JREEN_LOG_INFIX << ": " << "Warning: " << msg;
|
||||
tDebug( LOGTHIRDPARTY ).nospace() << JREEN_LOG_INFIX << ": " << "Warning: " << msg;
|
||||
break;
|
||||
case QtCriticalMsg:
|
||||
tDebug(LOGTHIRDPARTY).nospace() << JREEN_LOG_INFIX << ": " << "Critical: " << msg;
|
||||
tDebug( LOGTHIRDPARTY ).nospace() << JREEN_LOG_INFIX << ": " << "Critical: " << msg;
|
||||
break;
|
||||
case QtFatalMsg:
|
||||
tDebug(LOGTHIRDPARTY).nospace() << JREEN_LOG_INFIX << ": " << "Fatal: " << msg;
|
||||
tDebug( LOGTHIRDPARTY ).nospace() << JREEN_LOG_INFIX << ": " << "Fatal: " << msg;
|
||||
abort();
|
||||
}
|
||||
}
|
||||
|
||||
XmppSipPlugin::XmppSipPlugin( Account *account )
|
||||
|
||||
XmppSipPlugin::XmppSipPlugin( Account* account )
|
||||
: SipPlugin( account )
|
||||
, m_state( Account::Disconnected )
|
||||
#ifndef ENABLE_HEADLESS
|
||||
@@ -97,7 +102,6 @@ XmppSipPlugin::XmppSipPlugin( Account *account )
|
||||
Jreen::Logger::addHandler( JreenMessageHandler );
|
||||
|
||||
m_currentUsername = readUsername();
|
||||
|
||||
m_currentServer = readServer();
|
||||
m_currentPassword = readPassword();
|
||||
m_currentPort = readPort();
|
||||
@@ -107,7 +111,6 @@ XmppSipPlugin::XmppSipPlugin( Account *account )
|
||||
|
||||
// general client setup
|
||||
m_client = new Jreen::Client( jid, m_currentPassword );
|
||||
m_client->setProxyFactory( TomahawkUtils::proxyFactory( true ) );
|
||||
setupClientHelper();
|
||||
|
||||
m_client->registerPayload( new TomahawkXmppMessageFactory );
|
||||
@@ -122,6 +125,7 @@ XmppSipPlugin::XmppSipPlugin( Account *account )
|
||||
m_xmlConsole->show();
|
||||
}
|
||||
#endif
|
||||
|
||||
// add VCardUpdate extension to own presence
|
||||
m_client->presence().addExtension( new Jreen::VCardUpdate() );
|
||||
|
||||
@@ -148,19 +152,19 @@ XmppSipPlugin::XmppSipPlugin( Account *account )
|
||||
qDebug() << "Our Port set to" << m_client->port();
|
||||
|
||||
// setup slots
|
||||
connect(m_client, SIGNAL(serverFeaturesReceived(QSet<QString>)), SLOT(onConnect()));
|
||||
connect(m_client, SIGNAL(disconnected(Jreen::Client::DisconnectReason)), SLOT(onDisconnect(Jreen::Client::DisconnectReason)));
|
||||
connect(m_client, SIGNAL(messageReceived(Jreen::Message)), SLOT(onNewMessage(Jreen::Message)));
|
||||
connect( m_client, SIGNAL( serverFeaturesReceived( QSet<QString> ) ), SLOT( onConnect() ) );
|
||||
connect( m_client, SIGNAL( disconnected( Jreen::Client::DisconnectReason ) ), SLOT( onDisconnect( Jreen::Client::DisconnectReason ) ) );
|
||||
connect( m_client, SIGNAL( messageReceived( Jreen::Message ) ), SLOT( onNewMessage( Jreen::Message ) ) );
|
||||
|
||||
connect(m_client, SIGNAL(iqReceived(Jreen::IQ)), SLOT(onNewIq(Jreen::IQ)));
|
||||
connect( m_client, SIGNAL( iqReceived( Jreen::IQ ) ), SLOT( onNewIq( Jreen::IQ ) ) );
|
||||
|
||||
connect(m_roster, SIGNAL(presenceReceived(Jreen::RosterItem::Ptr,Jreen::Presence)),
|
||||
SLOT(onPresenceReceived(Jreen::RosterItem::Ptr,Jreen::Presence)));
|
||||
connect(m_roster, SIGNAL(subscriptionReceived(Jreen::RosterItem::Ptr,Jreen::Presence)),
|
||||
SLOT(onSubscriptionReceived(Jreen::RosterItem::Ptr,Jreen::Presence)));
|
||||
connect( m_roster, SIGNAL( presenceReceived( Jreen::RosterItem::Ptr, Jreen::Presence ) ),
|
||||
SLOT( onPresenceReceived( Jreen::RosterItem::Ptr, Jreen::Presence ) ) );
|
||||
connect( m_roster, SIGNAL( subscriptionReceived( Jreen::RosterItem::Ptr, Jreen::Presence ) ),
|
||||
SLOT( onSubscriptionReceived( Jreen::RosterItem::Ptr, Jreen::Presence ) ) );
|
||||
|
||||
#ifndef ENABLE_HEADLESS
|
||||
connect(m_avatarManager, SIGNAL(newAvatar(QString)), SLOT(onNewAvatar(QString)));
|
||||
connect( m_avatarManager, SIGNAL( newAvatar( QString ) ), SLOT( onNewAvatar( QString ) ) );
|
||||
#endif
|
||||
|
||||
m_pubSubManager = new Jreen::PubSub::Manager( m_client );
|
||||
@@ -168,15 +172,16 @@ XmppSipPlugin::XmppSipPlugin( Account *account )
|
||||
|
||||
// Clear status
|
||||
Jreen::Tune::Ptr tune( new Jreen::Tune() );
|
||||
m_pubSubManager->publishItems(QList<Jreen::Payload::Ptr>() << tune, Jreen::JID());
|
||||
|
||||
m_pubSubManager->publishItems( QList<Jreen::Payload::Ptr>() << tune, Jreen::JID() );
|
||||
}
|
||||
|
||||
|
||||
XmppSipPlugin::~XmppSipPlugin()
|
||||
{
|
||||
//Note: the next two lines don't currently work, because the deletion wipes out internally posted events, need to talk to euro about a fix
|
||||
Jreen::Tune::Ptr tune( new Jreen::Tune() );
|
||||
m_pubSubManager->publishItems(QList<Jreen::Payload::Ptr>() << tune, Jreen::JID());
|
||||
m_pubSubManager->publishItems( QList<Jreen::Payload::Ptr>() << tune, Jreen::JID() );
|
||||
|
||||
delete m_pubSubManager;
|
||||
delete m_avatarManager;
|
||||
delete m_roster;
|
||||
@@ -205,21 +210,20 @@ XmppSipPlugin::menu()
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
void
|
||||
XmppSipPlugin::connectPlugin()
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
|
||||
if( m_client->isConnected() )
|
||||
if ( m_client->isConnected() )
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO << "Already connected to server, not connecting again...";
|
||||
return;
|
||||
}
|
||||
|
||||
if( m_account->configuration().contains("enforcesecure") && m_account->configuration().value("enforcesecure").toBool() )
|
||||
if ( m_account->configuration().contains( "enforcesecure" ) && m_account->configuration().value( "enforcesecure" ).toBool() )
|
||||
{
|
||||
tLog() << Q_FUNC_INFO << "Enforcing secure connection...";
|
||||
m_client->setFeatureConfig(Jreen::Client::Encryption, Jreen::Client::Force);
|
||||
m_client->setFeatureConfig( Jreen::Client::Encryption, Jreen::Client::Force );
|
||||
}
|
||||
|
||||
tDebug() << "Connecting to the Xmpp server..." << m_client->jid().full();
|
||||
@@ -228,18 +232,17 @@ XmppSipPlugin::connectPlugin()
|
||||
QTimer::singleShot( 1000, m_client, SLOT( connectToServer() ) );
|
||||
|
||||
if ( m_client->connection() )
|
||||
connect(m_client->connection(), SIGNAL(error(Jreen::Connection::SocketError)), SLOT(onError(Jreen::Connection::SocketError)));
|
||||
connect( m_client->connection(), SIGNAL( error( Jreen::Connection::SocketError ) ), SLOT( onError( Jreen::Connection::SocketError ) ) );
|
||||
|
||||
m_state = Account::Connecting;
|
||||
emit stateChanged( m_state );
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
XmppSipPlugin::disconnectPlugin()
|
||||
{
|
||||
if (!m_client->isConnected())
|
||||
if ( !m_client->isConnected() )
|
||||
{
|
||||
if ( m_state != Account::Disconnected ) // might be Connecting
|
||||
{
|
||||
@@ -267,8 +270,6 @@ XmppSipPlugin::disconnectPlugin()
|
||||
void
|
||||
XmppSipPlugin::onConnect()
|
||||
{
|
||||
// qDebug() << Q_FUNC_INFO;
|
||||
|
||||
// update jid resource, servers like gtalk use resource binding and may
|
||||
// have changed our requested /resource
|
||||
if ( m_client->jid().resource() != m_currentResource )
|
||||
@@ -277,15 +278,9 @@ XmppSipPlugin::onConnect()
|
||||
emit jidChanged( m_client->jid().full() );
|
||||
}
|
||||
|
||||
qDebug() << "Connected to xmpp as:" << m_client->jid().full();
|
||||
|
||||
// set presence to least valid value
|
||||
m_client->setPresence(Jreen::Presence::XA, "Got Tomahawk? http://gettomahawk.com", -127);
|
||||
|
||||
// set ping timeout to 15 secs (TODO: verify if this works)
|
||||
m_client->setPingInterval(1000);
|
||||
|
||||
// load roster
|
||||
m_client->setPresence( Jreen::Presence::XA, "Got Tomahawk? http://gettomahawk.com", -127 );
|
||||
m_client->setPingInterval( 1000 );
|
||||
m_roster->load();
|
||||
|
||||
// load XmppInfoPlugin
|
||||
@@ -293,13 +288,12 @@ XmppSipPlugin::onConnect()
|
||||
{
|
||||
infoPlugin().data()->moveToThread( Tomahawk::InfoSystem::InfoSystem::instance()->workerThread().data() );
|
||||
Tomahawk::InfoSystem::InfoSystem::instance()->addInfoPlugin( infoPlugin() );
|
||||
QMetaObject::invokeMethod( infoPlugin().data(), "init", Qt::QueuedConnection );
|
||||
}
|
||||
|
||||
//FIXME: this implementation is totally broken atm, so it's disabled to avoid harm :P
|
||||
// join MUC with bare jid as nickname
|
||||
//TODO: make the room a list of rooms and make that configurable
|
||||
QString mucNickname = QString( "tomahawk@conference.qutim.org/" ).append( QString( m_client->jid().bare() ).replace( "@", "-" ) );
|
||||
// QString mucNickname = QString( "tomahawk@conference.qutim.org/" ).append( QString( m_client->jid().bare() ).replace( "@", "-" ) );
|
||||
//m_room = new Jreen::MUCRoom(m_client, Jreen::JID( mucNickname ) );
|
||||
//m_room->setHistorySeconds(0);
|
||||
//m_room->join();
|
||||
@@ -318,8 +312,6 @@ XmppSipPlugin::onConnect()
|
||||
void
|
||||
XmppSipPlugin::onDisconnect( Jreen::Client::DisconnectReason reason )
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
|
||||
switch( reason )
|
||||
{
|
||||
case Jreen::Client::User:
|
||||
@@ -346,7 +338,7 @@ XmppSipPlugin::onDisconnect( Jreen::Client::DisconnectReason reason )
|
||||
|
||||
default:
|
||||
qDebug() << "Not all Client::DisconnectReasons checked" << ( int ) reason;
|
||||
Q_ASSERT(false);
|
||||
Q_ASSERT( false );
|
||||
break;
|
||||
}
|
||||
m_state = Account::Disconnected;
|
||||
@@ -354,9 +346,9 @@ XmppSipPlugin::onDisconnect( Jreen::Client::DisconnectReason reason )
|
||||
|
||||
removeMenuHelper();
|
||||
|
||||
Q_FOREACH(const Jreen::JID &peer, m_peers.keys())
|
||||
Q_FOREACH( const Jreen::JID &peer, m_peers.keys() )
|
||||
{
|
||||
handlePeerStatus(peer, Jreen::Presence::Unavailable);
|
||||
handlePeerStatus( peer, Jreen::Presence::Unavailable );
|
||||
}
|
||||
|
||||
if ( !m_infoPlugin.isNull() )
|
||||
@@ -377,56 +369,51 @@ XmppSipPlugin::errorMessage( Jreen::Client::DisconnectReason reason )
|
||||
switch( reason )
|
||||
{
|
||||
case Jreen::Client::User:
|
||||
return tr("User Interaction");
|
||||
return tr( "User Interaction" );
|
||||
break;
|
||||
case Jreen::Client::HostUnknown:
|
||||
return tr("Host is unknown");
|
||||
return tr( "Host is unknown" );
|
||||
break;
|
||||
case Jreen::Client::ItemNotFound:
|
||||
return tr("Item not found");
|
||||
return tr( "Item not found" );
|
||||
break;
|
||||
case Jreen::Client::AuthorizationError:
|
||||
return tr("Authorization Error");
|
||||
return tr( "Authorization Error" );
|
||||
break;
|
||||
case Jreen::Client::RemoteStreamError:
|
||||
return tr("Remote Stream Error");
|
||||
return tr( "Remote Stream Error" );
|
||||
break;
|
||||
case Jreen::Client::RemoteConnectionFailed:
|
||||
return tr("Remote Connection failed");
|
||||
return tr( "Remote Connection failed" );
|
||||
break;
|
||||
case Jreen::Client::InternalServerError:
|
||||
return tr("Internal Server Error");
|
||||
return tr( "Internal Server Error" );
|
||||
break;
|
||||
case Jreen::Client::SystemShutdown:
|
||||
return tr("System shutdown");
|
||||
return tr( "System shutdown" );
|
||||
break;
|
||||
case Jreen::Client::Conflict:
|
||||
return tr("Conflict");
|
||||
return tr( "Conflict" );
|
||||
break;
|
||||
|
||||
case Jreen::Client::Unknown:
|
||||
return tr("Unknown");
|
||||
break;
|
||||
|
||||
case Jreen::Client::NoCompressionSupport:
|
||||
return tr("No Compression Support");
|
||||
return tr( "No Compression Support" );
|
||||
break;
|
||||
|
||||
case Jreen::Client::NoEncryptionSupport:
|
||||
return tr("No Encryption Support");
|
||||
return tr( "No Encryption Support" );
|
||||
break;
|
||||
|
||||
case Jreen::Client::NoAuthorizationSupport:
|
||||
return tr("No Authorization Support");
|
||||
return tr( "No Authorization Support" );
|
||||
break;
|
||||
|
||||
case Jreen::Client::NoSupportedFeature:
|
||||
return tr("No Supported Feature");
|
||||
return tr( "No Supported Feature" );
|
||||
break;
|
||||
case Jreen::Client::Unknown:
|
||||
return tr( "Unknown" );
|
||||
break;
|
||||
|
||||
default:
|
||||
qDebug() << "Not all Client::DisconnectReasons checked";
|
||||
Q_ASSERT(false);
|
||||
Q_ASSERT( false );
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -438,43 +425,22 @@ XmppSipPlugin::errorMessage( Jreen::Client::DisconnectReason reason )
|
||||
|
||||
|
||||
void
|
||||
XmppSipPlugin::sendMsg( const QString& to, const QString& msg )
|
||||
XmppSipPlugin::sendMsg( const QString& to, const SipInfo& info )
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO << to << msg;
|
||||
qDebug() << Q_FUNC_INFO << to << info;
|
||||
|
||||
if ( !m_client ) {
|
||||
if ( !m_client )
|
||||
return;
|
||||
}
|
||||
|
||||
/*******************************************************
|
||||
* Obsolete this by a SipMessage class
|
||||
*/
|
||||
QJson::Parser parser;
|
||||
bool ok;
|
||||
QVariant v = parser.parse( msg.toAscii(), &ok );
|
||||
if ( !ok || v.type() != QVariant::Map )
|
||||
{
|
||||
qDebug() << "Invalid JSON in Xmpp msg";
|
||||
return;
|
||||
}
|
||||
QVariantMap m = v.toMap();
|
||||
/*******************************************************/
|
||||
|
||||
TomahawkXmppMessage *sipMessage;
|
||||
if(m["visible"].toBool())
|
||||
if ( info.isVisible() )
|
||||
{
|
||||
sipMessage = new TomahawkXmppMessage( m["ip"].toString(),
|
||||
m["port"].toInt(),
|
||||
m["uniqname"].toString(),
|
||||
m["key"].toString()
|
||||
);
|
||||
sipMessage = new TomahawkXmppMessage( info.host(), info.port(), info.uniqname(), info.key() );
|
||||
}
|
||||
else
|
||||
{
|
||||
sipMessage = new TomahawkXmppMessage();
|
||||
}
|
||||
|
||||
qDebug() << "Send sip messsage to " << to;
|
||||
qDebug() << "Send sip messsage to" << to;
|
||||
Jreen::IQ iq( Jreen::IQ::Set, to );
|
||||
iq.addExtension( sipMessage );
|
||||
Jreen::IQReply *reply = m_client->send( iq );
|
||||
@@ -486,15 +452,6 @@ XmppSipPlugin::sendMsg( const QString& to, const QString& msg )
|
||||
void
|
||||
XmppSipPlugin::broadcastMsg( const QString& msg )
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
|
||||
if ( !m_client )
|
||||
return;
|
||||
|
||||
foreach( const Jreen::JID& jid, m_peers.keys() )
|
||||
{
|
||||
sendMsg( jid.full(), msg );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -502,14 +459,11 @@ void
|
||||
XmppSipPlugin::addContact( const QString& jid, const QString& msg )
|
||||
{
|
||||
// Add contact to the Tomahawk group on the roster
|
||||
|
||||
QString realJid = jid;
|
||||
if( !realJid.contains( '@' ) )
|
||||
if ( !realJid.contains( '@' ) )
|
||||
realJid += defaultSuffix();
|
||||
|
||||
m_roster->subscribe( realJid, msg, realJid, QStringList() << "Tomahawk" );
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -533,24 +487,24 @@ XmppSipPlugin::showAddFriendDialog()
|
||||
void
|
||||
XmppSipPlugin::publishTune( const QUrl& url, const InfoSystem::InfoStringHash& trackInfo )
|
||||
{
|
||||
if( m_account->configuration().value("publishtracks").toBool() == false )
|
||||
if ( m_account->configuration().value("publishtracks").toBool() == false )
|
||||
{
|
||||
tDebug() << Q_FUNC_INFO << m_client->jid().full() << "Not publishing now playing info (disabled in account config)";
|
||||
tDebug() << Q_FUNC_INFO << m_client->jid().full() << "Not publishing now playing info (disabled in account config)";
|
||||
return;
|
||||
}
|
||||
|
||||
if ( trackInfo.isEmpty() )
|
||||
{
|
||||
Jreen::Tune::Ptr tune( new Jreen::Tune() );
|
||||
m_pubSubManager->publishItems(QList<Jreen::Payload::Ptr>() << tune, Jreen::JID());
|
||||
m_pubSubManager->publishItems( QList<Jreen::Payload::Ptr>() << tune, Jreen::JID() );
|
||||
}
|
||||
|
||||
Jreen::Tune::Ptr tune( new Jreen::Tune() );
|
||||
|
||||
tune->setTitle( trackInfo.value( "title" ) );
|
||||
tune->setArtist( trackInfo.value( "artist" ) );
|
||||
tune->setLength( trackInfo.value("duration").toInt() );
|
||||
tune->setTrack( trackInfo.value("albumpos") );
|
||||
tune->setLength( trackInfo.value( "duration" ).toInt() );
|
||||
tune->setTrack( trackInfo.value( "albumpos" ) );
|
||||
|
||||
//TODO: provide a rating once available in Tomahawk
|
||||
tune->setRating( 10 );
|
||||
@@ -559,7 +513,7 @@ XmppSipPlugin::publishTune( const QUrl& url, const InfoSystem::InfoStringHash& t
|
||||
tune->setSource( "Tomahawk" );
|
||||
|
||||
tune->setUri( url );
|
||||
tDebug() << Q_FUNC_INFO << "Setting URI of " << tune->uri().toString();
|
||||
tDebug() << Q_FUNC_INFO << "Setting URI of" << tune->uri().toString();
|
||||
|
||||
m_pubSubManager->publishItems( QList<Jreen::Payload::Ptr>() << tune, Jreen::JID() );
|
||||
}
|
||||
@@ -643,13 +597,16 @@ XmppSipPlugin::configurationChanged()
|
||||
}
|
||||
}
|
||||
|
||||
void XmppSipPlugin::setupClientHelper()
|
||||
|
||||
void
|
||||
XmppSipPlugin::setupClientHelper()
|
||||
{
|
||||
m_client->setProxyFactory( TomahawkUtils::proxyFactory( true ) );
|
||||
Jreen::JID jid = Jreen::JID( m_currentUsername );
|
||||
m_client->setJID( jid );
|
||||
m_client->setPassword( m_currentPassword );
|
||||
|
||||
if( !m_currentServer.isEmpty() )
|
||||
if ( !m_currentServer.isEmpty() )
|
||||
{
|
||||
// set explicit server details
|
||||
m_client->setServer( m_currentServer );
|
||||
@@ -663,20 +620,22 @@ void XmppSipPlugin::setupClientHelper()
|
||||
}
|
||||
}
|
||||
|
||||
void XmppSipPlugin::addMenuHelper()
|
||||
|
||||
void
|
||||
XmppSipPlugin::addMenuHelper()
|
||||
{
|
||||
#ifndef ENABLE_HEADLESS
|
||||
if( !m_menu )
|
||||
if ( !m_menu )
|
||||
{
|
||||
m_menu = new QMenu( QString( "%1 (" ).arg( friendlyName() ).append( readUsername() ).append(")" ) );
|
||||
|
||||
QAction* addFriendAction = m_menu->addAction( tr( "Add Friend..." ) );
|
||||
connect( addFriendAction, SIGNAL( triggered() ), this, SLOT( showAddFriendDialog() ) );
|
||||
connect( addFriendAction, SIGNAL( triggered() ), SLOT( showAddFriendDialog() ) );
|
||||
|
||||
if( readXmlConsoleEnabled() )
|
||||
if ( readXmlConsoleEnabled() )
|
||||
{
|
||||
QAction* showXmlConsoleAction = m_menu->addAction( tr( "XML Console...") );
|
||||
connect( showXmlConsoleAction, SIGNAL( triggered() ), this, SLOT( showXmlConsole() ) );
|
||||
QAction* showXmlConsoleAction = m_menu->addAction( tr( "XML Console..." ) );
|
||||
connect( showXmlConsoleAction, SIGNAL( triggered() ), SLOT( showXmlConsole() ) );
|
||||
}
|
||||
|
||||
emit addMenu( m_menu );
|
||||
@@ -684,10 +643,12 @@ void XmppSipPlugin::addMenuHelper()
|
||||
#endif
|
||||
}
|
||||
|
||||
void XmppSipPlugin::removeMenuHelper()
|
||||
|
||||
void
|
||||
XmppSipPlugin::removeMenuHelper()
|
||||
{
|
||||
#ifndef ENABLE_HEADLESS
|
||||
if( m_menu )
|
||||
if ( m_menu )
|
||||
{
|
||||
emit removeMenu( m_menu );
|
||||
|
||||
@@ -698,37 +659,35 @@ void XmppSipPlugin::removeMenuHelper()
|
||||
}
|
||||
|
||||
|
||||
void XmppSipPlugin::onNewMessage( const Jreen::Message& message )
|
||||
void
|
||||
XmppSipPlugin::onNewMessage( const Jreen::Message& message )
|
||||
{
|
||||
if ( m_state != Account::Connected )
|
||||
return;
|
||||
|
||||
// qDebug() << Q_FUNC_INFO << "message type" << message.subtype();
|
||||
|
||||
QString from = message.from().full();
|
||||
QString msg = message.body();
|
||||
|
||||
if(msg.isEmpty())
|
||||
if ( msg.isEmpty() )
|
||||
return;
|
||||
|
||||
if( message.subtype() == Jreen::Message::Error )
|
||||
if ( message.subtype() == Jreen::Message::Error )
|
||||
{
|
||||
tDebug() << Q_FUNC_INFO << "Received error message from " << from << ", not answering... (Condition: "
|
||||
tDebug() << Q_FUNC_INFO << "Received error message from" << from << ", not answering... (Condition:"
|
||||
<< ( message.error().isNull() ? -1 : message.error()->condition() ) << ")";
|
||||
return;
|
||||
}
|
||||
|
||||
SipInfo info = SipInfo::fromJson( msg );
|
||||
|
||||
if ( !info.isValid() )
|
||||
{
|
||||
QString to = from;
|
||||
QString response = QString( tr("I'm sorry -- I'm just an automatic presence used by Tomahawk Player"
|
||||
" (http://gettomahawk.com). If you are getting this message, the person you"
|
||||
" are trying to reach is probably not signed on, so please try again later!") );
|
||||
QString response = QString( tr( "I'm sorry -- I'm just an automatic presence used by Tomahawk Player"
|
||||
" (http://gettomahawk.com). If you are getting this message, the person you"
|
||||
" are trying to reach is probably not signed on, so please try again later!" ) );
|
||||
|
||||
// this is not a sip message, so we send it directly through the client
|
||||
m_client->send( Jreen::Message ( Jreen::Message::Error, Jreen::JID(to), response) );
|
||||
m_client->send( Jreen::Message ( Jreen::Message::Error, Jreen::JID( to ), response) );
|
||||
|
||||
emit msgReceived( from, msg );
|
||||
return;
|
||||
@@ -739,7 +698,8 @@ void XmppSipPlugin::onNewMessage( const Jreen::Message& message )
|
||||
}
|
||||
|
||||
|
||||
void XmppSipPlugin::onPresenceReceived( const Jreen::RosterItem::Ptr &item, const Jreen::Presence& presence )
|
||||
void
|
||||
XmppSipPlugin::onPresenceReceived( const Jreen::RosterItem::Ptr& item, const Jreen::Presence& presence )
|
||||
{
|
||||
Q_UNUSED(item);
|
||||
if ( m_state != Account::Connected )
|
||||
@@ -750,19 +710,20 @@ void XmppSipPlugin::onPresenceReceived( const Jreen::RosterItem::Ptr &item, cons
|
||||
|
||||
qDebug() << Q_FUNC_INFO << "* New presence:" << fulljid << presence.subtype();
|
||||
|
||||
if( jid == m_client->jid() )
|
||||
if ( jid == m_client->jid() )
|
||||
return;
|
||||
|
||||
if ( presence.error() ) {
|
||||
if ( presence.error() )
|
||||
{
|
||||
//qDebug() << Q_FUNC_INFO << fulljid << "Running tomahawk: no" << "presence error";
|
||||
return;
|
||||
}
|
||||
|
||||
// ignore anyone not Running tomahawk:
|
||||
Jreen::Capabilities::Ptr caps = presence.payload<Jreen::Capabilities>();
|
||||
if( caps )
|
||||
if ( caps )
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO << fulljid << "Running tomahawk: maybe" << "caps " << caps->node() << "requesting disco...";
|
||||
qDebug() << Q_FUNC_INFO << fulljid << "Running tomahawk: maybe" << "caps" << caps->node() << "requesting disco...";
|
||||
|
||||
// request disco features
|
||||
QString node = caps->node() + '#' + caps->ver();
|
||||
@@ -774,7 +735,7 @@ void XmppSipPlugin::onPresenceReceived( const Jreen::RosterItem::Ptr &item, cons
|
||||
reply->setData( RequestDisco );
|
||||
connect( reply, SIGNAL( received( Jreen::IQ ) ), SLOT( onNewIq( Jreen::IQ ) ) );
|
||||
}
|
||||
else if( !caps )
|
||||
else if ( !caps )
|
||||
{
|
||||
// qDebug() << Q_FUNC_INFO << "Running tomahawk: no" << "no caps";
|
||||
if ( presenceMeansOnline( m_peers[ jid ] ) )
|
||||
@@ -783,46 +744,40 @@ void XmppSipPlugin::onPresenceReceived( const Jreen::RosterItem::Ptr &item, cons
|
||||
}
|
||||
|
||||
|
||||
void XmppSipPlugin::onSubscriptionReceived( const Jreen::RosterItem::Ptr& item, const Jreen::Presence& presence )
|
||||
void
|
||||
XmppSipPlugin::onSubscriptionReceived( const Jreen::RosterItem::Ptr& item, const Jreen::Presence& presence )
|
||||
{
|
||||
if ( m_state != Account::Connected )
|
||||
return;
|
||||
|
||||
// qDebug() << Q_FUNC_INFO << "presence type:" << presence.subtype();
|
||||
if(item)
|
||||
if ( item )
|
||||
qDebug() << Q_FUNC_INFO << presence.from().full() << "subs" << item->subscription() << "ask" << item->ask();
|
||||
else
|
||||
qDebug() << Q_FUNC_INFO << "item empty";
|
||||
|
||||
// don't do anything if the contact is already subscribed to us
|
||||
if( presence.subtype() != Jreen::Presence::Subscribe ||
|
||||
(
|
||||
item && (item->subscription() == Jreen::RosterItem::From || item->subscription() == Jreen::RosterItem::Both)
|
||||
)
|
||||
)
|
||||
if ( presence.subtype() != Jreen::Presence::Subscribe ||
|
||||
( item && (item->subscription() == Jreen::RosterItem::From || item->subscription() == Jreen::RosterItem::Both ) ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// check if the requester is already on the roster
|
||||
if(item &&
|
||||
(
|
||||
item->subscription() == Jreen::RosterItem::To ||
|
||||
( item->subscription() == Jreen::RosterItem::None && !item->ask().isEmpty() )
|
||||
)
|
||||
)
|
||||
if ( item &&
|
||||
( item->subscription() == Jreen::RosterItem::To || ( item->subscription() == Jreen::RosterItem::None && !item->ask().isEmpty() ) ) )
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO << presence.from().bare() << "already on the roster so we assume ack'ing subscription request is okay...";
|
||||
m_roster->allowSubscription(presence.from(), true);
|
||||
m_roster->allowSubscription( presence.from(), true );
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
#ifndef ENABLE_HEADLESS
|
||||
// preparing the confirm box for the user
|
||||
QMessageBox *confirmBox = new QMessageBox(
|
||||
QMessageBox::Question,
|
||||
tr( "Authorize User" ),
|
||||
QString( tr( "Do you want to grant <b>%1</b> access to your Collection?" ) ).arg(presence.from().bare()),
|
||||
QString( tr( "Do you want to add <b>%1</b> to your friend list?" ) ).arg( presence.from().bare() ),
|
||||
QMessageBox::Yes | QMessageBox::No,
|
||||
TomahawkUtils::tomahawkWindow()
|
||||
);
|
||||
@@ -858,11 +813,10 @@ XmppSipPlugin::onSubscriptionRequestConfirmed( int result )
|
||||
sender()->deleteLater();
|
||||
|
||||
QMessageBox::StandardButton allowSubscription = static_cast< QMessageBox::StandardButton >( result );
|
||||
|
||||
if ( allowSubscription == QMessageBox::Yes )
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO << jid.bare() << "accepted by user, adding to roster";
|
||||
addContact(jid, "");
|
||||
addContact( jid, "" );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -874,7 +828,8 @@ XmppSipPlugin::onSubscriptionRequestConfirmed( int result )
|
||||
}
|
||||
|
||||
|
||||
void XmppSipPlugin::onNewIq( const Jreen::IQ& iq )
|
||||
void
|
||||
XmppSipPlugin::onNewIq( const Jreen::IQ& iq )
|
||||
{
|
||||
if ( m_state != Account::Connected )
|
||||
return;
|
||||
@@ -888,10 +843,9 @@ void XmppSipPlugin::onNewIq( const Jreen::IQ& iq )
|
||||
Jreen::Disco::Info *discoInfo = iq.payload< Jreen::Disco::Info >().data();
|
||||
if ( !discoInfo )
|
||||
return;
|
||||
|
||||
iq.accept();
|
||||
|
||||
Jreen::JID jid = iq.from();
|
||||
|
||||
Jreen::DataForm::Ptr form = discoInfo->form();
|
||||
|
||||
if ( discoInfo->features().contains( TOMAHAWK_FEATURE ) )
|
||||
@@ -907,8 +861,8 @@ void XmppSipPlugin::onNewIq( const Jreen::IQ& iq )
|
||||
Jreen::SoftwareVersion::Ptr softwareVersion = iq.payload<Jreen::SoftwareVersion>();
|
||||
if ( softwareVersion )
|
||||
{
|
||||
QString versionString = QString("%1 %2 %3").arg( softwareVersion->name(), softwareVersion->os(), softwareVersion->version() );
|
||||
qDebug() << Q_FUNC_INFO << "Received software version for " << iq.from().full() << ":" << versionString;
|
||||
QString versionString = QString( "%1 %2 %3" ).arg( softwareVersion->name(), softwareVersion->os(), softwareVersion->version() );
|
||||
qDebug() << Q_FUNC_INFO << "Received software version for" << iq.from().full() << ":" << versionString;
|
||||
emit softwareVersionReceived( iq.from().full(), versionString );
|
||||
}
|
||||
}
|
||||
@@ -936,12 +890,9 @@ void XmppSipPlugin::onNewIq( const Jreen::IQ& iq )
|
||||
|
||||
SipInfo info;
|
||||
info.setVisible( sipMessage->visible() );
|
||||
if( sipMessage->visible() )
|
||||
if ( sipMessage->visible() )
|
||||
{
|
||||
|
||||
QHostInfo hi;
|
||||
hi.setHostName( sipMessage->ip() );
|
||||
info.setHost( hi );
|
||||
info.setHost( sipMessage->ip() );
|
||||
info.setPort( sipMessage->port() );
|
||||
info.setUniqname( sipMessage->uniqname() );
|
||||
info.setKey( sipMessage->key() );
|
||||
@@ -956,7 +907,8 @@ void XmppSipPlugin::onNewIq( const Jreen::IQ& iq )
|
||||
}
|
||||
|
||||
|
||||
bool XmppSipPlugin::presenceMeansOnline( Jreen::Presence::Type p )
|
||||
bool
|
||||
XmppSipPlugin::presenceMeansOnline( Jreen::Presence::Type p )
|
||||
{
|
||||
switch( p )
|
||||
{
|
||||
@@ -965,22 +917,21 @@ bool XmppSipPlugin::presenceMeansOnline( Jreen::Presence::Type p )
|
||||
case Jreen::Presence::Error:
|
||||
return false;
|
||||
break;
|
||||
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void XmppSipPlugin::handlePeerStatus( const Jreen::JID& jid, Jreen::Presence::Type presenceType )
|
||||
void
|
||||
XmppSipPlugin::handlePeerStatus( const Jreen::JID& jid, Jreen::Presence::Type presenceType )
|
||||
{
|
||||
QString fulljid = jid.full();
|
||||
|
||||
// "going offline" event
|
||||
if ( !presenceMeansOnline( presenceType ) &&
|
||||
( !m_peers.contains( jid ) ||
|
||||
presenceMeansOnline( m_peers.value( jid ) )
|
||||
)
|
||||
)
|
||||
( !m_peers.contains( jid ) || presenceMeansOnline( m_peers.value( jid ) ) ) )
|
||||
{
|
||||
m_peers[ jid ] = presenceType;
|
||||
qDebug() << Q_FUNC_INFO << "* Peer goes offline:" << fulljid;
|
||||
@@ -991,10 +942,7 @@ void XmppSipPlugin::handlePeerStatus( const Jreen::JID& jid, Jreen::Presence::Ty
|
||||
|
||||
// "coming online" event
|
||||
if ( presenceMeansOnline( presenceType ) &&
|
||||
( !m_peers.contains( jid ) ||
|
||||
!presenceMeansOnline( m_peers.value( jid ) )
|
||||
)
|
||||
)
|
||||
( !m_peers.contains( jid ) || !presenceMeansOnline( m_peers.value( jid ) ) ) )
|
||||
{
|
||||
m_peers[ jid ] = presenceType;
|
||||
qDebug() << Q_FUNC_INFO << "* Peer goes online:" << fulljid;
|
||||
@@ -1021,7 +969,8 @@ void XmppSipPlugin::handlePeerStatus( const Jreen::JID& jid, Jreen::Presence::Ty
|
||||
}
|
||||
|
||||
|
||||
void XmppSipPlugin::onNewAvatar( const QString& jid )
|
||||
void
|
||||
XmppSipPlugin::onNewAvatar( const QString& jid )
|
||||
{
|
||||
#ifndef ENABLE_HEADLESS
|
||||
// qDebug() << Q_FUNC_INFO << jid;
|
||||
@@ -1032,20 +981,20 @@ void XmppSipPlugin::onNewAvatar( const QString& jid )
|
||||
|
||||
// find peers for the jid
|
||||
QList< Jreen::JID > peers = m_peers.keys();
|
||||
foreach ( const Jreen::JID &peer, peers )
|
||||
foreach ( const Jreen::JID& peer, peers )
|
||||
{
|
||||
if( peer.bare() == jid )
|
||||
if ( peer.bare() == jid )
|
||||
{
|
||||
emit avatarReceived ( peer.full(), m_avatarManager->avatar( jid ) );
|
||||
emit avatarReceived( peer.full(), m_avatarManager->avatar( jid ) );
|
||||
}
|
||||
}
|
||||
|
||||
if ( jid == m_client->jid().bare() )
|
||||
// own avatar
|
||||
emit avatarReceived ( m_avatarManager->avatar( jid ) );
|
||||
emit avatarReceived( m_avatarManager->avatar( jid ) );
|
||||
else
|
||||
// someone else's avatar
|
||||
emit avatarReceived ( jid, m_avatarManager->avatar( jid ) );
|
||||
emit avatarReceived( jid, m_avatarManager->avatar( jid ) );
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -1066,6 +1015,7 @@ XmppSipPlugin::readUsername()
|
||||
return credentials.contains( "username" ) ? credentials[ "username" ].toString() : QString();
|
||||
}
|
||||
|
||||
|
||||
QString
|
||||
XmppSipPlugin::readPassword()
|
||||
{
|
||||
|
@@ -48,9 +48,6 @@
|
||||
#include <QtGui/QMessageBox>
|
||||
#endif
|
||||
|
||||
#define TOMAHAWK_FEATURE QLatin1String( "tomahawk:sip:v1" )
|
||||
#define TOMAHAWK_CAP_NODE_NAME QLatin1String( "http://tomahawk-player.org/" )
|
||||
|
||||
#include "accounts/AccountDllMacro.h"
|
||||
|
||||
#include "../XmppInfoPlugin.h"
|
||||
@@ -89,11 +86,12 @@ public slots:
|
||||
virtual void disconnectPlugin();
|
||||
virtual void checkSettings();
|
||||
virtual void configurationChanged();
|
||||
virtual void sendMsg( const QString& to, const QString& msg );
|
||||
void broadcastMsg( const QString &msg );
|
||||
virtual void addContact( const QString &jid, const QString& msg = QString() );
|
||||
virtual void sendMsg( const QString& peerId, const SipInfo& info );
|
||||
virtual void addContact( const QString& peerId, const QString& msg = QString() );
|
||||
|
||||
void broadcastMsg( const QString& msg );
|
||||
void showAddFriendDialog();
|
||||
void publishTune( const QUrl &url, const Tomahawk::InfoSystem::InfoStringHash &trackInfo );
|
||||
void publishTune( const QUrl& url, const Tomahawk::InfoSystem::InfoStringHash& trackInfo );
|
||||
|
||||
protected:
|
||||
virtual QString defaultSuffix() const;
|
||||
@@ -103,14 +101,14 @@ private slots:
|
||||
void onConnect();
|
||||
void onDisconnect( Jreen::Client::DisconnectReason reason );
|
||||
|
||||
void onPresenceReceived( const Jreen::RosterItem::Ptr &item, const Jreen::Presence& presence );
|
||||
void onSubscriptionReceived( const Jreen::RosterItem::Ptr &item, const Jreen::Presence& presence );
|
||||
void onPresenceReceived( const Jreen::RosterItem::Ptr& item, const Jreen::Presence& presence );
|
||||
void onSubscriptionReceived( const Jreen::RosterItem::Ptr& item, const Jreen::Presence& presence );
|
||||
void onSubscriptionRequestConfirmed( int result );
|
||||
|
||||
void onNewMessage( const Jreen::Message& message );
|
||||
void onError( const Jreen::Connection::SocketError& e );
|
||||
void onNewIq( const Jreen::IQ &iq );
|
||||
void onNewAvatar( const QString &jid );
|
||||
void onNewIq( const Jreen::IQ& iq );
|
||||
void onNewAvatar( const QString& jid );
|
||||
|
||||
private:
|
||||
bool readXmlConsoleEnabled();
|
||||
@@ -125,7 +123,7 @@ private:
|
||||
void removeMenuHelper();
|
||||
|
||||
bool presenceMeansOnline( Jreen::Presence::Type p );
|
||||
void handlePeerStatus( const Jreen::JID &jid, Jreen::Presence::Type presenceType );
|
||||
void handlePeerStatus( const Jreen::JID& jid, Jreen::Presence::Type presenceType );
|
||||
|
||||
QString m_currentUsername;
|
||||
QString m_currentPassword;
|
||||
@@ -133,22 +131,24 @@ private:
|
||||
int m_currentPort;
|
||||
QString m_currentResource;
|
||||
|
||||
QWeakPointer< Tomahawk::InfoSystem::XmppInfoPlugin> m_infoPlugin;
|
||||
QWeakPointer< Tomahawk::InfoSystem::XmppInfoPlugin > m_infoPlugin;
|
||||
Tomahawk::Accounts::Account::ConnectionState m_state;
|
||||
|
||||
// sort out
|
||||
Jreen::Client *m_client;
|
||||
Jreen::Client* m_client;
|
||||
|
||||
Jreen::MUCRoom* m_room;
|
||||
Jreen::SimpleRoster* m_roster;
|
||||
QHash< Jreen::JID, Jreen::Presence::Type > m_peers;
|
||||
|
||||
Jreen::MUCRoom *m_room;
|
||||
Jreen::SimpleRoster *m_roster;
|
||||
QHash<Jreen::JID, Jreen::Presence::Type> m_peers;
|
||||
#ifndef ENABLE_HEADLESS
|
||||
QHash<Jreen::JID, QMessageBox*> m_subscriptionConfirmBoxes;
|
||||
QHash< Jreen::JID, QMessageBox* > m_subscriptionConfirmBoxes;
|
||||
QMenu* m_menu;
|
||||
XmlConsole* m_xmlConsole;
|
||||
#endif
|
||||
|
||||
enum IqContext { NoContext, RequestDisco, RequestedDisco, SipMessageSent, RequestedVCard, RequestVersion, RequestedVersion };
|
||||
AvatarManager *m_avatarManager;
|
||||
AvatarManager* m_avatarManager;
|
||||
Jreen::PubSub::Manager* m_pubSubManager;
|
||||
};
|
||||
|
||||
|
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 4.6 KiB |
@@ -29,6 +29,7 @@
|
||||
#include <QTimer>
|
||||
|
||||
#include "database/Database.h"
|
||||
#include "database/DatabaseImpl.h"
|
||||
#include "network/Servent.h"
|
||||
#include "accounts/AccountDllMacro.h"
|
||||
|
||||
@@ -101,14 +102,14 @@ public slots:
|
||||
// Keep newer versions first
|
||||
QByteArray advert = QString( "TOMAHAWKADVERT:%1:%2:%3" )
|
||||
.arg( m_port )
|
||||
.arg( Database::instance()->dbid() )
|
||||
.arg( Database::instance()->impl()->dbid() )
|
||||
.arg( QHostInfo::localHostName() )
|
||||
.toAscii();
|
||||
m_sock.writeDatagram( advert.data(), advert.size(),
|
||||
QHostAddress::Broadcast, ZCONF_PORT );
|
||||
advert = QString( "TOMAHAWKADVERT:%1:%2" )
|
||||
.arg( m_port )
|
||||
.arg( Database::instance()->dbid() )
|
||||
.arg( Database::instance()->impl()->dbid() )
|
||||
.toAscii();
|
||||
m_sock.writeDatagram( advert.data(), advert.size(),
|
||||
QHostAddress::Broadcast, ZCONF_PORT );
|
||||
@@ -140,7 +141,7 @@ private slots:
|
||||
{
|
||||
bool ok;
|
||||
int port = parts.at(1).toInt( &ok );
|
||||
if ( ok && Database::instance()->dbid() != parts.at( 2 ) )
|
||||
if ( ok && Database::instance()->impl()->dbid() != parts.at( 2 ) )
|
||||
{
|
||||
emit tomahawkHostFound( sender.toString(), port, parts.at( 3 ), parts.at( 2 ) );
|
||||
}
|
||||
@@ -149,7 +150,7 @@ private slots:
|
||||
{
|
||||
bool ok;
|
||||
int port = parts.at(1).toInt( &ok );
|
||||
if ( ok && Database::instance()->dbid() != parts.at( 2 ) )
|
||||
if ( ok && Database::instance()->impl()->dbid() != parts.at( 2 ) )
|
||||
{
|
||||
qDebug() << "ADVERT received:" << sender << port;
|
||||
Node *n = new Node( sender.toString(), parts.at( 2 ), port );
|
||||
|
@@ -64,7 +64,7 @@ public slots:
|
||||
|
||||
void advertise();
|
||||
|
||||
void sendMsg( const QString& , const QString& ) {}
|
||||
void sendMsg( const QString& peerId , const SipInfo& ) {}
|
||||
void broadcastMsg( const QString & ) {}
|
||||
void addContact( const QString &, const QString& ) {}
|
||||
|
||||
|
@@ -86,7 +86,7 @@ void
|
||||
ZeroconfAccount::authenticate()
|
||||
{
|
||||
if ( !isAuthenticated() )
|
||||
static_cast< ZeroconfPlugin* >( m_sipPlugin.data() )->connectPlugin();
|
||||
sipPlugin()->connectPlugin();
|
||||
}
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@ void
|
||||
ZeroconfAccount::deauthenticate()
|
||||
{
|
||||
if ( isAuthenticated() )
|
||||
static_cast< ZeroconfPlugin* >( m_sipPlugin.data() )->disconnectPlugin();
|
||||
sipPlugin()->disconnectPlugin();
|
||||
}
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@ ZeroconfAccount::connectionState() const
|
||||
return Disconnected;
|
||||
|
||||
// TODO can we get called before sipPlugin()?
|
||||
return static_cast< ZeroconfPlugin* >( m_sipPlugin.data() )->connectionState();
|
||||
return m_sipPlugin.data()->connectionState();
|
||||
}
|
||||
|
||||
|
||||
@@ -120,10 +120,10 @@ SipPlugin*
|
||||
ZeroconfAccount::sipPlugin()
|
||||
{
|
||||
if ( m_sipPlugin.isNull() )
|
||||
m_sipPlugin = QWeakPointer< SipPlugin >( new ZeroconfPlugin( this ) );
|
||||
m_sipPlugin = QWeakPointer< ZeroconfPlugin >( new ZeroconfPlugin( this ) );
|
||||
|
||||
return m_sipPlugin.data();
|
||||
}
|
||||
|
||||
|
||||
Q_EXPORT_PLUGIN2( Tomahawk::Accounts::AccountFactory, Tomahawk::Accounts::ZeroconfFactory )
|
||||
Q_EXPORT_PLUGIN2( Tomahawk::Accounts::AccountFactory, Tomahawk::Accounts::ZeroconfFactory )
|
||||
|
@@ -19,6 +19,7 @@
|
||||
#ifndef ZEROCONF_ACCOUNTS_H
|
||||
#define ZEROCONF_ACCOUNTS_H
|
||||
|
||||
#include "Zeroconf.h"
|
||||
#include "accounts/Account.h"
|
||||
#include "../AccountDllMacro.h"
|
||||
|
||||
@@ -71,7 +72,7 @@ public:
|
||||
QWidget* aclWidget() { return 0; }
|
||||
|
||||
private:
|
||||
QWeakPointer< SipPlugin > m_sipPlugin;
|
||||
QWeakPointer< ZeroconfPlugin > m_sipPlugin;
|
||||
};
|
||||
|
||||
}
|
||||
|
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.3 KiB |
@@ -66,17 +66,17 @@ CrashReporter::CrashReporter( const QStringList& args )
|
||||
m_minidump = m_dir + '/' + args.value( 2 ) + ".dmp";
|
||||
m_product_name = args.value( 3 );
|
||||
|
||||
setFixedSize( sizeHint() );
|
||||
|
||||
//hide until "send report" has been clicked
|
||||
ui.progressBar->setVisible( false );
|
||||
ui.button->setVisible( false );
|
||||
ui.progressLabel->setVisible( false );
|
||||
connect( ui.sendButton, SIGNAL( clicked() ), SLOT( onSendButton() ));
|
||||
|
||||
connect( ui.sendButton, SIGNAL( clicked() ), SLOT( onSendButton() ) );
|
||||
|
||||
adjustSize();
|
||||
setFixedSize( size() );
|
||||
}
|
||||
|
||||
|
||||
CrashReporter::~CrashReporter()
|
||||
{
|
||||
delete m_http;
|
||||
@@ -186,6 +186,7 @@ CrashReporter::onFail( int error, const QString& errorString )
|
||||
qDebug() << "Error:" << error << errorString;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
CrashReporter::onSendButton()
|
||||
{
|
||||
@@ -194,5 +195,9 @@ CrashReporter::onSendButton()
|
||||
ui.progressLabel->setVisible( true );
|
||||
ui.sendButton->setEnabled( false );
|
||||
ui.dontSendButton->setEnabled( false );
|
||||
|
||||
adjustSize();
|
||||
setFixedSize( size() );
|
||||
|
||||
QTimer::singleShot( 0, this, SLOT( send() ) );
|
||||
}
|
||||
|
@@ -9,8 +9,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>438</width>
|
||||
<height>246</height>
|
||||
<width>376</width>
|
||||
<height>216</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
@@ -77,7 +77,7 @@
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string><html><head/><body><p><span style=" font-weight:600;">Sorry!</span> Tomahawk crashed. Please tell us about it! Tomahawk has created an error report for you that can help improve the stability in the future. You can now send the this report directly to the Tomahawk developers.</p></body></html></string>
|
||||
<string><html><head/><body><p><span style=" font-weight:600;">Sorry!</span> Tomahawk crashed. Please tell us about it! Tomahawk has created an error report for you that can help improve the stability in the future. You can now send this report directly to the Tomahawk developers.</p></body></html></string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::RichText</enum>
|
||||
|
@@ -9,6 +9,7 @@ list(APPEND simple_plugins
|
||||
MusixMatch
|
||||
MusicBrainz
|
||||
Rovi
|
||||
Discogs
|
||||
)
|
||||
|
||||
foreach(simple_plugin ${simple_plugins})
|
||||
|
@@ -52,8 +52,23 @@ ChartsPlugin::ChartsPlugin()
|
||||
: InfoPlugin()
|
||||
, m_chartsFetchJobs( 0 )
|
||||
{
|
||||
tDebug( LOGVERBOSE ) << Q_FUNC_INFO << QThread::currentThread();
|
||||
/// If you add resource, update version aswell
|
||||
m_chartVersion = "2.3";
|
||||
m_supportedGetTypes << InfoChart << InfoChartCapabilities;
|
||||
}
|
||||
|
||||
|
||||
ChartsPlugin::~ChartsPlugin()
|
||||
{
|
||||
tDebug( LOGVERBOSE ) << Q_FUNC_INFO << QThread::currentThread();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ChartsPlugin::init()
|
||||
{
|
||||
tDebug( LOGVERBOSE ) << Q_FUNC_INFO << QThread::currentThread();
|
||||
QVariantList source_qvarlist = TomahawkUtils::Cache::instance()->getData( "ChartsPlugin", "chart_sources" ).toList();
|
||||
foreach( const QVariant & source, source_qvarlist ) {
|
||||
m_chartResources.append( source.toString() );
|
||||
@@ -63,14 +78,6 @@ ChartsPlugin::ChartsPlugin()
|
||||
tDebug( LOGVERBOSE ) << Q_FUNC_INFO << "total sources" << m_chartResources.size() << source_qvarlist.size();
|
||||
if( m_chartResources.size() == 0 )
|
||||
fetchChartSourcesList( true );
|
||||
m_supportedGetTypes << InfoChart << InfoChartCapabilities;
|
||||
|
||||
}
|
||||
|
||||
|
||||
ChartsPlugin::~ChartsPlugin()
|
||||
{
|
||||
tDebug( LOGVERBOSE ) << Q_FUNC_INFO;
|
||||
}
|
||||
|
||||
|
||||
@@ -219,7 +226,7 @@ ChartsPlugin::fetchChartSourcesList( bool fetchOnlySourceList )
|
||||
reply->setProperty( "only_source_list", fetchOnlySourceList );
|
||||
|
||||
|
||||
tDebug() << "fetching:" << url;
|
||||
tDebug() << Q_FUNC_INFO << "fetching:" << url;
|
||||
connect( reply, SIGNAL( finished() ), SLOT( chartSourcesList() ) );
|
||||
|
||||
}
|
||||
@@ -227,7 +234,7 @@ ChartsPlugin::fetchChartSourcesList( bool fetchOnlySourceList )
|
||||
void
|
||||
ChartsPlugin::chartSourcesList()
|
||||
{
|
||||
tDebug( LOGVERBOSE ) << "Got chart sources list";
|
||||
tDebug( LOGVERBOSE ) << Q_FUNC_INFO << "Got chart sources list";
|
||||
QNetworkReply* reply = qobject_cast<QNetworkReply*>( sender() );
|
||||
|
||||
if ( reply->error() == QNetworkReply::NoError )
|
||||
@@ -239,7 +246,7 @@ ChartsPlugin::chartSourcesList()
|
||||
|
||||
if ( !ok )
|
||||
{
|
||||
tLog() << "Failed to parse sources" << p.errorString() << "On line" << p.errorLine();
|
||||
tLog() << Q_FUNC_INFO << "Failed to parse sources" << p.errorString() << "On line" << p.errorLine();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -253,6 +260,8 @@ ChartsPlugin::chartSourcesList()
|
||||
if( !reply->property("only_source_list" ).toBool() )
|
||||
fetchAllChartSources();
|
||||
}
|
||||
else
|
||||
tDebug() << Q_FUNC_INFO << "Encountered error fetching chart sources list";
|
||||
}
|
||||
|
||||
void ChartsPlugin::fetchAllChartSources()
|
||||
@@ -266,7 +275,7 @@ void ChartsPlugin::fetchAllChartSources()
|
||||
QNetworkReply* reply = TomahawkUtils::nam()->get( QNetworkRequest( url ) );
|
||||
reply->setProperty( "chart_source", source);
|
||||
|
||||
tDebug() << "fetching:" << url;
|
||||
tDebug() << Q_FUNC_INFO << "fetching:" << url;
|
||||
connect( reply, SIGNAL( finished() ), SLOT( chartsList() ) );
|
||||
|
||||
m_chartsFetchJobs++;
|
||||
@@ -291,7 +300,7 @@ void ChartsPlugin::fetchChart( Tomahawk::InfoSystem::InfoRequestData requestData
|
||||
void
|
||||
ChartsPlugin::chartsList()
|
||||
{
|
||||
tDebug( LOGVERBOSE ) << "Got chart list result";
|
||||
tDebug( LOGVERBOSE ) << Q_FUNC_INFO << "Got chart list result";
|
||||
QNetworkReply* reply = qobject_cast<QNetworkReply*>( sender() );
|
||||
|
||||
if ( reply->error() == QNetworkReply::NoError )
|
||||
|
@@ -55,6 +55,7 @@ public:
|
||||
ChartType chartType() const { return m_chartType; }
|
||||
|
||||
protected slots:
|
||||
virtual void init();
|
||||
virtual void getInfo( Tomahawk::InfoSystem::InfoRequestData requestData );
|
||||
virtual void notInCacheSlot( Tomahawk::InfoSystem::InfoStringHash criteria, Tomahawk::InfoSystem::InfoRequestData requestData );
|
||||
|
||||
|
189
src/infoplugins/generic/discogs/DiscogsPlugin.cpp
Normal file
@@ -0,0 +1,189 @@
|
||||
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
||||
*
|
||||
* Copyright 2012 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 "DiscogsPlugin.h"
|
||||
|
||||
#include <QNetworkReply>
|
||||
#include <QDomDocument>
|
||||
#include <QtPlugin>
|
||||
|
||||
#include "utils/TomahawkUtils.h"
|
||||
#include "utils/Logger.h"
|
||||
#include "utils/Closure.h"
|
||||
#include <parser.h>
|
||||
|
||||
using namespace Tomahawk::InfoSystem;
|
||||
|
||||
|
||||
DiscogsPlugin::DiscogsPlugin()
|
||||
: InfoPlugin()
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
m_supportedGetTypes << Tomahawk::InfoSystem::InfoAlbumSongs;
|
||||
}
|
||||
|
||||
|
||||
DiscogsPlugin::~DiscogsPlugin() {}
|
||||
|
||||
|
||||
void
|
||||
DiscogsPlugin::getInfo( Tomahawk::InfoSystem::InfoRequestData requestData )
|
||||
{
|
||||
if ( !requestData.input.canConvert< Tomahawk::InfoSystem::InfoStringHash >() )
|
||||
{
|
||||
emit info( requestData, QVariant() );
|
||||
return;
|
||||
}
|
||||
|
||||
InfoStringHash hash = requestData.input.value< Tomahawk::InfoSystem::InfoStringHash >();
|
||||
if ( !hash.contains( "artist" ) || !hash.contains( "album" ) )
|
||||
{
|
||||
emit info( requestData, QVariant() );
|
||||
return;
|
||||
}
|
||||
|
||||
switch ( requestData.type )
|
||||
{
|
||||
case InfoAlbumSongs:
|
||||
{
|
||||
|
||||
Tomahawk::InfoSystem::InfoStringHash criteria;
|
||||
criteria["artist"] = hash["artist"];
|
||||
criteria["album"] = hash["album"];
|
||||
|
||||
emit getCachedInfo( criteria, 2419200000, requestData );
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
{
|
||||
Q_ASSERT( false );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
DiscogsPlugin::notInCacheSlot( InfoStringHash criteria, InfoRequestData requestData )
|
||||
{
|
||||
switch ( requestData.type )
|
||||
{
|
||||
case InfoAlbumSongs:
|
||||
{
|
||||
QString requestString( "http://api.discogs.com/database/search" );
|
||||
QUrl url( requestString );
|
||||
url.addQueryItem( "type", "release" );
|
||||
url.addQueryItem( "release_title", criteria[ "album" ] );
|
||||
url.addQueryItem( "artist", criteria[ "artist" ] );
|
||||
QNetworkRequest req( url );
|
||||
req.setRawHeader( "User-Agent", "TomahawkPlayer/1.0 +http://tomahawk-player.org" );
|
||||
QNetworkReply* reply = TomahawkUtils::nam()->get( req );
|
||||
|
||||
NewClosure( reply, SIGNAL( finished() ), this, SLOT( albumSearchSlot( Tomahawk::InfoSystem::InfoRequestData, QNetworkReply* ) ), requestData, reply );
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
{
|
||||
Q_ASSERT( false );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
DiscogsPlugin::albumSearchSlot( const InfoRequestData &requestData, QNetworkReply *reply )
|
||||
{
|
||||
QJson::Parser p;
|
||||
QVariantMap results = p.parse( reply ).toMap();
|
||||
|
||||
if ( !results.contains( "results" ) || results.value( "results" ).toList().isEmpty() )
|
||||
{
|
||||
emit info( requestData, QVariant() );
|
||||
return;
|
||||
}
|
||||
|
||||
const QVariantMap result = results.value( "results" ).toList().first().toMap();
|
||||
if ( !result.contains( "id" ) )
|
||||
{
|
||||
emit info( requestData, QVariant() );
|
||||
return;
|
||||
}
|
||||
|
||||
const int id = result.value( "id" ).toInt();
|
||||
QUrl url( QString( "http://api.discogs.com/release/%1" ).arg( id ) );
|
||||
QNetworkRequest req( url );
|
||||
req.setRawHeader( "User-Agent", "TomahawkPlayer/1.0 +http://tomahawk-player.org" );
|
||||
|
||||
QNetworkReply* reply2 = TomahawkUtils::nam()->get( req );
|
||||
NewClosure( reply2, SIGNAL( finished() ), this, SLOT( albumInfoSlot( Tomahawk::InfoSystem::InfoRequestData, QNetworkReply* ) ), requestData, reply2 );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
DiscogsPlugin::albumInfoSlot( const InfoRequestData& requestData, QNetworkReply* reply )
|
||||
{
|
||||
QJson::Parser p;
|
||||
QVariantMap results = p.parse( reply ).toMap();
|
||||
|
||||
if ( !results.contains( "resp" ) )
|
||||
{
|
||||
emit info( requestData, QVariant() );
|
||||
return;
|
||||
}
|
||||
|
||||
const QVariantMap resp = results[ "resp" ].toMap();
|
||||
if ( !resp.contains( "release" ) )
|
||||
{
|
||||
emit info( requestData, QVariant() );
|
||||
return;
|
||||
}
|
||||
|
||||
const QVariantMap release = resp[ "release" ].toMap();
|
||||
if ( !release.contains( "tracklist" ) || release[ "tracklist" ].toList().isEmpty() )
|
||||
{
|
||||
emit info( requestData, QVariant() );
|
||||
return;
|
||||
}
|
||||
|
||||
QStringList trackNameList;
|
||||
foreach ( const QVariant& v, release[ "tracklist" ].toList() )
|
||||
{
|
||||
const QVariantMap track = v.toMap();
|
||||
if ( track.contains( "title" ) )
|
||||
trackNameList << track[ "title" ].toString();
|
||||
}
|
||||
|
||||
QVariantMap returnedData;
|
||||
returnedData["tracks"] = trackNameList;
|
||||
|
||||
emit info( requestData, returnedData );
|
||||
|
||||
Tomahawk::InfoSystem::InfoStringHash criteria;
|
||||
criteria["artist"] = requestData.input.value< Tomahawk::InfoSystem::InfoStringHash>()["artist"];
|
||||
criteria["album"] = requestData.input.value< Tomahawk::InfoSystem::InfoStringHash>()["album"];
|
||||
|
||||
emit updateCache( criteria, 0, requestData.type, returnedData );
|
||||
}
|
||||
|
||||
|
||||
|
||||
Q_EXPORT_PLUGIN2( Tomahawk::InfoSystem::InfoPlugin, Tomahawk::InfoSystem::DiscogsPlugin )
|
63
src/infoplugins/generic/discogs/DiscogsPlugin.h
Normal file
@@ -0,0 +1,63 @@
|
||||
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
||||
*
|
||||
* Copyright 2012 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 DISCOGS_PLUGIN_H
|
||||
#define DISCOGS_PLUGIN_H
|
||||
|
||||
#include "Typedefs.h"
|
||||
#include "infosystem/InfoSystem.h"
|
||||
#include "infosystem/InfoSystemWorker.h"
|
||||
#include "infoplugins/InfoPluginDllMacro.h"
|
||||
|
||||
class QNetworkReply;
|
||||
|
||||
namespace Tomahawk
|
||||
{
|
||||
|
||||
namespace InfoSystem
|
||||
{
|
||||
|
||||
class INFOPLUGINDLLEXPORT DiscogsPlugin : public InfoPlugin
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_INTERFACES( Tomahawk::InfoSystem::InfoPlugin )
|
||||
|
||||
public:
|
||||
DiscogsPlugin();
|
||||
virtual ~DiscogsPlugin();
|
||||
|
||||
protected slots:
|
||||
virtual void init() {}
|
||||
virtual void getInfo( Tomahawk::InfoSystem::InfoRequestData requestData );
|
||||
virtual void notInCacheSlot( InfoStringHash criteria, InfoRequestData requestData );
|
||||
|
||||
virtual void pushInfo( Tomahawk::InfoSystem::InfoPushData ) {}
|
||||
private slots:
|
||||
void albumSearchSlot( const Tomahawk::InfoSystem::InfoRequestData& , QNetworkReply* );
|
||||
void albumInfoSlot( const Tomahawk::InfoSystem::InfoRequestData& , QNetworkReply* );
|
||||
|
||||
private:
|
||||
bool isValidTrackData( Tomahawk::InfoSystem::InfoRequestData requestData );
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Q_DECLARE_METATYPE( QNetworkReply* )
|
||||
#endif
|
@@ -39,7 +39,6 @@ EchonestPlugin::EchonestPlugin()
|
||||
{
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
m_supportedGetTypes << Tomahawk::InfoSystem::InfoArtistBiography << Tomahawk::InfoSystem::InfoArtistFamiliarity << Tomahawk::InfoSystem::InfoArtistHotttness << Tomahawk::InfoSystem::InfoArtistTerms << Tomahawk::InfoSystem::InfoMiscTopTerms;
|
||||
Echonest::Config::instance()->setNetworkAccessManager( TomahawkUtils::nam() );
|
||||
}
|
||||
|
||||
|
||||
@@ -49,6 +48,13 @@ EchonestPlugin::~EchonestPlugin()
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
EchonestPlugin::init()
|
||||
{
|
||||
Echonest::Config::instance()->setNetworkAccessManager( TomahawkUtils::nam() );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
EchonestPlugin::getInfo( Tomahawk::InfoSystem::InfoRequestData requestData )
|
||||
{
|
||||
|
@@ -45,6 +45,8 @@ public:
|
||||
virtual ~EchonestPlugin();
|
||||
|
||||
protected slots:
|
||||
virtual void init();
|
||||
|
||||
virtual void getInfo( Tomahawk::InfoSystem::InfoRequestData requestData );
|
||||
|
||||
virtual void pushInfo( Tomahawk::InfoSystem::InfoPushData pushData )
|
||||
|
@@ -30,6 +30,7 @@
|
||||
#include "Typedefs.h"
|
||||
#include "TomahawkSettings.h"
|
||||
#include "utils/TomahawkUtils.h"
|
||||
#include "infosystem/InfoSystemWorker.h"
|
||||
#include "utils/Logger.h"
|
||||
#include "Source.h"
|
||||
|
||||
@@ -94,8 +95,6 @@ HypemPlugin::HypemPlugin()
|
||||
<< "Techno"
|
||||
<< "Punk"
|
||||
<< "New wave";
|
||||
chartTypes();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -107,6 +106,13 @@ HypemPlugin::~HypemPlugin()
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
HypemPlugin::init()
|
||||
{
|
||||
chartTypes();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
HypemPlugin::dataError( Tomahawk::InfoSystem::InfoRequestData requestData )
|
||||
{
|
||||
@@ -189,6 +195,7 @@ HypemPlugin::fetchChartCapabilities( Tomahawk::InfoSystem::InfoRequestData reque
|
||||
void
|
||||
HypemPlugin::notInCacheSlot( QHash<QString, QString> criteria, Tomahawk::InfoSystem::InfoRequestData requestData )
|
||||
{
|
||||
tDebug( LOGVERBOSE ) << "HypemPlugin thread: " << QThread::currentThread() << ", InfoSystemWorker thread: " << Tomahawk::InfoSystem::InfoSystem::instance()->workerThread().data()->currentThread();
|
||||
switch ( requestData.type )
|
||||
{
|
||||
case InfoChart:
|
||||
|