1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-09-20 19:01:34 +02:00

Compare commits

..

762 Commits

Author SHA1 Message Date
Christian Muehlhaeuser
e19423e08f * Updated ChangeLog. 2012-07-13 11:03:21 +02:00
Christian Muehlhaeuser
e041ce87fc * Bumped to 0.5.4. 2012-07-13 10:00:28 +02:00
Tomahawk CI
6eacdf808e Automatic merge of Transifex translations 2012-07-13 09:58:49 +02:00
Leo Franchi
b6d5c86952 Pointer safety 2012-07-13 09:58:40 +02:00
Leo Franchi
b7fb9a03bf Add spotify infoplugin for album lookups 2012-07-13 09:58:19 +02:00
Christian Muehlhaeuser
37fad49393 * Fixed Windows shutdown. 2012-07-13 09:50:16 +02:00
Christian Muehlhaeuser
fa83fde05e * Try not deleting cache. 2012-07-13 09:26:02 +02:00
Christian Muehlhaeuser
b3b34cacbd * Try not deleting the infoSystem on shutdown. Does it fix Windows crashes? 2012-07-13 08:06:59 +02:00
Christian Muehlhaeuser
d0f697cd4b * Friend class MusicScanner. 2012-07-12 10:47:38 +02:00
Christian Muehlhaeuser
c144a0142f * Fixed forgotten merge. 2012-07-12 10:24:19 +02:00
Christian Muehlhaeuser
318866d37a * Fixed broken merge. 2012-07-12 10:19:40 +02:00
Christian Muehlhaeuser
70e93faa3f * Added verbose shutdown debug output. 2012-07-12 10:17:07 +02:00
Christian Muehlhaeuser
89e21289a6 * Fixed broken merge. 2012-07-12 10:08:52 +02:00
Christian Muehlhaeuser
fe0d2d87fc * Updated ChangeLog. 2012-07-12 10:00:21 +02:00
Christian Muehlhaeuser
8531ca2234 * Fixed broken merge. 2012-07-12 09:52:42 +02:00
Christian Muehlhaeuser
8d5082fe2c * Really fix compiling on Windows. 2012-07-12 09:49:11 +02:00
Christian Muehlhaeuser
7672c7caec * Try to fix compiling on mingw. 2012-07-12 09:48:26 +02:00
Christian Muehlhaeuser
bf2139824d * Cleaned up DiagnosticsDialog. 2012-07-12 09:08:49 +02:00
Christian Muehlhaeuser
eb749b1e44 * Provide convenience openUrl( url ) method in TomahawkUtilsGui, since QDesktopServices fail to work on Windows. 2012-07-12 09:08:00 +02:00
Christian Muehlhaeuser
53226f37c2 * Expose logfile's path in Logger. 2012-07-12 09:07:52 +02:00
Christian Muehlhaeuser
20032a40b2 * Use a RAMDirectory if we can't open the regular lucene index file. 2012-07-12 09:06:58 +02:00
Tomahawk CI
a6d1bbb91e Automatic merge of Transifex translations 2012-07-12 09:06:50 +02:00
Jeff Mitchell
f7240a5d39 Increased pointer safety (oops 19400) 2012-07-12 09:06:39 +02:00
Jeff Mitchell
2142a04fda Increased pointer safety (oops 19336) 2012-07-12 09:05:55 +02:00
Jeff Mitchell
0406b38f1c * Merged 4-is-not-JSON bug to stable. 2012-07-12 09:04:47 +02:00
Tomahawk CI
8e2174baf1 Automatic merge of Transifex translations 2012-07-12 09:02:05 +02:00
Tomahawk CI
7caeaddc21 Automatic merge of Transifex translations 2012-07-12 09:01:57 +02:00
Tomahawk CI
f4a01ec6aa Automatic merge of Transifex translations 2012-07-12 09:01:42 +02:00
Christian Muehlhaeuser
ed81799294 * Merged music scanner fix. 2012-07-12 09:01:24 +02:00
Christian Muehlhaeuser
0283d534f0 * Remove overlays when filter changed. 2012-07-12 08:59:09 +02:00
Christian Muehlhaeuser
4a00ff4d24 * Fixed crash in ContextMenu. 2012-07-12 08:58:55 +02:00
Tomahawk CI
b98c535247 Automatic merge of Transifex translations 2012-07-12 08:58:38 +02:00
Christian Muehlhaeuser
fbcffed27b * Fixed FadingPixmap isn't initialized with m_isDefault being true. 2012-07-12 08:58:16 +02:00
Christian Muehlhaeuser
e521150d33 * Hooking up to resultsChanged() is enough in PlayableItem. 2012-07-12 08:58:16 +02:00
Christian Muehlhaeuser
2a0aa602b6 * Refetch cover when underlying metadata changed in PixmapDelegateFader. 2012-07-12 08:58:16 +02:00
Christian Muehlhaeuser
cf37aae430 * Emit resultsChanged() after adding / removing results in a Query. 2012-07-12 08:57:46 +02:00
Christian Muehlhaeuser
292f395c47 * Bumped to 0.5.3. 2012-07-06 01:59:42 +02:00
Christian Muehlhaeuser
047f3cc2d4 * Updated ChangeLog. 2012-07-06 01:59:26 +02:00
Tomahawk CI
97681ace31 Automatic merge of Transifex translations 2012-07-06 01:50:04 +02:00
Tomahawk CI
6be5257bc0 Automatic merge of Transifex translations 2012-07-06 01:49:58 +02:00
Tomahawk CI
8cfbe1f38b Automatic merge of Transifex translations 2012-07-06 01:49:48 +02:00
Christian Muehlhaeuser
8db8e42ec4 * Filter tree-model based on query, not result. 2012-07-06 01:47:19 +02:00
Christian Muehlhaeuser
9492055fc6 * Should fix crash when filtering collection. 2012-07-06 01:47:04 +02:00
Christian Muehlhaeuser
3dc624858b * Prevent crash in ViewHeader. 2012-07-06 01:45:55 +02:00
Christian Muehlhaeuser
f154c2bbcd * Correctly unset pause / spinner on GridView when a new track is loading. 2012-07-06 01:45:44 +02:00
Christian Muehlhaeuser
e9127ae3ec * Fixed Last.fm history importing. 2012-07-06 01:45:27 +02:00
Leo Franchi
c7d9d8e5b7 Seed pipeline job item with query immediately 2012-07-06 01:45:17 +02:00
Christian Muehlhaeuser
e525291213 * Don't load social actions twice. 2012-07-06 01:44:55 +02:00
Tomahawk CI
44269ee8f6 Automatic merge of Transifex translations 2012-07-06 01:44:47 +02:00
Christian Muehlhaeuser
53c4a2d675 * Add a vertical spacer item to the DiagnosticsDialog, so contents don't move around. 2012-07-06 01:44:40 +02:00
Christian Muehlhaeuser
ebfc53e009 * Emit coverChanged() even when we couldn't get a cover, so the views update / trigger new requests. 2012-07-06 01:44:28 +02:00
Tomahawk CI
190845a86e Automatic merge of Transifex translations 2012-07-06 01:44:06 +02:00
Leo Franchi
25af4f4275 Don't confuse QFileInfo 2012-07-05 16:49:48 -04:00
Jeff Mitchell
bca64a70ed along to you -> along with you 2012-07-05 14:49:28 -04:00
Jeff Mitchell
10462ee257 Having this replace in there actually breaks notification for me.
I'm guessing that this is notification-system dependent; however, we
can't show & to people not using HTML-based notification renderers.

The fix needs to lie with the notification renderer vendor.
2012-07-05 13:40:21 -04:00
Christian Muehlhaeuser
ba4532593b * Bumped to 0.5.2. 2012-07-01 22:39:40 +02:00
Christian Muehlhaeuser
c84fd28dd2 * Update ChangeLog. 2012-07-01 22:37:07 +02:00
Christian Muehlhaeuser
dbbb491a81 * Indicate invalid PlaylistEntries. 2012-07-01 22:33:53 +02:00
Christian Muehlhaeuser
bab5e27673 * Fixed crashes in DbCmd_SetPlaylistRevision. 2012-07-01 22:33:53 +02:00
Christian Muehlhaeuser
17f71bd366 * Don't ever accept invalid results coming from resolvers. 2012-07-01 22:33:53 +02:00
Christian Muehlhaeuser
e96bbc11e1 * Fixed cover loading in error case. 2012-07-01 08:57:34 +02:00
Christian Muehlhaeuser
d492ba0317 * spotify -> Spotify. 2012-07-01 06:48:22 +02:00
Leo Franchi
b6466a6027 Changelogify 2012-07-01 00:43:58 -04:00
Christian Muehlhaeuser
6b5d391cde * Remove debug output again. 2012-07-01 05:45:28 +02:00
Christian Muehlhaeuser
0680dec5df * Set m_coverLoaded to true even when we couldn't find any image. 2012-07-01 05:45:28 +02:00
Christian Muehlhaeuser
a4e8f4216c * Removed rc0. 2012-07-01 05:13:29 +02:00
Christian Muehlhaeuser
355c95e068 * Set m_coverLoaded to true before emitting the coverChanged signal. 2012-07-01 02:51:46 +02:00
Christian Muehlhaeuser
da07361ec0 * Bumped to 0.5.1. 2012-07-01 02:29:57 +02:00
Christian Muehlhaeuser
aafe8797ad * Don't crash when removing page in history. 2012-07-01 02:23:31 +02:00
Tomahawk CI
95343ca024 Automatic merge of Transifex translations 2012-07-01 00:21:51 +02:00
Leo Franchi
f85bcc1c64 No more libspotify in bundle 2012-07-01 00:21:15 +02:00
Christian Muehlhaeuser
e53e51aefc * Add 'Copy Artist/Album Link' context menu items. 2012-07-01 00:21:08 +02:00
Christian Muehlhaeuser
d22b33bc50 * Be prepared for empty query_ptrs being returned from Query::get(). 2012-07-01 00:20:59 +02:00
Christian Muehlhaeuser
c36414bb4c * Return empty query_ptr when query data is invalid. 2012-07-01 00:20:51 +02:00
Christian Muehlhaeuser
a78349f9f1 * Use 'large' album covers from Last.fm. 2012-07-01 00:20:43 +02:00
Stefan Derkits
fa41b96260 Ubuntu 11.10 needs explicit pthread, reenable finding & linking them 2012-07-01 00:17:55 +02:00
Tomahawk CI
7f2bf85663 Automatic merge of Transifex translations 2012-07-01 00:17:47 +02:00
Leo Franchi
85fe824df3 Also remove saved resolver path when uninstalling 2012-07-01 00:17:36 +02:00
Leo Franchi
c37bbb4deb Use headerpad_max_install_names on OS X builds 2012-07-01 00:17:23 +02:00
Leo Franchi
1a9bf84ab4 Don't copy to bundle any longer when installing binary resolvers on osx 2012-07-01 00:17:17 +02:00
Leo Franchi
a283ea1ed0 Do our own attica download fetching since we send the tomahawk version as well 2012-07-01 00:17:10 +02:00
Christian Muehlhaeuser
d27dd0785a * Use new Querylabel API. 2012-07-01 00:17:02 +02:00
Christian Muehlhaeuser
5e1f808d28 * Support setting Artist / Album on a QueryLabel directly. We need a proper 'CleverLabel' so badly. 2012-07-01 00:16:55 +02:00
Christian Muehlhaeuser
aba78c7a24 * Removed obsolete code. 2012-07-01 00:16:43 +02:00
Christian Muehlhaeuser
f45e92a24d * No more dragsource.type. 2012-07-01 00:16:27 +02:00
Christian Muehlhaeuser
5ae04043d4 * Properly drag Artists / Albums from QueryLabel. 2012-07-01 00:16:11 +02:00
Christian Muehlhaeuser
5f521a6cf5 * Use new PlayableModel API throughout app. 2012-07-01 00:15:53 +02:00
Christian Muehlhaeuser
a4b30dcecd * Adjust inheriting models to new PlayableModel API. 2012-07-01 00:15:44 +02:00
Christian Muehlhaeuser
700394a054 * Resolved a bunch more hidden overloaded virtual methods in PlayableModel. 2012-07-01 00:15:35 +02:00
Christian Muehlhaeuser
819ee17b74 * Use new PlayableModel API throughout app. 2012-07-01 00:15:11 +02:00
Christian Muehlhaeuser
79c55f1699 * Adjust inheriting models to new PlayableModel API. 2012-07-01 00:15:04 +02:00
Christian Muehlhaeuser
f42696de23 * Resolved a bunch of hidden overloaded virtual methods in PlayableModel. 2012-07-01 00:14:52 +02:00
Christian Muehlhaeuser
adfaf5ce53 * Fixed text-width calculation after my latest patch. 2012-07-01 00:13:08 +02:00
Christian Muehlhaeuser
32aca98a97 * Fix english translation plurals. 2012-07-01 00:12:59 +02:00
Tomahawk CI
294809debb Automatic merge of Transifex translations 2012-07-01 00:12:45 +02:00
Christian Muehlhaeuser
e4593079f3 * Proper fix for QueryLabel's context menu. 2012-07-01 00:11:40 +02:00
Christian Muehlhaeuser
cfa4210854 * Show correct context menus for album / artist QueryLabels. 2012-07-01 00:10:42 +02:00
Tomahawk CI
91084885fb Automatic merge of Transifex translations 2012-07-01 00:10:30 +02:00
Tomahawk CI
0b7f420bef Automatic merge of Transifex translations 2012-07-01 00:10:21 +02:00
Jeff Mitchell
046237f009 Fix compilation 2012-06-30 17:07:01 -04:00
Jeff Mitchell
85d9755a47 Merge pull request #103 from nowrep/master
FdoNotifyPlugin: Fixed showing notifications with & character
2012-06-30 17:01:35 -04:00
Jeff Mitchell
98bd7b1857 Fix another crash related to debug accessing null pointers 2012-06-29 10:06:37 -04:00
Jeff Mitchell
37510fc2d7 OK, really fix crash. Promise. 2012-06-29 10:05:08 -04:00
Jeff Mitchell
a91ad7dd5f Actually fix crash 2012-06-29 10:02:21 -04:00
Jeff Mitchell
2cc85c8f4f Fix accessing playlist that could be invalid inside debug 2012-06-29 10:00:07 -04:00
Christian Muehlhaeuser
19625fffd4 * Only return online results via web API. 2012-06-27 07:39:51 +02:00
Christian Muehlhaeuser
a98cab55b7 * Properly sort artists & albums in search widget. 2012-06-27 05:37:15 +02:00
Christian Muehlhaeuser
ec7b98e589 * Moved levenshtein method to TomahawkUtils. 2012-06-27 05:37:15 +02:00
Christian Muehlhaeuser
1262dcb60a * Retry on this sql error, too. 2012-06-27 05:37:15 +02:00
Christian Muehlhaeuser
fc9c6e6017 * Use new spinner integration API. 2012-06-27 05:37:15 +02:00
Christian Muehlhaeuser
fa4463dc88 * No need to check all results for playability. Their sorted by that, so we just check the first one. 2012-06-27 05:37:15 +02:00
Christian Muehlhaeuser
3fb403c695 * Allow to sort by composer and origin. 2012-06-27 05:37:15 +02:00
Christian Muehlhaeuser
fdb1d1b621 * Expose composer's sortname in Query's API. 2012-06-27 05:37:15 +02:00
Leo Franchi
127da50144 Forcibly kill spotify resolver before starting out own in case it's an old one 2012-06-27 01:02:53 +02:00
Leo Franchi
5640923d51 Don't assert on quit anymore, served its debug purpose 2012-06-27 01:02:53 +02:00
Leo Franchi
4a2ef91638 Looks like paths with spaces need to be esaped everywhere with QProcess... 2012-06-27 01:02:53 +02:00
Christian Muehlhaeuser
012556ca0a * Resolve dupe accelerator assignment. 2012-06-27 01:01:20 +02:00
Christian Muehlhaeuser
8d0a51cc64 * Updated ChangeLog. 2012-06-27 00:12:59 +02:00
Leo Franchi
253120a35c We no longer remove accounts when uninstalling from attica 2012-06-27 00:12:59 +02:00
Leo Franchi
671bd5361b Always re-install spotify resolver if path is no longer valid 2012-06-27 00:12:59 +02:00
Leo Franchi
3dc969a31f Style fix 2012-06-27 00:12:59 +02:00
Christian Muehlhaeuser
64a70f5073 * Don't accept empty queries from web API. 2012-06-27 00:12:59 +02:00
Christian Muehlhaeuser
1911d4b8a0 * Assert when trying to setup a query without artist or track. 2012-06-27 00:12:59 +02:00
Christian Muehlhaeuser
92229ce3e2 * Call wipeIndex via a single-shot timer to avoid dead-locks. 2012-06-27 00:12:59 +02:00
Christian Muehlhaeuser
7df3f867ea * Re-bind values for failed TomahawkSqlQueries. 2012-06-27 00:12:59 +02:00
Jeff Mitchell
6e66c4a192 Revert "See if this fixes lfranchi's assert"
This reverts commit e6af7b03d7.

Conflicts:

	src/libtomahawk/database/DatabaseImpl.cpp
2012-06-27 00:12:58 +02:00
Christian Muehlhaeuser
49fe0f945e * Elide temporary page's text when showing the delete button. 2012-06-26 05:57:25 +02:00
Christian Muehlhaeuser
0d915513b9 * Spit out error messages when we couldn't resolve a track, album or artist. 2012-06-26 05:57:25 +02:00
Christian Muehlhaeuser
6c69edd0e7 * Remove spinner when AudioEngine stopped. 2012-06-26 05:57:25 +02:00
Christian Muehlhaeuser
23c2c77869 * Style cleanup. 2012-06-26 05:57:25 +02:00
Christian Muehlhaeuser
cd7c64ac0a * Set m_finished when tracks are loaded in Artist- & AlbumPlaylistInterface. 2012-06-26 05:57:25 +02:00
Christian Muehlhaeuser
0637ee7338 * Added a isFinished and m_finished to PlaylistInterface. 2012-06-26 05:57:25 +02:00
Christian Muehlhaeuser
7765aa116b * Auto re-prepare query on weird 'no query' error. 2012-06-26 05:57:25 +02:00
Christian Muehlhaeuser
c46ed53930 * Don't scale now playing icon decoration when expanding a playlist item. 2012-06-26 05:57:25 +02:00
Christian Muehlhaeuser
22105d448a * Don't expand LovedTracksItem. 2012-06-26 05:57:25 +02:00
Christian Muehlhaeuser
4f4efdfbab * Use new RecentlyPlayedModel API. 2012-06-26 05:55:22 +02:00
Christian Muehlhaeuser
686730e27c * Use new Recently- Played/Added -Model's API. 2012-06-26 05:55:22 +02:00
Christian Muehlhaeuser
fdfe4d12d4 * Split up CTOR and setSource methods. 2012-06-26 05:55:22 +02:00
Christian Muehlhaeuser
669e7550f2 * Split up CTOR and setSource methods. 2012-06-26 05:55:22 +02:00
Christian Muehlhaeuser
d4a2294963 * Show loading spinner when loading charts. 2012-06-26 05:55:22 +02:00
Christian Muehlhaeuser
66b0ecc846 * Show a loading spinner when loading a collection. 2012-06-26 05:55:22 +02:00
Christian Muehlhaeuser
c3563a2449 * Remove comments. 2012-06-26 05:55:22 +02:00
Christian Muehlhaeuser
05efe29a67 * Don't show an info button for empty items. 2012-06-26 05:55:22 +02:00
Christian Muehlhaeuser
3480690479 * Automatically adjust crash-reporter's window size. 2012-06-26 05:55:22 +02:00
Christian Muehlhaeuser
a1fb66e024 * Don't reset current viewpage when the new page is the same as the current one. 2012-06-26 05:55:22 +02:00
Christian Muehlhaeuser
02e9f99ce4 * Make sure script-resolvers are executable before trying to execute them. 2012-06-26 05:55:22 +02:00
Christian Muehlhaeuser
95c74fe370 * Re-center play/pause buttons when resizing GridView. 2012-06-26 05:55:22 +02:00
Christian Muehlhaeuser
358226bdb1 * No need to manuall set fake query's results. 2012-06-26 05:52:54 +02:00
Christian Muehlhaeuser
a2d81d0099 * Respond to pings from external resolver. 2012-06-26 05:52:54 +02:00
Christian Muehlhaeuser
292e97fcee * Don't show resolver errors when built with RelWithDebInfo. 2012-06-26 05:52:53 +02:00
Christian Muehlhaeuser
6dafcf3c80 * Temporary fix for compiling madness. 2012-06-26 05:52:53 +02:00
Tomahawk CI
ee1b13aee6 Automatic merge of Transifex translations 2012-06-26 05:52:53 +02:00
Christian Muehlhaeuser
ce8eecd40f * Fixed compiling on Windows. I hope. 2012-06-26 05:52:53 +02:00
Christian Muehlhaeuser
f674b3b751 * Style cleanup. 2012-06-26 05:52:53 +02:00
Jeff Mitchell
44cd64a8b6 Add ChangeLog entries 2012-06-26 05:52:53 +02:00
Christian Muehlhaeuser
a9418fc8aa * Fixed OSX linking. 2012-06-26 05:50:57 +02:00
Christian Muehlhaeuser
44546763b9 * Fixed Windows includes. 2012-06-26 05:50:57 +02:00
Christian Muehlhaeuser
66a74ad6e2 * Fixed compiling on OSX. 2012-06-26 05:50:57 +02:00
Christian Muehlhaeuser
6aae2dd96f * Updated breakpad to latest version. 2012-06-26 05:50:56 +02:00
Christian Muehlhaeuser
ffd2cee2ff * Mutex protect logging. 2012-06-26 05:50:56 +02:00
Christian Muehlhaeuser
438f8444c3 * Init Database earlier. 2012-06-26 05:50:56 +02:00
Christian Muehlhaeuser
b55be311b4 * While not a bug, this shutdown check would have never been triggered. 2012-06-26 05:50:56 +02:00
Tomahawk CI
7a4d113af6 Automatic merge of Transifex translations 2012-06-26 05:50:56 +02:00
Jeff Mitchell
ba24e57896 Remove some spammy debug 2012-06-22 19:56:03 -04:00
Tomahawk CI
bf3cbb4fbe Automatic merge of Transifex translations 2012-06-22 22:16:46 +00:00
Jeff Mitchell
e3cb3a1c10 Fix problem with identifying same account with Twitter 2012-06-22 18:05:14 -04:00
Jeff Mitchell
e2cc678daa Add debugging for alastair 2012-06-22 16:46:44 -04:00
Jeff Mitchell
966445a465 Properly check for a peer is on one of our subnets 2012-06-22 16:24:19 -04:00
Jeff Mitchell
607042b865 Port whitelist acl check over from Servent to Connection 2012-06-22 15:07:07 -04:00
Jeff Mitchell
5d9685ba5c Don't prompt for auth for your own accounts. 2012-06-22 12:22:50 -04:00
Leo Franchi
bfd7433647 Use Proxima Nova Bold 2012-06-22 10:39:45 -04:00
Leo Franchi
19ced2239c Use new icons for windows installer 2012-06-22 10:26:12 -04:00
Leo Franchi
f35ca66fb7 Try not setting PWD on QProcess on windows 2012-06-22 10:28:54 -03:00
Christian Muehlhaeuser
9c8807302b * Remove wonky assert. 2012-06-22 12:53:09 +02:00
Christian Muehlhaeuser
54e7fbdd5d * Drop the rc0. We're gold. 2012-06-22 04:59:44 +02:00
Leo Franchi
c9bbd96fa6 Make sure to start the resolver after installing it 2012-06-21 22:25:42 -04:00
Leo Franchi
f299d0b923 Delete widget after it's removed 2012-06-21 21:39:01 -04:00
Christian Muehlhaeuser
2c91365cbb * Dont exec the app when loading as a secondary instance. 2012-06-22 03:35:02 +02:00
Christian Muehlhaeuser
f91d9f30ce * Prevent source-retrieval from accidentally creating new sources. 2012-06-22 03:04:43 +02:00
Christian Muehlhaeuser
a7c3cce720 * Removed obsolete code path in DbSyncConnection. 2012-06-22 02:56:57 +02:00
Christian Muehlhaeuser
82794ed207 * This might prevent dupe db-ops. 2012-06-22 02:44:08 +02:00
Christian Muehlhaeuser
6572f9820a * Stop logging every query. 2012-06-22 02:44:08 +02:00
Jeff Mitchell
707a8cb280 Add more specialized SQL debugging 2012-06-21 18:35:43 -04:00
Tomahawk CI
23d87d9824 Automatic merge of Transifex translations 2012-06-21 22:17:35 +00:00
Jeff Mitchell
53f4569d11 Add some asserts to guarantee no access to Database before it's ready 2012-06-21 18:12:23 -04:00
Jeff Mitchell
45b10435df Add further query debugging 2012-06-21 17:59:51 -04:00
Jeff Mitchell
6ce38cb986 Sorry, fix encoding n such 2012-06-21 17:45:23 -04:00
Jeff Mitchell
e6af7b03d7 See if this fixes lfranchi's assert 2012-06-21 17:39:31 -04:00
Leo Franchi
f8ea0667d4 Only show spotify wrench if resolver is running 2012-06-21 16:35:46 -04:00
Jeff Mitchell
2c6f26e36b Set no parent on Impls and explicitly delete them. Tested fine here. 2012-06-21 16:15:52 -04:00
Jeff Mitchell
e3783b58e4 Revert "Remove one of the parenting warnings."
This reverts commit a1146fbe53.
2012-06-21 16:13:24 -04:00
Jeff Mitchell
a1146fbe53 Remove one of the parenting warnings. 2012-06-21 15:59:54 -04:00
Christian Muehlhaeuser
6cfc4eeb51 * Updated ChangeLog. 2012-06-21 21:38:07 +02:00
Christian Muehlhaeuser
b61ee3ff1a * Disable lyrics for 0.5. Sigh. 2012-06-21 21:36:36 +02:00
Jason Herskowitz
68f2802214 Shrink images that somehow got too big... I blame someone else 2012-06-21 15:29:19 -04:00
Jeff Mitchell
51b70e1e6e Fix another invalid png file 2012-06-21 15:23:57 -04:00
Jeff Mitchell
1a67ca0e7e Fix warning-causing png file 2012-06-21 15:23:57 -04:00
Christian Muehlhaeuser
8148a18b32 * Show a loading spinner for top hits. 2012-06-21 21:23:11 +02:00
Christian Muehlhaeuser
0dc1d6664a * Show loading spinner and emptiness tooltip on track page. 2012-06-21 21:12:23 +02:00
Jeff Mitchell
408bc713d7 Revert "Remove unused mutates parameters, since we base our work on what the command claims"
This reverts commit 6b6ccee575.
2012-06-21 14:45:51 -04:00
Jeff Mitchell
6b6ccee575 Remove unused mutates parameters, since we base our work on what the command claims 2012-06-21 14:43:02 -04:00
Christian Muehlhaeuser
199dd1afc7 * Mutex protect any m_db access within DatabaseImpl. 2012-06-21 20:26:03 +02:00
Leo Franchi
d659a1f339 Install libspotify to Frameworks/ 2012-06-21 14:51:09 -03:00
Leo Franchi
5cce01d346 Use commands instead of subprocess.check_output 2012-06-21 13:19:42 -04:00
Leo Franchi
b6545f7d5c Copy libspotify to app bundle when creating 2012-06-21 12:47:56 -04:00
Christian Muehlhaeuser
d46889706b * Fixed not properly deleting temporary pages. 2012-06-21 18:25:45 +02:00
Leo Franchi
cccd5db05a Clarify naming 2012-06-21 11:58:56 -04:00
Leo Franchi
b5bc3bca45 Properly initialize binary bool flag on creation 2012-06-21 11:56:50 -04:00
Christian Muehlhaeuser
2acae2fd45 * Whoops. Almost forgot this one: Show artist name on artist page. 2012-06-21 16:54:52 +02:00
Christian Muehlhaeuser
33b8608668 * Bumped to 0.5.0rc0. 2012-06-21 15:03:33 +02:00
Christian Muehlhaeuser
eb9786e08d * Make sure we always access dbimpl's mutex-protected. 2012-06-21 11:24:19 +02:00
Jeff Mitchell
9ad3e053e7 Avoid possible null pointer access 2012-06-20 21:47:10 -04:00
Tomahawk CI
ed58392e04 Automatic merge of Transifex translations 2012-06-20 22:18:31 +00:00
Christian Muehlhaeuser
55537ce5f8 * Use unique db connection names. 2012-06-21 00:05:23 +02:00
Jeff Mitchell
d687bdb54f Remove confusing and obsolete parent parameter 2012-06-20 17:58:26 -04:00
Christian Muehlhaeuser
0c613cbcbe * Use Db's impl() directly to always be in the right thread for sure. 2012-06-20 23:49:34 +02:00
Jeff Mitchell
03c3c3d29a Work around wonkiness in track info view before similar tracks are
loaded
2012-06-20 17:44:36 -04:00
Christian Muehlhaeuser
024392140e * Removed obsolete and problematic pragma call. 2012-06-20 23:39:29 +02:00
Christian Muehlhaeuser
b53a9b6d67 * Keep retrying when error indicates a pragma query. 2012-06-20 23:25:01 +02:00
Jeff Mitchell
5dfe460f9d Fix positioning...moveLeft/Right don't do what you think they do... 2012-06-20 16:19:43 -04:00
Christian Muehlhaeuser
ba897efada * Clean up ChangeLog a bit. 2012-06-20 22:05:47 +02:00
Christian Muehlhaeuser
c2dd22ed40 * Prevent dead-locking. 2012-06-20 22:02:19 +02:00
Jeff Mitchell
6cd80cf047 Enforce minimum distance between allow/deny buttons for ACL request 2012-06-20 15:58:23 -04:00
Jason Herskowitz
859d1cbf7d Add some stuff we forgot in changelog. 2012-06-20 16:43:01 -03:00
Christian Muehlhaeuser
3e0068b83c * Don't duplicate a query's results when dropping a result onto another playlist. 2012-06-20 20:44:35 +02:00
Christian Muehlhaeuser
052759dce5 * Fixed dragging unresolved queries from PlayableModel. 2012-06-20 20:39:32 +02:00
Christian Muehlhaeuser
ae6fda4cc8 * Silly style cleanups. 2012-06-20 19:54:35 +02:00
Christian Muehlhaeuser
056213bc27 * Make Source::addCommand synchronous again, so we can rely on m_lastCmdGuid being set. 2012-06-20 19:34:51 +02:00
Christian Muehlhaeuser
faf6374967 * Tweaked track page some more. 2012-06-20 17:40:33 +02:00
Christian Muehlhaeuser
dce0615a28 * Tweaked artist page some more. 2012-06-20 17:40:32 +02:00
Christian Muehlhaeuser
27ea1ea793 * Prevent duplicate accounts IDs in settings. 2012-06-20 17:40:32 +02:00
Christian Muehlhaeuser
6fd839c237 * Elide source names earlier. 2012-06-20 17:40:32 +02:00
Christian Muehlhaeuser
fba255cc13 * Removed obsolete loadingStarted/Finished methods in ArtistInfoWidget. 2012-06-20 17:40:31 +02:00
Jeff Mitchell
64837d8a0c Save ACL entries when in headless mode, so going non-headless doesn't
ask for them again.
2012-06-20 10:14:06 -04:00
Christian Muehlhaeuser
e0a635b310 * No need to set the auto_vacuum pragma per connection. 2012-06-20 13:36:05 +02:00
Christian Muehlhaeuser
3f0cb9baf6 * Don't use stage.toma.hk for the release. 2012-06-20 13:26:45 +02:00
Christian Muehlhaeuser
11d4c38386 * Bumped liblastfm and libattica deps. 2012-06-20 13:23:45 +02:00
Christian Muehlhaeuser
5f799ea5d5 * Reverted QSQLite import. Should be obsolete now. 2012-06-20 11:10:52 +02:00
Christian Muehlhaeuser
3b87444cd9 * No need to manually clone impls anymore. 2012-06-20 11:04:22 +02:00
Christian Muehlhaeuser
7bb61f1a38 * Make sure we have a separate database impl returned for each thread. 2012-06-20 11:04:06 +02:00
Christian Muehlhaeuser
a7642d12d1 * Fixed copy. 2012-06-20 11:03:18 +02:00
Christian Muehlhaeuser
61d766be11 * Remove obsolete Database::m_indexReady. 2012-06-20 10:50:15 +02:00
Jeff Mitchell
2603a7d28b Remove some warnings 2012-06-19 22:24:20 -04:00
Tomahawk CI
6e46b03f86 Automatic merge of Transifex translations 2012-06-19 22:16:50 +00:00
Jeff Mitchell
269ffb3508 Set crash reporter inactive in headless mode 2012-06-19 16:48:22 -04:00
Jeff Mitchell
c9841985a1 Forgot this line... 2012-06-19 16:10:01 -04:00
Jeff Mitchell
63c64de455 I guess actually fix the headless crash? Not sure why this should be
needed, but it works
2012-06-19 12:21:36 -04:00
Jeff Mitchell
3b40b9b4a9 Don't crash when running with --headless 2012-06-19 11:36:48 -04:00
Jeff Mitchell
f2989dd4d9 Add link to legal page in Help menu. Note: will work properly when stage
is pushed to main, as .html differs
2012-06-18 20:27:55 -04:00
Leo Franchi
8f7a6de801 Only cache last.fm similar artists/tracks if there is data 2012-06-19 01:22:59 +02:00
Leo Franchi
8abc08c5a9 Copy shortened track link from page context menu.
Slipped in in the big IdThreadWorker revert in previous commit
2012-06-19 01:21:22 +02:00
Leo Franchi
8558cdfc8e Revert usage of boost::threads to speed up id loading. Our MinGW boost package is broken.
Revert "Set future on artist/album immediately after creating promise"

This reverts commit 9d9fae75b5.

Revert "Remove duplicate function, and fix copy link from sidebar track page"

This reverts commit 1fe28714cb.

Revert "Catch by const ref and assert to check hypothesis"

This reverts commit a8f0053fc8.

Revert "Reimplement QApplication::notify() to print out something about the exception if we can"

This reverts commit 7b8136a36e.

Revert "Catch boost::unitialized_future if it is thrown"

This reverts commit c1d678e2b1.

Revert "Another boost/thread.hpp include rather than specific boost headers"

This reverts commit ee8d3e6a92.

Revert "One include to (hopefully) rule them all"

This reverts commit 52752cd234.

Revert "Add another boost include"

This reverts commit 7bec03560a.

Revert "Try some more includes"

This reverts commit e56f2f7ee0.

Revert "Remove old code"

This reverts commit 69b56e0836.

Revert "Fix oversight in queue draining"

This reverts commit 8c48af423c.

Revert "Safer locking of id() to prevent deadlocks"

This reverts commit 3f2906d4d1.

Revert "Cleanup fixes"

This reverts commit cd3eeb2951.

Revert "Experimental asynchronous artist and album id loading"

This reverts commit 75eb35397d.

Conflicts:

	src/libtomahawk/CMakeLists.txt
2012-06-19 00:47:23 +02:00
Leo Franchi
1e0a00dbe2 Encode spaces as + and unify encoding logic in GlobalActionManager 2012-06-19 00:47:23 +02:00
Tomahawk CI
0f6b903139 Automatic merge of Transifex translations 2012-06-18 22:16:45 +00:00
Jeff Mitchell
7e2266e001 Changelogify 2012-06-18 17:09:27 -04:00
Jeff Mitchell
df11500305 Bump Attica dep 2012-06-18 17:07:51 -04:00
Jeff Mitchell
2f5e2b231a Merge branch 'master' into atticafixes-waiting-on-attica-release 2012-06-18 16:59:26 -04:00
Jeff Mitchell
ccebc6b9f9 Move proxy factory setup in xmpp client 2012-06-18 16:59:20 -04:00
Jeff Mitchell
bb44c9a2e9 Remove some debug and change around some proxy ordering to make sense when no hostname is passed in 2012-06-18 16:18:44 -04:00
Jeff Mitchell
fda615f0ab Make headless mode use the Stream ACL by default 2012-06-18 11:36:08 -04:00
Jeff Mitchell
da17f467cf Wanted to get this in there before 0.5 goes wild, as doing this in a
cleaner code fashion requires re-authing your peers. Adds a friendyname
to Users, so that when there is more fine-grained ACL management you can
set/show the friendly name along with the known screen names of a user.
2012-06-18 11:11:11 -04:00
Jeff Mitchell
cec2eb738f Merge branch 'thqsqlite' 2012-06-18 04:59:53 -04:00
Jeff Mitchell
46bd366643 Refresh delegates on both add and remove; also, if ACL can't be displayed cause it's the wrong item type, just don't paint anything at all 2012-06-18 04:43:12 -04:00
Jeff Mitchell
4aadb95f5d Refresh delegates on both add and remove; also, if ACL can't be displayed cause it's the wrong item type, just don't paint anything at all 2012-06-18 04:43:00 -04:00
Jeff Mitchell
8a61e89d83 Merge branch 'master' into thqsqlite 2012-06-18 04:22:47 -04:00
Jeff Mitchell
4a8710ce7f Add FindSqlite and use its values 2012-06-18 04:22:41 -04:00
Jeff Mitchell
09882283d1 Remove unneeded files 2012-06-18 04:09:58 -04:00
Jeff Mitchell
7b05ad29e6 Import QSQLite from 4.8.1. Import Clementine's smain.cpp and
CMakeLists.txt (thanks, Clementine!). Do some name changing for sanity's
sake so we're sure of which plugin we're actually connected to.
2012-06-18 04:08:48 -04:00
Jeff Mitchell
b88be39f54 Fix checking result of ACL against name 2012-06-18 03:35:24 -04:00
Jeff Mitchell
0383378385 Fix cases where JID could be reduced to nothing 2012-06-18 03:14:09 -04:00
Jeff Mitchell
3ab01c1b46 Fix typo 2012-06-18 02:24:58 -04:00
Jeff Mitchell
167d71539a Merge branch 'aclwidget'. NOTE: If you have previous [acl] entries in
your Tomahawk.conf from previous testing, be sure to remove them, or
clear them from the button in Settings->Advanced.

Conflicts:
	ChangeLog
2012-06-18 01:56:53 -04:00
Jeff Mitchell
df269ae7a6 Update ChangeLog 2012-06-18 01:42:45 -04:00
Jeff Mitchell
7896d15536 For custom JobItems, the delegate is parented to the view, so don't attempt to delete it in the destructor of the item 2012-06-18 01:29:40 -04:00
Jeff Mitchell
4a1adbfb8a Eep, use name, not nodeid, in the shortening 2012-06-18 01:20:13 -04:00
Jeff Mitchell
a82a8b2abe Add ACL-clearing button to settings 2012-06-18 01:03:34 -04:00
Jeff Mitchell
f1a0de0f53 Start on acl entry clearing; also change where we strip the JID 2012-06-18 00:22:06 -04:00
Jeff Mitchell
8603667270 Knock down acl issue num 3: XMPP shows and auths against full jid with resource, sometimes 2012-06-18 00:08:40 -04:00
Jeff Mitchell
2c28325ae3 Fix item 1) in remaining ACL issues for 0.5...change text of adding-friend prompt to prevent confusion 2012-06-17 23:53:48 -04:00
Jeff Mitchell
4f1579274e Always refresh delegates on item finish, not just when that item had a custom delegate, in case it's switched rows 2012-06-17 23:10:06 -04:00
Jeff Mitchell
259e4f3da9 Fix ACL saving/loading 2012-06-17 22:24:49 -04:00
Jeff Mitchell
554cb5d7a1 Properly handle delegates so that a) we don't crash and b) we actually
show the proper delegates for items when there are more than two in the
queue. This pretty much makes the job view stuff fully work, except
somehow saving got broken.
2012-06-17 18:56:07 -04:00
Leo Franchi
9d9fae75b5 Set future on artist/album immediately after creating promise 2012-06-17 22:34:31 +02:00
Leo Franchi
1fe28714cb Remove duplicate function, and fix copy link from sidebar track page 2012-06-17 16:51:56 +02:00
Leo Franchi
a8f0053fc8 Catch by const ref and assert to check hypothesis 2012-06-17 15:30:27 +02:00
Leo Franchi
7b8136a36e Reimplement QApplication::notify() to print out something about the exception if we can 2012-06-17 15:29:47 +02:00
Leo Franchi
c1d678e2b1 Catch boost::unitialized_future if it is thrown 2012-06-17 13:38:21 +02:00
Leo Franchi
ee8d3e6a92 Another boost/thread.hpp include rather than specific boost headers 2012-06-17 10:01:46 +02:00
Leo Franchi
52752cd234 One include to (hopefully) rule them all 2012-06-17 09:52:49 +02:00
Leo Franchi
7bec03560a Add another boost include 2012-06-17 09:49:03 +02:00
Leo Franchi
e56f2f7ee0 Try some more includes 2012-06-17 09:44:11 +02:00
Leo Franchi
69b56e0836 Remove old code 2012-06-17 09:01:09 +02:00
Leo Franchi
8c48af423c Fix oversight in queue draining 2012-06-17 09:01:09 +02:00
Leo Franchi
3f2906d4d1 Safer locking of id() to prevent deadlocks 2012-06-17 09:01:08 +02:00
Leo Franchi
cd3eeb2951 Cleanup fixes 2012-06-17 09:01:08 +02:00
Leo Franchi
75eb35397d Experimental asynchronous artist and album id loading 2012-06-17 09:01:08 +02:00
Tomahawk CI
8c6af48358 Automatic merge of Transifex translations 2012-06-16 22:19:44 +00:00
Leo Franchi
acd6e75a10 Factor out some code 2012-06-17 00:09:59 +02:00
Leo Franchi
89ab3344d4 Create copyable artist and album page links 2012-06-17 00:09:03 +02:00
Leo Franchi
b1b9ee46db Handle tomahawk://import/playlist as well as playlist/import as it's more consistent 2012-06-16 21:05:20 +02:00
Leo Franchi
a53ef7370c Also check if a query has a result to determine equality, instead of only brittle string comparison 2012-06-16 16:57:27 +02:00
Leo Franchi
bc6cd4008d TWK-936: Allow loading playlists with new open/playlist tomahawk link 2012-06-16 16:57:02 +02:00
Christian Muehlhaeuser
1d5e199d89 * Set the bgcolors in one central place. 2012-06-16 14:11:07 +02:00
Christian Muehlhaeuser
2290da1648 * Have a different color for the info sidebar on track pages. 2012-06-16 14:04:46 +02:00
Christian Muehlhaeuser
3b885aa730 * Show a styled vertical scrollbar for artist's biographies, if needed. 2012-06-16 12:48:09 +02:00
Christian Muehlhaeuser
c15e4062b2 * Try using QPalette::BrightText to make sure the text is always visible. 2012-06-16 12:31:01 +02:00
Christian Muehlhaeuser
3b5ca53539 * Fixed AudioControls layouts for OSX. 2012-06-16 12:28:20 +02:00
Christian Muehlhaeuser
b2ebd1adcb * Make sure jump icon fits in the space we're painting. 2012-06-16 12:20:56 +02:00
Christian Muehlhaeuser
e103a202eb * Pixel-sizes shouldn't need to be platform-specific. 2012-06-16 12:06:24 +02:00
Christian Muehlhaeuser
63da02bc27 * Updated ChangeLog. 2012-06-16 11:38:55 +02:00
Christian Muehlhaeuser
10858d0a6b * Check hover index to display info buttons in TreeItemDelegate. 2012-06-16 11:25:57 +02:00
Christian Muehlhaeuser
69cec1b28e * Show info buttons for tracks in TreeViews. 2012-06-16 11:25:13 +02:00
Christian Muehlhaeuser
bae8de0ca5 * Use displayQuery for more readable code. 2012-06-16 11:24:49 +02:00
Christian Muehlhaeuser
867761f449 * Fixed Artist-/AlbumPlaylistInterface's overzealous caching. 2012-06-16 10:55:01 +02:00
Christian Muehlhaeuser
5e0748a1f9 * Fixed text-alignment in TreeItemDelegate. 2012-06-16 10:48:10 +02:00
Christian Muehlhaeuser
7b89645718 * User-friendlier (?) status texts. 2012-06-16 10:34:03 +02:00
Christian Muehlhaeuser
d1c41f4ad0 * Hide dupe albums on album page. 2012-06-16 09:02:03 +02:00
Christian Muehlhaeuser
8a3c962779 * Hide dupe albums on artist page. 2012-06-16 09:00:11 +02:00
Christian Muehlhaeuser
5d297808da * Hide dupe album & artists in SearchWidget. 2012-06-16 08:47:26 +02:00
Christian Muehlhaeuser
9b89f36387 * Support filtering out dupe items in PlayableProxyModel. 2012-06-16 08:46:58 +02:00
Christian Muehlhaeuser
fe8149ee8a * Fixed sorting by score. 2012-06-16 08:26:20 +02:00
Christian Muehlhaeuser
e1b0125a46 * Handle non left-aligned QueryLabels (badly). Will have to be rewritten soon. 2012-06-16 08:21:52 +02:00
Christian Muehlhaeuser
44bf61adc0 * Hide album label on track page if no album name is set. 2012-06-16 08:21:21 +02:00
Christian Muehlhaeuser
9849a8ee58 * Fixed SQL escaping. 2012-06-16 07:08:57 +02:00
Christian Muehlhaeuser
89cd75a2ed * Style cleanup. 2012-06-16 07:08:38 +02:00
Christian Muehlhaeuser
eef2c0a89a * Always show a vertical scrollbar on the track page, so we don't have to shift things around once loading finished. 2012-06-16 06:42:18 +02:00
Christian Muehlhaeuser
288f20a8f1 * GridView in auto-resize mode now sets a maximum number of visible items, so we never show half-empty rows. 2012-06-16 06:41:29 +02:00
Christian Muehlhaeuser
5ff36d670f * PlayableProxyModel now supports setting a maximum amount of visible items. 2012-06-16 06:40:19 +02:00
Christian Muehlhaeuser
264095d351 * UI fixes for Track page. 2012-06-16 03:03:45 +02:00
Christian Muehlhaeuser
11d1fce78f * Check auto-resizing GridView when items are being added or removed. 2012-06-16 03:03:18 +02:00
Tomahawk CI
45a65e219a Automatic merge of Transifex translations 2012-06-15 22:16:48 +00:00
Jeff Mitchell
10bb33590b Fix crash from loading invalid entries from cache 2012-06-15 15:01:30 -04:00
Jeff Mitchell
285498d638 Fix half-baked fix 2012-06-15 14:35:57 -04:00
Jeff Mitchell
805a942cf6 Fix possible crash due to saving invalid qvariants 2012-06-15 14:32:01 -04:00
Jeff Mitchell
7f2f7d642b Merge branch 'master' into aclwidget
Conflicts:
	src/libtomahawk/utils/TomahawkUtilsGui.cpp
	src/libtomahawk/utils/TomahawkUtilsGui.h
2012-06-15 14:29:46 -04:00
Leo Franchi
6870cc6f88 Revert previously mostly-bad commit, oops. 2012-06-15 18:47:03 +02:00
Leo Franchi
9d5d6b7360 Don't track shared pointers 2012-06-15 16:19:42 +02:00
Leo Franchi
cf4ea429f6 Fix focus issue with native cocoa views by turning off alien widgets 2012-06-15 15:38:59 +02:00
Leo Franchi
e18594994c Show delete playlist dialog as a sheet on OS X 2012-06-15 10:22:53 +02:00
Christian Muehlhaeuser
514841cf1c * Updated README. 2012-06-15 10:28:16 +03:00
Leo Franchi
181bff132f Require libechonest 1.2 as it's been out for ages and has some important fixes 2012-06-15 09:24:01 +02:00
Christian Muehlhaeuser
f20b8db56a * Attica & QuaZip are hard deps by now. 2012-06-15 10:18:53 +03:00
Christian Muehlhaeuser
4189f370a6 Updated README. 2012-06-15 10:11:03 +03:00
Leo Franchi
b2becc6287 TWK-934: Don't crash when checking TreeView for jump-to-track 2012-06-15 08:58:03 +02:00
Tomahawk CI
2f6b08948a Automatic merge of Transifex translations 2012-06-14 22:16:50 +00:00
Christian Muehlhaeuser
7552ef4cce * Disable queue's tooltip for 0.5. Needs some more fixing. 2012-06-14 21:53:58 +02:00
Christian Muehlhaeuser
18bd293074 * Let track page automatically resize. 2012-06-14 21:47:15 +02:00
Christian Muehlhaeuser
87dd871c6c * GridView now supports auto-resizing to fit its contents. 2012-06-14 21:46:17 +02:00
Christian Muehlhaeuser
4fad494630 * Add PlayableModel::itemSize(). 2012-06-14 21:45:29 +02:00
Christian Muehlhaeuser
848721902c * Silly style cleanup. 2012-06-14 21:45:08 +02:00
Christian Muehlhaeuser
7abd653b31 * Style cleanup. 2012-06-14 21:41:17 +02:00
Leo Franchi
c41c7eaa94 Provide base64 encode and decode to js resolvers 2012-06-14 21:21:58 +02:00
Leo Franchi
96d89e230c Uncomment out some migration code :) 2012-06-14 20:57:17 +02:00
Leo Franchi
6d79fc2ab8 Set friendly name for spotify account to prevent the dupe check from deleting it 2012-06-14 20:56:59 +02:00
Leo Franchi
bb57108182 Set account friendly name for spotify account 2012-06-14 20:56:19 +02:00
Jeff Mitchell
5d890582c7 Merge branch 'master' into atticafixes-waiting-on-attica-release 2012-06-14 13:20:34 -04:00
Leo Franchi
26733aa85f Add a Copy Link action and keep Export Playlist for static playlists 2012-06-14 17:09:38 +02:00
Leo Franchi
5b98bc9c75 Style and fix merge 2012-06-14 17:09:13 +02:00
Leo Franchi
c2363e0967 Enable stage playlist exporting
rename
2012-06-14 16:46:07 +02:00
Leo Franchi
a1874a941d Sort new releases by date, show newest release first. 2012-06-14 09:21:00 +02:00
Christian Muehlhaeuser
a512d85672 * Fixed accidental dupe connect. 2012-06-14 08:47:15 +02:00
Christian Muehlhaeuser
6c725e72e7 * Use styleScrollBar method. 2012-06-14 08:44:56 +02:00
Christian Muehlhaeuser
d4dff8809a * Added styleScrollBar method to TomahawkUtils. 2012-06-14 08:44:36 +02:00
Christian Muehlhaeuser
c99df9257c * Added custom scrollbars for testing. 2012-06-14 07:34:43 +02:00
Christian Muehlhaeuser
9bea6b8709 * Added scrollbar border-images. 2012-06-14 07:34:43 +02:00
Christian Muehlhaeuser
e831ba9c46 * Fixed typo in SeekSlider. 2012-06-14 07:34:43 +02:00
Christian Muehlhaeuser
ab5fe146d4 * Swap Albums & Related Artists. 2012-06-14 07:34:43 +02:00
Tomahawk CI
7b1a586a8b Automatic merge of Transifex translations 2012-06-13 22:16:55 +00:00
Christian Muehlhaeuser
9c9dbb33c4 Revert "Swap placement of Albums and Related Artists on new album page and shrink label size a few points"
This reverts commit 2656c4f3f3.
2012-06-13 20:45:17 +02:00
Jason Herskowitz
2656c4f3f3 Swap placement of Albums and Related Artists on new album page and shrink label size a few points 2012-06-13 10:22:06 -04:00
Christian Muehlhaeuser
e3aefb78f7 * Fixed artist page's bg color on OSX. 2012-06-13 09:56:38 +02:00
Christian Muehlhaeuser
236fe91646 * Try fixing solid bg color on OSX. 2012-06-13 09:39:03 +02:00
Christian Muehlhaeuser
52dcf924a4 * New track page. Again, still a bit WIP. 2012-06-13 09:17:53 +02:00
Christian Muehlhaeuser
1a52b99d4f * Cleanup ui file. 2012-06-13 09:17:53 +02:00
Leo Franchi
339e9a3869 TWK-579: Always set stretch factor to avoid super wide default widths 2012-06-13 09:16:25 +02:00
Christian Muehlhaeuser
9935aca127 * New artist page. Tweaks, shadows etc. coming. 2012-06-13 08:48:38 +02:00
Christian Muehlhaeuser
0bb74d949f * Fixed NSIS template. 2012-06-13 01:24:20 +02:00
Tomahawk CI
274d85216b Automatic merge of Transifex translations 2012-06-12 22:16:54 +00:00
Leo Franchi
d18439b4ae Revert "Enable Subscribing on SpotifyPlaylists"
Looks fine but holding off until post-0.5.0 is tagged as I would like to test it quite thoroughly :)

This reverts commit 8401befe6b.
2012-06-12 23:26:13 +02:00
Hugo Lindström
8401befe6b Enable Subscribing on SpotifyPlaylists 2012-06-12 23:05:37 +02:00
Christian Muehlhaeuser
14d7b882fa * Don't fade out SocialWidget. 2012-06-12 21:27:00 +02:00
Christian Muehlhaeuser
a00c931192 * Make SocialWidget less transparent. 2012-06-12 21:17:39 +02:00
Christian Muehlhaeuser
bcd7d82654 * Missing breaks. 2012-06-12 19:46:33 +02:00
Leo Franchi
833a9f59d3 Don't crash when moving the mouse after hitting Cancel in the Share widget 2012-06-12 17:29:34 +02:00
Leo Franchi
3456f5d038 Mark liblastfm as required 2012-06-12 17:29:34 +02:00
Jason Herskowitz
e72062b05c Removed LOVING IT from tweet text since you didn't actually love it, and changed SHARE button text to TWEET for now until we get Facebook back in 2012-06-12 10:03:40 -04:00
Leo Franchi
ecc8634209 Only remove from pipeline on destruction if still running 2012-06-12 09:39:39 +02:00
Christian Muehlhaeuser
8cf7f0bb2b * Make sure m_defaultImage is properly init'ed. 2012-06-12 09:31:40 +02:00
Leo Franchi
f2503afd69 Try letting NSString live longer 2012-06-12 09:14:31 +02:00
Christian Muehlhaeuser
b3ebcb59c0 * Only try loading covers once. 2012-06-12 08:58:40 +02:00
Christian Muehlhaeuser
d0a8f2d1b9 * Safer cover loading for Artists & Albums. 2012-06-12 08:41:10 +02:00
Christian Muehlhaeuser
82febe8da3 * Hardcode foreground color for OverlayWidgets. Needs improved color management eventually. 2012-06-12 07:48:04 +02:00
Christian Muehlhaeuser
6a8edd688b * Use jump-label in AudioControls. 2012-06-12 07:45:40 +02:00
Christian Muehlhaeuser
fa4ef44e4a * QueryLabel now supports displaying a jump-label and handles cursor states itself. 2012-06-12 07:45:14 +02:00
Christian Muehlhaeuser
aeeaaadcd2 * Reimplemented ViewManager::pageForInterface. 2012-06-12 07:42:02 +02:00
Christian Muehlhaeuser
4acf96429e * Added jump-link.png to resources. 2012-06-12 07:41:43 +02:00
Christian Muehlhaeuser
35a25c3971 * Don't track history for destroyed widgets. 2012-06-12 05:41:19 +02:00
Christian Muehlhaeuser
f7d3c48b25 * Disable Facebook / Twitter button for 0.5 release. Renamed OK to Share. 2012-06-12 05:27:45 +02:00
Christian Muehlhaeuser
2bb175860b * Prevent more than one SocialWidget showing up at a time. 2012-06-12 05:18:27 +02:00
Christian Muehlhaeuser
caaec5c1c8 * Style cleanup. 2012-06-12 05:12:24 +02:00
Christian Muehlhaeuser
745ccd34ff * Hard-coded posting to Twitter in SocialWidget. 2012-06-12 05:12:08 +02:00
Christian Muehlhaeuser
9c1f200905 * Support posting to all TwitterInfoPlugins. 2012-06-12 05:11:47 +02:00
Christian Muehlhaeuser
13c22e0c72 * Extra safety for AudioEngine. 2012-06-12 04:43:11 +02:00
Christian Muehlhaeuser
9093068504 * Fixed size for share / love buttons. 2012-06-12 04:42:48 +02:00
Christian Muehlhaeuser
a1ef4c252c * Use proper CMake variables for liblastfm. 2012-06-12 01:21:25 +02:00
Christian Muehlhaeuser
6c94e25286 * Fixed FindLibLastFm.cmake. 2012-06-12 01:21:09 +02:00
Christian Muehlhaeuser
5e731953a3 * Fixed FindLibLastFm.cmak comments. 2012-06-12 01:18:07 +02:00
Christian Muehlhaeuser
cc320a99f2 * Check for liblastfm 1.0.0 being available. 2012-06-12 01:12:33 +02:00
Christian Muehlhaeuser
3b7a057dbb * Added infoplugins to DMG. 2012-06-12 00:57:14 +02:00
Tomahawk CI
14ab48ae36 Automatic merge of Transifex translations 2012-06-11 22:56:16 +00:00
Christian Muehlhaeuser
88ea5f7855 * Fixed macdeploy scripts for VLC2 and Qt 4.8.2. 2012-06-12 00:47:37 +02:00
Dominik Schmidt
695feed2b6 Include Qt translations 2012-06-12 02:26:11 +02:00
Christian Muehlhaeuser
eae9194aa8 Merge pull request #99 from eartle/master
Bundle script changes for VLC 2.0.
2012-06-11 15:17:03 -07:00
Christian Muehlhaeuser
a9a86f8043 * Fixed usage of new liblastfm. 2012-06-11 22:15:09 +02:00
Christian Muehlhaeuser
d16c608610 * Fixed CMakeLists.txt. 2012-06-11 22:15:09 +02:00
Christian Muehlhaeuser
4f261b1711 * Removed liblastfm2 from thirdparty/CMakeLists.txt. 2012-06-11 22:15:09 +02:00
Christian Muehlhaeuser
d77c9eb3eb * Removed liblastfm2 from thirdparty/. 2012-06-11 22:15:09 +02:00
Dominik Schmidt
6f9a79404d Really only find liblastfm-1.0.0 include dirs 2012-06-11 22:08:35 +02:00
Dominik Schmidt
22bca7ed12 Update FindLibLastFm for liblastfm-1.0.0 2012-06-11 22:04:50 +02:00
Dominik Schmidt
31f4c4f656 liblastfm pulls in ${QT_LIBRARIES} as dep for libtomahawk, mention all needed components explicitly as well 2012-06-11 20:37:49 +02:00
Leo Franchi
26729f6f87 Extra safety, but wtf 2012-06-11 11:03:40 +02:00
Tomahawk CI
36bbeb9d5a Automatic merge of Transifex translations 2012-06-10 22:16:56 +00:00
Leo Franchi
5a534954cc Explicitly set working dir of script resolvers being launched 2012-06-10 22:53:29 +02:00
Leo Franchi
9218488409 TWK-879: Ensure bredcrumb arrow is the right proportions 2012-06-10 22:02:19 +02:00
Leo Franchi
c114657f81 TWK-911: Fix placement of social widget 2012-06-10 17:57:26 +02:00
Leo Franchi
60f8241305 Draw small text with highlighted color in large delegate if selected 2012-06-10 17:57:26 +02:00
Leo Franchi
4bc703b477 Make grey text visible when highlighted in playlist delegate 2012-06-10 17:57:26 +02:00
Leo Franchi
99d84c6489 Only install from attica when checking, even if we have checked + uninstalled 2012-06-10 17:57:25 +02:00
Tomahawk CI
37d1c88b42 Automatic merge of Transifex translations 2012-06-09 22:16:47 +00:00
Tomahawk CI
bdd809cc30 Automatic merge of Transifex translations 2012-06-08 22:16:50 +00:00
Leo Franchi
2462c27f05 Comment out fromPath release until I work out why it makes Hugo's Tomahawk unhappy 2012-06-08 23:06:54 +03:00
Jason Herskowitz
ee76eb3dee Make the 3D logo the right color red since it somehow got too pale when I first 3Dified it 2012-06-08 15:10:53 -04:00
Christian Muehlhaeuser
f520217f51 * Fixed XspfUpdater for headless. 2012-06-08 20:08:33 +02:00
Christian Muehlhaeuser
c02edee100 * Fixed GlobalActionManager for headless. 2012-06-08 20:08:33 +02:00
Christian Muehlhaeuser
b908854d59 * Fixed Account for headless. 2012-06-08 20:08:32 +02:00
Christian Muehlhaeuser
e9a1157e00 * Fixed DbCmd_UpdateSearchIndex for headless. 2012-06-08 20:08:32 +02:00
Christian Muehlhaeuser
eecf2c38d2 * Fixed ShortenedLinkParser for headless. 2012-06-08 20:08:32 +02:00
Christian Muehlhaeuser
320182427f * Fixed SipPlugin for headless. 2012-06-08 20:08:31 +02:00
Christian Muehlhaeuser
973436a09b * Fixed Source for headless. 2012-06-08 20:08:30 +02:00
Christian Muehlhaeuser
1abe69079f * Fixed Query for headless. 2012-06-08 20:08:30 +02:00
Christian Muehlhaeuser
13945286ac * Fixed ACLRegistry for headless. 2012-06-08 20:08:30 +02:00
Leo Franchi
53dd69e2f3 TWK-736: Tooltip for currently playing song for peers 2012-06-08 16:37:33 +02:00
Leo Franchi
ce19d8c70b Move Last.fm account to libtomahawk 2012-06-08 15:59:23 +02:00
Leo Franchi
c9edf98dd2 Better reasoning in comments 2012-06-08 15:44:36 +02:00
Leo Franchi
7af7a8784f Remove assert as it might happen in valid conditions sometimes 2012-06-08 15:43:06 +02:00
Leo Franchi
e0d6d5ef6b Move spotify account to libtomahawk 2012-06-08 15:32:08 +02:00
Leo Franchi
59ab945f0b Fix stupid regression in sizegrip hiding when fullscreening 2012-06-08 14:19:08 +02:00
Leo Franchi
224b46f5b0 Only wait for shutdown of script resolver if it's running 2012-06-08 09:25:11 +02:00
Leo Franchi
69ed522954 TWK-922: Text fix for Account delegate 2012-06-08 09:25:11 +02:00
Leo Franchi
e36ea3b263 Don't use auto-release pool and manually release created NSString* 2012-06-08 09:25:10 +02:00
Tomahawk CI
658f919104 Automatic merge of Transifex translations 2012-06-07 22:16:55 +00:00
Christian Muehlhaeuser
171f0e314b * Keep retrying on commit transaction locks. 2012-06-07 14:35:49 +02:00
Christian Muehlhaeuser
8d125f128c * Send version string along when requesting providers.xml from server. 2012-06-07 14:12:17 +02:00
Christian Muehlhaeuser
1272973b52 * Make sure Phonon errors show up on console, and not just the log file. 2012-06-07 14:11:18 +02:00
Christian Muehlhaeuser
aadd7fea2b * Prevent race condition when cloning DatabaseImpls. 2012-06-07 13:32:54 +02:00
Christian Muehlhaeuser
2389770d8a * Moved reindexing to FuzzyIndex. 2012-06-07 13:25:33 +02:00
Christian Muehlhaeuser
7dabdc0a68 * Make FuzzyIndex robuster. 2012-06-07 13:25:02 +02:00
Christian Muehlhaeuser
f174afbd56 * Make artist & album names clickable on track page. 2012-06-07 13:07:11 +02:00
Christian Muehlhaeuser
197dda1ff7 * Set default vertical alignment for QueryLabels to be centered. 2012-06-07 13:01:02 +02:00
Christian Muehlhaeuser
145d95166d * Got rid of all direct InfoSystem calls from ArtistInfoWidget. 2012-06-07 12:16:33 +02:00
Christian Muehlhaeuser
5f473a0c5c * Support loading and cache artists' biographies in Artist object directly. 2012-06-07 12:15:38 +02:00
Christian Muehlhaeuser
f5aeeeb9c8 * OverlayWidget uses PlaylistView as an event-filter for Drag-n-Drop events. 2012-06-07 11:24:20 +02:00
Christian Muehlhaeuser
f89f119078 * Notify results about their originating resolver. 2012-06-07 10:43:26 +02:00
Christian Muehlhaeuser
07660c3f81 * Refresh results when the solve status changed. 2012-06-07 10:42:40 +02:00
Christian Muehlhaeuser
530a420fb4 * Tomahawk::Result now keeps track of the originating resolver and maintains a proper online state. 2012-06-07 10:41:26 +02:00
Christian Muehlhaeuser
ff50bcb545 * Fixed slot signature. 2012-06-07 10:37:58 +02:00
Christian Muehlhaeuser
96e12a0f90 * Register Tomahawk::Resolver* as a meta-type. 2012-06-07 10:37:31 +02:00
Christian Muehlhaeuser
18a1ed4c7d * Less work for SourceDelegate now. 2012-06-07 09:37:28 +02:00
Christian Muehlhaeuser
0d85d15002 * Manage source's off-/online state for the local source, too. 2012-06-07 09:35:35 +02:00
Christian Muehlhaeuser
1b743b0e9d * Let local source know when we go off- / online. 2012-06-07 09:16:37 +02:00
Christian Muehlhaeuser
f1226cd7e4 * Show a loading spinner for 'Newest Stations / Playlists'. 2012-06-07 08:57:04 +02:00
Christian Muehlhaeuser
acc4fa8c9a * Emit loadingStarted() / -Finished() signals from RecentPlaylistsModel. 2012-06-07 08:56:08 +02:00
Christian Muehlhaeuser
8ba433afa5 * Ignore incompatible models. 2012-06-07 08:55:34 +02:00
Christian Muehlhaeuser
8c9d209940 * Removed old sql escaping helper in TomahawkUtils. 2012-06-07 08:34:20 +02:00
Christian Muehlhaeuser
077409ae7e * Use TomahawkSqlQuery's new escaping method. 2012-06-07 08:33:56 +02:00
Christian Muehlhaeuser
14ee71e665 * Added a convenient sql escaping method to TomahawkSqlQuery. It uses the sql drivers internal escaping mechanism. 2012-06-07 08:33:08 +02:00
Christian Muehlhaeuser
9443992ff9 * Keep retrying sql queries forever, as long as the returned db error indicates the db is just busy / locked. 2012-06-07 08:20:55 +02:00
Christian Muehlhaeuser
25ef791afc * Style fix, once again. 2012-06-07 08:12:29 +02:00
Christian Muehlhaeuser
1df157976a * We can rely on stateChanged() signal for updating a source's sidebar info now. 2012-06-07 08:12:28 +02:00
Christian Muehlhaeuser
f57c0c5b74 * More consistent stateChanged() behaviour for sources. 2012-06-07 08:12:28 +02:00
Christian Muehlhaeuser
e550ffe2b0 * Immediately clear the a source's current track pointer after playback finished. 2012-06-07 08:12:28 +02:00
Tomahawk CI
94a8aaced7 Automatic merge of Transifex translations 2012-06-06 22:17:01 +00:00
Jason Herskowitz
0fd008ba41 Changelogify. What did I miss? 2012-06-06 14:55:41 -04:00
Christian Muehlhaeuser
8c9deaf4ac * More accurate debug output. 2012-06-06 16:45:33 +02:00
Christian Muehlhaeuser
6d48ffc298 * One pixel more space for WelcomeWidget's figures. 2012-06-06 16:45:03 +02:00
Christian Muehlhaeuser
447536958e * Give sidebar figures a bit more space and use a thicker font. 2012-06-06 16:42:22 +02:00
Christian Muehlhaeuser
43d2bb7716 * Fancy avatars are now scaled ignoring the aspect ratio. This fixed some odd clipping issues. 2012-06-06 16:40:06 +02:00
Christian Muehlhaeuser
06d79cd788 * Enable shared qsqlite caches. 2012-06-06 16:32:43 +02:00
Christian Muehlhaeuser
d481ffbd90 * Use our own (fail-safer) commit transaction method. 2012-06-06 16:26:12 +02:00
Christian Muehlhaeuser
d8c3006cb4 * Added retry blocks for failed (busy) sql queries & commits. 2012-06-06 16:25:44 +02:00
Christian Muehlhaeuser
872d8a3da5 * Added TomahawkUtils::msleep( uint ). Sigh. 2012-06-06 16:24:39 +02:00
Christian Muehlhaeuser
2dc73d04af * Reuse precalculated connection name. 2012-06-06 16:02:49 +02:00
Leo Franchi
28e15122ea Live longer, dict 2012-06-05 23:31:30 +01:00
Tomahawk CI
89c0e71874 Automatic merge of Transifex translations 2012-06-05 22:17:07 +00:00
Leo Franchi
338a39fe5b Attempt to make sizegrip fix work from 10.6 builds 2012-06-05 09:18:33 +01:00
Leo Franchi
c001acffee Don't leak 2012-06-05 09:18:32 +01:00
Leo Franchi
a8ff291a37 Faster pixmap fading 2012-06-05 09:18:32 +01:00
Leo Franchi
8ba4cb66ea Declare method as well 2012-06-05 09:18:31 +01:00
Leo Franchi
0401c4c88c Another os x ui tweak 2012-06-05 09:18:31 +01:00
Jason Herskowitz
ff0d4bcc26 Now make logo appear on auth page again 2012-06-04 16:49:26 -04:00
Jason Herskowitz
a2082bbb44 More fixes on playdar auth page 2012-06-04 16:42:58 -04:00
Jason Herskowitz
722e1c3d57 Update logo for Tomahawklet Auth Page 2012-06-04 16:34:37 -04:00
Christian Muehlhaeuser
fc5fa6d4ea * Don't manually delete the fuzzy index, instead rely on QObject parenting. 2012-06-04 21:07:12 +02:00
Christian Muehlhaeuser
2b3f850259 * Prioritize query for resolving when requesting to play a still unresolved query. 2012-06-03 21:23:36 +02:00
Christian Muehlhaeuser
2fefdf8118 * Move query to the top of the pipeline if a secondary, prioritized resolve requests arrives. 2012-06-03 21:22:56 +02:00
Christian Muehlhaeuser
2425ec34e5 * Use a separate database connection for each db-worker thread. 2012-06-03 15:38:36 +02:00
Tomahawk CI
93a062c07f Automatic merge of Transifex translations 2012-06-01 22:16:42 +00:00
Jason Herskowitz
6fa0f8a140 Crop SVG logo 2012-06-01 13:32:36 -04:00
Christian Muehlhaeuser
f35821b3b5 * Add an alternative OverlayWidget CTOR for regular QWidgets. 2012-06-01 10:40:48 +02:00
Christian Muehlhaeuser
95dd12aaea * Updated ChangeLog. 2012-06-01 10:31:22 +02:00
Christian Muehlhaeuser
c1885fa6d9 * Support AIFF type audio files. 2012-06-01 10:26:22 +02:00
Christian Muehlhaeuser
72c6b009ff * Fixed resetting empty-tooltip in TreeView. 2012-06-01 09:39:22 +02:00
Christian Muehlhaeuser
a3545712ca * Show a empty-tooltip for collection views. 2012-06-01 09:38:54 +02:00
Christian Muehlhaeuser
393d3370d3 * Set empty-tooltips for Artist-,Album- and TrackInfoWidgets. 2012-06-01 09:05:30 +02:00
Christian Muehlhaeuser
707c2a93d0 * Let TreeView manage empty-tooltips, too. 2012-06-01 09:04:21 +02:00
Christian Muehlhaeuser
4efafaede1 * Set empty-tooltips for Loved-, Recent Additions- and Recent Plays views. 2012-06-01 08:46:51 +02:00
Christian Muehlhaeuser
ba82de45b5 * Only append similar tracks when we received some. 2012-06-01 08:46:13 +02:00
Christian Muehlhaeuser
efc8616a17 * onChanged() will be triggered automatically. 2012-06-01 08:45:38 +02:00
Christian Muehlhaeuser
eff7669dd2 * Always emit a playback history list, even if it's empty. 2012-06-01 08:45:20 +02:00
Christian Muehlhaeuser
ba7556b078 * Emit loading signals for CustomPlaylistViews. 2012-06-01 08:45:00 +02:00
Christian Muehlhaeuser
3928a2d084 * Emit startLoading() when we start loading the playback history. 2012-06-01 08:44:37 +02:00
Christian Muehlhaeuser
8ca0cfa917 * Emit finishedLoading() when we start adding tracks to the model. 2012-06-01 08:44:11 +02:00
Christian Muehlhaeuser
494df4e9a0 * Emit finishedLoading() when we start adding tracks to the model. 2012-06-01 08:43:58 +02:00
Christian Muehlhaeuser
11e1a410e8 * Let GridView manage empty-tooltips, too. 2012-06-01 08:43:27 +02:00
Christian Muehlhaeuser
2aa71d130f * Properly set empty tooltip for PlaylistModels/Views. 2012-06-01 08:09:35 +02:00
Christian Muehlhaeuser
43c1c498d6 * Also hook up OverlayWidget with the model's loading signals. 2012-06-01 08:09:07 +02:00
Christian Muehlhaeuser
137fce3445 * Remove debug in PlaylistView. 2012-06-01 07:49:06 +02:00
Christian Muehlhaeuser
5ee92afb36 * Restore the empty-tooltip when filtering is done. 2012-06-01 07:48:50 +02:00
Christian Muehlhaeuser
1da5ea8ae7 * Show / hide the empty-tooltip when sliding. 2012-06-01 07:46:59 +02:00
Christian Muehlhaeuser
83e073fc7c * AnimatedWidget emits a signal when the sliding animation is done. 2012-06-01 07:46:28 +02:00
Christian Muehlhaeuser
6695372639 * Auto resize OverlayWidget to a reasonable size. 2012-06-01 07:45:58 +02:00
Christian Muehlhaeuser
0d63fb97f7 * Set proper defautl empty-tooltips for PlaylistViews. 2012-06-01 07:13:56 +02:00
Christian Muehlhaeuser
27e7186b98 * Set an empty-tooltip for the QueueView. 2012-06-01 07:11:28 +02:00
Christian Muehlhaeuser
218098e1ff * Allow API users to set an empty tooltip for TrackViews. 2012-06-01 07:11:02 +02:00
Christian Muehlhaeuser
0a7b6c9a22 * Make start- / finishLoading public methods of PlayableModel. 2012-06-01 07:10:27 +02:00
Christian Muehlhaeuser
d713dec19d * OverlayWidget needs to update when items get removed, too. 2012-06-01 07:09:44 +02:00
Christian Muehlhaeuser
3a47a5f9c8 * Never show an empty OverlayWidget. 2012-06-01 06:57:13 +02:00
Christian Muehlhaeuser
4634f95b4c * Temporarily work-around QSqliteDriver's race condition issues. 2012-06-01 06:47:02 +02:00
Christian Muehlhaeuser
4a47f6dd22 * No need to manually disable or include OverlayWidget anymore. 2012-06-01 06:41:57 +02:00
Christian Muehlhaeuser
161b860359 * No need to manually disable or include OverlayWidget anymore. 2012-06-01 06:39:24 +02:00
Christian Muehlhaeuser
18183c512f * No need to include OverlayWidget anymore. 2012-06-01 06:37:11 +02:00
Christian Muehlhaeuser
1d1b3ff382 * No need to manually disable OverlayWidget anymore. 2012-06-01 06:35:15 +02:00
Christian Muehlhaeuser
0abc1a4be9 * Renamed ArtistView to TreeView. 2012-06-01 05:58:42 +02:00
Christian Muehlhaeuser
d97b83557b * Got rid of TreeHeader. Handled by ViewHeader now. 2012-06-01 05:46:36 +02:00
Christian Muehlhaeuser
59fb1fefa0 * Got rid of TrackHeader. Handled by ViewHeader now. 2012-06-01 05:44:56 +02:00
Christian Muehlhaeuser
75991dca18 * Renamed AlbumItemDelegate to GridItemDelegate. 2012-06-01 05:29:02 +02:00
Christian Muehlhaeuser
a61f602855 * Renamed AlbumView to GridView. 2012-06-01 05:19:43 +02:00
Christian Muehlhaeuser
6d9b41dc02 * Soon to be used. 2012-06-01 05:18:51 +02:00
Christian Muehlhaeuser
35fd077d01 * Remove CollectionView which is replaced by TrackView. 2012-06-01 04:59:48 +02:00
Christian Muehlhaeuser
bdab8bc1c8 * Need to eventually hookup the link between SourceItem and ViewManager again. 2012-06-01 04:58:56 +02:00
Christian Muehlhaeuser
8c5fbcd7c7 * SourceInfoWidget now uses a bog standard TrackView. 2012-06-01 04:58:20 +02:00
Christian Muehlhaeuser
e197231fe6 * CollectionView is gone. 2012-06-01 04:57:42 +02:00
Christian Muehlhaeuser
872ccc5305 * A Source's latest-additions view is now a TrackView instead of a CollectionView. 2012-06-01 04:47:54 +02:00
Christian Muehlhaeuser
175b413584 * TrackView's default ViewPage implementation is good enough for PlaylistView. 2012-06-01 04:46:48 +02:00
Christian Muehlhaeuser
fad3c6d12a * TrackView now has a default ViewPage implementation and inheritance. 2012-06-01 04:46:02 +02:00
Christian Muehlhaeuser
f5bdc3a30b * Got rid of obsolete CollectionProxyModel*. 2012-06-01 04:23:03 +02:00
Christian Muehlhaeuser
faf8cf1539 * Fixed TWK-839: Creating name-less playlists results in a better default name. 2012-06-01 03:34:57 +02:00
Christian Muehlhaeuser
690c80db60 * DRY: Call main window and let it create a new playlist. 2012-06-01 03:34:17 +02:00
Christian Muehlhaeuser
062e7a5a3e * Cleanup DiagnosticsDialog. Remove update button and fix copying to clipboard. 2012-06-01 03:05:20 +02:00
Ahmed
65710f9d51 Changes to the DiagnosticsDialog that updates when any changes happens 2012-06-01 02:46:53 +02:00
Christian Muehlhaeuser
b62b9c3531 * Style fix for DynamicView. 2012-06-01 02:17:08 +02:00
Christian Muehlhaeuser
497c0f01c2 * Call insert instead of insertInternal so it gets called correctly, in case it's overwritten. 2012-06-01 02:16:56 +02:00
Christian Muehlhaeuser
c3570e8e53 * Added comment to tr(). 2012-06-01 02:01:53 +02:00
Christian Muehlhaeuser
8841fa48bf * QueueModel is now created by the QueueView directly. 2012-06-01 01:58:41 +02:00
Christian Muehlhaeuser
f74e49b99b * Show how many items are currently in the queue. 2012-06-01 01:58:21 +02:00
Christian Muehlhaeuser
bb1800d27f * Remove items from queue when they're played. 2012-06-01 01:57:27 +02:00
Christian Muehlhaeuser
c829752b7e * Switch to a pointing hand cursor when hovering an artist name in AlbumItemDelegate. 2012-06-01 01:05:36 +02:00
Christian Muehlhaeuser
7ab04deb12 * No more AlbumProxyModel. 2012-06-01 00:35:16 +02:00
Christian Muehlhaeuser
d5d969e058 * PlayableModel is set to be loading as default. 2012-06-01 00:34:48 +02:00
Christian Muehlhaeuser
3467a9e47d * Don't hook up TreeModel to InfoSystem anymore. 2012-06-01 00:34:24 +02:00
Christian Muehlhaeuser
77b4e62918 * OverlayWidget uses PlayableProxyModel now. 2012-06-01 00:34:05 +02:00
Christian Muehlhaeuser
657b4b18f8 * ArtistViw uses PlayableProxyModel now. 2012-06-01 00:33:39 +02:00
Christian Muehlhaeuser
a42f19f07e * AlbumView uses PlayableProxyModel now. 2012-06-01 00:33:17 +02:00
Christian Muehlhaeuser
7409f65874 * AlbumItemDelegate uses PlayableProxyModel now. 2012-06-01 00:32:50 +02:00
Christian Muehlhaeuser
644f6a714a * TreeProxyModel now inherits from PlayableProxyModel. 2012-06-01 00:32:15 +02:00
Christian Muehlhaeuser
0f6f58373e * QueueProxyModel now inherits from PlayableProxyModel. 2012-06-01 00:31:33 +02:00
Christian Muehlhaeuser
68bf96f924 * PlaylistView uses a standard PlayableProxyModel now. 2012-06-01 00:31:09 +02:00
Christian Muehlhaeuser
d17783ef6e * PlayableProxyModel supports artist & album items. 2012-06-01 00:30:28 +02:00
Christian Muehlhaeuser
14f6647471 * Removed obsolete proxy models and their interfaces. 2012-06-01 00:29:40 +02:00
Christian Muehlhaeuser
a62a9d50fe * ViewManager uses new AlbumView/AlbumModel API. 2012-05-31 23:14:28 +02:00
Christian Muehlhaeuser
54612b3512 * SearchWidget uses new AlbumView/AlbumModel API. 2012-05-31 23:14:12 +02:00
Christian Muehlhaeuser
a2f8a2ae11 * SocialPlaylistWidget uses new AlbumView/AlbumModel API. 2012-05-31 23:13:53 +02:00
Christian Muehlhaeuser
cd198db31d * WhatsHotWidget uses new AlbumView/AlbumModel API. 2012-05-31 23:13:32 +02:00
Christian Muehlhaeuser
088ff60339 * AlbumInfoWidget uses new AlbumView/AlbumModel API. 2012-05-31 23:13:09 +02:00
Christian Muehlhaeuser
bf9052bb1b * ArtistInfoWidget uses new AlbumView/AlbumModel API. 2012-05-31 23:12:50 +02:00
Christian Muehlhaeuser
2a4f2d3802 * SourceInfoWidget uses new AlbumView/AlbumModel API. 2012-05-31 23:12:23 +02:00
Christian Muehlhaeuser
98de149eec * TrackInfoWidget uses new AlbumView/AlbumModel API. 2012-05-31 23:12:10 +02:00
Christian Muehlhaeuser
1c4fabed2b * WelcomeWidget uses new AlbumView/AlbumModel API. 2012-05-31 23:11:48 +02:00
Christian Muehlhaeuser
790120836d * NewReleasesWidget now uses PlayableModels. 2012-05-31 23:11:17 +02:00
Christian Muehlhaeuser
b14985bf81 * Style fix in CustomPlaylistView. 2012-05-31 23:10:52 +02:00
Christian Muehlhaeuser
fee2f3a01b * AlbumView now uses a PlayableModel internally. 2012-05-31 23:10:27 +02:00
Christian Muehlhaeuser
6d057732b5 * Support new AlbumModel API. 2012-05-31 23:09:58 +02:00
Christian Muehlhaeuser
bc982f0ca5 * AlbumModel now inherits from PlayableModel. 2012-05-31 23:09:37 +02:00
Christian Muehlhaeuser
811cd200d0 * Support item-sizes & adding various item_ptr's with templating in PlayableModel. 2012-05-31 23:08:58 +02:00
Christian Muehlhaeuser
c6ba3bcc15 * CollectionFlatModel is obsolete now. 2012-05-31 21:41:25 +02:00
Christian Muehlhaeuser
16736a2afd * RelatedArtistsContext uses new TreeModel API. 2012-05-31 21:35:51 +02:00
Christian Muehlhaeuser
713b076929 * WhatsHotWidget uses new TreeModel API. 2012-05-31 21:35:29 +02:00
Christian Muehlhaeuser
172a4a8d77 * TrackView now uses LoadingSpinner and new OverlayWidget. 2012-05-31 21:34:19 +02:00
Christian Muehlhaeuser
2860bfc704 * ArtistView now uses LoadingSpinner and new OverlayWidget. 2012-05-31 21:33:52 +02:00
Christian Muehlhaeuser
3e8d131c16 * AlbumView now uses LoadingSpinner and new OverlayWidget. 2012-05-31 21:33:05 +02:00
Christian Muehlhaeuser
72528ab089 * LoadingSpinner inherits AnimatedSpinner and automatically connects to a QAbstractItemView. 2012-05-31 21:31:43 +02:00
Christian Muehlhaeuser
7bdc5ea4f2 * OverlayWidget now expects a QAbstractItemView which it automatically connects all signals to. 2012-05-31 21:31:01 +02:00
Christian Muehlhaeuser
7a8818ae94 * Style fix in DbCmd_SetPlaylistRevision. 2012-05-31 21:29:38 +02:00
Christian Muehlhaeuser
ca3b01362c * TreeModel inherits PlayableModel now. Will be renamed to CollectionModel soon. 2012-05-31 21:29:12 +02:00
Christian Muehlhaeuser
bff7f01e22 * Fixed warnings and added itemCountChanged( uint ) signal to PlayableModel. 2012-05-31 21:28:37 +02:00
Christian Muehlhaeuser
751f029564 * PlayableModel is now capable of dealing with trees. 2012-05-31 21:22:18 +02:00
Christian Muehlhaeuser
623850a281 * Catch any exceptions when opening the lucene FSDirectory. 2012-05-31 16:54:44 +02:00
Christian Muehlhaeuser
5c1763e847 * Let's try that with Utf8 again. 2012-05-31 16:45:14 +02:00
Christian Muehlhaeuser
602cf294d0 * Store path as a temporary QByteArray so the data doesn't get free'd again immediately. 2012-05-31 16:37:40 +02:00
Christian Muehlhaeuser
ac9064dcbc * Trying toLocal8Bit().data() for fixing Windows with non-latin usernames. 2012-05-31 16:35:45 +02:00
Christian Muehlhaeuser
f9e7ddfb86 * Trying toLocal8Bit() for fixing Windows with non-latin usernames. 2012-05-31 13:54:48 +02:00
Michael Coffey
9be74e001c Change the bundle script to find VLC 2.0 plugins, which are no longer in subfolders. A few have been commented out as they don't exist anymore (at least not with the same name). 2012-05-31 12:17:08 +01:00
Tomahawk CI
d655d66e96 Automatic merge of Transifex translations 2012-05-30 22:18:29 +00:00
Christian Muehlhaeuser
2ac0be98d3 * Does this potentially fix our Windows non-latin username issues? 2012-05-30 21:59:10 +02:00
Christian Muehlhaeuser
2820774220 * No need to pass DatabaseImpl into FuzzyIndex. 2012-05-30 21:58:16 +02:00
Christian Muehlhaeuser
62f041cc2a Merge pull request #96 from x8lucas8x/amarokfork
Some changes to make libtomahawk more usable by third-parties
2012-05-30 01:09:40 -07:00
Lucas Lira Gomes
9fe91d6af1 * Moved some files to libtomahawk. 2012-05-29 20:40:24 -03:00
Lucas Lira Gomes
2a5d061dee * Made ZeroConfAccount less bug prone. 2012-05-29 20:40:14 -03:00
Lucas Lira Gomes
5f385753c3 * Fixed FindJreen.cmake. 2012-05-29 19:49:28 -03:00
Tomahawk CI
c5138bfd76 Automatic merge of Transifex translations 2012-05-29 22:16:42 +00:00
Jason Herskowitz
a3cfdae7e8 Tweak SVG some more to see if it's better or worse 2012-05-29 15:08:41 -04:00
Jason Herskowitz
7cebabf7f2 Bigger SVG icon. See if this helps the Linux Mint implementation of Gnome3/icon 2012-05-29 14:31:46 -04:00
Jason Herskowitz
4082395d4b Change track temp page icon in sidebar to same style as others 2012-05-29 10:18:40 -04:00
Tomahawk CI
4113389cb5 Automatic merge of Transifex translations 2012-05-28 22:16:57 +00:00
Christian Muehlhaeuser
96132ef9c6 * Added love track action to the tray menu. 2012-05-28 19:38:57 +02:00
Christian Muehlhaeuser
1528095de2 * No need to call loadSocialActions manually. 2012-05-28 19:38:40 +02:00
Christian Muehlhaeuser
7cf307080b * Split audioStopped / audioPaused into separate slots. 2012-05-28 19:00:53 +02:00
Christian Muehlhaeuser
e06f58eb29 * Properly init StopAfterPlayback action. 2012-05-28 19:00:29 +02:00
Christian Muehlhaeuser
22d65b7364 * Make QueueView's header draggable for resizing. 2012-05-28 17:46:30 +02:00
Christian Muehlhaeuser
84c40dc590 * Support manual resizing in AnimatedSplitter. 2012-05-28 17:46:11 +02:00
Christian Muehlhaeuser
fac2e2fc5b * Make HeaderLabel an alternative drag-for-resize method. 2012-05-28 17:45:40 +02:00
Christian Muehlhaeuser
ab86a48ef7 * Style fixes for WidgetDragFilter. 2012-05-28 17:45:00 +02:00
Christian Muehlhaeuser
3b04498661 * Make sure we always have a working uuid in Artist / Album. 2012-05-28 16:32:29 +02:00
Christian Muehlhaeuser
c8afb7a7c6 * DropJob now uses the new API. 2012-05-28 16:12:51 +02:00
Christian Muehlhaeuser
0980044ef6 * Style fix for JobStatusModel. 2012-05-28 16:12:28 +02:00
Christian Muehlhaeuser
7cacc42737 * Cleaned up DropJobNotifier. 2012-05-28 16:11:57 +02:00
Christian Muehlhaeuser
9d26f342d3 * Always select the current view-page in the SourceTreeView. 2012-05-28 14:19:33 +02:00
Christian Muehlhaeuser
bea23d7dbe * Don't emit selection requests if we didn't activate a ViewPage. 2012-05-28 14:18:51 +02:00
Christian Muehlhaeuser
684f33a99f * Removed obsolete signal connections in RelatedArtistsContext. 2012-05-28 14:17:53 +02:00
Christian Muehlhaeuser
be52d81248 * Fixed TWK-842: Use sheet dialog when asking for new station's name. 2012-05-28 13:22:25 +02:00
Christian Muehlhaeuser
e9aaf56b3d * Fixed accidental typo. 2012-05-28 13:16:25 +02:00
Christian Muehlhaeuser
40051b82cb * Style cleanup for XmppSip. 2012-05-28 13:05:55 +02:00
Christian Muehlhaeuser
c258f1897f * Style cleanup for AvatarManager. 2012-05-28 13:05:55 +02:00
Christian Muehlhaeuser
c9f287590c * Style fix. Sorry Leo. 2012-05-28 13:05:54 +02:00
Tomahawk CI
f3164635e0 Automatic merge of Transifex translations 2012-05-27 22:16:53 +00:00
Christian Muehlhaeuser
04ce453687 * Fixed TWK-910: Make sure search results are sorted properly. 2012-05-27 20:26:46 +02:00
Christian Muehlhaeuser
f7a46de38e * Remove bottom frame of our toolbar. 2012-05-27 19:43:58 +02:00
Christian Muehlhaeuser
c2814bdabb * Make hover fading a tiny bit faster again. 2012-05-27 19:35:09 +02:00
Christian Muehlhaeuser
b3f2478d6d * Remove debug output again. 2012-05-27 19:31:00 +02:00
Christian Muehlhaeuser
49a4dddd88 * Use new API in RelatedArtistsContext. 2012-05-27 19:21:27 +02:00
Christian Muehlhaeuser
9af174a198 * Use new API in TopTracksContext. 2012-05-27 19:21:27 +02:00
Christian Muehlhaeuser
13befb9d6f * Remove obsolete info-id. 2012-05-27 19:21:27 +02:00
Christian Muehlhaeuser
401d52d6f0 * Remove obsolete info-id. 2012-05-27 19:21:26 +02:00
Leo Franchi
aee7dcd008 More debug an an assert to track down empty resolve status job 2012-05-27 13:10:01 -04:00
Leo Franchi
d2f876b6f3 Only load resolve icon pixmap once 2012-05-27 13:10:00 -04:00
Christian Muehlhaeuser
70fa4b73d4 * Use the new Artist API in ArtistInfoWidget. 2012-05-27 19:05:23 +02:00
Christian Muehlhaeuser
d8c5dcc6ba * Cleaned up names in TrackInfoWidget. 2012-05-27 19:04:56 +02:00
Christian Muehlhaeuser
74af29054a * Fixed TWK-719: Handle Twitter names in --demo mode. 2012-05-27 18:35:58 +02:00
Christian Muehlhaeuser
4d281b645c * Extra debug output for, well, debugging help. 2012-05-27 18:24:46 +02:00
Christian Muehlhaeuser
5e0d8d2292 * Fixed TWK-812: Persistent volume settings across sessions. 2012-05-27 18:24:46 +02:00
Christian Muehlhaeuser
8830593f1d * Added volume / setVolume methods to TomahawkSettings. 2012-05-27 18:24:46 +02:00
Leo Franchi
8d57ec3283 Remove stale files 2012-05-27 12:22:24 -04:00
Christian Muehlhaeuser
d67f4827a8 * Re-enabled WidgetDragFilter for main-window's toolbar. 2012-05-27 18:10:27 +02:00
Christian Muehlhaeuser
418f12743f * Style fix. 2012-05-27 17:35:53 +02:00
Christian Muehlhaeuser
b811b12e77 * Fixed AudioEngine's now playing data pusher to wait for covers being available. 2012-05-27 17:35:36 +02:00
Christian Muehlhaeuser
f24d11b41a * Use new coverLoaded() methods. 2012-05-27 17:34:22 +02:00
Christian Muehlhaeuser
c5f6c25e93 * Added coverLoaded() method to Query. 2012-05-27 17:34:03 +02:00
Christian Muehlhaeuser
9d064f7689 * Renamed infoLoaded() to coverLoaded(). 2012-05-27 17:33:46 +02:00
Christian Muehlhaeuser
33cae66d95 * Renamed infoLoaded() to coverLoaded(). 2012-05-27 17:33:38 +02:00
Jason Herskowitz
b2b7fc4a4e Add a bit of 3rd dimension to the dock icon 2012-05-27 09:02:32 -04:00
Christian Muehlhaeuser
f75531da79 * Fixed TWK-853: Confirm with user before actually deleting a playlist. 2012-05-27 13:01:25 +02:00
Christian Muehlhaeuser
13920ce25d * Implement a page history in ViewManager. 2012-05-27 11:49:40 +02:00
Leo Franchi
05ea3065f8 Allow rating custom resolvers 2012-05-26 18:35:47 -04:00
Leo Franchi
ae958cb124 Don't wordwrap download count 2012-05-26 18:35:47 -04:00
Tomahawk CI
23ef32ffee Automatic merge of Transifex translations 2012-05-26 22:16:57 +00:00
Christian Muehlhaeuser
5e820ee0a8 * Fixed broken translation. 2012-05-26 18:17:46 +02:00
Christian Muehlhaeuser
ecd4aeb965 * Make the hover fade a bit more noticeable. Looks nice imo. 2012-05-26 18:08:19 +02:00
Tomahawk CI
a55c1c0f08 Automatic merge of Transifex translations 2012-05-26 15:31:06 +00:00
Christian Muehlhaeuser
9f7c6b2380 * Made strings translation-friendlier for various languages. 2012-05-26 17:26:56 +02:00
Christian Muehlhaeuser
bd9a1aab8e * Fixed un-tr()'d strings. 2012-05-26 17:20:04 +02:00
Leo Franchi
d846c8a693 Fix ported from ResolverAccount to CustomAtticaAccount omission 2012-05-26 09:12:32 -04:00
Christian Muehlhaeuser
da82f398be * Fixed untranslatable strings issue. 2012-05-26 11:13:42 +02:00
Tomahawk CI
cfa63049e2 Automatic merge of Transifex translations 2012-05-25 22:18:59 +00:00
Leo Franchi
f947005666 TWK-885: Hide resize handle when in osx full-screen mode 2012-05-25 18:08:40 -04:00
Leo Franchi
ac46b080fe Only show updater icon if updater is actively syncing 2012-05-25 17:12:50 -04:00
Leo Franchi
3710d617a1 Load 22x22 track-info icon 2012-05-25 17:12:50 -04:00
Leo Franchi
9bdeed232e Fix typo 2012-05-25 17:01:03 -04:00
Leo Franchi
075d5e74f8 TWK-903: Resize last.fm dialog when beginning to import 2012-05-25 16:21:42 -04:00
Leo Franchi
3cac235232 TWK-888: Steer text color should be highlighted text color 2012-05-25 15:38:48 -04:00
Leo Franchi
873b8dab91 Assert if we forcibly kill external resolvers, to get some user feedback 2012-05-25 15:13:53 -04:00
Leo Franchi
37b59126f6 Sort binary resolvers, then script resolvers by download count 2012-05-25 15:13:40 -04:00
Leo Franchi
098183ddca Keep Remove button size in accounts delegate same as Add 2012-05-25 14:14:06 -04:00
Leo Franchi
fb5d21e401 Add a cmake flag to disable binary attica resolvers for distros 2012-05-25 12:35:28 -04:00
Leo Franchi
26036a2021 Only turn on enable account when going back online 2012-05-25 12:12:15 -04:00
Leo Franchi
9521ed3fde More warning fixes 2012-05-25 09:02:34 -04:00
Leo Franchi
da3bf8d43f Fix warning 2012-05-25 08:52:10 -04:00
Christian Muehlhaeuser
1c55f56777 * A little dependency tracking. 2012-05-25 07:49:28 +02:00
Tomahawk CI
2af0d9a027 Automatic merge of Transifex translations 2012-05-25 04:43:20 +00:00
Christian Muehlhaeuser
63843416cf * Fixed about dialog translation. 2012-05-25 06:40:23 +02:00
Christian Muehlhaeuser
81949ee0a0 * Support arabic translation. 2012-05-25 06:05:02 +02:00
Christian Muehlhaeuser
3b5f48926c * Remove gloox support. XmppBot will need to be ported but was broken by now, anyway. 2012-05-25 05:52:08 +02:00
Leo Franchi
677944d403 Discogs infoplugin, only albums contents atm. 2012-05-24 23:07:34 -04:00
Leo Franchi
9294b73c57 Invert 2012-05-24 21:54:41 -04:00
Leo Franchi
052093f1ea Try out some fading 2012-05-24 21:05:54 -04:00
Tomahawk CI
216e43a502 Automatic merge of Transifex translations 2012-05-24 22:16:44 +00:00
Leo Franchi
e571050758 Make sure to re-enable resolver when overwriting attica with local installed 2012-05-24 16:12:55 -04:00
Christian Muehlhaeuser
d14e14d25a * Workaround for scrobbling duration-less results. 2012-05-24 16:09:44 +02:00
Christian Muehlhaeuser
fde130ef9f * Store volume when actually pausing. 2012-05-24 15:26:38 +02:00
Christian Muehlhaeuser
305b69b229 * Only reset volume when resuming playback. 2012-05-24 15:26:02 +02:00
Christian Muehlhaeuser
ca41b8b7d3 * Fixed resolving top hits top-to-bottom. 2012-05-24 15:20:09 +02:00
Leo Franchi
ac26378914 Remove legacy/confusing autostart from pipeline's external resolvers 2012-05-24 08:58:39 -04:00
Christian Muehlhaeuser
1845bbbd65 * No frame / focus rect for lyrics. 2012-05-24 14:48:18 +02:00
Christian Muehlhaeuser
0af1cc6e20 Revert "* Leo: please review. I think this was meant to be this way actually."
This reverts commit c036c147a7.
2012-05-24 14:17:06 +02:00
Christian Muehlhaeuser
a150697f49 * DRY and style cleanups. 2012-05-24 14:08:42 +02:00
Christian Muehlhaeuser
ca7db4ff99 * Fixed artist / album search results. 2012-05-24 13:49:41 +02:00
Christian Muehlhaeuser
c574dfeff3 * Added some queueState safety mechanism. Phonon's error signal fails to fire sometimes. Sigh. 2012-05-24 13:42:02 +02:00
Christian Muehlhaeuser
4b059293d1 * Clear command queue when Phonon reports an error. 2012-05-24 12:34:52 +02:00
Christian Muehlhaeuser
cbda055c89 * Fixed enabling all resolvers on startup. 2012-05-24 12:10:30 +02:00
Christian Muehlhaeuser
c036c147a7 * Leo: please review. I think this was meant to be this way actually. 2012-05-24 11:01:00 +02:00
Christian Muehlhaeuser
8abf255b27 * Changed debug output and style cleanup. 2012-05-24 11:00:28 +02:00
Christian Muehlhaeuser
b51e7390ba * Ok, let's try that publicly. AudioState queue to work around the Phonon state mess. 2012-05-24 10:44:33 +02:00
Christian Muehlhaeuser
3225407118 * Fixed incorrect PixmapDelegateFader connect()s. 2012-05-24 07:55:34 +02:00
Christian Muehlhaeuser
606fb9cae5 * Defines in headers are just evil. 2012-05-24 07:50:20 +02:00
Dominik Schmidt
41d0c9b153 unused_variable_warnings-- 2012-05-24 01:10:03 +02:00
Christian Muehlhaeuser
b0a99ad1ad * Style cleanup. 2012-05-24 00:26:05 +02:00
Christian Muehlhaeuser
6b1aa6e9cd * According to Leo this is even faster. 2012-05-24 00:26:05 +02:00
Tomahawk CI
8aec11c0e9 Automatic merge of Transifex translations 2012-05-23 22:16:59 +00:00
Leo Franchi
1dd053dc0f Emit a failed signal if there's no internet, so things that depend on AtticaManager move forward 2012-05-23 17:31:20 -04:00
Jeff Mitchell
608d0c30d0 Update against attica >0.3 to fix attica proxy handling 2012-05-23 15:49:45 -04:00
Jason Herskowitz
ac06dbdbef Add logo SVG 2012-05-23 15:01:53 -04:00
Jason Herskowitz
c685ba7c03 Give black OS X systray icon a little more padding 2012-05-23 14:50:14 -04:00
Dominik Schmidt
e5b697801a Make tray icon colorful on windows and linux again 2012-05-23 20:49:13 +02:00
Jason Herskowitz
56d93f1201 Make black icon for use with OS X 2012-05-23 14:43:38 -04:00
Jason Herskowitz
76f463b81a New logo 2012-05-23 14:20:30 -04:00
Jeff Mitchell
d09145b06f Better debug output from whatshotwidget 2012-05-23 13:27:25 -04:00
Jeff Mitchell
d7a925d110 Make init methods for all infoplugins to solve issues with network traffic before they're in the right thread 2012-05-23 13:23:15 -04:00
Jeff Mitchell
91024493ee Loaded plugins don't get loaded into the correct thread...fix this 2012-05-23 11:27:37 -04:00
Jeff Mitchell
3159cfd840 Make the Tomahawk cache spit out a more useful error when data not
found, and stop Sources from endlessely querying it for avatars that we
already know don't exist
2012-05-23 11:16:04 -04:00
Christian Muehlhaeuser
0fb1511904 * Re-layout item grid when model changes. 2012-05-23 17:13:58 +02:00
Christian Muehlhaeuser
7af615dbf8 * Disable shutdown db analyze again. 2012-05-23 17:08:29 +02:00
Christian Muehlhaeuser
ab602b2072 * Don't tell model about item size if there's no model yet. 2012-05-23 16:54:50 +02:00
Christian Muehlhaeuser
bc0e3810d7 * Speed up DbCmd_AllAlbums. A ton. 2012-05-23 14:29:17 +02:00
Christian Muehlhaeuser
e2ab7d834b * Run analyze on shutdown (for debugging only). 2012-05-23 13:08:23 +02:00
Christian Muehlhaeuser
2673645907 * Fixed compiling on OSX. 2012-05-23 13:04:30 +02:00
Christian Muehlhaeuser
3e1a5c15c5 * Added verbose log output for SQL queries. 2012-05-23 12:41:02 +02:00
Christian Muehlhaeuser
5d0a54ce8b * Moved TomahawkSqlQuery's implementation into a separate file. 2012-05-23 12:18:42 +02:00
Christian Muehlhaeuser
ff70417891 * Progress towards compiling on OS X (10.6). 2012-05-23 10:15:47 +02:00
Christian Muehlhaeuser
f160947ddc * Split out BinaryExtractWorker and SharedTimeLine into separate files. 2012-05-23 10:07:29 +02:00
Christian Muehlhaeuser
a3d11225a3 * Fixed compiling on OS X 10.6. 2012-05-23 09:38:26 +02:00
Leo Franchi
92ec403f7c Fixes for spotify and lastfm custom accounts, and fix some misc older bugs 2012-05-22 22:03:48 -04:00
Leo Franchi
af50be9ef8 Don't assert on a potentially valid condition 2012-05-22 22:03:47 -04:00
Leo Franchi
a538553d17 Do binary payload management in background 2012-05-22 22:03:47 -04:00
Leo Franchi
982945107e Handle linux in checkForResolver 2012-05-22 22:03:47 -04:00
Tomahawk CI
b66e191078 Automatic merge of Transifex translations 2012-05-22 22:16:39 +00:00
Jeff Mitchell
47254de796 Merge branch 'master' into aclwidget 2012-05-21 15:31:44 -04:00
Jeff Mitchell
8f4b160ae9 Merge branch 'master' into aclwidget
Conflicts:
	src/libtomahawk/jobview/AclJobItem.cpp
2012-05-20 16:12:08 -04:00
Leo Franchi
067138b9ac Update view sizehint when we get a custom delegate in case it is non-standard in height 2012-05-19 18:25:10 -04:00
Leo Franchi
a36693bd4c Fix merge 2012-05-19 17:40:53 -04:00
Leo Franchi
a3bcf52529 Merge branch 'master' into aclwidget
Conflicts:
	src/libtomahawk/AclRegistry.cpp
	src/libtomahawk/jobview/AclJobItem.cpp
2012-05-19 14:54:45 -04:00
Jeff Mitchell
456d6f74bb Fix invalid variant conversion; need to make sure it's actually working properly, though 2012-04-22 16:57:50 -04:00
Jeff Mitchell
261aa7b677 W. T. F. Why can my simple struct no longer be serialized by QVariant.
Even adding destructor/copy constructor didn't help.
2012-04-22 16:05:14 -04:00
Jeff Mitchell
4fcfbf8e06 Semi-working ACL state. 2012-04-22 14:40:15 -04:00
698 changed files with 33144 additions and 39802 deletions

View File

@@ -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)

View File

@@ -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 )

View File

@@ -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)

View File

@@ -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)

View File

@@ -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"

View File

@@ -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
View File

@@ -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!

View File

@@ -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')

View File

@@ -1,2 +1,2 @@
[Paths]
Plugins = PlugIns
Plugins = qt-plugins

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 151 KiB

After

Width:  |  Height:  |  Size: 151 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 260 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 KiB

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View File

@@ -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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 MiB

After

Width:  |  Height:  |  Size: 260 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 356 KiB

After

Width:  |  Height:  |  Size: 260 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 MiB

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 397 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 376 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 MiB

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 MiB

After

Width:  |  Height:  |  Size: 68 KiB

View File

@@ -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">

View File

@@ -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">

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 27 KiB

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -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>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -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()

View File

@@ -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>

View File

@@ -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();
}

View File

@@ -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;

View File

@@ -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>

View File

@@ -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

View File

@@ -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

View File

@@ -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;
}

View File

@@ -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;

View File

@@ -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>&amp;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 &amp;Log-file</string>
</property>
</widget>
</item>

View File

@@ -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();

View File

@@ -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 );
}

View File

@@ -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

View File

@@ -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();

View File

@@ -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;
};

View File

@@ -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 )
{

View File

@@ -97,6 +97,8 @@ private slots:
void changePage( QListWidgetItem*, QListWidgetItem* );
void serventReady();
void aclEntryClearButtonClicked();
void requiresRestart();
private:

View File

@@ -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();
}

View File

@@ -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;

View File

@@ -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>

View File

@@ -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();
}

View File

@@ -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();

View File

@@ -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 );
}

View File

@@ -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

View File

@@ -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 &lt;muesli@tomahawk-player.org&gt;<br/><br/>"
"Thanks to: Leo Franchi, Jeff Mitchell, Dominik Schmidt, Jason Herskowitz, Alejandro Wainzinger, Hugo Lindstr&ouml;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 &lt;muesli@tomahawk-player.org&gt;<br/><br/>"
"%2 Leo Franchi, Jeff Mitchell, Dominik Schmidt, Jason Herskowitz, Alejandro Wainzinger, Hugo Lindstr&ouml;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
}

View File

@@ -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;

View File

@@ -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>&amp;Legal Info...</string>
</property>
<property name="menuRole">
<enum>QAction::ApplicationSpecificRole</enum>
</property>
</action>
<action name="actionDiagnostics">
<property name="text">
<string>Diagnostics...</string>

View File

@@ -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 );
}
}

View File

@@ -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 );

View File

@@ -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 );
}

View File

@@ -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 )
{

View File

@@ -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 &regex, 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;

View File

@@ -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;

View File

@@ -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 );

View File

@@ -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;
}

View File

@@ -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

View File

@@ -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()
{

View File

@@ -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;
};

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

View File

@@ -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 );

View File

@@ -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& ) {}

View File

@@ -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 )

View File

@@ -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;
};
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

@@ -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() ) );
}

View File

@@ -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>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Sorry!&lt;/span&gt; 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.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Sorry!&lt;/span&gt; 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.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="textFormat">
<enum>Qt::RichText</enum>

View File

@@ -9,6 +9,7 @@ list(APPEND simple_plugins
MusixMatch
MusicBrainz
Rovi
Discogs
)
foreach(simple_plugin ${simple_plugins})

View File

@@ -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 )

View File

@@ -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 );

View 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 )

View 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

View File

@@ -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 )
{

View File

@@ -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 )

View File

@@ -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:

Some files were not shown because too many files have changed in this diff Show More