1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-09-08 21:20:45 +02:00

Compare commits

...

958 Commits

Author SHA1 Message Date
Jeff Mitchell
37ca79aa61 All post-0.5 changes so far 2012-05-23 09:04:07 -04:00
Leo Franchi
e4bd229ef0 OSX fix 2012-05-22 10:38:54 -04:00
Leo Franchi
bb62fd6047 Try harder to find an account 2012-05-22 10:35:13 -04:00
Leo Franchi
e91d9e55f6 Fix slow network causing multiple spotify accounts to show up 2012-05-22 10:35:13 -04:00
Leo Franchi
b308212214 Properly download+install binary payload on linux 2012-05-22 08:35:17 -04:00
Leo Franchi
5766ea382b Fix heisenbug 2012-05-22 08:35:17 -04:00
Christian Muehlhaeuser
413bddaf7d * Updated ChangeLog. 2012-05-22 13:11:38 +02:00
Christian Muehlhaeuser
2deb9bcdc1 * Wording: Resume instead of Retry. 2012-05-22 12:11:27 +02:00
Christian Muehlhaeuser
5b2a5b76a4 * Show current import date. 2012-05-22 12:01:03 +02:00
Christian Muehlhaeuser
2558202a52 * Update the button status while the import is ongoing. 2012-05-22 11:48:05 +02:00
Christian Muehlhaeuser
ac8703c9e7 * Robuster error / retry handling. 2012-05-22 11:38:12 +02:00
Christian Muehlhaeuser
2ee66a3cda * Allow to locally import Last.fm playback history. Works but needs discussion. 2012-05-22 10:43:39 +02:00
Christian Muehlhaeuser
3f5d219549 * Fixed sorting order when retrieving playback history. 2012-05-22 10:41:58 +02:00
Christian Muehlhaeuser
b1904b877e * Cleaner code in AudioEngine. 2012-05-22 10:41:37 +02:00
Christian Muehlhaeuser
7ffb3b2fef * Fixed logic error in DbCmd_TrackAttributes. 2012-05-22 10:41:12 +02:00
Christian Muehlhaeuser
95dccb8cf9 * Improved resolving: be more careful when it comes to result similarity. 2012-05-22 08:07:07 +02:00
Christian Muehlhaeuser
530d9d7e5f * Fixed systray menu not working. 2012-05-22 08:01:14 +02:00
Christian Muehlhaeuser
d44028a2af * AlbumModel items shouldn't be editable. 2012-05-22 02:34:44 +02:00
Tomahawk CI
5a1ee4ec3a Automatic merge of Transifex translations 2012-05-21 22:16:50 +00:00
Christian Muehlhaeuser
e426e26e8d * DRY PlayableItem. 2012-05-21 12:42:25 +02:00
Christian Muehlhaeuser
1b748201bc * Renamed Track(Proxy)Model to Playable(Proxy)Model. 2012-05-21 10:07:49 +02:00
Christian Muehlhaeuser
45397e82a8 * Drop the usage of the old item classes and use the new PlayableItem. 2012-05-21 09:05:14 +02:00
Christian Muehlhaeuser
3f494ed5d3 * PlayableItem. One class to rule them all. Album-, TrackModel- and TreeModelItem be gone. 2012-05-21 09:04:42 +02:00
Christian Muehlhaeuser
a36ee207e9 * Pass on QWheelEvents to AlbumView when hovering a spinner / play / pause button on top of it. 2012-05-21 06:12:34 +02:00
Christian Muehlhaeuser
70245e34ac * Fixed delegate's connect. 2012-05-21 04:46:03 +02:00
Christian Muehlhaeuser
965a9b6153 * Consistent color for duration in PlaylistItemDelegate. 2012-05-21 04:41:22 +02:00
Christian Muehlhaeuser
219d4e5f19 * Fixed cover fading. 2012-05-21 04:36:37 +02:00
Dominik Schmidt
41074e15d1 Include all plugins on windows 2012-05-21 02:17:51 +02:00
Tomahawk CI
b2e233b127 Automatic merge of Transifex translations 2012-05-20 22:16:34 +00:00
Leo Franchi
48b089c3c4 More robust install feedback, see if it works for binary resolvers too 2012-05-20 17:05:01 -04:00
Leo Franchi
675841e9a7 Don't start resolver if the path no longer exists 2012-05-20 16:24:38 -04:00
Leo Franchi
e0693475d7 Don't re-install spotify on each restart on windows ;) 2012-05-20 16:24:38 -04:00
Dominik Schmidt
b7aef08b7c Merge pull request #95 from seezer/master
Fix key event handling in SourceTreeView
2012-05-20 13:22:53 -07:00
Leo Franchi
6c856db4f8 Heisenbug observed, debug removed. 2012-05-20 15:37:23 -04:00
Leo Franchi
a63a636750 Add some debug for hugo 2012-05-20 15:26:22 -04:00
Leo Franchi
01b6b6887c Make license header consistent 2012-05-20 15:26:17 -04:00
Sebastian Goth
ad49a5d5af Fix key event handling in SourceTreeView
Correctly propagate multimedia key events to mainwindow
2012-05-20 18:30:28 +02:00
Dominik Schmidt
edb34eef59 warnings-- 2012-05-20 15:47:11 +02:00
Christian Muehlhaeuser
717b04623f * Style cleanup. 2012-05-20 15:44:03 +02:00
Dominik Schmidt
5a8b32691e Fix export 2012-05-20 15:21:28 +02:00
Dominik Schmidt
92423fe925 Fix last commit 2012-05-20 14:26:51 +02:00
Dominik Schmidt
cdb044b4e4 Make timeoutMillis invunerable against inconsistent changes 2012-05-20 14:07:58 +02:00
Christian Muehlhaeuser
e26545b195 * Nicer margin for AudioControl's cover image. 2012-05-20 13:17:10 +02:00
Christian Muehlhaeuser
46fde05aa9 * Cleaned up AlbumItemDelegate and fixed a few smaller issues. 2012-05-20 12:30:21 +02:00
Christian Muehlhaeuser
4fdd6ddc45 * Fixed 'Jeffe's copyright. 2012-05-20 12:29:44 +02:00
Christian Muehlhaeuser
ebe8df4f91 * Support changing image size in PixmapDelegateFader. 2012-05-20 12:29:21 +02:00
Christian Muehlhaeuser
5ed65cafce * Introduced Query::displayQuery(). Returns (if available) the first result as a query_ptr, otherwise returns the Query's own query_ptr. Use this whenever you wanna display Query stuff in the GUI. Also, reduce numResults() usage. 2012-05-20 10:39:05 +02:00
Christian Muehlhaeuser
d3271cffde * Don't try to load the playback history if the sources instance isn't ready yet. 2012-05-20 10:20:38 +02:00
Christian Muehlhaeuser
46f0ef9552 * Implemented proper ArtistPlaylistInterface. Enables direct artist playback from the grid. 2012-05-20 08:20:22 +02:00
Leo Franchi
b052486e2e Update to newer kdsingleappguard 2012-05-20 01:06:06 -04:00
Leo Franchi
7326212671 Only emit finished once for binary resolvers 2012-05-19 23:17:22 -04:00
Leo Franchi
57ab3f73db Debug and a potential windows fix 2012-05-19 20:26:01 -04:00
Tomahawk CI
4507315f3b Automatic merge of Transifex translations 2012-05-19 22:16:32 +00:00
Leo Franchi
e96b5cb080 Move BinaryInstallerHelper into its own file 2012-05-19 14:22:28 -04:00
Leo Franchi
b2c281ad37 Fix style 2012-05-19 12:21:00 -04:00
Ahmed
337423c52f TWK-883: Prevent failed tracks from being displayed as recently played in the dashboard 2012-05-19 12:20:48 -04:00
Leo Franchi
4b28c15850 Warning and memleak fixes 2012-05-19 09:41:05 -04:00
Christian Muehlhaeuser
77a901a71f * Fixed asserting in AlbumPlaylistInterface. 2012-05-19 11:01:16 +02:00
Christian Muehlhaeuser
b449651452 * Added context menu to item views. 2012-05-19 10:41:28 +02:00
Christian Muehlhaeuser
763ae73d01 * Cleaner connect in ArtistView. 2012-05-19 10:41:12 +02:00
Christian Muehlhaeuser
ab3c4330df * Resolve similar tracks in correct order. 2012-05-19 10:29:40 +02:00
Christian Muehlhaeuser
b7a43553fe * Clear window title when playback stopped. 2012-05-19 10:29:22 +02:00
Christian Muehlhaeuser
13b74f1c21 * Allow seeking without playlists and emit stopped() only after we actually stopped. 2012-05-19 10:28:44 +02:00
Christian Muehlhaeuser
80fe1f0777 * Clean up Query::infoSystemFinished. 2012-05-19 10:12:32 +02:00
Christian Muehlhaeuser
2ef10fee39 * Plugin-ify NewReleasesPlugin. 2012-05-19 09:50:04 +02:00
Christian Muehlhaeuser
73e824c859 * Plugin-ify RoviPlugin. 2012-05-19 09:44:51 +02:00
Christian Muehlhaeuser
93cc1fcca8 * Plugin-ify MusicBrainzPlugin. 2012-05-19 09:44:37 +02:00
Christian Muehlhaeuser
667a4e5a78 * Added lyrics display on Track Page. Experimental. 2012-05-19 09:37:19 +02:00
Christian Muehlhaeuser
81b8a22d6a * Cleaned up InfoSystemWorker debug output. 2012-05-19 09:36:51 +02:00
Christian Muehlhaeuser
b6b3bf1a1c * Added lyrics support to Query class. 2012-05-19 09:36:27 +02:00
Christian Muehlhaeuser
b17b5ed276 * Make MusixMatchPlugin a proper InfoPlugin. Also, fix it up. 2012-05-19 09:35:49 +02:00
Christian Muehlhaeuser
de89a0dd83 * Overlay pause button during playback of a list item. 2012-05-19 08:18:54 +02:00
Christian Muehlhaeuser
69f41c41e8 * Let AudioEngine wait for a query to finish resolving and start playback asap. 2012-05-19 07:23:33 +02:00
Christian Muehlhaeuser
5f1564fd3d * Resolve AlbumPlaylistInterface's track list in corrct order. 2012-05-19 06:42:31 +02:00
Christian Muehlhaeuser
2e0d6b0874 * Fixed artist links for similar tracks. 2012-05-19 06:40:30 +02:00
Christian Muehlhaeuser
5d977d1ca7 * Properly center spinner. 2012-05-19 06:23:23 +02:00
Christian Muehlhaeuser
246d935c04 * Link to pages from QueryLabel's context-menu. 2012-05-19 06:13:39 +02:00
Christian Muehlhaeuser
084186bdf6 * Fixed a few painting glitches. 2012-05-19 06:13:26 +02:00
Christian Muehlhaeuser
ed4a631619 * Hooked up history-related signals to TomahawkWindow. 2012-05-19 06:13:13 +02:00
Christian Muehlhaeuser
285b254f76 * Added 'Open Page' item to Artist/Album/Track context menus. 2012-05-19 03:08:50 +02:00
Christian Muehlhaeuser
23757b2819 * Re-added mainwindow toolbar. 2012-05-19 02:53:04 +02:00
Christian Muehlhaeuser
eb87952ce5 * Fixed crash and show hover state for album items again. 2012-05-19 02:05:38 +02:00
Leo Franchi
c9704cbe64 Fix windows ifdef 2012-05-18 19:36:56 -04:00
Christian Muehlhaeuser
5c70221296 * Show proper play buttons / spinners overlaying album items. 2012-05-19 01:29:22 +02:00
Tomahawk CI
0564ac3565 Automatic merge of Transifex translations 2012-05-18 22:16:25 +00:00
Leo Franchi
64aea4541d Begone QSharedPointer destructor warnings! 2012-05-18 17:40:35 -04:00
Leo Franchi
eeba60dfec Add semicolon 2012-05-18 17:17:35 -04:00
Leo Franchi
f874e6b4f0 See if this helps... 2012-05-18 17:10:24 -04:00
Leo Franchi
f7f4cbb781 Smarter windows logic for finding resolver executable 2012-05-18 16:55:23 -04:00
Leo Franchi
fdfda2e435 Try this include 2012-05-18 16:48:48 -04:00
Leo Franchi
b972558171 Merge branch 'binaryghns' 2012-05-18 16:34:54 -04:00
Leo Franchi
3cb1778502 Use real bakery again 2012-05-18 16:34:38 -04:00
Leo Franchi
dbbf93bfcd FIx macdeploy since plugins are .so now not .dylib 2012-05-18 16:06:04 -04:00
Leo Franchi
ebd5a98d27 Windows-specific handling 2012-05-18 16:05:38 -04:00
Christian Muehlhaeuser
ae807bc7ce Revert "* Style cleanup."
This reverts commit 4ec75ec49c.
2012-05-18 21:42:37 +02:00
Leo Franchi
647f68bd22 Ensure we have lastfm and spotify accounts 2012-05-18 12:46:11 -04:00
Leo Franchi
4f947b893f Fix some linux binary resolver stuff 2012-05-18 12:06:03 -04:00
Leo Franchi
8ce4b3587d Merge remote-tracking branch 'origin/master' into binaryghns 2012-05-18 08:01:52 -04:00
Christian Muehlhaeuser
2d356c5bae * No more mode init. 2012-05-18 12:14:38 +02:00
Christian Muehlhaeuser
b76b96ef3e * Show play button on item-views. 2012-05-18 12:14:38 +02:00
Christian Muehlhaeuser
ee7986180f * ModelMode specific AlbumPlaylistInterfaces. 2012-05-18 12:14:38 +02:00
Christian Muehlhaeuser
2d34a69e0c * ModelMode specific PlaylistInterfaces for Album object. 2012-05-18 12:14:38 +02:00
Christian Muehlhaeuser
4c04feb529 * Lazy init for AlbumView. 2012-05-18 12:14:38 +02:00
Christian Muehlhaeuser
fd7f1fe422 * Don't use bold fonts for infobar description. 2012-05-18 12:14:37 +02:00
Christian Muehlhaeuser
3e9e37fdc9 * Per default, add the Mixed album info to a playlist. 2012-05-18 12:14:37 +02:00
Christian Muehlhaeuser
fe58726b69 * Directly query artist / albums objects for their data. 2012-05-18 12:14:37 +02:00
Christian Muehlhaeuser
bf3e2ccb01 * Use item-views on AlbumInfoWidget. 2012-05-18 12:14:37 +02:00
Christian Muehlhaeuser
33c9f59929 * Use item-views on ArtistInfoWidget. 2012-05-18 12:14:37 +02:00
Christian Muehlhaeuser
a699348766 * Fixed direct artist_ptr playback. 2012-05-18 12:14:37 +02:00
Christian Muehlhaeuser
45d06c9be5 * Declare artist_ptr as metatype. 2012-05-18 12:14:37 +02:00
Christian Muehlhaeuser
cf4baf28c3 * Added comment. 2012-05-18 12:14:36 +02:00
Christian Muehlhaeuser
91205b8fd7 * Remove obsolete debug output. 2012-05-18 12:14:36 +02:00
Christian Muehlhaeuser
8d6d584bb4 * AudioEngine methods for directly playing artists / albums / queries. 2012-05-18 12:14:36 +02:00
Christian Muehlhaeuser
9291ee80c9 * Layout fixes for TrackInfoWidget. 2012-05-18 12:14:36 +02:00
Christian Muehlhaeuser
4ec75ec49c * Style cleanup. 2012-05-18 12:14:36 +02:00
Christian Muehlhaeuser
b05f56491e * Register album_ptr & artist_ptr as meta-types. 2012-05-18 12:14:36 +02:00
Christian Muehlhaeuser
9df8fc0182 * Clicking track name in AudioControls brings up track-page now. 2012-05-18 12:14:36 +02:00
Jeff Mitchell
65c8739da5 Merge branch 'master' into infoplugins and fix up problematic bits. This
fully separates out all infoplugins into separate buildable units.
Eventually I'll make cmake switches to enable easy picking of the
different plugins at build-time; distros will like that.

Conflicts:
	src/infoplugins/generic/CMakeLists.txt
	src/infoplugins/generic/ChartsPlugin.cpp
	src/infoplugins/generic/ChartsPlugin.h
	src/infoplugins/generic/ChartsPlugin_Data_p.h
	src/infoplugins/generic/charts/ChartsPlugin.cpp
	src/infoplugins/generic/charts/ChartsPlugin.h
	src/infoplugins/generic/hypem/HypemPlugin.cpp
	src/infoplugins/generic/hypem/HypemPlugin.h
	src/infoplugins/generic/hypemPlugin.cpp
	src/infoplugins/generic/hypemPlugin.h
	src/libtomahawk/CMakeLists.txt
	src/libtomahawk/CountryUtils.h
	src/libtomahawk/infosystem/InfoSystemWorker.cpp
	src/libtomahawk/infosystem/infoplugins/generic/ChartsPlugin.cpp
	src/libtomahawk/infosystem/infoplugins/generic/ChartsPlugin.h
	src/libtomahawk/infosystem/infoplugins/generic/ChartsPlugin_Data_p.h
	src/libtomahawk/infosystem/infoplugins/generic/hypemPlugin.cpp
	src/libtomahawk/infosystem/infoplugins/generic/hypemPlugin.h
2012-05-18 00:47:32 -04:00
Leo Franchi
841b151acc fixes for linux binary ghns 2012-05-17 20:56:36 -04:00
Leo Franchi
b4dda21704 Merge branch 'master' into binaryghns 2012-05-17 19:03:57 -04:00
Leo Franchi
48ab96a1f6 Add hack/workaround for manually adding spotify resolver 2012-05-17 19:03:18 -04:00
Leo Franchi
183b0c8958 Don't show spotify config widget if we have no resolver 2012-05-17 18:11:13 -04:00
Leo Franchi
fb842a3580 Revert "Don't show spotify config widget unless we have a resolver"
This reverts commit e8247421ab.
2012-05-17 18:09:38 -04:00
Leo Franchi
e8247421ab Don't show spotify config widget unless we have a resolver 2012-05-17 18:09:16 -04:00
Leo Franchi
32e1a16ead Guard against divide-by-0 2012-05-17 12:57:12 -04:00
Dominik Schmidt
f9eab019a9 cmake *sigh* 2012-05-17 18:37:34 +02:00
Leo Franchi
a8354ed1a9 Merge pull request #93 from randomguy3/mpris2-fixes
Mpris2 fixes
2012-05-17 06:28:30 -07:00
Alex Merry
1f0f4e21a8 MPRIS2: Fix volume property
Volume is a double between 0 and 1, not a percentage between 0 and 100.
2012-05-17 14:16:36 +01:00
Alex Merry
8b17657da1 MPRIS2: mpris:length should be in microseconds, not seconds 2012-05-17 14:11:58 +01:00
Alex Merry
e52b9eb36b MPRIS2: Fix type of mpris:trackid metadata
It should be a DBus Object Path ('o'), not a String ('s').
2012-05-17 14:01:32 +01:00
Leo Franchi
34656e6395 bugfixing adding spotify account 2012-05-16 22:49:29 -04:00
Tomahawk CI
06338c73f1 Automatic merge of Transifex translations 2012-05-16 22:16:30 +00:00
Leo Franchi
ff431b1183 More work on handling binary resolver install 2012-05-16 18:07:56 -04:00
Leo Franchi
d6f017bc6a Merge pull request #92 from mguentner/crashprivacy
added "Send this report" and "Don't send" buttons
2012-05-16 06:52:46 -07:00
Tomahawk CI
cd84015c8d Automatic merge of Transifex translations 2012-05-15 22:16:34 +00:00
Leo Franchi
d60b8bda3e Merge branch 'binaryghns' of github.com:lfranchi/tomahawk into binaryghns 2012-05-15 18:09:50 -04:00
Leo Franchi
95bb3629a1 slight work on spotify account 2012-05-15 17:48:07 -04:00
Maximilian Güntner
8cce5dafcd added "Send this report" and "Don't send" buttons
Most users probably do not disable crash reporting. Adding two
simple buttons will give them a chance to abort if they do not
want to send their crash report.

Signed-off-by: Maximilian Güntner <maximilian.guentner@gmail.com>
2012-05-15 02:40:26 +02:00
Tomahawk CI
69dbb8a882 Automatic merge of Transifex translations 2012-05-14 22:16:27 +00:00
Jeff Mitchell
6cfac1978e Migrate charts plugin 2012-05-14 13:10:59 -04:00
Jeff Mitchell
50fbe986d7 Move HypemPlugin over to new plugin paradigm 2012-05-14 12:34:48 -04:00
Christian Muehlhaeuser
3e60adfe37 * Fixed mainwindow layout jumping around on startup. 2012-05-14 02:49:44 -07:00
Christian Muehlhaeuser
37f7521d5c * Fixed compiling. 2012-05-13 22:35:41 -07:00
Dominik Schmidt
42faa354ec Port echonest info plugin to the new macro 2012-05-14 05:25:12 +02:00
Dominik Schmidt
f33d446f7f Make linux infoplugins real plugins 2012-05-14 05:17:07 +02:00
Leo Franchi
f7b9f8a3d7 Merge pull request #90 from nowrep/master
Fixed style of scrollbar in TrackInfoWidget
2012-05-13 19:55:19 -07:00
Dominik Schmidt
380ff0d23d Make generic infoplugins real plugins 2012-05-14 04:42:21 +02:00
Dominik Schmidt
9c995270cf minor improvements for add_tomahawk_plugin 2012-05-14 04:16:58 +02:00
Leo Franchi
dcc61f56e3 Merge branch 'binaryghns' of github.com:lfranchi/tomahawk into binaryghns 2012-05-13 21:28:45 -04:00
Leo Franchi
5bb31a2e7c try adding some account linkup 2012-05-13 21:28:18 -04:00
Dominik Schmidt
027c716fd7 add_tomahawk_plugin: port zeroconf account 2012-05-14 03:24:17 +02:00
Dominik Schmidt
d2c8196b07 add_tomahawk_plugin: port twitter account 2012-05-14 03:24:15 +02:00
Dominik Schmidt
dd4acb0cd2 add_tomahawk_plugin: port googlewrapper account 2012-05-14 03:24:10 +02:00
Dominik Schmidt
8c4cfef5a1 add_tomahawk_plugin: port xmpp account 2012-05-14 03:24:02 +02:00
Leo Franchi
eeaba8309d Merge branch 'binaryghns' of github.com:lfranchi/tomahawk into binaryghns 2012-05-13 20:50:02 -04:00
Leo Franchi
81575c68e8 hook up 2012-05-13 20:48:55 -04:00
Leo Franchi
bb5e5c33ca listen to results of asynchronous binary installs 2012-05-13 20:44:03 -04:00
Leo Franchi
a071105a26 Add workaround for Qt bug, thanks David Sansome! 2012-05-13 20:43:54 -04:00
Dominik Schmidt
102ead74bd Add add_tomahawk_plugin cmake macro 2012-05-14 02:41:02 +02:00
Leo Franchi
e72289c078 Merge branch 'binaryghns' of github.com:lfranchi/tomahawk into binaryghns 2012-05-13 19:08:32 -04:00
Leo Franchi
51e790de2f Merge branch 'master' into binaryghns 2012-05-13 19:07:25 -04:00
Leo Franchi
f64cce1567 set unzipped executable to executable 2012-05-13 19:02:28 -04:00
Tomahawk CI
755285920c Automatic merge of Transifex translations 2012-05-13 22:16:32 +00:00
Jeff Mitchell
ee8e25b8ce Don't need this anymore.... 2012-05-13 17:42:53 -04:00
Jeff Mitchell
3e781a243e Make infoplugins dynamically loadable, and convert echonest plugin to
this format
2012-05-13 17:37:25 -04:00
Leo Franchi
be76cc49d3 add error handling to resolver in stall so we hide the spinner 2012-05-13 17:36:32 -04:00
Leo Franchi
021cd54687 Add tomahawk public key 2012-05-13 17:31:17 -04:00
Leo Franchi
8aae86cf16 Add mac FileHelpers 2012-05-13 17:12:21 -04:00
Leo Franchi
27eb1b51f1 Enable move-with-authentication for osx binary resolvers 2012-05-13 17:05:37 -04:00
Jeff Mitchell
485d076d73 Update account DLL macro to use Q_DECL_X 2012-05-13 16:36:57 -04:00
nowrep
1324b6fe64 Fixed style of scrollbar in TrackInfoWidget 2012-05-13 13:28:51 +02:00
Jason Herskowitz
d47adbea63 Get rid of old icons that we no longer use 2012-05-12 22:51:41 -07:00
Jason Herskowitz
6034458769 More design stuff 2012-05-12 22:18:36 -07:00
Jason Herskowitz
6cc62d24d7 User newer iTune icon 2012-05-12 20:08:25 -07:00
Christian Muehlhaeuser
a9c049b0ee * Use cache for source avatars. 2012-05-12 18:12:45 -07:00
Christian Muehlhaeuser
2a6766c6d2 * Different track icon for temporary pages. 2012-05-12 18:12:45 -07:00
Jason Herskowitz
393cefb88c Add track icon and tweak page color on track page 2012-05-12 17:58:46 -07:00
Jason Herskowitz
4dc3014a37 Even more icon cleanup. Soon I will have more commits that Domme. :P 2012-05-12 17:28:33 -07:00
Jason Herskowitz
8589977233 Tweak avatar placeholder to better make new sidebar icons 2012-05-12 16:45:19 -07:00
Jason Herskowitz
f8d363e3d0 Tweak color of track number overaly in the New Stations & Playlists widget 2012-05-12 16:27:47 -07:00
Jason Herskowitz
a2c5a949b3 Lots of icon cleanup. Make more subtle. 2012-05-12 16:18:40 -07:00
Tomahawk CI
d05fd22999 Automatic merge of Transifex translations 2012-05-12 22:16:28 +00:00
Christian Muehlhaeuser
69987877a1 * Nicer AlbumView. 2012-05-12 13:21:54 -07:00
Jason Herskowitz
92b5d3cb84 Add more padding around album grid placeholder 2012-05-12 12:06:35 -07:00
Jason Herskowitz
ff18013f88 Darker grid placeholder images 2012-05-12 12:00:26 -07:00
Jason Herskowitz
3830d44a78 Add grid album placeholder icon 2012-05-12 11:36:30 -07:00
Jason Herskowitz
c89b43ac07 Add square artist image placeholder for grid view 2012-05-12 11:28:12 -07:00
Leo Franchi
42a1119cba Beginning of tomahawk-side osx handling of binary resolvers 2012-05-10 23:01:55 -04:00
Tomahawk CI
3cae004dd4 Automatic merge of Transifex translations 2012-05-10 22:16:49 +00:00
Dominik Schmidt
82b4fdafd3 Merge pull request #89 from swiftscythe/master
Improved systray behaviour
2012-05-10 12:03:50 -07:00
Adria Arrufat
641eff8472 Improved systray behaviour: Now it brings Tomahawk to front when it's not the Active App, instead of hiding it
Signed-off-by: Adria Arrufat <swiftscythe@gmail.com>
2012-05-10 20:57:24 +02:00
Alejandro Wainzinger
b2f7c5f7c5 When listening privately, don't push Adium status updates. 2012-05-08 18:13:48 -07:00
Tomahawk CI
a631afa051 Automatic merge of Transifex translations 2012-05-08 22:18:29 +00:00
Jeff Mitchell
03fbcb8790 When running as a library, don't assume that there will be a thread, and
thus a proxyfactory, for the application thread.
2012-05-08 18:11:43 -04:00
Tomahawk CI
7ea8f8aa64 Automatic merge of Transifex translations 2012-05-07 22:16:31 +00:00
Tomahawk CI
4ed1b4975f Automatic merge of Transifex translations 2012-05-06 22:16:34 +00:00
Tomahawk CI
43a55d932e Automatic merge of Transifex translations 2012-05-05 22:16:30 +00:00
Jason Herskowitz
cbd25df44d Add jump link icon for use in Now Playing area - go back to current playing list view 2012-05-05 13:01:17 -04:00
Christian Muehlhaeuser
789536c49f * Added title & description for latest special ViewPages. 2012-05-05 17:24:12 +02:00
Christian Muehlhaeuser
79c2c12631 * Added ViewPage title for TrackInfoWidget. 2012-05-05 17:13:08 +02:00
Christian Muehlhaeuser
22e05bd6ea * Fixed Last.fm plugin. 2012-05-05 17:11:23 +02:00
Christian Muehlhaeuser
7789c1ec2c * Supprt info button for Tracks. 2012-05-05 17:02:36 +02:00
Christian Muehlhaeuser
a9b3ad786c * Info button for tracks. 2012-05-05 17:02:35 +02:00
Christian Muehlhaeuser
61fb4744f3 * Added TrackInfoWidget. WIP. 2012-05-05 17:02:35 +02:00
Christian Muehlhaeuser
906e1147e5 * Support activating queries in Album (Items-)Views. 2012-05-05 17:02:35 +02:00
Christian Muehlhaeuser
f40500452b * Added query/track pages. 2012-05-05 17:02:35 +02:00
Christian Muehlhaeuser
2b139103d0 * Moved SocialActions to Query. 2012-05-05 17:02:35 +02:00
Christian Muehlhaeuser
7b801270c2 * Added queries to AlbumModel. This will be renamed to ItemModel soon. 2012-05-05 17:02:35 +02:00
Christian Muehlhaeuser
e27976c8a1 * Added DatabaseCommand_TrackStats. This will eventually be merged with PlaybackHistory. 2012-05-05 17:02:34 +02:00
Christian Muehlhaeuser
b9e772f3e3 * Added similar tracks and playback history methods to Artist. 2012-05-05 17:02:34 +02:00
Christian Muehlhaeuser
01f98ddc7f * Added similar tracks and playback history methods to Query. 2012-05-05 17:02:34 +02:00
Christian Muehlhaeuser
e95efe6f76 * Added similar tracks infosystem call. 2012-05-05 17:02:34 +02:00
Christian Muehlhaeuser
913663eef0 * Added similar tracks method to liblastfm. 2012-05-05 17:01:28 +02:00
Christian Muehlhaeuser
f59bbc111f * Also update cover when the updated() signal is emitted. This happens when we couldn't retrieve any cover. 2012-05-05 17:01:28 +02:00
Christian Muehlhaeuser
fc9a36e28e * Don't assume the current track of a remote source is always resolveable. 2012-05-05 17:01:28 +02:00
Jeff Mitchell
7b89460aa1 Do not scrobble or show current track on Last.fm when listening privately 2012-05-05 10:10:25 -04:00
Jeff Mitchell
07ba8d307c Rename LastFmPlugin to LastFmInfoPlugin for clarity 2012-05-05 10:03:15 -04:00
Tomahawk CI
a453934d08 Automatic merge of Transifex translations 2012-05-04 22:16:27 +00:00
Leo Franchi
7adb3fc737 Download binary resolver listing 2012-05-04 14:13:57 -04:00
Jeff Mitchell
9326813f3f Synchronize liblastfm structure a bit, other than src/ 2012-05-04 10:38:04 -04:00
Tomahawk CI
65bc08524e Automatic merge of Transifex translations 2012-05-03 22:16:28 +00:00
Leo Franchi
b75a575f51 Don't show spacers on osx in settings dialog 2012-05-03 14:10:04 -04:00
Jeff Mitchell
3b332d6d12 Fix up the advanced settings dialog. Make it more clear whether
UPnP/Static/LAN-only is going to be used. Use a checkbox to enable proxy
since we'll likely never support anything other than socks -- at least,
not anytime soon. Group items in a nicer fashion.
2012-05-03 13:36:23 -04:00
Leo Franchi
b1210ea43f Fix compile on clang 2012-05-03 09:12:36 -04:00
Dominik Schmidt
3a8eb34e35 Map Play key to playPause() action 2012-05-03 01:54:29 +02:00
Dominik Schmidt
697599db6c win: catch multimedia keys globally. 2012-05-03 01:33:49 +02:00
Dominik Schmidt
e74ec6ba79 Add multimedia key support on windows and linux 2012-05-03 01:33:49 +02:00
Tomahawk CI
838b802846 Automatic merge of Transifex translations 2012-05-02 22:16:23 +00:00
Jeff Mitchell
57e953409a Safety 2012-05-02 15:40:11 -04:00
Leo Franchi
5452c41760 Hide verbose accountmodel debug 2012-05-01 21:03:56 -04:00
Leo Franchi
414f553eb3 Re-enable last.fm test login button when changing fields 2012-05-01 21:03:45 -04:00
Leo Franchi
7698b2ec38 start auto updaters on start 2012-05-01 20:53:24 -04:00
Leo Franchi
04358fbafe don;t crash if username is null 2012-05-01 20:53:17 -04:00
Leo Franchi
d30e5df23e recreate scrobbler when changing credentials 2012-05-01 20:52:56 -04:00
Leo Franchi
455d7816e5 Change updaters to use QMultiHash instead of QHash 2012-05-01 20:08:38 -04:00
Jeff Mitchell
710780f3e9 Untested but relatively straightforward...add InfoShareTrack, custom message/account ability for twitter 2012-05-01 18:22:36 -04:00
Tomahawk CI
07430668d2 Automatic merge of Transifex translations 2012-05-01 22:16:26 +00:00
Leo Franchi
66b282be6c Merge branch 'multipleupdaters' 2012-04-30 22:46:34 -04:00
Leo Franchi
b5626c0b61 Update icon when deleting/removing updater 2012-04-30 22:43:26 -04:00
Leo Franchi
029dd935c9 Unregister updater from playlist on deletion 2012-04-30 22:43:12 -04:00
Leo Franchi
8392251280 remove usage of smartpointerlist 2012-04-30 22:41:37 -04:00
Leo Franchi
4b3682c1c5 Fewer crashes and bugs :) 2012-04-30 20:39:49 -04:00
Leo Franchi
b1a5626e94 add migration code 2012-04-30 18:25:37 -04:00
Tomahawk CI
32022ce209 Automatic merge of Transifex translations 2012-04-30 22:17:03 +00:00
Dominik Schmidt
c7ecacda32 FindQCA2: OSX: Add additional search path for qca from brew 2012-04-30 23:04:53 +02:00
Leo Franchi
319a03b791 fixes 2012-04-30 08:33:33 -04:00
Leo Franchi
17bcaf7369 work on multiple updaters 2012-04-29 13:40:05 -04:00
Tomahawk CI
652dd24e7d Automatic merge of Transifex translations 2012-04-28 22:17:00 +00:00
Leo Franchi
c0e627b7c6 Calculate radius and arm width with a formula to allow proper scaling 2012-04-28 17:14:05 -04:00
Leo Franchi
812bfd7ca5 Show spinner for an account while it's connecting 2012-04-28 16:29:32 -04:00
Leo Franchi
56edc1ba0c Update diagnostics dialog for accounts. Just ported over, still crappy. 2012-04-28 15:51:22 -04:00
Leo Franchi
82240ff6c1 Cleanup and move center of spinner down by 1 px 2012-04-28 15:18:04 -04:00
Leo Franchi
7b901c18a9 Show some debug output if we forcefully kill external resolvers 2012-04-27 19:39:33 -04:00
Leo Franchi
4a510b436b SHouldnt commit this 2012-04-27 19:12:39 -04:00
Leo Franchi
0677db0419 Merge branch 'mhd' 2012-04-27 19:05:05 -04:00
Leo Franchi
ab641c88e0 Clean up from working branch, disable playlist links until ready. 2012-04-27 19:04:03 -04:00
Leo Franchi
91ebe57dd2 Fix qpixmap mode of AnimatedSpinner 2012-04-27 18:58:24 -04:00
Tomahawk CI
7763a94969 Automatic merge of Transifex translations 2012-04-27 22:17:00 +00:00
Leo Franchi
65b01ffbca Port to new AnimatedSpinner 2012-04-27 17:38:43 -04:00
Leo Franchi
1d5e124b46 Fix animated spinner colors, fading, and animation 2012-04-27 17:30:31 -04:00
Leo Franchi
8d6a4335b8 Merge branch 'master' into mhd
Conflicts:
	src/AccountDelegate.cpp
	src/libtomahawk/playlist/TrackView.cpp
	src/libtomahawk/widgets/SearchWidget.cpp
2012-04-27 17:30:22 -04:00
Leo Franchi
f5873c283a Merge branch 'horus' 2012-04-27 10:37:33 -04:00
Leo Franchi
6d6ca1e94a fix style 2012-04-27 10:37:16 -04:00
Stefan Derkits
b92f7f551e move code from AudioEngine header to cpp file 2012-04-27 13:29:18 +02:00
Leo Franchi
7fc03770d0 Add proper playlist POSTing 2012-04-26 21:12:44 -04:00
Tomahawk CI
6352542793 Automatic merge of Transifex translations 2012-04-26 22:17:27 +00:00
Stefan Derkits
dab5d51952 rename slots & signals, disable Stop After Current Track in systray if track is stopped 2012-04-26 23:08:47 +02:00
Stefan Derkits
ef8306394f Merge branch 'master' of https://github.com/tomahawk-player/tomahawk 2012-04-26 22:52:07 +02:00
Dominik Schmidt
bb9906cd9a Merge pull request #87 from seezer/master
Don't break build if CMAKE_DATESTAMP_* is null
2012-04-26 05:26:41 -07:00
Stefan Derkits
a191a7648b Changed text from after this Track to after current Track, connect started signal with additional slot, check if current track is null 2012-04-26 14:08:00 +02:00
Sebastian Goth
12d627f3a7 Don't break build if CMAKE_DATESTAMP_* is null
The If-statement breaks whenever cmake substitutes TOMAHAWK_VERSION_DATE to null
2012-04-26 14:04:59 +02:00
Stefan Derkits
802fc1f39f First version of stop playback after this track also in systray context menu 2012-04-25 21:26:00 +02:00
Tomahawk CI
4535295dd6 Automatic merge of Transifex translations 2012-04-24 22:18:24 +00:00
Jeff Mitchell
24f2b29806 Fix proxying (on Qt 4.8? With current OpenSSH?) 2012-04-24 14:43:37 -04:00
Leo Franchi
696dca4af4 Sync last.fm settings to file immediately 2012-04-24 11:28:44 -04:00
Christian Muehlhaeuser
4c6f31e7c2 * Fixed a few issues with the merged code. 2012-04-24 08:35:06 +02:00
Christian Muehlhaeuser
93ad670828 * Added Artist::albums( ... ) for convenience. Removes a lot of DRY code. 2012-04-24 08:07:18 +02:00
Christian Muehlhaeuser
99e09b3b8d * Style fix. 2012-04-24 08:07:18 +02:00
Christian Muehlhaeuser
b0a1e5ffe1 * Obsolete and dangerous include. 2012-04-24 08:07:18 +02:00
Tomahawk CI
269319c15d Automatic merge of Transifex translations 2012-04-23 22:17:21 +00:00
Dominik Schmidt
fbe918dd4e Make the not-all-disconnect-reasons-checked message actually useful 2012-04-23 15:52:13 +02:00
Tomahawk CI
46bee7acd4 Automatic merge of Transifex translations 2012-04-22 22:17:05 +00:00
Jeff Mitchell
2a24b4d239 truthiness++ 2012-04-22 13:52:12 -04:00
Leo Franchi
24ec94ed96 POST and jspf handling 2012-04-22 04:15:17 -04:00
Jeff Mitchell
9c2e17a660 Still get no output, but at least the debug looks good now, and fixed segfault on exit 2012-04-22 01:17:57 -04:00
Jeff Mitchell
931cfd8eb2 Check in interim work 2012-04-22 00:37:00 -04:00
Christian Muehlhaeuser
c630baf774 * Fixed include. 2012-04-22 02:18:43 +02:00
Jeff Mitchell
987345dd58 AND WE'RE DONE! CAMELCASE FTW!!1!1! 2012-04-21 19:49:39 -04:00
Jeff Mitchell
78d7a376bc CamelCase Round 4: Let there be light! (Less than 100 left) 2012-04-21 19:32:33 -04:00
Jeff Mitchell
b52e0d8470 CamelCase round 3: ~100 more down. 2012-04-21 19:04:04 -04:00
Jeff Mitchell
e3bdfda2ee CamelCase Round 2...FIGHT 2012-04-21 18:46:33 -04:00
Tomahawk CI
0aea363abf Automatic merge of Transifex translations 2012-04-21 22:16:29 +00:00
Jeff Mitchell
11895fc198 First batch of CamelCasing 2012-04-21 17:41:43 -04:00
Leo Franchi
a48fff23c2 Merge branch 'master' of github.com:tomahawk-player/tomahawk into mhd 2012-04-21 15:23:26 -04:00
Jeff Mitchell
e4d6b1785c I'm stupid. Put the right version first. 2012-04-21 15:18:04 -04:00
Jeff Mitchell
9373b6b312 Changelogify 2012-04-21 14:53:52 -04:00
Leo Franchi
012bc8949e Merge remote-tracking branch 'origin/master' into mhd 2012-04-21 14:42:56 -04:00
Leo Franchi
15595b741e some work 2012-04-21 14:42:52 -04:00
Jeff Mitchell
f272c5e966 Add zerconf protocol v2 2012-04-21 14:41:28 -04:00
Jeff Mitchell
9419c77069 Add a lot more acl job plumbing; it's pretty much ready to go except for
the actual drawing
2012-04-21 13:33:34 -04:00
Jeff Mitchell
50ce4d3c55 Add AclJobItem 2012-04-21 11:54:54 -04:00
Jeff Mitchell
fda71bb583 Add new role for getting item data 2012-04-21 11:54:26 -04:00
Jeff Mitchell
eb0ed267fa Make job counting generic 2012-04-21 11:43:51 -04:00
Jeff Mitchell
0b796a3085 The delegate needs a parent at creation, so send the item instead of sending the delegate over 2012-04-21 11:32:23 -04:00
Jeff Mitchell
1695b39abf Add acl job queue and custom delegate removal capability 2012-04-21 11:06:48 -04:00
Jeff Mitchell
c84cfc8bf0 RETHINK MUSIC COMMIT #1!!1!!11! Implement a way to set a custom delegate in job view items 2012-04-21 10:39:21 -04:00
Christian Muehlhaeuser
53e97e75da * Test commit. 2012-04-21 07:05:57 +02:00
Leo Franchi
ab84f6837a Add animated spinner 2012-04-21 00:01:42 -04:00
Leo Franchi
6557b3fb0f closer to working manual animated spinner 2012-04-21 00:01:21 -04:00
Leo Franchi
db07be002d Initial work on spinners for resolver download and new chasewidget 2012-04-20 18:21:20 -04:00
Tomahawk CI
6f266230f5 Automatic merge of Transifex translations 2012-04-20 22:16:23 +00:00
Leo Franchi
31c7c84b5c rm 2012-04-20 16:04:59 -04:00
Leo Franchi
f7fcfcb452 start towards info 2012-04-20 16:04:36 -04:00
Leo Franchi
ddd0af895f account dedup 2012-04-20 15:10:45 -04:00
Leo Franchi
1360d28b25 Give resolver another second to quit and terminate 2012-04-19 21:51:06 -04:00
Tomahawk CI
0bc8316319 Automatic merge of Transifex translations 2012-04-18 22:16:14 +00:00
Tomahawk CI
361fdbe31f Automatic merge of Transifex translations 2012-04-17 22:16:25 +00:00
Tomahawk CI
134fa6dffd Automatic merge of Transifex translations 2012-04-16 22:16:42 +00:00
Leo Franchi
1a45a42a86 Playlists might not be synced, but might have an updater 2012-04-16 11:30:43 -04:00
Leo Franchi
c7feb0f6f0 Only show Sync actions if user is logged in, and re-add if spotify user switches 2012-04-15 22:50:09 -04:00
Leo Franchi
46cb1f01fb Don't prompt for deleting tomahawk playlist when spotify user is switched 2012-04-15 22:42:27 -04:00
Leo Franchi
3ade68cf25 Log in to spotify if the user entered credentials and hit OK without pressing log in 2012-04-15 22:38:51 -04:00
Leo Franchi
3cbb6c426b provide a way for accounts to show an about widget, and show it for spotify 2012-04-15 22:23:16 -04:00
Leo Franchi
8942cbb9fa derichtext 2012-04-15 21:52:32 -04:00
Leo Franchi
177e0a6a80 marginally better spotify config ui 2012-04-15 21:45:20 -04:00
Leo Franchi
5a17ad2fd9 Move spotify legalese into tomahawk account dialog 2012-04-15 21:39:40 -04:00
Leo Franchi
e1c7c9df05 TWK-854: Handle deletion of synced playlist 2012-04-15 21:09:34 -04:00
Tomahawk CI
3b4c3cd36c Automatic merge of Transifex translations 2012-04-15 22:16:23 +00:00
Leo Franchi
1b99cabef9 fix deleting on exit 2012-04-15 11:14:30 -04:00
Christian Muehlhaeuser
8bac05eb97 * Simplify code. 2012-04-15 07:18:27 +02:00
Christian Muehlhaeuser
ae2b09ab4e * Fixed SocialWidget tr() call. 2012-04-15 07:15:13 +02:00
Christian Muehlhaeuser
fff849bb88 * Added new translations. 2012-04-15 07:13:57 +02:00
Leo Franchi
5feee4ba75 Fix merge oops 2012-04-15 01:00:52 -03:00
Leo Franchi
701ef5a69d Merge branch 'spotifyplaylists' 2012-04-14 23:52:08 -04:00
Leo Franchi
794bcc6fb1 dead code-- 2012-04-14 23:50:06 -04:00
Leo Franchi
64ba0b5d7c fix some UI glitches with spotify playlist list 2012-04-14 23:50:05 -04:00
Leo Franchi
255cef8092 remove updater from settings when changing user 2012-04-14 22:46:30 -04:00
Leo Franchi
a99b35e11b always show proper credentials, update playlist when updater is removed 2012-04-14 22:36:07 -04:00
Leo Franchi
d61a99629f Rework spotify UI a bit for greater clarity 2012-04-14 22:09:22 -04:00
Tomahawk CI
7ccccae722 Automatic merge of Transifex translations 2012-04-14 22:16:15 +00:00
Leo Franchi
4d02b9945d only save diretory if user actually chose one 2012-04-14 16:50:15 -04:00
Leo Franchi
d2f6a65eb5 save/restore folder when loading playlists 2012-04-14 15:07:46 -04:00
Leo Franchi
08a15f0acb Don't tweet on love 2012-04-14 14:57:44 -04:00
Leo Franchi
d9f690d9d6 Merge remote-tracking branch 'origin/master' into spotifyplaylists
Conflicts:
	src/libtomahawk/accounts/Account.cpp
	src/tomahawkapp.cpp
2012-04-14 13:10:06 -04:00
Leo Franchi
c4a9dd6b32 Fix position when moving 2012-04-14 13:07:33 -04:00
Leo Franchi
4ec0117c43 Send tracks moved to spotify 2012-04-14 11:44:27 -04:00
Leo Franchi
b7b5e60f98 notifications for track moved 2012-04-13 23:06:39 -04:00
Leo Franchi
8069baf911 support moving to beginning 2012-04-13 22:05:25 -04:00
Leo Franchi
df37fd42fd try re-setting m_entries on new playlist revision instead of adding new/removing old only 2012-04-13 21:34:26 -04:00
Leo Franchi
f72e123140 Handle moves from spotify (doesn't show up till a restart) 2012-04-13 19:58:57 -04:00
Tomahawk CI
ba064206c4 Automatic merge of Transifex translations 2012-04-13 22:16:23 +00:00
Casey Link
a542797038 Fix NewReleases loading bug by using the new generic cache 2012-04-13 16:21:39 -05:00
Casey Link
0cf9a26004 If we can't retrieve source list from cache, re-fetch. 2012-04-13 16:15:44 -05:00
Casey Link
a6754e7467 Fix charts on subsequent starts by caching the list of sources. 2012-04-13 16:09:12 -05:00
Casey Link
6e51739ec9 Add stream operators for CacheData 2012-04-13 16:09:12 -05:00
Casey Link
c46c9bba8e Add some debug to the generic cache 2012-04-13 16:09:12 -05:00
Casey Link
613d40a605 Store the correct lifetime for cache data. 2012-04-13 16:09:12 -05:00
Casey Link
4b6eadd956 Add documentation to cache 2012-04-13 16:09:12 -05:00
Casey Link
c6beda5a7b Add a Cache mutex to protect shared data 2012-04-13 16:09:12 -05:00
Casey Link
67d943bce3 Rename TomahawkUtils::TomahawkCache to TomahawkUtils::Cache 2012-04-13 16:09:12 -05:00
Casey Link
08fa4bacd1 New TomahawkCache utility class.
A simple, generic cache utility that various bits and bobs can use.
2012-04-13 16:09:12 -05:00
Leo Franchi
bc443d25ac save new title 2012-04-13 16:01:35 -04:00
Leo Franchi
78be0b75fe oops not meant to commit that... 2012-04-13 13:48:17 -04:00
Leo Franchi
7169c6d070 Queue up spotify db ops if playlist is busy, otherwise we hit a race condition 2012-04-13 13:47:12 -04:00
Hugo Lindström
78a8c3cfc4 Initial syncstate removal on userchange 2012-04-13 09:06:26 +02:00
Tomahawk CI
68d2cb38de Automatic merge of Transifex translations 2012-04-12 22:17:09 +00:00
Hugo Lindström
332e9c0448 Output friendly errors 2012-04-12 19:12:45 +02:00
Hugo Lindström
0eafeb995d Added ErrorJob 2012-04-12 18:04:51 +02:00
Hugo Lindström
2a44de8641 Prepare for JobStatus 2012-04-12 17:48:20 +02:00
Leo Franchi
c1a7c63f03 Ask to delete a playlist on spotify side when deleting a synced playlist 2012-04-12 09:09:09 -04:00
Leo Franchi
6a24d8ebf5 fixes for handling createPlaylist command 2012-04-11 21:34:53 -04:00
Jeff Mitchell
add5bdf8de Add assert to make it obvious during development if an info plugin is not in the right thread, thanks Leo for the suggestion 2012-04-11 20:34:58 -04:00
Casey Link
90d3661c52 Bring back the right-arrow that segments the breadcrumbs 2012-04-11 18:44:09 -05:00
Casey Link
6c4e6725b4 Remove unused cruft 2012-04-11 18:44:09 -05:00
Casey Link
78192cc752 Simplify new releases ui 2012-04-11 18:44:09 -05:00
Jeff Mitchell
d93c45fd1e Since we're increasingly using toma.hk, make sure people understand that the option is recommended 2012-04-11 18:29:45 -04:00
Tomahawk CI
066a7a2660 Automatic merge of Transifex translations 2012-04-11 22:16:57 +00:00
Casey Link
548aa1a194 First pass at new releases widget 2012-04-11 16:14:50 -05:00
Casey Link
69d1450b5c Implement New Releases info plugin
Heavily based off existing charts info plugin, refactoring and consolidating
can be done later.
2012-04-11 16:06:30 -05:00
Casey Link
066c387ae9 Update charts info plugin to use the new API
This changes from the /source/billboard/chart/top100 style of uri
resource naming to /charts/billboard/top100. The server side changes
have been live for several weeks.
2012-04-11 15:58:57 -05:00
Jason Herskowitz
72df118216 Add New Releases icon for sidebar 2012-04-11 16:05:20 -04:00
Jeff Mitchell
556c0b0767 Merge branch 'twitterinfo' 2012-04-11 15:25:25 -04:00
Jeff Mitchell
511d353cc6 Somehow, who knows how, passing a QImage to the FDO notification spec
crashes some X servers, but saving the QImage to a file as a PNG,
loading it back from the file as a PNG, and passing that QImage is
totally cool. Wut.
2012-04-11 15:22:34 -04:00
Leo Franchi
ffe810349b Merge pull request #85 from nowrep/master
Fixed position of context menu in ArtistView and TrackView
2012-04-11 10:44:00 -07:00
nowrep
f42aca9a02 Fixed position of context menu in ArtistView and TrackView
- using viewport()->mapToGlobal() as QTreeView is subclass of
  QAbstractScrollArea
2012-04-11 19:27:12 +02:00
Jeff Mitchell
64fbd23008 Use returned notification ID instead of static version. Thanks to David Rosca <nowrep@gmail.com> for the fix 2012-04-11 12:54:56 -04:00
Jason Herskowitz
9db33b7fb6 New social share icon in now playing controls 2012-04-11 12:18:19 -04:00
Jeff Mitchell
75d1ab7bbe Make now-playing FDO notifications reuse, and fix a logic bug in audioengine that would cause missed notifictions 2012-04-11 11:32:29 -04:00
Leo Franchi
4871b6b76c Merge remote-tracking branch 'origin/master' into spotifyplaylists
Conflicts:
	src/libtomahawk/globalactionmanager.cpp
2012-04-11 10:24:02 -04:00
Jeff Mitchell
28c76e73bd Merge remote-tracking branch 'origin/master' into twitterinfo 2012-04-11 09:55:56 -04:00
Jeff Mitchell
3ea581c4f8 Maybe fix cover temp file writing 2012-04-11 09:55:48 -04:00
Jeff Mitchell
7284a53d0f Move Jreen bits in xmpp info plugin to the SIP side, allowing the plugin to run in the correct thread. 2012-04-11 08:19:10 -04:00
Christian Muehlhaeuser
c5eb71d0de * Small tweaks to the SocialWidget. 2012-04-11 07:35:01 +02:00
Christian Muehlhaeuser
06fbb9e0dc * Added SocialWidget, tweet or share your latest music obsessions. 2012-04-11 07:14:42 +02:00
Christian Muehlhaeuser
e33923c63f Merge pull request #83 from excieve/master
"xesam:artist" MPRIS2 type change
2012-04-10 15:37:58 -07:00
Jeff Mitchell
2b09915a0d Convert sip plugin to a weak pointer so we can check its validity before running invokeMethod on it 2012-04-10 18:36:35 -04:00
Tomahawk CI
35c56395da Automatic merge of Transifex translations 2012-04-10 22:16:55 +00:00
Jeff Mitchell
619373c2e5 Make lastfm/xmpp info plugins more robust 2012-04-10 18:16:14 -04:00
Jeff Mitchell
43806aec62 Remove album from love action 2012-04-10 17:59:23 -04:00
Jeff Mitchell
54aef2cd2e More work towards cleaning up and making safer the info plugins. Twitter should be pretty good, but need to make lastfm and xmpp use the same paradigm 2012-04-10 17:58:34 -04:00
Artem Gluvchynsky
4b38bbff30 Changed xesam:artist to a list of strings according to the Xesam spec 2012-04-11 00:19:08 +03:00
Jeff Mitchell
4eaff7a45f Get rid of double-additions of info plugins. Still not sure why it doesn't seem to delete itself. 2012-04-10 12:43:47 -04:00
Jeff Mitchell
25fba84b32 This should hopefully get rid of the messages about parent being in the wrong thread 2012-04-09 23:52:06 -04:00
Leo Franchi
042b27ea83 tomahawk side of creating a newly synced playlist 2012-04-09 23:01:03 -04:00
Leo Franchi
f51f5e4d59 remove associated actions when deleting spotify account 2012-04-09 22:20:49 -04:00
Jeff Mitchell
4c5855c95d Add twitter info plugin. Still needs some work -- when it should delete
itself (for instance if you disable the plugin and re-enable) it doesn't
seem to, leading to twitter complaining about duplicate statuses. Also
get a message about creating children for parent in different thread.

Along the way, made lastfm plugin correctly switch to the right thread
for the info plugin, fix a couple bugs (such as loving and unloving
using the same type), and so on.

Need to fix up xmpp info plugin to use the correct thread as well.

Also, right now tweets indiscriminately when you love, should turn that
off before merging to master.
2012-04-09 20:50:10 -04:00
Tomahawk CI
6a88aefadc Automatic merge of Transifex translations 2012-04-09 22:16:19 +00:00
Jason Herskowitz
feedb1450c Make capitalization of Stop Playback after this Track consistent with other context menu items 2012-04-09 14:46:42 -04:00
Jeff Mitchell
bfdc7a3d67 Fix Adium plugin with updated notfications 2012-04-09 13:11:35 -04:00
Jeff Mitchell
80a1009aa2 Update text in notification 2012-04-09 12:52:43 -04:00
Jeff Mitchell
bb0e24f074 Fix up xmpp info plugin. This plugin respects private listening
settings, since unlike mpris and fdo it isn't designed to display
locally
2012-04-09 12:19:25 -04:00
Jeff Mitchell
b6cd43d25f Vastly simplify mpris plugin by getting rid of unnecessary info system call 2012-04-09 12:03:12 -04:00
Jeff Mitchell
b0e8fd33ce Merge branch 'master' into notificationcleanup 2012-04-09 11:37:30 -04:00
Leo Franchi
3cb079b014 crash fix and only show spotify sync context menu for local playlists 2012-04-09 09:41:26 -04:00
Dominik Schmidt
651bde6b4a Don't make the context menus transparent as well. Thanks to nowrep for the hint 2012-04-09 12:45:39 +02:00
Leo Franchi
03c57d3a0f Add spotify context menu action for local playlists
This also adds a generic way for runtime components to register actions to
be shown for a certain category of items (e.g. playlists, tracks, artists, etc).
Initiating a sync from Tomahawk is still a TODO
2012-04-08 22:43:11 -04:00
Leo Franchi
6ffaa1450e safer 2012-04-08 20:29:39 -04:00
Jeff Mitchell
ca375bcc76 Remove privacy for mpris; we want to keep local info updated, it's up to the user to configure how programs proxy mpris information 2012-04-08 20:07:07 -04:00
Leo Franchi
1dda0371b5 Merge remote-tracking branch 'origin/master' into spotifyplaylists 2012-04-08 20:05:43 -04:00
Leo Franchi
1b445934a8 Work on the tomahawk side of spotify syncing. bugfixes and new UI indicators 2012-04-08 20:05:20 -04:00
Jeff Mitchell
3f39b0a95f Some cleanup 2012-04-08 19:52:17 -04:00
Jeff Mitchell
8bb31492e4 Merge branch 'master' into notificationcleanup 2012-04-08 19:31:31 -04:00
Jeff Mitchell
41a3cea05e Fix CPU usage due to fader 2012-04-08 19:30:28 -04:00
Jeff Mitchell
c6b5ea0380 Covers aren't showing up now...but at least we're not pegging CPU. Will continue to fix in a bit 2012-04-08 18:30:37 -04:00
Tomahawk CI
712805f5b0 Automatic merge of Transifex translations 2012-04-08 22:16:06 +00:00
Leo Franchi
1a6f96caaf don't delete a playlist if we don't have an updater for it or if it's already deleted 2012-04-08 16:11:43 -04:00
Jeff Mitchell
789a93dbe9 Make changes to audiocontrols fader to better handle transitions to/from default cover 2012-04-08 15:33:44 -04:00
Jeff Mitchell
7914fc9551 Initial work on notification cleanup 2012-04-08 14:36:06 -04:00
Jeff Mitchell
8a85b8bbc6 Fix changing connect status 2012-04-08 11:31:11 -04:00
Leo Franchi
a80929e52f Merge remote-tracking branch 'origin/master' into spotifyplaylists 2012-04-08 10:00:55 -04:00
Jeff Mitchell
ff3770a464 Use shared timeline for pixmapdelegatefader. 2012-04-08 09:49:39 -04:00
Jeff Mitchell
546abf4a6d Wrote this SharedTimeLine thing, then converted the wrong class to use it, oops. Seems to work perfectly, though, so might as well use it. 2012-04-07 21:17:53 -04:00
Leo Franchi
cfcdbbb728 Refactor playlist updater system to make it more generic
Updaters aren't necessarily timer-based, and each updater provides its own
configuration widget, as a checkbox might not always make sense
2012-04-07 19:13:38 -04:00
Leo Franchi
30791e9bdc less debug 2012-04-07 19:13:38 -04:00
Jeff Mitchell
4e01387eb9 I can't think of any reason that removing this wasn't a mistake, so I'm
putting it back
2012-04-07 18:57:43 -04:00
Jeff Mitchell
09ee426710 Because I am a moron, I didn't take the opportuniy when last futzing
with pushInfo to change things to a struct like I did on the pull side.
Now I'm fixing that mistake, which makes future changes to push data
far, far easier.
2012-04-07 18:51:20 -04:00
Tomahawk CI
de3b8c794b Automatic merge of Transifex translations 2012-04-07 22:16:10 +00:00
Christian Muehlhaeuser
94d97a1029 * Updated README url. 2012-04-07 19:19:47 +02:00
Hugo Lindström
af1a8ea8b4 fix missing ref 2012-04-07 10:51:45 +02:00
Hugo Lindström
d82df7f00d cleanup 2012-04-07 10:34:03 +02:00
Hugo Lindström
570171bddd emit rename signal and update spotify playlistname 2012-04-07 10:24:03 +02:00
Christian Muehlhaeuser
67d1e6e97c * Updated ChangeLog. 2012-04-07 10:03:28 +02:00
Christian Muehlhaeuser
dfa2a80d82 * Work-around VLC bug: reset volume when resuming. 2012-04-07 09:55:08 +02:00
Christian Muehlhaeuser
9d77f20710 * Boundaries are set by QSlider already. 2012-04-07 09:55:08 +02:00
Christian Muehlhaeuser
6d003028c3 * Don't update seek slider too often, use less cpu. 2012-04-07 09:55:08 +02:00
Leo Franchi
1f1f0d5bda debug-- 2012-04-06 22:45:12 -04:00
Leo Franchi
662ee55514 Hook up "delete tomahawk playlist when stopping sync" option 2012-04-06 22:44:09 -04:00
Leo Franchi
d154c141fb Compile 2012-04-06 21:23:21 -04:00
Leo Franchi
e4b90e6305 Don't create a timer with a 0ms timeout, that's not nice 2012-04-06 21:22:51 -04:00
Leo Franchi
fd81151996 Merge branch 'master' into spotifyplaylists 2012-04-06 20:03:02 -04:00
Hugo Lindström
6a6e2754c4 Also rename playlist if renamed in spotify. Todo: Both ways 2012-04-07 00:35:39 +02:00
Jeff Mitchell
ebd59724a5 Be a bit more explicit when connecting 2012-04-06 18:33:09 -04:00
Tomahawk CI
678ad2649f Automatic merge of Transifex translations 2012-04-06 22:16:10 +00:00
Jeff Mitchell
514d399f6b Bump cache version; put back in its proper place, and put in a better place in headless 2012-04-06 18:06:50 -04:00
Leo Franchi
9d88f16aa4 don't call artist->cover more than we need to 2012-04-06 17:21:26 -04:00
Jeff Mitchell
2a6a4c0252 Revert "Be a bit smarter about when we consider info loaded and updated"
This reverts commit 0c308b850d.
2012-04-06 17:17:43 -04:00
Jeff Mitchell
0c308b850d Be a bit smarter about when we consider info loaded and updated 2012-04-06 16:51:25 -04:00
Leo Franchi
55d80eb547 fix logic fail 2012-04-06 15:14:58 -04:00
Jeff Mitchell
110824bb06 Now that Jreen is fixed update signature 2012-04-06 15:03:08 -04:00
Leo Franchi
3b21c91a97 Allow specifying which type of cover image is requested 2012-04-06 14:56:31 -04:00
Leo Franchi
58adc470ce const ref'ify 2012-04-06 14:56:31 -04:00
Leo Franchi
2be9dfc45b Don't ask the infosystem for the same item data more than once racily 2012-04-06 14:56:31 -04:00
Jason Herskowitz
1a7f2cc070 Add volume fix to changelog 2012-04-06 08:35:19 -03:00
Leo Franchi
84773f7956 Add fading to various custom large track delegates and support query in fader 2012-04-05 23:31:48 -04:00
Leo Franchi
155cccb109 add fading to track charts 2012-04-05 23:31:21 -04:00
Leo Franchi
30e239c311 Don't load covers till scrolling stops in the treeview 2012-04-05 22:37:15 -04:00
Leo Franchi
f1aa7b6d28 Add fading for artist/albums in treeview as well 2012-04-05 22:24:25 -04:00
Leo Franchi
6c48be2563 Don't fade in to default covers 2012-04-05 22:05:42 -04:00
Leo Franchi
caf77a0935 debug-- 2012-04-05 21:25:15 -04:00
Leo Franchi
6af93841cb Try out some fading for album covers 2012-04-05 21:24:11 -04:00
Tomahawk CI
396f332d55 Automatic merge of Transifex translations 2012-04-05 22:16:30 +00:00
Jeff Mitchell
624e95a97b Clear status on Tomahawk startup since we can't currently clear it on
shutdown
2012-04-05 13:13:28 -04:00
Jeff Mitchell
3b9fb2c7eb Fix compile on OSX 2012-04-05 10:17:40 -04:00
Jeff Mitchell
8ba61f5496 Modify pushInfo interface to allow flags. These flags can be coded to
add extra common information for all consuming plugins. So far, a
shorturl flag has been added, making a short url available to all
plugins. I wasn't able to check this on OSX, so it might need a small
amount of touching up.
2012-04-04 21:37:34 -04:00
Leo Franchi
e147bf4861 some safety 2012-04-04 18:22:32 -04:00
Tomahawk CI
5fc54a7e4c Automatic merge of Transifex translations 2012-04-04 22:16:22 +00:00
Christian Muehlhaeuser
4ad1efbcf5 * Fixed crash in AudioControls. 2012-04-04 16:41:27 +02:00
Jason Herskowitz
caf2d18708 Change Account preference icon to a more generic Services icon and make color of preference icons match new gray 2012-04-03 22:17:03 -04:00
Jason Herskowitz
80e433abe0 Make placeholder avatar use same blue gray 2012-04-03 21:46:26 -04:00
Jason Herskowitz
464a32f35d Use different icon for collection in sidebar but don't change all the other instances that used drop-track.png 2012-04-03 20:54:10 -04:00
Christian Muehlhaeuser
b136eedc8b * Merged ChangeLog. 2012-04-04 02:45:58 +02:00
Christian Muehlhaeuser
97f2bb601f * Fixed spacing. 2012-04-04 02:45:02 +02:00
Jason Herskowitz
90e1af331b Tweak colors of footnote and queue headers to match palette of new playlist header 2012-04-03 18:16:55 -04:00
Tomahawk CI
cef3e7fac7 Automatic merge of Transifex translations 2012-04-03 22:16:14 +00:00
Leo Franchi
22e53172eb add metatype declaration 2012-04-03 09:54:48 -04:00
Leo Franchi
ee4dcc3892 Merge remote-tracking branch 'origin/master' into spotifyplaylists 2012-04-03 09:43:01 -04:00
Leo Franchi
f1c33bd67c fix our direct copy of clementine's closure class too 2012-04-03 08:32:06 -04:00
Tomahawk CI
1161ab2095 Automatic merge of Transifex translations 2012-04-02 22:16:08 +00:00
Christian Muehlhaeuser
c8743cd0e0 * Fixed non debug builds. 2012-04-02 17:41:26 +02:00
Leo Franchi
cc7ecc6795 allow updating playlist metadata 2012-04-02 09:41:35 -04:00
Christian Muehlhaeuser
e9db3ed319 * We are always on CMake >2.8.3. 2012-04-02 04:02:19 +02:00
Tomahawk CI
a40813c3b8 Automatic merge of Transifex translations 2012-04-02 01:50:50 +00:00
Tomahawk CI
6c45806fbe Automatic merge of Transifex translations 2012-04-02 01:37:21 +00:00
Christian Muehlhaeuser
bfc99e1af9 * Fixed about dialog for non debug releases. 2012-04-02 03:20:00 +02:00
Dominik Schmidt
1cd134d6b0 Add transiflex repo config 2012-04-02 04:38:13 +02:00
Leo Franchi
a80db298c0 TWK-762: Don't crash when exiting during indexing 2012-04-01 20:33:15 -04:00
Leo Franchi
a4c805b122 Save spotify ids we get returned from resolver after adding tracks 2012-04-01 14:58:59 -04:00
Leo Franchi
83a35fe3aa TWK-815: Lets not copy and paste the same code in 3 places and only fix it in one :) 2012-04-01 13:43:06 -04:00
Leo Franchi
57e36d5d01 Update translation, thanks neycho! 2012-04-01 13:06:54 -04:00
Leo Franchi
eeddd067ea Merge remote-tracking branch 'origin/master' into spotifyplaylists
Conflicts:
	resources.qrc
2012-04-01 12:56:24 -04:00
Jason Herskowitz
3f65e2b73c Gray squares playlist header. Thoughts? 2012-03-31 18:22:49 -04:00
Leo Franchi
266e7bed8b wider version of header for less tiling 2012-03-31 17:40:47 -04:00
Leo Franchi
47b1990eeb Try out a background pixmap for the infobar. What do people think? 2012-03-31 17:32:25 -04:00
Dominik Schmidt
b32f5c4904 Bump required Jreen version 2012-03-31 23:07:22 +02:00
Dominik Schmidt
bc76ce550c xmpp: Add checkbox for enforcing secure connections 2012-03-31 22:09:09 +02:00
Jeff Mitchell
4960e68208 Less CPU usage when updating time, hopefully 2012-03-31 13:39:14 -04:00
Jeff Mitchell
74ef12268e See if this fixes Chris' time-updating problem 2012-03-31 13:04:48 -04:00
Leo Franchi
676bf7f6d7 Don't block next update on delete from spotify 2012-03-31 12:18:53 -04:00
Leo Franchi
42d488eaac Uncomment assert for now 2012-03-31 11:44:49 -04:00
Leo Franchi
059d0374c6 Merge branch 'master' into spotifyplaylists
Conflicts:
	src/accounts/lastfm/lastfmplugin.h
	src/libtomahawk/playlist.h
	src/libtomahawk/resolvers/scriptresolver.cpp
	src/main.cpp
	src/tomahawkapp.h
2012-03-31 11:44:39 -04:00
Leo Franchi
5d09ff81fb Update bulgarian translation from neycho 2012-03-31 10:35:50 -04:00
Leo Franchi
d43db27ce0 Merge branch 'stable' 2012-03-31 10:27:31 -04:00
Leo Franchi
5dcf426cdf TWK-770: Fix echonest sentence summary grammar 2012-03-31 10:03:53 -04:00
Leo Franchi
5b6c4560ae TWK-785: Rename playlist after revision is created so plitem is selectable 2012-03-31 09:53:47 -04:00
Leo Franchi
fec670f27c TWK-793: Let the sourcetreeview sort before we scroll otherwise we might scroll the wrong amount 2012-03-31 09:26:30 -04:00
Leo Franchi
fb13ccd285 Oops, fix signals/slot params 2012-03-31 09:26:07 -04:00
Leo Franchi
b3b70cea82 TWK-795: Filter dups from last.fm top artists 2012-03-31 09:05:14 -04:00
Leo Franchi
f84d08e011 Don't sort related artists in footnotes 2012-03-31 08:49:18 -04:00
Christian Muehlhaeuser
7403713d98 * Only connect to InfoSystem on demand. 2012-03-31 08:44:07 +02:00
Christian Muehlhaeuser
e049dcd6af * Added global Recently Played page. 2012-03-31 07:53:47 +02:00
Christian Muehlhaeuser
1af928790e * Fixed delegate for latest additions. 2012-03-31 07:36:53 +02:00
Christian Muehlhaeuser
48d66649b1 * Forgot those files. 2012-03-31 07:18:01 +02:00
Christian Muehlhaeuser
c054d07110 * Fading covers in AudioControls. 2012-03-31 07:15:11 +02:00
Christian Muehlhaeuser
f0f9e6847b * Make stop-after-track better. 2012-03-31 06:38:38 +02:00
Christian Muehlhaeuser
b9c61952a6 * Fixed PlaylistLargeItemDelegate. 2012-03-31 05:48:15 +02:00
Christian Muehlhaeuser
c3e3944421 * Added stop-after-track context menu entry. 2012-03-31 05:17:15 +02:00
Leo Franchi
eddaec701b Merge pull request #79 from krf/make-compile-on-arm
Make compile on arm
2012-03-30 15:23:45 -07:00
Kevin Funk
87086e5278 Make compile on ARM (related to breakpad)
Make breakpad optional, add options
Same for CrashReporter - both don't work on ARM.
2012-03-31 00:20:14 +02:00
Leo Franchi
9c5966000c TWK-799: Don't set autoupdate when loading playlist view 2012-03-30 17:47:28 -04:00
Leo Franchi
b49d810f01 Merge branch 'stable'
Conflicts:
	src/libtomahawk/CMakeLists.txt
	src/libtomahawk/playlist/treemodel.cpp
	src/libtomahawk/widgets/infowidgets/AlbumInfoWidget.cpp
	src/libtomahawk/widgets/infowidgets/AlbumInfoWidget.h
	src/tomahawkapp.cpp
2012-03-30 17:29:34 -04:00
Leo Franchi
79bfdec895 TWK-798: Start playing first resolvable track when double-clicking on a playlist item 2012-03-30 17:14:08 -04:00
Christian Muehlhaeuser
d8be1fa224 * Merged neycho's bg translation. 2012-03-30 23:00:37 +02:00
Leo Franchi
948a438ff2 Remove autoconnect hidden toggle 2012-03-30 15:01:38 -04:00
Leo Franchi
9f5215302c various updater fixes 2012-03-30 14:32:01 -04:00
Leo Franchi
73d7ba03f5 TWK-815: Try using foreground text color when drawing grey bg, white on grey is hard to read 2012-03-30 13:34:48 -04:00
Leo Franchi
d623bbefc2 Fix crash on exit 2012-03-30 13:27:36 -04:00
Leo Franchi
907dad95e1 TWK-721: Don't flicker from officialtracks to supercollection tracks.
If the second infosystem albumtracks request comes back empty but the first one
came back with tracks, this is not a failure and so keep the official tracks
2012-03-30 12:09:59 -04:00
Leo Franchi
cdb70b05d2 Cleanups 2012-03-30 11:25:51 -04:00
Leo Franchi
565217a53a TWK-725: Some extra pointer safety 2012-03-30 10:42:11 -04:00
Christian Muehlhaeuser
bee6485475 * Fixed crash situation in AudioControls.
(cherry picked from commit a2bfd73d55)

Conflicts:

	src/audiocontrols.cpp
2012-03-30 10:31:07 -04:00
Christian Muehlhaeuser
ace18dfa1f * Prevent race condition.
(cherry picked from commit ebbedb2b99)
2012-03-30 10:30:29 -04:00
Christian Muehlhaeuser
95f1162b6e * Fixed cached resolving.
(cherry picked from commit bd098e3ff2)
2012-03-30 10:30:09 -04:00
Christian Muehlhaeuser
e5bdd2242f * Fixed race condition during resolving.
(cherry picked from commit b70114a225)
2012-03-30 10:30:01 -04:00
Christian Muehlhaeuser
deb0eb819c * Fetch square covers from Last.fm.
(cherry picked from commit d5aed7b6df)
2012-03-30 10:29:48 -04:00
Jeff Mitchell
04864c7d79 Set scanning threads idle priority
(cherry picked from commit 5a57e285ec)
2012-03-30 10:28:04 -04:00
Leo Franchi
0dc0067450 some cleanups 2012-03-29 23:28:09 -04:00
Christian Muehlhaeuser
a4421df9e9 * Potential fix for rotzbouw's weird crash. 2012-03-29 19:02:06 +02:00
Christian Muehlhaeuser
47774c3894 * Add polish to our released languages. All translations could do with an update now. 2012-03-29 18:04:57 +02:00
Jeff Mitchell
43c4daa4e3 Change wording 2012-03-29 10:41:16 -04:00
Jeff Mitchell
fc95cee6ce Dynamically enable/disable the web API, and change the wording for the option to make it more enticing 2012-03-29 10:41:14 -04:00
Leo Franchi
f39e9621a0 Uncomment out, oops 2012-03-28 21:39:17 -04:00
Leo Franchi
704c736046 more fixes 2012-03-28 18:23:41 -04:00
Kevin Funk
0d8a8038b7 Compile fix for ARM
Not sure why this is needed, but without this the tomahawk binary fails
to link.

Error:
`.LTHUNK9' referenced in section
`.text._ZN21AccountFactoryWrapperD1Ev[AccountFactoryWrapper::~AccountFactoryWrapper()]'
of CMakeFiles/tomahawk.dir/tomahawk_automoc.cpp.o: defined in discarded
section
`.text._ZN21AccountFactoryWrapperD2Ev[_ZN21AccountFactoryWrapperD5Ev]'
of CMakeFiles/tomahawk.dir/tomahawk_automoc.cpp.o
collect2: ld returned 1 exit status
make[2]: *** [tomahawk] Error 1
2012-03-28 23:45:48 +02:00
Jeff Mitchell
38ea9653a0 Change wording 2012-03-28 14:20:29 -04:00
Jeff Mitchell
eebf5dfe07 Dynamically enable/disable the web API, and change the wording for the option to make it more enticing 2012-03-28 14:17:27 -04:00
Dominik Schmidt
ba46795749 Merge branch 'stable'
Conflicts:
	src/libtomahawk/result.cpp
	src/libtomahawk/utils/tomahawkutils.cpp
	src/settingsdialog.cpp
	src/sip/twitter/tomahawkoauthtwitter.cpp
	src/sip/twitter/tomahawkoauthtwitter.h
2012-03-28 17:37:16 +02:00
Dominik Schmidt
fff8fbfe80 win: fix qca2 usage/grooveshark 2012-03-28 17:23:27 +02:00
Dominik Schmidt
00dade5460 YES, I GOT IT. I'M SURE. 2012-03-28 15:44:03 +02:00
Dominik Schmidt
301c1d21fe Make publishing the user tune optional 2012-03-28 15:34:51 +02:00
Dominik Schmidt
bac82c0abf Add missing return 2012-03-28 15:03:40 +02:00
Dominik Schmidt
8e0f44a374 Add XmppInfoPlugin for updating the user tune 2012-03-28 14:38:59 +02:00
Christian Muehlhaeuser
5593c134cd * Reorder toma.hk parameters to match website order. 2012-03-28 07:06:10 +02:00
Leo Franchi
f414e92b74 Keep track of spotify IDs of tracks in a synced playlist and update to id api 2012-03-27 23:07:58 -04:00
Leo Franchi
02ff39f595 Merge branch 'master' into spotifyplaylists
Conflicts:
	src/libtomahawk/utils/xspfloader.cpp
2012-03-27 17:49:02 -04:00
Leo Franchi
eec8b76de0 fix xspf auto-updating
(cherry picked from commit c54ca78769)
2012-03-27 11:27:07 -04:00
Leo Franchi
68f03dbd13 autoupdate fixes: init on creation, and every 10 not 100 mins
(cherry picked from commit ff04ab3b92)
2012-03-27 11:27:03 -04:00
Leo Franchi
c54ca78769 fix xspf auto-updating 2012-03-27 11:26:33 -04:00
Leo Franchi
ff04ab3b92 autoupdate fixes: init on creation, and every 10 not 100 mins 2012-03-27 10:30:37 -04:00
Leo Franchi
cb484a2058 Merge remote-tracking branch 'origin/master' into spotifyplaylists
Conflicts:
	admin/mac/macdeploy.py
2012-03-26 12:26:09 -04:00
Leo Franchi
1bd7d37a0a eh 2012-03-25 09:58:09 -04:00
Jason Herskowitz
f41872540d Tweak recently played icon to give more padding 2012-03-24 20:23:20 -04:00
Leo Franchi
4dabbdf247 Disable ref work for now 2012-03-24 17:57:36 -04:00
Leo Franchi
4392e34882 Notify of tracks inserted also when dropped on sidebar item 2012-03-24 16:22:27 -04:00
Leo Franchi
aec6b557a6 fix adding hopefully 2012-03-23 18:38:29 -04:00
Leo Franchi
dddeb9e9a7 Some tomahawk-side fixes to playlist syncing. Removing works, adding not yet. 2012-03-23 18:11:36 -04:00
Jeff Mitchell
3c485949b6 Major restructuring to how ACLs will work. Disable dialog box again, for
now.
2012-03-22 17:57:57 -04:00
Leo Franchi
27978e5cd3 Now that vlc plugins are in Frameworks/vlc/plugins, we can rename plugins to PlugIns to retain case-sensitive compatibility on osx 2012-03-22 14:39:20 -04:00
Leo Franchi
fa49dde51a Merge remote-tracking branch 'origin/master' into spotifyplaylists 2012-03-22 10:36:45 -04:00
Leo Franchi
6d56d4350a Merge branch 'master' into spotifyplaylists
Conflicts:
	src/libtomahawk/playlist.cpp
	src/libtomahawk/playlist.h
2012-03-22 10:36:34 -04:00
Jeff Mitchell
a4ff57fafb Add some safety...since m_waitingForResolved won't die on an invalid object, use it to determine whether to disconnect, since there should be a 1:1 correlation 2012-03-20 14:40:54 -04:00
Jeff Mitchell
8fa4252fd6 Move the ACL check to Connection...hopefully this will work around a Qt socket crash 2012-03-20 12:48:46 -04:00
Leo Franchi
753e1b3c90 aFix crash in dragging artist, don't assume AlbumModel only contains albums as it's hacked to also contain artists.
(cherry picked from commit 68d541d2e8)
2012-03-20 11:29:30 -04:00
Leo Franchi
68d541d2e8 aFix crash in dragging artist, don't assume AlbumModel only contains albums as it's hacked to also contain artists. 2012-03-20 11:28:45 -04:00
Leo Franchi
75e9deabc4 Fix test when timeout fails 2012-03-19 23:59:22 -04:00
Leo Franchi
d6c7e7f57b Add WIP test login button for spotify 2012-03-19 23:55:44 -04:00
Leo Franchi
e828dadec8 All QSharedPointers used in different threads need deleteLater as custom deleter. This is some of them.
(cherry picked from commit e3f5605c4e)
2012-03-19 22:24:41 -04:00
Leo Franchi
6e929986cb A bit of extra safety
(cherry picked from commit 2a58d53145)
2012-03-19 22:22:28 -04:00
mack-t
e1b086e3a4 Add albumpos, discnumber and score information from tomahawk resolver
(cherry picked from commit 21eeab61d8)
2012-03-19 22:20:32 -04:00
Leo Franchi
27147a0140 Guard against null sharedptr that shouldn't be null anyway -.- 2012-03-19 22:20:07 -04:00
Leo Franchi
b8d3b3bc5f TWK-768: Enable xmlconsole by adding an xmlconsole arg to the settings for an account 2012-03-19 22:19:03 -04:00
Leo Franchi
b18f926fa5 TWK-744: Add individual account toggles in factory wrapper delegate 2012-03-19 22:06:46 -04:00
Leo Franchi
bf0b104d27 Guard against null sharedptr that shouldn't be null anyway -.- 2012-03-19 21:25:38 -04:00
Leo Franchi
c0ab42021e Make consistent name 2012-03-19 19:11:18 -04:00
Jeff Mitchell
4d77074c78 Reclaim copyrights 2012-03-19 16:58:15 -04:00
Jeff Mitchell
8ffd79d764 Move old code out of servent to acl registry; make ACL registry actually
do something.

Still needed: a page in settings to manage it
2012-03-19 15:53:15 -04:00
Leo Franchi
6da14794df Set playlists on config widget creation as well as on msg receive 2012-03-19 09:53:50 -04:00
Leo Franchi
f2c3edb8fe start actually implementing tomahawk-side spotify sync 2012-03-18 23:16:49 -04:00
Jason Herskowitz
e0f60931f7 Make track title prominent information in Queue and make it match new charts and latest additions 2012-03-18 19:21:33 -04:00
Jason Herskowitz
5b1aa81d1d Make track title primary info in track charts and top loved and lighten text of secondary info. Muesli, like? 2012-03-18 18:30:13 -04:00
Leo Franchi
ac274a50d3 Create playlists from spotify on flip 2012-03-18 18:23:39 -04:00
Jason Herskowitz
44a1adb922 Pretty up Recently Played widget on dashboard a bit by making played time/playee gray text 2012-03-18 17:50:21 -04:00
Leo Franchi
93c68b4ce1 Merge pull request #78 from mack-t/master
Pull additional information from tomahawk resolvers
2012-03-18 14:25:54 -07:00
mack-t
21eeab61d8 Add albumpos, discnumber and score information from tomahawk resolver 2012-03-18 16:20:57 -04:00
Leo Franchi
3aa7f5c9de ITWK-769: Don't activate window for all tomahawk urls, as play controls shouldn't 2012-03-18 15:46:07 -04:00
Leo Franchi
1468d3c0dc Add beginning of spotify playlist updater 2012-03-18 15:45:55 -04:00
Leo Franchi
6de0656794 factory-ize the playlist updater loading 2012-03-18 15:45:32 -04:00
jeff
0c4ac584e4 Refactor ACLSystem into ACLRegistry, clean it up a lot 2012-03-18 15:08:43 -04:00
Leo Franchi
b2612f9189 some further work 2012-03-18 14:56:38 -04:00
Leo Franchi
b0486f44b3 tweak size 2012-03-18 14:33:37 -04:00
Jason Herskowitz
819623300d Use recently played icon for new recently played sidebar item 2012-03-18 13:36:29 -04:00
Leo Franchi
a710782624 Merge branch 'master' into spotifyplaylists 2012-03-18 13:34:01 -04:00
Leo Franchi
42b2779240 Fix atticaid sync issue that would lose value 2012-03-18 13:26:54 -04:00
Leo Franchi
195953f4f8 Update spotify description 2012-03-18 13:26:54 -04:00
Jason Herskowitz
ba82c142ef Copy edit Url to URL 2012-03-18 10:26:13 -04:00
Jason Herskowitz
8d59a33502 Make systray icon actually use the grayscale version 2012-03-18 09:54:25 -04:00
Jason Herskowitz
2e3132732a Add grayscale icon to be used for OS X systray 2012-03-18 09:40:22 -04:00
Christian Muehlhaeuser
a2bfd73d55 * Fixed crash situation in AudioControls. 2012-03-17 17:09:57 +01:00
Christian Muehlhaeuser
ebbedb2b99 * Prevent race condition. 2012-03-17 12:10:09 +01:00
Christian Muehlhaeuser
57e55d0b88 * other vs others. 2012-03-17 11:23:40 +01:00
Christian Muehlhaeuser
15194438ee * Slightly decrease size of third chart item. 2012-03-17 10:35:29 +01:00
Christian Muehlhaeuser
6d068e33ce * Use different color for chart position. 2012-03-17 10:04:59 +01:00
Christian Muehlhaeuser
48d2ac71fa * Use bigger fonts for top chart items. 2012-03-17 09:46:35 +01:00
Christian Muehlhaeuser
afe6ed8463 * Added a Chart delegate. 2012-03-17 09:40:04 +01:00
Christian Muehlhaeuser
6e34b3f620 * Fixed size for the search widget. 2012-03-17 08:54:02 +01:00
Christian Muehlhaeuser
6f0d29dde9 * Bold font decoration for usernames in the delegate. 2012-03-17 08:08:28 +01:00
Christian Muehlhaeuser
3e11945c02 * Added PlaylistLargeItemDelegate. Loved, latest & recent tracks use it. 2012-03-17 06:55:49 +01:00
Christian Muehlhaeuser
bd098e3ff2 * Fixed cached resolving. 2012-03-17 05:49:43 +01:00
Christian Muehlhaeuser
b70114a225 * Fixed race condition during resolving. 2012-03-17 05:42:25 +01:00
Christian Muehlhaeuser
d5aed7b6df * Fetch square covers from Last.fm. 2012-03-17 01:33:03 +01:00
Christian Muehlhaeuser
d86124203c * Don't crash in onCoverUpdated if there's no current track. 2012-03-17 01:32:15 +01:00
Christian Muehlhaeuser
29c49b12b7 * This is explicitly WIP: Added Latest Additions & Recently Played nodes. 2012-03-16 23:23:58 +01:00
Christian Muehlhaeuser
d2b719b61c * DRY: Added RecentlyAddedModel. 2012-03-16 22:48:46 +01:00
Jason Herskowitz
8495c6397a Change text from GChat to Google Talk in account dialog 2012-03-16 17:43:12 -04:00
Leo Franchi
9b1a983cfd More work towards playlists 2012-03-16 17:41:26 -04:00
Christian Muehlhaeuser
8b99d234e8 * DRY: Added RecentlyPlayedModel. 2012-03-16 22:12:17 +01:00
Christian Muehlhaeuser
0e2da32f0c * Headless. Now. 2012-03-16 20:26:30 +01:00
Christian Muehlhaeuser
4d91fab887 * Headless fix. 2012-03-16 20:23:27 +01:00
Christian Muehlhaeuser
967c767f0b * More headless fixes. 2012-03-16 20:16:03 +01:00
Christian Muehlhaeuser
28f62d850d * Attempt to unbreak headless. 2012-03-16 20:14:11 +01:00
Leo Franchi
4f84158bdc Migrate spotify config to tomahawk, and set up for playlist work 2012-03-16 14:53:34 -04:00
Christian Muehlhaeuser
ce44b17544 * Updated ChangeLog. 2012-03-16 17:50:51 +01:00
Christian Muehlhaeuser
c9a3b697ef * Easier substring extraction. 2012-03-16 17:50:51 +01:00
Leo Franchi
ad82b81225 TWK-740: Don't accept the resolver account factory when adding new accounts to list 2012-03-16 11:16:40 -04:00
Leo Franchi
e3f5605c4e All QSharedPointers used in different threads need deleteLater as custom deleter. This is some of them. 2012-03-15 19:00:48 -04:00
Christian Muehlhaeuser
66836ae0bd * Something is wonky about CLucene scoring. Rely on our internal scoring. 2012-03-15 09:05:56 +01:00
Christian Muehlhaeuser
6342e6a9f8 * Fixed TWK-758: Sorting playlist by album position. 2012-03-15 09:05:47 +01:00
Christian Muehlhaeuser
b34b3c7470 * Something is wonky about CLucene scoring. Rely on our internal scoring. 2012-03-15 09:04:16 +01:00
Christian Muehlhaeuser
19d3cf5bae * Don't request covers for tracks in the flat view. 2012-03-15 08:52:03 +01:00
Christian Muehlhaeuser
6408d93dc0 * Fixed TWK-758: Sorting playlist by album position. 2012-03-15 08:42:05 +01:00
Dominik Schmidt
f65b9d7f6f epic fail is epic 2012-03-15 03:29:52 +01:00
Dominik Schmidt
232409b1c4 naaaaaaaaaaaaaaaaaaaaaaaaaaaarf. 2012-03-15 02:37:02 +01:00
Dominik Schmidt
2efc4ee9d8 just say narf. 2012-03-15 02:24:38 +01:00
Dominik Schmidt
a27d918bea Make my warning actually readable ... 2012-03-15 02:12:35 +01:00
Dominik Schmidt
8503f5bbe3 Some more cleanup in FindJreen.cmake 2012-03-15 02:11:19 +01:00
Dominik Schmidt
b2779a9b6a Cleanup FindJreen.cmake and make it version aware 2012-03-15 01:24:35 +01:00
Leo Franchi
51087b5e0a oops not meant to be there 2012-03-14 19:41:21 -04:00
Leo Franchi
39bf8f9f6e Move spotify and last.fm accounts from libtomahawk to tomahawk/ 2012-03-14 19:37:18 -04:00
Dominik Schmidt
496871af04 Use the new Jreen::Logger and bump version requirement to 1.0.3 2012-03-15 00:26:09 +01:00
Dominik Schmidt
dab85e2008 Bump required CMake version also in README 2012-03-15 00:26:08 +01:00
Jeff Mitchell
042ccbe730 Fix merge issue 2012-03-14 16:31:20 -04:00
Jeff Mitchell
6c6411561b Bump dependencies 2012-03-14 16:20:24 -04:00
Jeff Mitchell
18e3669911 Fix XMPP proxy. Make no proxy hosts static so changing it works across
all threads; make a duplication method so jreen doesn't scopepointer us
to death on shutdown; pass in proxyfactory to jreen.

Conflicts:

	src/settingsdialog.cpp
	src/sip/jabber/jabber.cpp
2012-03-14 16:19:32 -04:00
Jeff Mitchell
5a57e285ec Set scanning threads idle priority 2012-03-14 16:14:25 -04:00
Leo Franchi
c5732d0d62 Don't crash loading covers for some tracks 2012-03-13 08:56:43 -04:00
Christian Muehlhaeuser
2e6688f42b * Use defaultPixmap() in TreeItemDelegate. 2012-03-13 03:49:02 +01:00
Christian Muehlhaeuser
6409113c0e * Lazily load TrackView covers. 2012-03-13 03:45:32 +01:00
Leo Franchi
ccd3e19fac fix spotify migration when migrating from pre-accounts 2012-03-12 22:03:31 -04:00
Christian Muehlhaeuser
18c16959ed * Added cover() method to Query. 2012-03-13 02:51:58 +01:00
Leo Franchi
60d11db923 TWK-750: Properly check if last.fm was enabled during accounts migration 2012-03-12 21:40:30 -04:00
Leo Franchi
c88058358e Fix macdeploy and build shared instead of MODULE, we don't want .so's on osx either. domme: confirm plz :) 2012-03-12 17:23:45 -04:00
Christian Muehlhaeuser
c511841f57 * Updated README. 2012-03-12 22:03:55 +01:00
Dominik Schmidt
240517b0cd Bump the required QTweetLib version 2012-03-11 18:46:00 +01:00
Jeff Mitchell
fab36b2262 Use new QTweetLib 0.5 API for PIN values so leading zeros are respected
Conflicts:

	src/accounts/twitter/tomahawkoauthtwitter.h
2012-03-11 18:44:43 +01:00
Leo Franchi
cb85c767de Auto upgrade old spotify to new spotify 2012-03-11 12:31:22 -04:00
Leo Franchi
35706f16f7 Remove assert as it hits of synchrotron is down, no fun 2012-03-11 12:11:17 -04:00
Leo Franchi
538db98e2c Disable Sync code until I can figure out why clang doesn't like it 2012-03-09 22:54:49 -05:00
Leo Franchi
5c0507323c Merge branch 'spotifyAccount' 2012-03-09 22:41:29 -05:00
Leo Franchi
57490a68f0 Cleanup 2012-03-09 22:41:01 -05:00
Leo Franchi
66e67fdd4e Fix crash when accounts were loaded before attica was fetched 2012-03-09 22:37:39 -05:00
Leo Franchi
6dbcac58a4 Show description from factory for manual resolvers 2012-03-09 22:37:25 -05:00
Leo Franchi
1aeb5ed807 Don't re-sync on deletion as then deleting an account never removes it from the config file 2012-03-09 22:36:53 -05:00
Leo Franchi
2d1a036b3d Use virtual method for factory name 2012-03-09 22:36:35 -05:00
Leo Franchi
970b3e79a9 Properly load spotify account 2012-03-09 21:49:50 -05:00
Jeff Mitchell
c6cd6821bf Use new QTweetLib 0.5 API for PIN values so leading zeros are respected 2012-03-09 18:24:05 -05:00
Leo Franchi
e1edd9c5ee Account plugins have different names 2012-03-09 18:06:25 -05:00
Leo Franchi
ccee34eaa7 Initial work on Spotify account
Merge branch 'master' into spotifyAccount

Conflicts:
	src/libtomahawk/CMakeLists.txt
2012-03-09 17:56:38 -05:00
Jeff Mitchell
3f3c855a6d Fix XMPP proxy. Make no proxy hosts static so changing it works across
all threads; make a duplication method so jreen doesn't scopepointer us
to death on shutdown; pass in proxyfactory to jreen.
2012-03-09 17:41:38 -05:00
Leo Franchi
5848e7ba8c Debug and safety 2012-03-09 16:31:53 -05:00
Leo Franchi
7ac68392a6 Less debug 2012-03-09 15:34:06 -05:00
Leo Franchi
1ebeae274a fix warning 2012-03-09 15:20:56 -05:00
Leo Franchi
2710bca395 Back up old config file before upgrading, when it's an ini file 2012-03-09 15:16:16 -05:00
Leo Franchi
dc28a7694b So much for platform independence 2012-03-09 15:07:08 -05:00
Leo Franchi
a30c4f9055 Oops 2012-03-09 14:59:57 -05:00
Leo Franchi
ab026b5e2f Remove hardcoding of delegate height to accomodate different font sizes 2012-03-09 14:56:34 -05:00
Leo Franchi
99aea14b62 Migrate port and server to configuration not credentials 2012-03-09 14:50:00 -05:00
Leo Franchi
cf5c368499 Set alternating row colors for accounts list 2012-03-09 14:43:14 -05:00
Leo Franchi
2a58d53145 A bit of extra safety 2012-03-09 14:14:13 -05:00
Dominik Schmidt
9a19c9e81e Don't use dllmacro in the application 2012-03-09 02:55:46 +01:00
Dominik Schmidt
448734190c Use automoc on all platforms 2012-03-09 02:55:31 +01:00
Leo Franchi
afe2db8d51 TWK-738: Don't crash on quit 2012-03-08 19:20:41 -05:00
Leo Franchi
f4603e0cad clean up from refactor 2012-03-08 19:11:37 -05:00
Leo Franchi
6cbc8a9539 Refactor account dialogs into utils, and port tomahawk to automoc too 2012-03-08 18:53:59 -05:00
Leo Franchi
f3324ce167 Check enabled/disabled when enabling/disabling, not authenticated 2012-03-08 17:41:55 -05:00
Leo Franchi
5f674dbc83 dangerous debug byebye 2012-03-08 17:29:35 -05:00
Leo Franchi
69cfe8bb2f quazip byebye 2012-03-08 17:29:30 -05:00
Dominik Schmidt
528121d283 Fix resolver.cpp 2012-03-08 20:15:02 +01:00
Dominik Schmidt
71833b817f Fix automoc on OSX 2012-03-08 20:09:20 +01:00
Dominik Schmidt
df65d040e8 Port libtomahawk to the new cmake-build-in automoc. Requires cmake 2.8.6 2012-03-08 19:30:00 +01:00
Leo Franchi
5641f2a07c fix migrating when there is already a last.fm account, and hide debug 2012-03-08 12:32:53 -05:00
Leo Franchi
a602cbe005 add stupid amounts of debug 2012-03-08 12:24:30 -05:00
Leo Franchi
f9940ead9f More debug 2012-03-08 12:14:31 -05:00
Leo Franchi
0c7780e5e3 add some debug for domme 2012-03-08 12:01:44 -05:00
Leo Franchi
6b6d5f270f TWK-732: Fix filter for status push account types 2012-03-07 22:38:36 -05:00
Leo Franchi
0067e376ae Services
Merge branch 'accounts'

Conflicts:
	resources.qrc
	src/accounts/zeroconf/zeroconf.cpp
2012-03-07 18:23:32 -05:00
Leo Franchi
935b046acc Set git version to 0.4.99 as 0.4.0 is tagged and branched 2012-03-07 16:48:52 -05:00
Christian Muehlhaeuser
dd74ce04e6 Moved QuaZip from "shipped" to "recommended". 2012-03-07 17:51:20 +01:00
Christian Muehlhaeuser
e3a43e8ca6 * Bumped version to 0.4.0. 2012-03-07 05:07:47 +01:00
Christian Muehlhaeuser
c401ea0d91 * Update ChangeLog. 2012-03-07 05:07:23 +01:00
Christian Muehlhaeuser
2d03b8aea0 * Didn't mean to commit that. 2012-03-07 04:49:26 +01:00
Christian Muehlhaeuser
178aed9174 * Fixed TWK-474: proper fulltext search. 2012-03-07 04:47:24 +01:00
Christian Muehlhaeuser
6552deca61 * Fixed Source method being run in the wrong thread. 2012-03-07 04:45:32 +01:00
Leo Franchi
89009c09be Add a small guard to Artist::get and Album::get as they are called all over, and might be called after destruction of DB on shutdown 2012-03-06 18:47:55 -05:00
Leo Franchi
34672c7bed TWK-722: Fix quitting right after startup by ensuring chart data loaders are deleted before database 2012-03-06 18:46:48 -05:00
Leo Franchi
3caeb4642a Attempt at fixing TWK-723. 2012-03-06 18:23:17 -05:00
Christian Muehlhaeuser
80b0eacfed * Revert macdeploy back to use Qt 4.7.4. 2012-03-06 00:42:12 +01:00
Leo Franchi
aa078e86e5 Merge pull request #77 from anselmolsm/master
Play/Pause when system tray receives a mouse middle click
2012-03-05 12:20:13 -08:00
Anselmo L. S. Melo
9daf0a6089 Play/Pause when system tray receives a mouse middle click 2012-03-05 15:00:28 -03:00
Jason Herskowitz
6dead5e7e1 Fix all Super Collection text strings to SuperCollection 2012-03-04 22:46:10 -05:00
Jason Herskowitz
335868ea95 Merge branch 'master' of github.com:tomahawk-player/tomahawk 2012-03-04 22:28:56 -05:00
Jason Herskowitz
fc45646205 Update SuperCollection header text 2012-03-04 22:28:35 -05:00
Leo Franchi
dbd466d3ed Changelog++ 2012-03-04 22:21:04 -05:00
Leo Franchi
292d8c9530 Don't update playlist if no tracks have changed 2012-03-04 21:54:55 -05:00
Leo Franchi
6b68598d1d Show job status for indexing 2012-03-04 21:54:55 -05:00
Dominik Schmidt
0d9e248dac Fix lastfm export macro after my last commit. Why did it work before that?! 2012-03-05 01:09:31 +01:00
Leo Franchi
46a86fe6a5 Install vlc plugins to Frameworks/vlc/plugins instead of plugins/ 2012-03-04 16:55:57 -05:00
Dominik Schmidt
a56ca4ddfc Improve liblastfm2 export macro 2012-03-04 21:14:59 +01:00
Leo Franchi
6483c55749 Revert "Disable breakpad for an osx nightly"
This reverts commit 5a56a3e060.
2012-03-04 13:21:41 -05:00
Leo Franchi
5a56a3e060 Disable breakpad for an osx nightly 2012-03-04 12:55:05 -05:00
Dominik Schmidt
585f32c4d8 osx: fix undefined reference to bringToFront() with visibility=hidden 2012-03-04 18:44:23 +01:00
Jason Herskowitz
9ea311526c Make audio error icon match set 2012-03-03 18:45:07 -05:00
Leo Franchi
1342fdb9a7 Revert "disable break for a sec"
This reverts commit 2cc4fccd66.
2012-03-03 11:40:16 -05:00
Leo Franchi
2cc4fccd66 disable break for a sec 2012-03-03 11:39:49 -05:00
Leo Franchi
a2d0899285 Add grooveshark track parsing, and add a job notification for shortened url unwrapping 2012-03-02 22:41:44 -05:00
Dominik Schmidt
06cc52744d Enforce proper symbol exporting on all platforms 2012-03-03 01:14:21 +01:00
Leo Franchi
2878552239 Fix various bugs in attica<->account bridge and bump config version 2012-03-02 16:23:45 -05:00
Leo Franchi
df758aa3f8 TWK-710: Don't expand items when clicking on headphones or lock icon 2012-03-02 00:15:16 -05:00
Leo Franchi
f79ed86b57 TWK-711: Some attica resolver icon fixes and optimizations. Don't write too much to disk 2012-03-01 23:33:27 -05:00
Leo Franchi
c9b0c92450 Bump up time for SetFile to finish 2012-03-01 23:25:49 -05:00
Leo Franchi
57d1c29d35 TWK-533: Show instructive error message if stations run out of tracks 2012-03-01 23:05:09 -05:00
Christian Muehlhaeuser
cdf7c11b29 * Fixed TWK-703: Auto expand sidebar's groups per default. 2012-03-02 04:42:32 +01:00
Leo Franchi
be7b5babe9 Show filter errors when loading a dynamic playlist for the first time too 2012-03-01 22:34:55 -05:00
Leo Franchi
f7f2c51d4e TWK-712: Don't emit track number changed when they really haven't, thus masking other errors 2012-03-01 22:11:02 -05:00
Leo Franchi
4889ed6a33 TWK-633: Don't use useless-to-us QUrl.addQueryItem, does not encode '+' 2012-03-01 21:53:13 -05:00
Leo Franchi
3557686681 Include in the right place 2012-03-01 21:53:11 -05:00
Christian Muehlhaeuser
58dfc54e00 * Fixed TWK-708: Resolve album page top-to-bottom. 2012-03-02 03:32:30 +01:00
Christian Muehlhaeuser
bddbc7a194 * Fixed TWK-642: Update Footnotes when selecting an album in AlbumView. 2012-03-02 02:45:56 +01:00
Christian Muehlhaeuser
33e0116e4b * Fixed TWK-700: Add description for SuperCollection. 2012-03-02 02:28:27 +01:00
Christian Muehlhaeuser
b07f498516 * Fixed TWK-699: Don't paint now playing icon over item decoration. 2012-03-02 02:21:08 +01:00
Christian Muehlhaeuser
c77be81e5b * Fixed TWK-641: don't write empty album covers in InfoSystem. 2012-03-02 01:55:28 +01:00
Christian Muehlhaeuser
11cf2c78d8 * Fixed ArtistPlaylistInterface. 2012-03-02 01:30:31 +01:00
Leo Franchi
77bcc7c7aa TWK-709: Fetch albums from infosystem if no tracks are found in the DB when dropping an album 2012-03-01 18:14:45 -05:00
Leo Franchi
934ee4a535 Merge branch 'master' into accounts
Conflicts:
	src/libtomahawk/AtticaManager.cpp
	src/libtomahawk/AtticaManager.h
	src/libtomahawk/tomahawksettings.cpp
2012-03-01 16:58:08 -05:00
Leo Franchi
5b97802104 Revert "Add debug for jason". Debug did its job :)
This reverts commit 25ec5cb432.
2012-03-01 09:20:41 -05:00
Leo Franchi
25ec5cb432 Add debug for jason 2012-03-01 09:12:27 -05:00
Leo Franchi
8b4b4a8f0c Add documentation 2012-03-01 00:19:59 -05:00
Leo Franchi
6448cebec6 Mostly fix TWK-701. A few bugs lined up here.
1) Tracks fetched from an album or artist in DropJob would only fetch from the db
   and never resolve w/ resolvers
2) artist* and album* objects were getting deleted too early if they didn't already exist before
   DropJob asked for them (results from db thread are queued, sharedpointer deletion happened first).
   Keep ahold of them until we're done with them.

For albums we don't know about, we still need to look up metadata track listings when nothing is found in the DB.
2012-03-01 00:14:16 -05:00
Leo Franchi
191ee259d4 TWK-671: Fix filter text being 'behind' by one step 2012-02-29 22:28:54 -05:00
Leo Franchi
dc364726c0 TWK-706: Don't auto-enable resolvers when upgrading them. 2012-02-29 18:46:58 -05:00
Hugo Lindström
6ac0f68224 Silly misstake in naming 2012-03-01 00:38:32 +01:00
Leo Franchi
3c3078f9f8 Clean up from previous test 2012-02-29 17:45:20 -05:00
Leo Franchi
b994befc58 osx /volumes tweak 2012-02-29 17:12:59 -05:00
Hugo Lindström
56cf0239da Fix soundcloudwall and pump version 2012-02-29 08:06:56 +01:00
Christian Muehlhaeuser
69d75362b3 * This should speed up resolving... a lot. 2012-02-29 02:36:33 +01:00
Leo Franchi
e677656b74 Merge branch 'master' into accounts 2012-02-28 20:24:07 -05:00
Leo Franchi
8db9c79e57 Add some SetFile/GetFileInfo debug 2012-02-28 18:54:22 -05:00
Hugo Lindström
e9ee617d94 Better name for soundcloudwall 2012-02-28 21:36:53 +01:00
Leo Franchi
c9c6534af5 Wait a bit longer for portfwd thread to exit to avoid crashes on exit 2012-02-28 10:37:37 -05:00
Leo Franchi
1b9767995b Make stations item drop enabled. How did this ever work!? 2012-02-28 10:37:37 -05:00
Christian Muehlhaeuser
1c561ba7a9 * Prepare macdeploy for Qt 4.8. 2012-02-28 15:49:21 +01:00
Leo Franchi
91e307b261 fix duplicate delete 2012-02-27 19:48:56 -05:00
Leo Franchi
91546d0684 Fix some bugs in ze last.fm account 2012-02-27 19:48:47 -05:00
Leo Franchi
f4c92793e6 Merge branch 'master' into accounts
Conflicts:
	src/libtomahawk/utils/xspfloader.cpp
	src/libtomahawk/utils/xspfloader.h
	src/tomahawkapp.cpp
	src/tomahawkwindow.h
2012-02-27 08:37:40 -05:00
Leo Franchi
52baebc899 Delete pipeline after database, as some dbcmds create queries which access Pipeline 2012-02-26 17:35:14 -05:00
Leo Franchi
63c029554a Set default type of echonest control so an empty control is valid (and ignored) 2012-02-26 17:34:11 -05:00
Leo Franchi
3900dd27d2 TWK-686: Implement playlistinterface and jump to current track 2012-02-26 13:06:10 -05:00
Leo Franchi
e9fb17dadb TWK-604: Update Show/Hide menu entry if Tomahawk is hidden with Cmd-H 2012-02-26 12:44:19 -05:00
Leo Franchi
56c2f86381 Use SetFile/GetFileInfo from bundle 2012-02-26 10:57:00 -05:00
Leo Franchi
a8440c72e4 Fix build for gcc on mac. Hudson should use clang :D 2012-02-25 23:52:34 -05:00
Leo Franchi
cbb5bac075 TWK-624: When resolving dups in dropjob, prefer playable ones 2012-02-25 23:20:31 -05:00
Leo Franchi
b7f1f56f77 TWK-633: Don't hand-make URLs, that is just asking for trouble 2012-02-25 21:53:08 -05:00
Leo Franchi
9fe17cf6f5 Upgrade SPMediaKeyTap 2012-02-25 21:25:57 -05:00
Leo Franchi
d641f06e6d cleanups 2012-02-25 20:54:54 -05:00
Leo Franchi
7668f04c0c Cache height as sizehint is called plenty often 2012-02-25 20:13:12 -05:00
Leo Franchi
a73d1cd342 Don't calculate height by assuming rows are same height anymore, as they are not. 2012-02-25 20:07:33 -05:00
Leo Franchi
35c4a29cbe center icon in delegate for multi-line jobs 2012-02-25 20:03:01 -05:00
Leo Franchi
f6e00fbb86 Show error message if phonon spits an error, but don't block with modal dialog/audio stop 2012-02-25 20:02:38 -05:00
Leo Franchi
3f9503364c Return null qstring 2012-02-25 19:48:00 -05:00
Leo Franchi
36b2a585f9 Show errors when fetching information from the network. Fixes TWK-515 2012-02-25 19:39:35 -05:00
Leo Franchi
42220a8c95 Delete InfoSystem after pipeline as various constructors connect to InfoSystem. Fixes crash on exit. 2012-02-25 16:24:57 -05:00
Leo Franchi
540db2860e fix a crash 2012-02-25 11:59:47 -05:00
Christian Muehlhaeuser
1ac4efa88a * Prepare for 0.4.0. 2012-02-25 10:18:00 +01:00
Leo Franchi
b2247febc1 Fix last.fm rsolver part of lastfm account 2012-02-24 18:52:16 -06:00
Leo Franchi
ea47a5556d better assert 2012-02-24 16:49:14 -06:00
Leo Franchi
b51480f122 Fix unchecking of unique factories 2012-02-24 11:30:22 -06:00
Leo Franchi
55d7fe9e53 Remove debugging aid 2012-02-24 11:00:36 -06:00
Leo Franchi
e6efa8dac3 Merge remote-tracking branch 'origin/master' into accounts
Conflicts:
	src/libtomahawk/tomahawksettings.cpp
	src/tomahawkapp.cpp
2012-02-24 10:59:47 -06:00
Leo Franchi
ac42abda7f Add a last.fm account on fresh config 2012-02-24 10:46:46 -06:00
Hugo Lindström
6a6f5dba7a Beginning of a bad spotifyAccount 2012-02-24 16:53:33 +01:00
Leo Franchi
d0b6d09255 Add first round of integration for custom attica accounts 2012-02-23 23:35:26 -06:00
Christian Muehlhaeuser
cfe42d10ea * Minor cleanups. 2012-02-24 06:29:32 +01:00
Christian Muehlhaeuser
6ad9e820e3 * Only show top 50 loved tracks for the SuperCollection. 2012-02-24 05:52:02 +01:00
Christian Muehlhaeuser
47a403a9c8 * Update social actions everytime you open the contextual menu of a track. 2012-02-24 05:40:00 +01:00
Christian Muehlhaeuser
b2fc0935a4 * Show now playing speaker next to current playlist again. 2012-02-24 05:18:55 +01:00
Christian Muehlhaeuser
a04d384ac4 * Show default album, not artist cover on AlbumInfoWidget. 2012-02-24 04:15:28 +01:00
Christian Muehlhaeuser
325bb0bf8f * Added global common image cache. 2012-02-24 04:13:37 +01:00
Christian Muehlhaeuser
c2a79d4cbf * Don't wordwrap track names in sidebar. 2012-02-23 21:06:17 +01:00
Christian Muehlhaeuser
b17b8356ad * Fixed a few issues with controlling playback via CLI args. 2012-02-23 20:34:23 +01:00
Christian Muehlhaeuser
a41b174851 Merge pull request #76 from ubertaco/master
Initial support for TWK-595
2012-02-23 11:23:43 -08:00
ubertaco
458d32ed7c removed duplicate --stop 2012-02-23 14:05:44 -05:00
ubertaco
a0383b6664 fixed helpstrings and inconsistent spacing 2012-02-23 14:04:24 -05:00
ubertaco
9b1fc4cd24 added helpstrings 2012-02-23 13:52:11 -05:00
ubertaco
2a27ef88f6 Added initial support for TWK-595 ( command-line audio controls ) 2012-02-23 13:48:51 -05:00
Christian Muehlhaeuser
d1ecf6d748 * More work on sidebar reorganization. 2012-02-23 06:22:47 +01:00
Christian Muehlhaeuser
396b5cd6e0 * Modify Tomahawk's config file to be only accessible by the owner. 2012-02-23 04:36:30 +01:00
Christian Muehlhaeuser
55e7d6383b * Unbreak headless more. 2012-02-23 04:08:14 +01:00
Christian Muehlhaeuser
dbcbffb6c4 * Auto load covers after expanding an artist. 2012-02-23 04:05:06 +01:00
Christian Muehlhaeuser
6b51872c3e * Unbreak headless. 2012-02-23 03:30:22 +01:00
Christian Muehlhaeuser
79d8b081d7 * Speed up cover loading in TreeView. 2012-02-23 03:21:21 +01:00
Christian Muehlhaeuser
165276912f * Fixed Windows compiling. 2012-02-22 02:42:42 +01:00
Christian Muehlhaeuser
413052bf8e * Destroy Pipeline properly and deactivate it earlier during shutdown. 2012-02-22 02:09:24 +01:00
Leo Franchi
b8ccf5a2e9 Merge remote-tracking branch 'origin/master' into accounts
Conflicts:
	src/main.cpp
2012-02-21 08:42:24 -06:00
Leo Franchi
27cde20dbf Fix Add Account button in factory config on OSX, and a few other osx tweaks 2012-02-20 23:06:49 -05:00
Leo Franchi
01fbbb6683 osx button size tweaks 2012-02-20 18:01:19 -05:00
Leo Franchi
61b55ab156 shrink spacing 2012-02-20 18:01:18 -05:00
Leo Franchi
502db67510 don't crash on exit 2012-02-20 15:45:43 -05:00
Leo Franchi
47e8f4ffc6 Add a last.fm account w. resolver and infotype. Needs merging w/ attica still 2012-02-20 00:58:38 -05:00
Leo Franchi
46fd72920c Remove duplicate signal/slot collection. All SourceTreeItem* signals are already hooked up for each item 2012-02-19 15:36:48 -05:00
Christian Muehlhaeuser
399b835436 * SourcePlaylistInterface shouldn't use temporary queries. 2012-02-19 11:29:03 +01:00
Leo Franchi
3e81405086 Add ability to add infoplugins to infosystem
also, add infoplugins from accounts that support them, and clean up
adding new info plugins in infoworker
2012-02-18 18:15:13 -05:00
Leo Franchi
443c554b36 Rework some scriptresolver/pipeline interaction now that we haev accounts 2012-02-18 18:14:00 -05:00
Alejandro Wainzinger
9f76cdf486 Fix typo. 2012-02-18 00:49:08 -08:00
Alejandro Wainzinger
881bf5dd9d Check for OS X 10.7 as well as 10.6 for delegate protocol. 2012-02-18 00:47:23 -08:00
Leo Franchi
8bb9661960 Add an index on the file mtime. For future users for now 2012-02-17 19:08:59 -05:00
Leo Franchi
a1c69b0b43 rework some startup order to load servent before UI components 2012-02-17 18:37:59 -05:00
Leo Franchi
8cdce8e1ca fix some typos, remove extra code 2012-02-17 13:36:01 -05:00
Leo Franchi
e3f4fdfdd8 Some more work + debug to try to fix j's issue 2012-02-17 13:16:21 -05:00
Leo Franchi
0b452cc415 more debug for account row removing 2012-02-17 11:31:33 -05:00
Leo Franchi
e6f4674064 Only remove rows from model if removing a manual resolver. Update otherwise 2012-02-16 23:21:37 -05:00
Leo Franchi
06be1868ea More accountmodel debug 2012-02-16 22:39:12 -05:00
Leo Franchi
2412266a34 Fix painting initial coordinate for qMin 2012-02-16 22:36:46 -05:00
Leo Franchi
6638d74687 Fix typo, left->right is small->big... 2012-02-16 22:31:01 -05:00
Leo Franchi
dc41b29ab7 add some debug to account adding 2012-02-16 22:22:46 -05:00
Leo Franchi
638718a48c Add an assert and debug 2012-02-15 08:29:09 -05:00
Leo Franchi
9adc4be099 elide and tooltip 2012-02-14 18:51:38 -05:00
Leo Franchi
75ea38010f fix creating factory and other first start issue 2012-02-14 18:38:44 -05:00
Dominik Schmidt
5083849514 Merge branch 'master' of git://github.com/tomahawk-player/tomahawk 2012-02-14 05:28:57 +01:00
Dominik Schmidt
8d75ba4d64 Add console output on windows 2012-02-14 05:28:35 +01:00
Leo Franchi
0c231d5532 fix first start issues 2012-02-13 21:11:47 -05:00
Leo Franchi
7e9fa7c2a7 fix addin and removing 2012-02-13 20:04:47 -05:00
Leo Franchi
3687ebdc6b Add an Install From File and Remove Account option 2012-02-13 18:03:30 -05:00
Leo Franchi
8ceb537860 Merge branch 'accounts' of github.com:tomahawk-player/tomahawk into accounts 2012-02-13 16:11:41 -05:00
Leo Franchi
64043e059f Merge branch 'master' of github.com:tomahawk-player/tomahawk into accounts 2012-02-13 15:57:57 -05:00
Leo Franchi
011483ec54 Update UI file 2012-02-13 15:52:19 -05:00
Leo Franchi
b6ce8d282c Fix twitter dm settings name 2012-02-13 11:29:26 -05:00
Leo Franchi
b54b7f6455 Up webapi timeouts so resolving can finish 2012-02-12 17:15:02 -05:00
Dominik Schmidt
d0a6d8a0a2 Fix windows installer 2012-02-12 22:48:37 +01:00
Leo Franchi
a02a9a4fd9 Merge remote-tracking branch 'origin/master' into accounts 2012-02-12 16:26:06 -05:00
Leo Franchi
e2749a7676 Fix some twitter stuff 2012-02-12 16:25:33 -05:00
Leo Franchi
0a3dc28bdf only migrate valid twitter accounts 2012-02-12 16:25:33 -05:00
Leo Franchi
79fd0278ce Fix turning on/off toplevel accounts 2012-02-12 16:25:33 -05:00
Dominik Schmidt
488eb387cb Use my new pvlc build in update-vlc.sh 2012-02-12 20:49:55 +01:00
Dominik Schmidt
99143f6148 Fix windows for qt 4.8 2012-02-12 20:23:20 +01:00
Dominik Schmidt
82c77e64c6 Fix windows 2012-02-12 19:59:33 +01:00
Leo Franchi
751af7862c fix merge 2012-02-11 12:24:09 -05:00
Leo Franchi
0425bfebac Merge remote-tracking branch 'origin/master' into accounts
Conflicts:
	src/accounts/xmpp/sip/xmppsip.cpp
2012-02-11 12:18:58 -05:00
Leo Franchi
40041f5c1e Finish adding filter imlpementation 2012-02-11 12:16:56 -05:00
Dominik Schmidt
1d4320afea Bump year ;-) 2012-02-11 03:55:23 +01:00
Leo Franchi
132460b797 Non-working save 2012-02-10 19:38:36 -05:00
Leo Franchi
369c8ecd98 ui cleanup 2012-02-10 19:08:01 -05:00
Leo Franchi
478ff17e67 Merge remote-tracking branch 'lfranchi/accounts' into accounts 2012-02-10 18:53:03 -05:00
Leo Franchi
41b146f38a small cleanup 2012-02-10 18:50:51 -05:00
Leo Franchi
eea70f104f dialogs-- 2012-02-10 18:47:30 -05:00
Leo Franchi
7bae6c6b8a fix deleting 2012-02-10 18:45:28 -05:00
Leo Franchi
9ab47d769b Some fixes to the dialogs 2012-02-10 18:31:46 -05:00
Leo Franchi
23d14bd476 bit of osx tweaks 2012-02-10 17:22:59 -05:00
Dominik Schmidt
d9c3162146 Remove now unneccesary workaround in mingw toolchain file 2012-02-10 19:36:10 +01:00
Dominik Schmidt
4a1b021753 Fix FindTaglib.cmake for windows 2012-02-10 19:33:48 +01:00
Leo Franchi
3418d5295b Merge pull request #75 from crabmanX/master
suggest playlist filename on export
2012-02-10 06:35:51 -08:00
Kilian Lackhove
bf30dc37a2 suggest playlist filename on export 2012-02-10 15:30:07 +01:00
Leo Franchi
ecccf87992 Add multi-account config widget and hook things up 2012-02-09 23:16:18 -05:00
Leo Franchi
0dd4823a23 SHow online/offline status for factory with an account as well 2012-02-06 17:48:38 -05:00
Leo Franchi
001b9d0627 revampify layout
Please enter the commit message for your changes. Lines starting
2012-02-06 11:27:17 -05:00
Dominik Schmidt
6ed4902e00 Check for QtUiTools 2012-02-06 14:56:32 +01:00
Leo Franchi
0cfe2d2357 refactored UI again 2012-02-05 15:33:53 -05:00
Leo Franchi
8f1fa9b728 Step one in the pivot 2012-02-03 18:34:46 -05:00
Leo Franchi
34dbc50b3a Work to add setData to the model, and hook up model to some signals 2012-02-03 17:19:04 -05:00
Leo Franchi
daa6b7b841 more work 2012-02-02 10:54:13 -05:00
Leo Franchi
21cfb96b1e more work 2012-02-01 18:24:39 -05:00
Leo Franchi
96eb48090c Initialwork on new accounts delegate 2012-01-31 23:05:50 -05:00
Leo Franchi
f17bba773d initial delegate work 2012-01-31 18:25:34 -05:00
Leo Franchi
8eba4c171f Begin work on overhauled account UI, again 2012-01-29 19:33:12 -05:00
Leo Franchi
f2b1cc6ae3 fix looping over account existing 2012-01-29 15:02:21 -05:00
Leo Franchi
e8eb7300fc i = iniMap.constFind(sections.at(j));
Q_ASSERT(i != iniMap.constEnd());
Consolidate version macro...
2012-01-29 13:43:21 -05:00
Leo Franchi
9607d6be00 remove duplicated signal 2012-01-29 13:38:43 -05:00
Leo Franchi
ddb4bd4563 Move qdatastream registration to before settings init 2012-01-29 13:38:22 -05:00
Leo Franchi
e5414c8ff6 Merge remote-tracking branch 'origin/master' into accounts
Conflicts:
	src/accounts/xmpp/sip/xmppsip.cpp
	src/libtomahawk/CMakeLists.txt
2012-01-29 10:27:31 -05:00
Leo Franchi
7e13f1ae62 Hook up some removing 2012-01-29 10:07:15 -05:00
Leo Franchi
b78a348712 small work 2012-01-28 12:15:51 -05:00
Leo Franchi
4e450b36ee implement adding in getnewstuffmodel for attica resolvers 2012-01-27 19:10:11 -05:00
Leo Franchi
b300279e30 remove Resolver from settings list 2012-01-27 18:32:25 -05:00
Leo Franchi
e319aa248c Initial work towards merging accounts into GetNewStuffModel 2012-01-27 18:31:11 -05:00
Leo Franchi
39c7af6262 Remove ifdef of libattica 2012-01-27 13:50:29 -05:00
Leo Franchi
4334840dad QIcon->QPixmap for account icon.
QIcon doesn't make sense in this case, as it is designed to store multiple sizes/active states for icons
that are associated with e.g. toolbuttons. Account icons are just an image that represents the logo of
the account, so only one pixmap is needed.
2012-01-27 12:49:29 -05:00
Leo Franchi
22def2c617 Add resolver account wrapper and attica flag 2012-01-23 23:28:49 -05:00
Leo Franchi
cf9389a0de work towards integrating resolvers in accounts refactor 2012-01-22 20:08:32 -05:00
Leo Franchi
601bc7729a Initial account UI update. Buttons needs styling and implementation 2012-01-08 18:33:13 -05:00
Leo Franchi
0aa61b9fa8 Reduce how fast we watch for other apps, reduce timer wakeups a bit 2012-01-08 18:32:28 -05:00
Leo Franchi
8483e38f58 style 2012-01-08 18:32:10 -05:00
Leo Franchi
a78ef004f0 Add migration from pre-accounts to accounts, and fix twitter in various places 2012-01-07 12:49:37 -05:00
Leo Franchi
811b6842c5 Merge branch 'master' into accounts
Conflicts:
	src/accounts/twitter/CMakeLists.txt
	src/accounts/zeroconf/CMakeLists.txt
	src/sip/jabber/CMakeLists.txt
	src/sip/jabber/googlewrapper/CMakeLists.txt
2012-01-06 17:32:14 -05:00
Leo Franchi
d8a8575b55 Merge branch 'master' into accounts 2011-12-31 18:02:08 -06:00
Leo Franchi
801d7e5d89 fix crash on closing account config dialog 2011-12-31 18:00:19 -06:00
Leo Franchi
aaf147a39a make twitter compile 2011-12-23 11:13:30 -06:00
Leo Franchi
2d66daec41 initial twitter fix 2011-12-22 12:34:09 -05:00
Leo Franchi
f74165424f Port zeroconf plugin 2011-12-18 13:31:36 -05:00
Leo Franchi
2e45bf5e26 Merge remote-tracking branch 'origin/master' into accounts
Conflicts:
	src/accounts/xmpp/sip/xmppsip.cpp
	src/accounts/xmpp/sip/xmppsip.h
	src/libtomahawk/sip/SipHandler.cpp
	src/libtomahawk/sip/SipPlugin.cpp
	src/libtomahawk/sip/SipPlugin.h
	src/settingsdialog.cpp
	src/sip/CMakeLists.txt
	src/sip/jabber/googlewrapper/googlewrapper.cpp
	src/sip/twitter/twitter.cpp
	src/sip/xmpp/CMakeLists.txt
	src/tomahawkwindow.cpp
2011-12-16 18:45:18 -05:00
Leo Franchi
7783f48bae show account name in delegate properly 2011-12-16 18:11:15 -05:00
Leo Franchi
3607d364e7 port google wrapper over 2011-12-16 17:31:54 -05:00
Leo Franchi
aefec1eaac missing bits and pieces of accounts and auto-connect
port settings dialog to new accounts
fix adding and removing of accounts
2011-12-16 16:20:26 -05:00
Leo Franchi
00adb66cf0 ready for settings dialog work 2011-12-11 22:57:14 -05:00
Leo Franchi
b6911525a4 separate more stuff into siphandler/accountmanager 2011-12-11 22:41:59 -05:00
Leo Franchi
328d055ee1 some work 2011-11-28 13:17:27 -05:00
Leo Franchi
cef9c620dc Revert last two commits, were not meant to be pushed 2011-11-18 21:17:24 -05:00
Leo Franchi
eedf940e5f Bit more work 2011-11-18 16:58:56 -05:00
Leo Franchi
e3785e50f2 Some work on accounts 2011-11-18 16:56:48 -05:00
Jeff Mitchell
aae400bea9 Move sip into accounts, and redo the exports so that it links on boxes
with --as-needed by default (and presumably Windows too)
2011-11-14 17:39:13 -05:00
Jeff Mitchell
01aa3ee9a5 Rename sip libraries 2011-11-14 16:10:31 -05:00
Jeff Mitchell
ccb6d82e88 Merge branch 'master' into accounts
Conflicts:
	src/libtomahawk/CMakeLists.txt
	src/libtomahawk/sip/SipPlugin.h
2011-11-14 15:41:40 -05:00
Jeff Mitchell
bfcf4d3bdb More cleanup work. Also, move twitter authentication to the account, so it's centralized 2011-11-06 13:18:19 -05:00
Jeff Mitchell
eaab5df5be Merge branch 'master' into accounts 2011-11-06 12:37:40 -05:00
Jeff Mitchell
ccde46447e Put canSelfAuthenticate in the right place 2011-11-05 20:17:18 -04:00
Jeff Mitchell
8b862774c9 Protect-ize account members and some methods 2011-11-05 19:32:57 -04:00
Jeff Mitchell
d50e41f4d2 XMPP via Accounts compiles. NFC if it works, but this is a big step...
(Also, GoogleWrapper not ported yet)
2011-11-05 18:56:55 -04:00
Jeff Mitchell
1736f4caaa Rename tomahawksipmessage to tomahawkxmppmessage -- after all it's quite xmpp specific 2011-11-05 15:51:31 -04:00
Jeff Mitchell
9db0b5ed40 Twitter actually saves auth and connects 2011-11-05 13:36:58 -04:00
Jeff Mitchell
13cfda6e1e Account properly saves itself now and can reload a saved account 2011-11-05 12:22:57 -04:00
Jeff Mitchell
8e2721236f Merge branch 'master' into accounts 2011-11-05 10:34:44 -04:00
Jeff Mitchell
c906bd4e8f Merge branch 'master' into accounts 2011-11-05 10:13:03 -04:00
Jeff Mitchell
988554934b Merge branch 'master' into accounts 2011-11-05 08:32:32 -04:00
Jeff Mitchell
709a25ce97 More compilation fixes, though settings dialog needs serious reworking. Can't figure out why it isn't linking atm 2011-10-22 14:45:40 -04:00
Jeff Mitchell
fb6d9967dc Merge branch 'master' into accounts 2011-10-22 14:07:57 -04:00
Jeff Mitchell
8f24acd008 More account updates 2011-10-22 13:59:05 -04:00
Jeff Mitchell
f548d36586 Further work towards compilation 2011-10-22 13:26:00 -04:00
Jeff Mitchell
c3064d8249 More twitter changeover to accounts work, mostly on sip -- does not
compile, does not work yet
2011-10-04 19:34:44 -04:00
Jeff Mitchell
60aec5ac0f Merge branch 'master' into accounts
Conflicts:
	src/libtomahawk/CMakeLists.txt
	src/sip/zeroconf/zeroconf.cpp
2011-10-04 18:06:22 -04:00
Jeff Mitchell
abd7edab36 twitter account showing a config dialog 2011-09-24 18:03:21 -04:00
Jeff Mitchell
88350b6a6c More account work; most of the pure-account side of a twitter account, but not yet tested 2011-09-24 17:38:24 -04:00
Jeff Mitchell
c7f6144bfe First commit towards new accounts system. Shouldn't work, but compiles. 2011-09-24 13:29:43 -04:00
839 changed files with 81131 additions and 24452 deletions

9
.tx/config Normal file
View File

@@ -0,0 +1,9 @@
[main]
host = https://www.transifex.net
[tomahawk.tomahawk-master]
file_filter = lang/tomahawk_<lang>.ts
source_file = lang/tomahawk_en.ts
source_lang = en
type = QT

View File

@@ -1,10 +1,7 @@
PROJECT( tomahawk )
CMAKE_MINIMUM_REQUIRED( VERSION 2.8 )
CMAKE_MINIMUM_REQUIRED( VERSION 2.8.6 )
SET( CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules" )
IF( ${CMAKE_VERSION} VERSION_GREATER 2.8.3 )
CMAKE_POLICY(SET CMP0017 NEW)
ENDIF( ${CMAKE_VERSION} VERSION_GREATER 2.8.3 )
CMAKE_POLICY(SET CMP0017 NEW)
###
### Tomahawk application info
@@ -15,17 +12,32 @@ SET( TOMAHAWK_APPLICATION_NAME "Tomahawk" )
SET( TOMAHAWK_DESCRIPTION_SUMMARY "The social media player" )
SET( TOMAHAWK_VERSION_MAJOR 0 )
SET( TOMAHAWK_VERSION_MINOR 3 )
SET( TOMAHAWK_VERSION_MINOR 4 )
SET( TOMAHAWK_VERSION_PATCH 99 )
#SET( TOMAHAWK_VERSION_RC 0 )
# enforce proper symbol exporting on all platforms
add_definitions( "-fvisibility=hidden" )
# build options
option(BUILD_GUI "Build Tomahawk with GUI" ON)
option(BUILD_RELEASE "Generate TOMAHAWK_VERSION without GIT info" OFF)
option(WITH_BREAKPAD "Build with breakpad integration" ON)
option(WITH_CRASHREPORTER "Build with CrashReporter" ON)
option(LEGACY_KDE_INTEGRATION "Install tomahawk.protocol file, deprecated since 4.6.0" OFF)
IF( CMAKE_SYSTEM_PROCESSOR MATCHES "arm" )
message(STATUS "Build of breakpad library disabled on this platform.")
SET(WITH_BREAKPAD OFF)
SET(WITH_CRASHREPORTER OFF)
ENDIF()
# add definitions based on build options
IF(WITH_BREAKPAD)
message(STATUS "Build with support for breakpad.")
ENDIF()
# generate version string
# base string used in release and unstable builds
@@ -38,7 +50,7 @@ ENDIF()
IF( NOT BUILD_RELEASE )
INCLUDE( CMakeDateStamp )
SET( TOMAHAWK_VERSION_DATE "${CMAKE_DATESTAMP_YEAR}${CMAKE_DATESTAMP_MONTH}${CMAKE_DATESTAMP_DAY}" )
IF( ${TOMAHAWK_VERSION_DATE} GREATER 0)
IF( TOMAHAWK_VERSION_DATE GREATER 0)
SET( TOMAHAWK_VERSION ${TOMAHAWK_VERSION}.${TOMAHAWK_VERSION_DATE} )
ENDIF()
@@ -72,7 +84,7 @@ IF( NOT BUILD_GUI )
MESSAGE( STATUS "Building Tomahawk ${TOMAHAWK_VERSION} in HEADLESS mode ***" )
ELSE()
MESSAGE( STATUS "Building Tomahawk ${TOMAHAWK_VERSION} full GUI version ***" )
LIST(APPEND NEEDED_QT4_COMPONENTS "QtGui" "QtWebkit" )
LIST(APPEND NEEDED_QT4_COMPONENTS "QtGui" "QtWebkit" "QtUiTools" )
ENDIF()
IF( BUILD_GUI AND UNIX AND NOT APPLE )
@@ -80,7 +92,7 @@ IF( BUILD_GUI AND UNIX AND NOT APPLE )
ENDIF()
macro_optional_find_package(Qt4 4.7.0 COMPONENTS ${NEEDED_QT4_COMPONENTS} )
macro_log_feature(QT4_FOUND "Qt" "A cross-platform application and UI framework" "http://qt.nokia.com" TRUE "" "If you see this, although libqt4-devel is installed, check whether \n the qtwebkit-devel package is installed as well")
macro_log_feature(QT4_FOUND "Qt" "A cross-platform application and UI framework" "http://qt.nokia.com" TRUE "" "If you see this, although libqt4-devel is installed, check whether the \n qtwebkit-devel package and whatever contains QtUiTools is installed too")
macro_optional_find_package(Phonon 4.5.0)
macro_log_feature(PHONON_FOUND "Phonon" "The Phonon multimedia library" "http://phonon.kde.org" TRUE "" "")
@@ -109,30 +121,17 @@ macro_optional_find_package(QCA2)
macro_log_feature(QCA2_FOUND "QCA2" "Provides encryption and signing functions required for Grooveshark resolver" "http://delta.affinix.com/qca/" FALSE "" "")
macro_optional_find_package(LibAttica)
macro_log_feature(LIBATTICA_FOUND "libattica" "Provides support for automatic fetching and managing of resolvers from the tomahawk website" "https://projects.kde.org/projects/kdesupport/attica" FALSE "" "")
macro_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)
macro_log_feature(QuaZip_FOUND "QuaZip" "Provides support for extracting downloaded resolvers automatically." "http://quazip.sourceforge.net/" FALSE "" "")
macro_log_feature(QuaZip_FOUND "QuaZip" "Provides support for extracting downloaded resolvers automatically." "http://quazip.sourceforge.net/" TRUE "" "")
macro_optional_find_package(Jreen)
macro_log_feature(LIBJREEN_FOUND "Jreen" "Qt XMPP Library" "https://github.com/euroelessar/jreen" FALSE "" "Jreen is needed for the Jabber SIP plugin.\n")
macro_optional_find_package(Jreen 1.0.5)
macro_log_feature(JREEN_FOUND "Jreen" "Qt XMPP Library" "http://qutim.org/jreen / https://github.com/euroelessar/jreen" FALSE "" "Jreen is needed for the Jabber SIP plugin.\n")
macro_optional_find_package(QTweetLib)
macro_log_feature(QTWEETLIB_FOUND "QTweetLib" "Qt Twitter Library" "https://github.com/minimoog/QTweetLib" FALSE "" "QTweetLib is needed for the Twitter SIP plugin.\n")
IF( NOT QuaZip_FOUND )
add_subdirectory( ${CMAKE_SOURCE_DIR}/src/libtomahawk/thirdparty/quazip )
SET( QuaZip_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR}/libtomahawk/thirdparty/quazip )
SET( QuaZip_LIBRARY quazip )
SET( QuaZip_LIBRARIES ${QuaZip_LIBRARY} )
SET( QuaZip_FOUND true )
macro_log_feature(QuaZip_FOUND "QuaZip" "Provides support for extracting downloaded resolvers automatically. Building internal copy" "http://quazip.sourceforge.net/" FALSE "" "")
# copy headers to build/quazip so we can use proper includes inside the code
FILE( COPY ${CMAKE_SOURCE_DIR}/src/libtomahawk/thirdparty/quazip/quazip/ DESTINATION ${CMAKE_BINARY_DIR}/libtomahawk/thirdparty/quazip )
ENDIF()
# required
#While we distribute our own liblastfm2, don't need to look for it
#macro_optional_find_package(LibLastFm 0.3.3)
@@ -211,9 +210,3 @@ ADD_SUBDIRECTORY( src/libtomahawk )
SET( TOMAHAWK_LIBRARIES tomahawklib )
ADD_SUBDIRECTORY( src )
ADD_SUBDIRECTORY( admin )
IF( BUILD_GUI )
IF( NOT DISABLE_CRASHREPORTER )
ADD_SUBDIRECTORY( src/breakpad/CrashReporter )
ENDIF()
ENDIF()

View File

@@ -0,0 +1,99 @@
MACRO(PARSE_ARGUMENTS prefix arg_names option_names)
SET(DEFAULT_ARGS)
FOREACH(arg_name ${arg_names})
SET(${prefix}_${arg_name})
ENDFOREACH(arg_name)
FOREACH(option ${option_names})
SET(${prefix}_${option} FALSE)
ENDFOREACH(option)
SET(current_arg_name DEFAULT_ARGS)
SET(current_arg_list)
FOREACH(arg ${ARGN})
SET(larg_names ${arg_names})
LIST(FIND larg_names "${arg}" is_arg_name)
IF (is_arg_name GREATER -1)
SET(${prefix}_${current_arg_name} ${current_arg_list})
SET(current_arg_name ${arg})
SET(current_arg_list)
ELSE (is_arg_name GREATER -1)
SET(loption_names ${option_names})
LIST(FIND loption_names "${arg}" is_option)
IF (is_option GREATER -1)
SET(${prefix}_${arg} TRUE)
ELSE (is_option GREATER -1)
SET(current_arg_list ${current_arg_list} ${arg})
ENDIF (is_option GREATER -1)
ENDIF (is_arg_name GREATER -1)
ENDFOREACH(arg)
SET(${prefix}_${current_arg_name} ${current_arg_list})
ENDMACRO(PARSE_ARGUMENTS)
MACRO(CAR var)
SET(${var} ${ARGV1})
ENDMACRO(CAR)
MACRO(CDR var junk)
SET(${var} ${ARGN})
ENDMACRO(CDR)
macro(add_tomahawk_plugin)
parse_arguments(PLUGIN
"SOURCES;UI;LINK_LIBRARIES;TYPE;EXPORT_MACRO;COMPILE_DEFINITIONS"
"NO_INSTALL"
${ARGN}
)
car(PLUGIN_NAME ${PLUGIN_DEFAULT_ARGS})
# message("*** Arguments for ${PLUGIN_NAME}")
# message("Sources: ${PLUGIN_SOURCES}")
# message("Link libraries: ${PLUGIN_LINK_LIBRARIES}")
# message("UI: ${PLUGIN_UI}")
# message("TYPE: ${PLUGIN_TYPE}")
# message("EXPORT_MACRO: ${PLUGIN_EXPORT_MACRO}")
# create target name once for convenience
set(target "tomahawk_${PLUGIN_TYPE}_${PLUGIN_NAME}")
# qt stuff
include_directories(${CMAKE_CURRENT_BINARY_DIR})
if(PLUGIN_UI)
qt4_wrap_ui(PLUGIN_UI_SOURCES ${PLUGIN_UI})
list(APPEND PLUGIN_SOURCES ${PLUGIN_UI_SOURCES})
endif()
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/resources.qrc")
qt4_add_resources(PLUGIN_RC_SOURCES "resources.qrc")
list(APPEND PLUGIN_SOURCES ${PLUGIN_RC_SOURCES})
unset(PLUGIN_RC_SOURCES)
endif()
# add target
add_library(${target} MODULE ${PLUGIN_SOURCES})
# definitions - can this be moved into set_target_properties below?
add_definitions(${QT_DEFINITIONS})
set_target_properties(${target} PROPERTIES AUTOMOC TRUE COMPILE_DEFINITIONS ${PLUGIN_EXPORT_MACRO})
if(PLUGIN_COMPILE_DEFINITIONS)
# Dear CMake, i hate you! Sincerely, domme
# At least in CMake 2.8.8, you CANNOT set more than one COMPILE_DEFINITIONS value
# only takes the first one if called multiple times or bails out with wrong number of arguments
# when passing in a list, thus i redefine the export macro here in hope it won't mess up other targets
add_definitions( "-D${PLUGIN_EXPORT_MACRO}" )
set_target_properties(${target} PROPERTIES COMPILE_DEFINITIONS ${PLUGIN_COMPILE_DEFINITIONS})
endif()
# add link targets
target_link_libraries(${target} tomahawklib)
if(PLUGIN_LINK_LIBRARIES)
target_link_libraries(${target} ${PLUGIN_LINK_LIBRARIES})
endif()
# make installation optional, maybe useful for dummy plugins one day
if(NOT PLUGIN_NO_INSTALL)
include(GNUInstallDirs)
install(TARGETS ${target} DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
endmacro()

View File

@@ -5,40 +5,32 @@
# LIBJREEN_LIBRARY, the path to libjreen
# LIBJREEN_FOUND, whether libjreen was found
FIND_PACKAGE(PkgConfig QUIET)
PKG_CHECK_MODULES(PC_JREEN QUIET libjreen)
find_path(LIBJREEN_INCLUDE_DIR NAMES jreen/jreen.h
HINTS
~/usr/include
/opt/local/include
/usr/include
/usr/local/include
/opt/kde4/include
${CMAKE_INSTALL_PREFIX}/include
${KDE4_INCLUDE_DIR}
FIND_PATH(JREEN_INCLUDE_DIR NAMES jreen/jreen.h
HINTS
${PC_JREEN_INCLUDEDIR}
${PC_JREEN_INCLUDE_DIRS}
${CMAKE_INSTALL_INCLUDEDIR}
${KDE4_INCLUDE_DIR}
)
find_library( LIBJREEN_LIBRARY NAMES jreen
PATHS
~/usr/lib
/opt/local/lib
/usr/lib
/usr/lib64
/usr/local/lib
/opt/kde4/lib
${CMAKE_INSTALL_PREFIX}/lib
${CMAKE_INSTALL_PREFIX}/lib64
${KDE4_LIB_DIR}
FIND_LIBRARY(JREEN_LIBRARIES NAMES jreen
HINTS
${PC_JREEN_LIBDIR}
${PC_JREEN_LIBRARY_DIRS}
${CMAKE_INSTALL_LIBDIR}
${KDE4_LIB_DIR}
)
IF(JREEN_LIBRARIES AND JREEN_INCLUDE_DIR AND NOT PC_JREEN_VERSION)
MESSAGE(WARNING "You don't have pkg-config and so the Jreen version check does not work!")
ENDIF()
if(LIBJREEN_INCLUDE_DIR AND LIBJREEN_LIBRARY)
set(LIBJREEN_FOUND TRUE)
message(STATUS "Found libjreen: ${LIBJREEN_INCLUDE_DIR}, ${LIBJREEN_LIBRARY}")
else(LIBJREEN_INCLUDE_DIR AND LIBJREEN_LIBRARY)
set(LIBJREEN_FOUND FALSE)
if (LIBJREEN_FIND_REQUIRED)
message(FATAL_ERROR "Could NOT find required package libjreen")
endif(LIBJREEN_FIND_REQUIRED)
endif(LIBJREEN_INCLUDE_DIR AND LIBJREEN_LIBRARY)
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Jreen
REQUIRED_VARS JREEN_LIBRARIES JREEN_INCLUDE_DIR
VERSION_VAR PC_JREEN_VERSION)
mark_as_advanced(LIBJREEN_INCLUDE_DIR LIBJREEN_LIBRARY)
MARK_AS_ADVANCED(JREEN_INCLUDE_DIR JREEN_LIBRARIES)

View File

@@ -38,7 +38,9 @@ else (QCA2_INCLUDE_DIR AND QCA2_LIBRARIES)
find_path(QCA2_INCLUDE_DIR qca.h
HINTS ${PC_QCA2_INCLUDEDIR} ${PC_QCA2_INCLUDE_DIRS}
PATH_SUFFIXES QtCrypto)
PATH_SUFFIXES QtCrypto
PATHS /usr/local/lib/qca.framework/Headers/
)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(QCA2 DEFAULT_MSG QCA2_LIBRARIES QCA2_INCLUDE_DIR)

View File

@@ -56,7 +56,7 @@ ELSE()
include(FindLibraryWithDebug)
include(FindPackageHandleStandardArgs)
find_path(TAGLIB_CFLAGS
find_path(TAGLIB_INCLUDES
NAMES
tag.h
PATH_SUFFIXES taglib

View File

@@ -28,8 +28,8 @@
; We use official release plugins
; mingw32-vlc from obs misses a lot and has even broken ones probably
!define VLC_PATH "${SOURCE_PATH}\admin\win\vlc\prefix" ; SIC! ^
!define VLC_BIN "${VLC_PATH}\bin"
!define VLC_PATH "${SOURCE_PATH}\admin\win\vlc\" ; SIC! ^
!define VLC_BIN "${VLC_PATH}"
!define VLC_PLUGIN_PATH "${VLC_BIN}\plugins"
!define NSI_PATH "${SOURCE_PATH}/admin/win/nsi"
@@ -279,9 +279,9 @@ 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\libquazip.dll"
File "${INSTALL_PATH}\bin\libtomahawklib.dll"
File "${INSTALL_PATH}\lib\libtomahawk_sip*.dll"
; plugins
File "${INSTALL_PATH}\lib\libtomahawk_*_*.dll"
!endif
!ifndef INSTALL_PATH
;Main executable.
@@ -294,8 +294,8 @@ Section "Tomahawk Player" SEC_TOMAHAWK_PLAYER
File "${BUILD_PATH}\libqxtweb-standalone.dll"
File "${BUILD_PATH}\libtomahawk_portfwd.dll"
File "${BUILD_PATH}\libtomahawk_lastfm2.dll"
File "${BUILD_PATH}\libquazip.dll"
File "${BUILD_PATH}\libtomahawk_sip*.dll"
; plugins
File "${BUILD_PATH}\libtomahawk_*_*.dll"
!endif
;License & release notes.
@@ -307,8 +307,10 @@ Section "Tomahawk Player" SEC_TOMAHAWK_PLAYER
File "${QT_DLL_PATH}\QtGui4.dll"
File "${QT_DLL_PATH}\QtNetwork4.dll"
File "${QT_DLL_PATH}\QtSql4.dll"
File "${QT_DLL_PATH}\QtXml4.dll"
File "${QT_DLL_PATH}\QtScript4.dll"
File "${QT_DLL_PATH}\QtUiTools4.dll"
File "${QT_DLL_PATH}\QtWebKit4.dll"
File "${QT_DLL_PATH}\QtXml4.dll"
;SQLite driver
SetOutPath "$INSTDIR\sqldrivers"
@@ -329,13 +331,12 @@ Section "Tomahawk Player" SEC_TOMAHAWK_PLAYER
File "${MING_BIN}\libstdc++-6.dll"
;Phonon stuff
File "${VLC_BIN}\libphonon.dll"
File "${MING_BIN}\libphonon.dll"
SetOutPath "$INSTDIR\phonon_backend"
File "${VLC_BIN}\phonon_backend\phonon_vlc.dll"
SetOutPath "$INSTDIR"
;VLC
;SetOutPath "$INSTDIR\phonon_backend"
File "${VLC_BIN}\libvlc.dll"
File "${VLC_BIN}\libvlccore.dll"
SetOutPath "$INSTDIR\plugins"
@@ -351,6 +352,7 @@ Section "Tomahawk Player" SEC_TOMAHAWK_PLAYER
File "${MING_BIN}\libechonest.dll"
File "${MING_BIN}\libQTweetLib.dll"
File "${MING_BIN}\libquazip.dll"
; Jabber
File "${MING_BIN}\libjreen.dll"

View File

@@ -1,3 +1,67 @@
Version 0.5.0:
* Added "Stop playback after this track" context menu items.
* You can now import your entire Last.fm playback history into Tomahawk.
* Support for multimedia keys (Play, Pause, Next etc.) on Windows & Linux.
* When listening privately scrobbling to Last.fm 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.
* Separate Loved Tracks and Recently Played views per source.
Version 0.4.2:
* Fix ZeroConf protocol showing IP addresses instead of host names.
* Updated translations for various languages.
* Resuming playback restores correct volume settings.
* Reduced CPU usage during playback.
* Fixed not starting up due to case sensitivity issue on OS X.
* Fixed volume issue (too quiet) on Windows.
Version 0.4.1:
* Fixed various crashes.
* Fixed issues with auto-updating XSPF playlists.
* Double-clicking a playlist starts playing it.
* Resolvers can now return disc number and album position for results.
* Fixed sorting playlists by track number.
* Fixed issues with changing proxy.
* Fixed Twitter authentication issues.
* Fixed Grooveshark support on Windows.
Version 0.4.0:
* Added visual notification for database indexing job.
* Fixed icons not appearing in resolvers list.
* Fixed various UI glitches and stray error messages in stations.
* Fixed bug where album page would resolve bottom-to-top.
* Fixed bug where Footnotes would not update when changing selected album.
* Fixed dragging albums and artists from charts, album, and artist views.
* Fixed bug where filter text would be one step behind filter value.
* Fixed bug where resolvers would enable themselves after auto-updating.
* Fixed occasional crash when dropping tracks onto New Station item.
* Added jump-to-current-track support for search results page.
* Fixed non-resolving tracks when dragging from album view.
* Fixed fetching album covers for albums with special characters.
* Show errors and continue gracefully when resolved audio is not available.
* Fixed various crashes on exit.
* Added basic command-line options for playback control.
* Bumped up web api timeouts to allow web clients to finish resolving.
* Added filename suggestion when exporting a playlist.
* Cleaned up highlighting of artist names in album view.
* Cleaned up alignment of playlist items.
* Fixed potential crash when searching.
* Added support for disc number.
* Added SoundCloudWall.com charts.
* Added ability to "lock on" to a user when listening along, to skip along.
* Fixed bug where loved tracks would be refreshed much too often.
* Fixed some font size issues.
* Sped up Tomahawk startup by moving chart loading into a separate thread.
* Added support for parsing Grooveshark and Tinysong tracks and playlists.
* Reorganized sidebar to follow more logical item groupings.
* Added artist and album results to global searches.
* Fixed style and contrast issues when using GTK styles.
* Fixed paths to artwork when using MPRIS2 interface.
* Fixed out of sync Show/Hide menu items on OS X when hidden with cmd-h.
* Fixed /Volumes directory not showing up on OS X.
* Fixed startup crash on OS X.
Version 0.3.3:
* Automatically load Super Collection tracks when no official release
information is available.

12
README
View File

@@ -13,7 +13,7 @@ Compiling Tomahawk
Detailed building instructions for Ubuntu
-----------------------------------------
See: http://wiki.tomahawk-player.org/mediawiki/index.php/Building_Ubuntu_Binary_on_Maverick_(10.10)
See: http://wiki.tomahawk-player.org/mediawiki/index.php/Building_Ubuntu_Binary_on_Precise_(12.04)
Detailed building instructions for OS X
---------------------------------------
@@ -27,7 +27,7 @@ Doxygen Documentation
Dependencies
------------
CMake 2.8.0 - http://www.cmake.org/
CMake 2.8.6 - http://www.cmake.org/
Qt 4.7.0 - http://qt.nokia.com/
QJson 0.7.1 - http://qjson.sourceforge.net/
SQLite 3.6.22 - http://www.sqlite.org/
@@ -38,14 +38,14 @@ Dependencies
The following dependencies are optional, but recommended:
Attica 0.2.0 - ftp://ftp.kde.org/pub/kde/stable/attica/
Jreen 1.0.1 - https://github.com/euroelessar/jreen
QTweetLib 0.3.0 - https://github.com/minimoog/QTweetLib
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
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/
QuaZip 0.4.3 - http://quazip.sourceforge.net/
Enjoy!

View File

@@ -1,6 +1,6 @@
#!/usr/bin/python
# This file is part of Clementine.
# This file is part of Tomahawk.
# It was inspired in large part by the macdeploy script in Clementine.
#
# Clementine is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -199,11 +199,10 @@ QT_PLUGINS = [
]
TOMAHAWK_PLUGINS = [
'libtomahawk_sipjabber.dylib',
'libtomahawk_sipgoogle.dylib',
'libtomahawk_siptwitter.dylib',
'libtomahawk_sipzeroconf.dylib',
'libtomahawk_qtweetlib.dylib',
'libtomahawk_account_xmpp.so',
'libtomahawk_account_google.so',
'libtomahawk_account_twitter.so',
'libtomahawk_account_zeroconf.so',
]
QT_PLUGINS_SEARCH_PATH=[
@@ -250,7 +249,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', 'PlugIns')
binary = os.path.join(bundle_dir, 'Contents', 'MacOS', bundle_name)
fixed_libraries = []
@@ -491,16 +490,11 @@ def FindVLCPlugin(name):
FixBinary(binary)
for plugin in VLC_PLUGINS:
FixVLCPlugin(FindVLCPlugin(plugin), '.')
FixVLCPlugin(FindVLCPlugin(plugin), '../Frameworks/vlc/plugins')
for plugin in TOMAHAWK_PLUGINS:
FixPlugin(plugin, '../MacOS')
try:
FixPlugin('spotify_tomahawkresolver', '../MacOS')
except:
print 'Failed to find spotify resolver'
try:
FixPlugin('tomahawk_crash_reporter', '../MacOS')
except:

View File

@@ -3,9 +3,12 @@ SET(MINGW_PREFIX "i686-w64-mingw32")
# this one is important
SET(CMAKE_SYSTEM_NAME Windows)
# specify the cross compiler
SET(CMAKE_C_COMPILER ccache ${MINGW_PREFIX}-gcc)
SET(CMAKE_C_FLAGS "-fno-keep-inline-dllexport")
SET(CMAKE_CXX_COMPILER ccache ${MINGW_PREFIX}-g++)
SET(CMAKE_CXX_FLAGS ${CMAKE_C_FLAGS})
SET(CMAKE_RC_COMPILER /usr/bin/${MINGW_PREFIX}-windres)
# where is the target environment containing libraries
@@ -15,13 +18,6 @@ SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
# libs with broken find modules
SET(TAGLIB_FOUND true)
SET(TAGLIB_LIBRARIES ${CMAKE_FIND_ROOT_PATH}/lib/libtag.dll.a)
SET(TAGLIB_INCLUDES ${CMAKE_FIND_ROOT_PATH}/include/taglib)
# configure qt variables
SET(QT_LIBRARY_DIR /usr/${MINGW_PREFIX}/bin)
SET(QT_PLUGINS_DIR ${CMAKE_FIND_ROOT_PATH}/lib/qt4/plugins/)
SET(QT_QTUITOOLS_LIBRARY_RELEASE ${CMAKE_FIND_ROOT_PATH}/lib/libQtUiTools.a)
SET(QT_QTUITOOLS_LIBRARY_DEBUG ${CMAKE_FIND_ROOT_PATH}/lib/libQtUiToolsd.a)
SET(QT_QTUITOOLS_LIBRARY ${QT_QTUITOOLS_LIBRARY_RELEASE})

View File

@@ -1,51 +1,52 @@
#!/bin/bash
mkdir -p vlc/
if [ "$1" = "-c" ] ; then
echo "Continuing last download.."
rm -rvf vlc/prefix/
rm -rvf vlc/
else
echo "Remove old vlc dir..."
rm -rvf vlc/*
echo "Update archive..."
fi
cd vlc/
rm -rvf vlc/
echo "Download phonon archive..."
#wget -c "http://downloads.sourceforge.net/project/vlc/1.1.9/win32/vlc-1.1.9-win32.7z?r=http%3A%2F%2Fwww.videolan.org%2Fvlc%2Fdownload-windows.html&ts=1306272584&use_mirror=leaseweb"
#wget -c "http://download.tomahawk-player.org/tomahawk-vlc-0.1.zip"
#wget -c http://people.videolan.org/~jb/phonon/phonon-vlc-last.7z
wget -c http://people.videolan.org/~jb/phonon/phonon_phonon-vlc_20111128.7z
# wget -c "http://downloads.sourceforge.net/project/vlc/1.1.9/win32/vlc-1.1.9-win32.7z?r=http%3A%2F%2Fwww.videolan.org%2Fvlc%2Fdownload-windows.html&ts=1306272584&use_mirror=leaseweb"
# wget -c "http://download.tomahawk-player.org/tomahawk-vlc-0.1.zip"
# wget -c http://people.videolan.org/~jb/phonon/phonon-vlc-last.7z
# wget -c http://people.videolan.org/~jb/phonon/phonon_phonon-vlc_20111128.7z
wget -c http://download.tomahawk-player.org/test/pvlc.tar.bz2
echo "Extract binary..."
7z x phonon*.7z
#mv -v vlc-*/ vlc/
#unzip tomahawk-vlc-0.1.zip
# 7z x phonon*.7z
# mv -v vlc-*/ vlc/
# unzip tomahawk-vlc-0.1.zip
tar xvjf pvlc.tar.bz2
echo "Download phonon_vlc_no_video.dll..."
wget -c http://people.videolan.org/~jb/phonon/phonon_vlc_no_video.dll
cp -v phonon_vlc_no_video.dll prefix/bin/phonon_backend/phonon_vlc.dll
# echo "Download phonon_vlc_no_video.dll..."
# wget -c http://people.videolan.org/~jb/phonon/phonon_vlc_no_video.dll
# cp -v phonon_vlc_no_video.dll prefix/bin/phonon_backend/phonon_vlc.dll
echo "Strip unneeded plugins from vlc/plugins..."
cd prefix/bin/plugins
rm -rvf libold* libvcd* libdvd* liblibass* libx264* libschroe* liblibmpeg2* \
libstream_out_* libmjpeg_plugin* libh264_plugin* libzvbi_plugin* lib*sub* \
*qt4* *skins2* libaccess_bd_plugin.dll \
libaudiobargraph_* libball_plugin.dll \
libdirac_plugin.dll \
libgnutls_plugin.dll \
libcaca_plugin.dll \
libfreetype_plugin.dll \
libaccess_output_shout_plugin.dll \
libremoteosd_plugin.dll \
libsdl_image_plugin.dll \
libvout_sdl_plugin.dll \
libpng_plugin.dll \
libgoom_plugin.dll \
libatmo_plugin.dll \
libmux_ts_plugin.dll \
libkate_plugin.dll \
libtaglib_plugin.dll
# echo "Strip unneeded plugins from vlc/plugins..."
# cd prefix/bin/plugins
# rm -rvf libold* libvcd* libdvd* liblibass* libx264* libschroe* liblibmpeg2* \
# libstream_out_* libmjpeg_plugin* libh264_plugin* libzvbi_plugin* lib*sub* \
# *qt4* *skins2* libaccess_bd_plugin.dll \
# libaudiobargraph_* libball_plugin.dll \
# libdirac_plugin.dll \
# libgnutls_plugin.dll \
# libcaca_plugin.dll \
# libfreetype_plugin.dll \
# libaccess_output_shout_plugin.dll \
# libremoteosd_plugin.dll \
# libsdl_image_plugin.dll \
# libvout_sdl_plugin.dll \
# libpng_plugin.dll \
# libgoom_plugin.dll \
# libatmo_plugin.dll \
# libmux_ts_plugin.dll \
# libkate_plugin.dll \
# libtaglib_plugin.dll
# this is for vlc-1.2

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 91 KiB

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 356 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.3 KiB

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 339 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 286 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

BIN
data/images/collection.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 68 KiB

BIN
data/images/grooveshark.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

BIN
data/images/jump-link.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

BIN
data/images/lastfm-icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 91 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 91 KiB

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 68 KiB

BIN
data/images/track-icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View File

@@ -0,0 +1,20 @@
-----BEGIN PUBLIC KEY-----
MIIDOzCCAi0GByqGSM44BAEwggIgAoIBAQDRltnNbKWFroVCsG1nTSdlTDmo7fjl
tgOuQ0YB2s0a1bcqgQ5YJRE59pFvF/z2pkHEHdyBA6USd9N7/T9lolwNcJoByJpO
MobUNs04elqZXliriaAdoSb2g6ZpxiedppbbyNP/BlK6o+zpyn0LVYXDI/OwJFzS
xjGXM+rBEWdUJnogZxV31gF9W3yD1Quz6icBulT9V/Soo6me9Mc60ooKSYj4Zgqd
3ln8tG90RFnWfbb0nbrITvR3ll6XXLfn081tjhymcXqHcgvaaqcmpKWL6ZWwX1mH
3t1pImnif/tSSZPG21KGE3FtuQ/+YFo19apQ6U6l8kaSFxqcDLAYzBy9AhUA/QfN
8WEIvzOEZ9uSWT7lYy64mUkCggEABsUmcs3kwjrmszIAAmPIowA0DBrxWZL03JBV
bDKT6tNHZaFFlCufVSjiL1EFZjRARC16OWYaDcElUsZYFMcsNIIa8LyDQaq6+SSm
quhMO5heeJiYPrutDiJzbJr0+HoY77Ll+Q4/cEkl0UAN4Ovp18WKwaq6GpHAvBnv
71LunLGAKsVb5joXBQ8In6zQkibJhgiBJwzLK90/j0OTiDaaOwM3PsAegORBVlVE
TAk4AQmawmF8nBGLzTyKXl83J571ku1Mm2JTl16jMYziKARKXYBmkcP1at0YddVK
WWpAwRKSxOucVJYfV58JqmjZqst8BBeH6esQKr5dklUvvDMaEwOCAQYAAoIBAQCw
5mo+8/R3S9cNYg9o8JNJGdSbMhSkurILHh9WNElsIC3RNtPcpijmAnWtXTVDhe6w
77wLj37tUuFGbsu2qPXtZoup35emf9DDshZ5w5UOclPaZ9HYjlC1H64c6d66Rllk
fY6FRDv9qVfjT84APbvMDrk6csJ5YHxFPDaqeQaFB0nxFiCMVwjEx+ZSvQNK1jJ2
o2gtuOvSPVSphsMeJ72DDNxO+SRRVnOmWaxg9rlmFuGle6Z+UJ2FItfmPEvhSBMY
hzndUbC7Wi4sIpBzbm9O5MiPYMv0VmN+0t1156EiC9uR4f7AKH2S94dnQob/YeY0
jMH+XxU/wzGUCmsOx1lx
-----END PUBLIC KEY-----

3819
lang/tomahawk_ar.ts Normal file

File diff suppressed because it is too large Load Diff

3848
lang/tomahawk_bg.ts Normal file

File diff suppressed because it is too large Load Diff

3838
lang/tomahawk_ca.ts Normal file

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

3843
lang/tomahawk_fr.ts Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,9 +1,14 @@
<!DOCTYPE RCC><RCC version="1.0">
<qresource prefix="/lang">
<file>tomahawk_en.qm</file>
<file>tomahawk_bg.qm</file>
<file>tomahawk_de.qm</file>
<file>tomahawk_sv.qm</file>
<file>tomahawk_es.qm</file>
<file>tomahawk_fr.qm</file>
<file>tomahawk_pl.qm</file>
<file>tomahawk_pt_BR.qm</file>
<file>tomahawk_ru.qm</file>
<file>tomahawk_es.qm</file>
<file>tomahawk_sv.qm</file>
<file>tomahawk_ja.qm</file>
</qresource>
</RCC>

3817
lang/tomahawk_ja.ts Normal file

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

3832
lang/tomahawk_ru.ts Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

3815
lang/tomahawk_tr.ts Normal file

File diff suppressed because it is too large Load Diff

3815
lang/tomahawk_zh_CN.ts Normal file

File diff suppressed because it is too large Load Diff

3816
lang/tomahawk_zh_TW.ts Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,5 @@
<RCC>
<qresource prefix="/">
<file>data/images/avatar-dude-plus.png</file>
<file>data/images/avatar-dude.png</file>
<file>data/images/back-pressed.png</file>
<file>data/images/back-rest.png</file>
<file>data/images/filter.png</file>
@@ -9,6 +7,8 @@
<file>data/images/not-loved.png</file>
<file>data/images/no-album-art-placeholder.png</file>
<file>data/images/no-artist-image-placeholder.png</file>
<file>data/images/artist-placeholder-grid.png</file>
<file>data/images/album-placeholder-grid.png</file>
<file>data/images/track-placeholder.png</file>
<file>data/images/now-playing-panel.png</file>
<file>data/images/now-playing-speaker.png</file>
@@ -66,12 +66,10 @@
<file>data/images/echonest_logo.png</file>
<file>data/images/loading-animation.gif</file>
<file>data/images/info.png</file>
<file>data/images/home.png</file>
<file>data/images/back.png</file>
<file>data/images/forward.png</file>
<file>data/images/music-icon.png</file>
<file>data/images/configure.png</file>
<file>data/images/create-playlist.png</file>
<file>data/images/private-listening.png</file>
<file>data/images/add.png</file>
<file>data/images/recently-played.png</file>
@@ -87,6 +85,7 @@
<file>data/images/station.png</file>
<file>data/images/new-additions.png</file>
<file>data/images/charts.png</file>
<file>data/images/new-releases.png</file>
<file>data/images/loved_playlist.png</file>
<file>data/images/dashboard.png</file>
<file>data/images/artist-icon.png</file>
@@ -133,6 +132,15 @@
<file>data/images/headphones-bigger.png</file>
<file>data/images/no-album-no-case.png</file>
<file>data/images/rdio.png</file>
<file>data/images/grooveshark.png</file>
<file>data/images/lastfm-icon.png</file>
<file>data/images/spotifycore-logo.png</file>
<file>data/images/playlist-header-tiled.png</file>
<file>data/images/share.png</file>
<file>data/sql/dbmigrate-27_to_28.sql</file>
<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>
</qresource>
</RCC>

784
src/AccountDelegate.cpp Normal file
View File

@@ -0,0 +1,784 @@
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
*
* Copyright 2011-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 "AccountDelegate.h"
#include <QApplication>
#include <QPainter>
#include <QMouseEvent>
#include "accounts/AccountModel.h"
#include "accounts/Account.h"
#include "accounts/AccountManager.h"
#include "utils/TomahawkUtils.h"
#include "utils/Logger.h"
#include "utils/AnimatedSpinner.h"
#include "utils/Closure.h"
#include "Source.h"
#define CHILD_ACCOUNT_HEIGHT 24
#define PADDING 4
#define PADDING_BETWEEN_STARS 2
#define STAR_SIZE 12
#ifdef Q_OS_MAC
#define ROW_HEIGHT_MULTIPLIER 4.9
#else
#define ROW_HEIGHT_MULTIPLIER 5.7
#endif
#define ICONSIZE 40
#define WRENCH_SIZE 24
#define SMALL_WRENCH_SIZE 16
#define STATUS_ICON_SIZE 13
#define CHECK_LEFT_EDGE 8
#define REMOVE_ICON_SIZE 12
using namespace Tomahawk;
using namespace Accounts;
AccountDelegate::AccountDelegate( QObject* parent )
: QStyledItemDelegate ( parent )
, m_accountRowHeight( -1 )
, m_model( 0 )
{
m_defaultCover.load( RESPATH "images/sipplugin-online.png" );
m_ratingStarPositive.load( RESPATH "images/starred.png" );
m_ratingStarNegative.load( RESPATH "images/star-unstarred.png" );
m_onHoverStar.load( RESPATH "images/star-hover.png" );
m_onlineIcon.load( RESPATH "images/sipplugin-online.png" );
m_offlineIcon.load( RESPATH "images/sipplugin-offline.png" );
m_removeIcon.load( RESPATH "images/list-remove.png" );
m_ratingStarPositive = m_ratingStarPositive.scaled( STAR_SIZE, STAR_SIZE, Qt::KeepAspectRatio, Qt::SmoothTransformation );
m_ratingStarNegative = m_ratingStarNegative.scaled( STAR_SIZE, STAR_SIZE, Qt::KeepAspectRatio, Qt::SmoothTransformation );
m_onlineIcon = m_onlineIcon.scaled( STATUS_ICON_SIZE, STATUS_ICON_SIZE, Qt::KeepAspectRatio, Qt::SmoothTransformation );
m_offlineIcon = m_offlineIcon.scaled( STATUS_ICON_SIZE, STATUS_ICON_SIZE, Qt::KeepAspectRatio, Qt::SmoothTransformation );
m_onHoverStar = m_onHoverStar.scaled( STAR_SIZE, STAR_SIZE, Qt::KeepAspectRatio, Qt::SmoothTransformation );
m_removeIcon = m_removeIcon.scaled( REMOVE_ICON_SIZE, REMOVE_ICON_SIZE, Qt::KeepAspectRatio, Qt::SmoothTransformation );
m_defaultCover = m_defaultCover.scaled( ICONSIZE, ICONSIZE, Qt::KeepAspectRatio, Qt::SmoothTransformation );
}
QSize
AccountDelegate::sizeHint( const QStyleOptionViewItem& option, const QModelIndex& index ) const
{
AccountModel::RowType rowType = static_cast< AccountModel::RowType >( index.data( AccountModel::RowTypeRole ).toInt() );
if ( m_accountRowHeight < 0 )
{
// Haven't calculated normal item height yet, do it once and save it
QStyleOptionViewItemV4 opt( option );
initStyleOption( &opt, index );
m_accountRowHeight = ROW_HEIGHT_MULTIPLIER * opt.fontMetrics.height();
}
if ( rowType == AccountModel::TopLevelAccount || rowType == AccountModel::UniqueFactory || rowType == AccountModel::CustomAccount )
{
return QSize( 200, m_accountRowHeight );
}
else if ( rowType == AccountModel::TopLevelFactory )
{
// Make more space for each account we have to show.
AccountFactory* fac = qobject_cast< AccountFactory* >( index.data( AccountModel::AccountData ).value< QObject* >() );
if ( fac->isUnique() )
return QSize( 200, m_accountRowHeight );
const QList< Account* > accts = index.data( AccountModel::ChildrenOfFactoryRole ).value< QList< Tomahawk::Accounts::Account* > >();
const QSize s = QSize( 200, m_accountRowHeight + 12 * accts.size()-1 );
if ( s != m_sizeHints[ index ] )
const_cast< AccountDelegate* >( this )->sizeHintChanged( index ); // FU KTHBBQ
m_sizeHints[ index ] = s;
return s;
}
return QSize();
}
void
AccountDelegate::paint ( QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index ) const
{
QStyleOptionViewItemV4 opt = option;
initStyleOption( &opt, index );
// draw the background
const QWidget* w = opt.widget;
QStyle* style = w ? w->style() : QApplication::style();
style->drawPrimitive( QStyle::PE_PanelItemViewItem, &opt, painter, w );
painter->setRenderHint( QPainter::Antialiasing );
if ( m_model == 0 || m_model != index.model() )
m_model = const_cast<QAbstractItemModel*>( index.model() );
QFont titleFont = opt.font;
titleFont.setBold( true );
titleFont.setPointSize( titleFont.pointSize() + 2 );
const QFontMetrics titleMetrics( titleFont );
QFont authorFont = opt.font;
authorFont.setItalic( true );
authorFont.setPointSize( authorFont.pointSize() - 1 );
#ifdef Q_OS_MAC
authorFont.setPointSize( authorFont.pointSize() - 1 );
#endif
const QFontMetrics authorMetrics( authorFont );
QFont descFont = authorFont;
descFont.setItalic( false );
const QFontMetrics descMetrics( descFont );
QFont installFont = opt.font;
installFont.setPointSize( installFont.pointSize() - 1 );
const QFontMetrics installMetrics( descFont );
const int height = opt.rect.height();
const int center = height / 2 + opt.rect.top();
// Left account enable/disable checkbox
const AccountModel::RowType rowType = static_cast< AccountModel::RowType >( index.data( AccountModel::RowTypeRole ).toInt() );
int leftEdge = PADDING;
// draw checkbox first
const int checkboxYPos = ( center ) - ( WRENCH_SIZE / 2 );
QRect checkRect = QRect( leftEdge, checkboxYPos, WRENCH_SIZE, WRENCH_SIZE );
QStyleOptionViewItemV4 opt2 = opt;
opt2.rect = checkRect;
if ( !m_loadingSpinners.contains( index ) )
{
drawCheckBox( opt2, painter, opt.widget );
}
else
{
Q_ASSERT( m_loadingSpinners[ index ] );
if ( m_loadingSpinners[ index ] )
{
const QPixmap pm = m_loadingSpinners[index]->pixmap();
painter->drawPixmap( checkRect, pm );
}
}
leftEdge += WRENCH_SIZE + PADDING / 2;
// Pixmap
QPixmap p = index.data( Qt::DecorationRole ).value< QPixmap >();
QRect pixmapRect( leftEdge + PADDING, center - ICONSIZE/2, ICONSIZE, ICONSIZE );
if ( p.isNull() ) // default image... TODO
p = m_defaultCover;
else
p = p.scaled( pixmapRect.size(), Qt::KeepAspectRatio, Qt::SmoothTransformation );
painter->drawPixmap( pixmapRect, p );
// Draw config wrench if there is one
const bool hasConfigWrench = index.data( AccountModel::HasConfig ).toBool();
int rightEdge = opt.rect.right();
m_cachedConfigRects[ index ] = QRect();
if ( hasConfigWrench )
{
const QRect confRect = QRect( rightEdge - 2*PADDING - WRENCH_SIZE, center - WRENCH_SIZE / 2, WRENCH_SIZE, WRENCH_SIZE );
QStyleOptionToolButton topt;
topt.rect = confRect;
topt.pos = confRect.topLeft();
drawConfigWrench( painter, opt, topt );
m_cachedConfigRects[ index ] = confRect;
rightEdge = confRect.left();
}
// Draw individual accounts and add account button for factories
m_cachedButtonRects[ index ] = QRect();
bool canDelete = index.data( AccountModel::CanDeleteRole ) .toBool();
if ( rowType == Tomahawk::Accounts::AccountModel::TopLevelFactory )
{
const QList< Account* > accts = index.data( AccountModel::ChildrenOfFactoryRole ).value< QList< Tomahawk::Accounts::Account* > >();
QRect btnRect;
const QString btnText = tr( "Add Account" );
const int btnWidth = installMetrics.width( btnText ) + 2*PADDING;
if ( accts.isEmpty() )
{
Q_ASSERT( !hasConfigWrench );
// Draw button in center of row
btnRect= QRect( opt.rect.right() - PADDING - btnWidth, center - ( installMetrics.height() + 4 ) / 2, btnWidth, installMetrics.height() + 2*PADDING );
rightEdge = btnRect.left();
}
else
{
painter->save();
painter->setFont( installFont );
rightEdge = drawAccountList( painter, opt, accts, rightEdge );
painter->restore();
btnRect = QRect( opt.rect.right() - PADDING - btnWidth, opt.rect.bottom() - installMetrics.height() - 3*PADDING, btnWidth, installMetrics.height() + 2*PADDING );
#ifdef Q_WS_MAC
btnRect.adjust( -4, 0, 4, 0 );
#endif
}
leftEdge = btnRect.left();
m_cachedButtonRects[ index ] = btnRect;
painter->save();
painter->setPen( opt.palette.color( QPalette::Active, QPalette::AlternateBase ) );
drawRoundedButton( painter, btnRect );
painter->setFont( installFont );
painter->drawText( btnRect, Qt::AlignCenter, btnText );
painter->restore();
}
else if ( rowType == AccountModel::UniqueFactory )
{
// Display as usual, except if it has an account, show the status.
const QList< Account* > accts = index.data( AccountModel::ChildrenOfFactoryRole ).value< QList< Tomahawk::Accounts::Account* > >();
if ( !accts.isEmpty() )
{
Q_ASSERT( accts.size() == 1 );
rightEdge = drawStatus( painter, QPointF( rightEdge, center - painter->fontMetrics().height()/2 ), accts.first(), true );
}
}
else if ( canDelete )
{
const QString btnText = tr( "Remove Account" );
const int btnWidth = installMetrics.width( btnText ) + 2*PADDING;
QRect btnRect;
if ( hasConfigWrench )
btnRect = QRect( opt.rect.right() - PADDING - btnWidth, opt.rect.bottom() - installMetrics.height() - 3*PADDING, btnWidth, installMetrics.height() + 2*PADDING );
else
btnRect = QRect( opt.rect.right() - PADDING - btnWidth, center - ( installMetrics.height() + 4 ) / 2, btnWidth, installMetrics.height() + 2*PADDING );
#ifdef Q_WS_MAC
btnRect.adjust( -4, 2, 4, -2 );
#endif
leftEdge = btnRect.left();
m_cachedButtonRects[ index ] = btnRect;
painter->save();
painter->setPen( opt.palette.color( QPalette::Active, QPalette::AlternateBase ) );
drawRoundedButton( painter, btnRect, true );
painter->setFont( installFont );
painter->drawText( btnRect, Qt::AlignCenter, btnText );
painter->restore();
}
// Draw the title and description
// title
QString title = index.data( Qt::DisplayRole ).toString();
const int rightTitleEdge = rightEdge - PADDING;
const int leftTitleEdge = pixmapRect.right() + PADDING;
painter->setFont( titleFont );
QRect textRect;
const bool canRate = index.data( AccountModel::CanRateRole ).toBool();
if ( canRate )
{
textRect = QRect( leftTitleEdge, opt.rect.top() + PADDING, rightTitleEdge - leftTitleEdge, painter->fontMetrics().height() );
}
else
{
textRect = QRect( leftTitleEdge, opt.rect.top() + PADDING, rightTitleEdge - leftTitleEdge, center - opt.rect.top() - PADDING );
}
painter->drawText( textRect, Qt::AlignVCenter | Qt::AlignLeft, title );
// author
QString author = index.data( AccountModel::AuthorRole ).toString();
int runningBottom = textRect.bottom();
if ( !author.isEmpty() && canRate )
{
painter->save();
painter->setFont( authorFont );
painter->setPen( QColor( Qt::gray ).darker( 150 ) );
const int authorWidth = authorMetrics.width( author );
const QRect authorRect( textRect.left(), textRect.bottom() + PADDING/2, authorWidth + 6, authorMetrics.height() );
painter->drawText( authorRect, Qt::AlignLeft | Qt::AlignVCenter, author );
painter->restore();
runningBottom = authorRect.bottom();
}
// description
QString desc = index.data( AccountModel::DescriptionRole ).toString();
const int descWidth = rightEdge - leftTitleEdge - PADDING;
painter->setFont( descFont );
const QRect descRect( leftTitleEdge, runningBottom + PADDING, descWidth, painter->fontMetrics().height() );
desc = painter->fontMetrics().elidedText( desc, Qt::ElideRight, descWidth );
painter->drawText( descRect, Qt::AlignLeft | Qt::TextWordWrap | Qt::AlignTop, desc );
runningBottom = descRect.bottom();
if ( index.data( AccountModel::CanRateRole ).toBool() )
{
// rating stars
const int rating = index.data( AccountModel::RatingRole ).toInt();
// int runningEdge = opt.rect.right() - 2*PADDING - ratingWidth;
int runningEdge = textRect.left();
// int starsTop = opt.rect.bottom() - 3*PADDING - m_ratingStarNegative.height();
int starsTop = runningBottom + PADDING;
for ( int i = 1; i < 6; i++ )
{
QRect r( runningEdge, starsTop, m_ratingStarPositive.width(), m_ratingStarPositive.height() );
// QRect r( runningEdge, opt.rect.top() + PADDING, m_ratingStarPositive.width(), m_ratingStarPositive.height() );
if ( i == 1 )
m_cachedStarRects[ index ] = r;
const bool userHasRated = index.data( AccountModel::UserHasRatedRole ).toBool();
if ( !userHasRated && // Show on-hover animation if the user hasn't rated it yet, and is hovering over it
m_hoveringOver > -1 &&
m_hoveringItem == index )
{
if ( i <= m_hoveringOver ) // positive star
painter->drawPixmap( r, m_onHoverStar );
else
painter->drawPixmap( r, m_ratingStarNegative );
}
else
{
if ( i <= rating ) // positive or rated star
{
if ( userHasRated )
painter->drawPixmap( r, m_onHoverStar );
else
painter->drawPixmap( r, m_ratingStarPositive );
}
else
painter->drawPixmap( r, m_ratingStarNegative );
}
runningEdge += m_ratingStarPositive.width() + PADDING_BETWEEN_STARS;
}
// downloaded num times
QString count = tr( "%1 downloads" ).arg( index.data( AccountModel::DownloadCounterRole ).toInt() );
painter->setFont( descFont );
const int countW = painter->fontMetrics().width( count );
const QRect countRect( runningEdge + 50, starsTop, countW, painter->fontMetrics().height() );
count = painter->fontMetrics().elidedText( count, Qt::ElideRight, rightEdge - PADDING - countRect.left() );
painter->drawText( countRect, Qt::AlignLeft | Qt::TextWordWrap, count );
// runningEdge = authorRect.x();
}
// Title and description!
return;
}
int
AccountDelegate::drawAccountList( QPainter* painter, QStyleOptionViewItemV4& opt, const QList< Account* > accts, int rightEdge ) const
{
// list each account name, and show the online, offline icon
const int textHeight = painter->fontMetrics().height() + 1;
const int mid = opt.rect.bottom() - opt.rect.height() / 2;
int runningRightEdge = rightEdge;
int current = 0;
int leftOfAccounts = rightEdge;
if ( accts.size() % 2 == 1 )
{
// If there's an odd number, the center one is centered
current = mid - ((textHeight + PADDING/2) * (accts.size()/2) ) - textHeight / 2;
}
else
{
// Even number, center between the middle ones
current = mid - ((textHeight + PADDING/2) * (accts.size()/2) );
}
for ( int i = 0; i < accts.size(); i++ )
{
// draw lightbulb and text
runningRightEdge = drawStatus( painter, QPointF( rightEdge - PADDING, current), accts.at( i ) );
const QString label = accts.at( i )->accountFriendlyName();
const QPoint textTopLeft( runningRightEdge - PADDING - painter->fontMetrics().width( label ), current);
painter->drawText( QRect( textTopLeft, QSize( painter->fontMetrics().width( label ) + 1, textHeight ) ), label );
current += textHeight + PADDING/2;
leftOfAccounts = qMin( leftOfAccounts, textTopLeft.x() );
}
return leftOfAccounts;
}
bool
AccountDelegate::editorEvent( QEvent* event, QAbstractItemModel* model, const QStyleOptionViewItem& option, const QModelIndex& index )
{
if ( event->type() != QEvent::MouseButtonPress &&
event->type() != QEvent::MouseButtonRelease &&
event->type() != QEvent::MouseButtonDblClick &&
event->type() != QEvent::MouseMove )
return false;
if ( event->type() == QEvent::MouseButtonPress )
{
// Show the config wrench as depressed on click
QMouseEvent* me = static_cast< QMouseEvent* >( event );
if ( me->button() == Qt::LeftButton && m_cachedConfigRects.contains( index ) && m_cachedConfigRects[ index ].contains( me->pos() ) )
{
m_configPressed = index;
const AccountModel::RowType rowType = static_cast< AccountModel::RowType >( index.data( AccountModel::RowTypeRole ).toInt() );
if ( rowType == AccountModel::TopLevelAccount ||
rowType == AccountModel::CustomAccount )
{
Account* acct = qobject_cast< Account* >( index.data( AccountModel::AccountData ).value< QObject* >() );
Q_ASSERT( acct ); // Should not be showing a config wrench if there is no account!
emit openConfig( acct );
}
else if ( rowType == AccountModel::TopLevelFactory )
{
AccountFactory* fac = qobject_cast< AccountFactory* >( index.data( AccountModel::AccountData ).value< QObject* >() );
Q_ASSERT( fac ); // Should not be showing a config wrench if there is no account!
emit openConfig( fac );
}
else if ( rowType == AccountModel::UniqueFactory )
{
const QList< Account* > accts = index.data( AccountModel::ChildrenOfFactoryRole ).value< QList< Tomahawk::Accounts::Account* > >();
Q_ASSERT( !accts.isEmpty() ); // If there's no account, why is there a config widget for this factory?
Q_ASSERT( accts.size() == 1 );
emit openConfig( accts.first() );
}
return true;
}
} else if ( event->type() == QEvent::MouseButtonRelease || event->type() == QEvent::MouseButtonDblClick )
{
QMouseEvent* me = static_cast< QMouseEvent* >( event );
if ( m_configPressed.isValid() )
emit update( m_configPressed );
m_configPressed = QModelIndex();
if ( checkRectForIndex( option, index ).contains( me->pos() ) )
{
// Check box for this row
// eat the double click events inside the check rect
if( event->type() == QEvent::MouseButtonDblClick ) {
return true;
}
Qt::CheckState curState = static_cast< Qt::CheckState >( index.data( Qt::CheckStateRole ).toInt() );
Qt::CheckState newState = curState == Qt::Checked ? Qt::Unchecked : Qt::Checked;
return model->setData( index, newState, AccountModel::CheckboxClickedRole );
}
else if ( m_cachedButtonRects.contains( index ) && m_cachedButtonRects[ index ].contains( me->pos() ) )
{
// Install/create/etc button for this row
model->setData( index, true, AccountModel::CustomButtonRole );
}
}
if ( m_cachedStarRects.contains( index ) )
{
QRect fullStars = m_cachedStarRects[ index ];
const int starsWidth = 5 * ( m_ratingStarPositive.width() + PADDING_BETWEEN_STARS );
fullStars.setWidth( starsWidth );
QMouseEvent* me = static_cast< QMouseEvent* >( event );
if ( fullStars.contains( me->pos() ) )
{
const int eachStar = starsWidth / 5;
const int clickOffset = me->pos().x() - fullStars.x();
const int whichStar = (clickOffset / eachStar) + 1;
if ( event->type() == QEvent::MouseButtonRelease )
{
model->setData( index, whichStar, AccountModel::RatingRole );
}
else if ( event->type() == QEvent::MouseMove )
{
// 0-indexed
m_hoveringOver = whichStar;
m_hoveringItem = index;
}
return true;
}
}
if ( m_hoveringOver > -1 )
{
emit update( m_hoveringItem );
m_hoveringOver = -1;
m_hoveringItem = QPersistentModelIndex();
}
return false;
}
void
AccountDelegate::drawRoundedButton( QPainter* painter, const QRect& btnRect, bool red ) const
{
QPainterPath btnPath;
const int radius = 3;
// draw top half gradient
const int btnCenter = btnRect.bottom() - ( btnRect.height() / 2 );
btnPath.moveTo( btnRect.left(), btnCenter );
btnPath.lineTo( btnRect.left(), btnRect.top() + radius );
btnPath.quadTo( QPoint( btnRect.topLeft() ), QPoint( btnRect.left() + radius, btnRect.top() ) );
btnPath.lineTo( btnRect.right() - radius, btnRect.top() );
btnPath.quadTo( QPoint( btnRect.topRight() ), QPoint( btnRect.right(), btnRect.top() + radius ) );
btnPath.lineTo( btnRect.right(),btnCenter );
btnPath.lineTo( btnRect.left(), btnCenter );
QLinearGradient g;
if ( !red )
{
g.setColorAt( 0, QColor(54, 127, 211) );
g.setColorAt( 0.5, QColor(43, 104, 182) );
}
else
{
g.setColorAt( 0, QColor(206, 63, 63) );
g.setColorAt( 0.5, QColor(170, 52, 52) );
}
//painter->setPen( bg.darker() );
painter->fillPath( btnPath, g );
//painter->drawPath( btnPath );
btnPath = QPainterPath();
btnPath.moveTo( btnRect.left(), btnCenter );
btnPath.lineTo( btnRect.left(), btnRect.bottom() - radius );
btnPath.quadTo( QPoint( btnRect.bottomLeft() ), QPoint( btnRect.left() + radius, btnRect.bottom() ) );
btnPath.lineTo( btnRect.right() - radius, btnRect.bottom() );
btnPath.quadTo( QPoint( btnRect.bottomRight() ), QPoint( btnRect.right(), btnRect.bottom() - radius ) );
btnPath.lineTo( btnRect.right(), btnCenter );
btnPath.lineTo( btnRect.left(), btnCenter );
if ( !red )
{
g.setColorAt( 0, QColor(34, 85, 159) );
g.setColorAt( 0.5, QColor(35, 79, 147) );
}
else
{
g.setColorAt( 0, QColor(150, 50, 50) );
g.setColorAt( 0.5, QColor(130, 40, 40) );
}
painter->fillPath( btnPath, g );
}
int
AccountDelegate::drawStatus( QPainter* painter, const QPointF& rightTopEdge, Account* acct, bool drawText ) const
{
QPixmap p;
QString statusText;
const Account::ConnectionState state = acct->connectionState();
if ( state == Account::Connected )
{
p = m_onlineIcon;
statusText = tr( "Online" );
}
else if ( state == Account::Connecting )
{
p = m_offlineIcon;
statusText = tr( "Connecting..." );
}
else
{
p = m_offlineIcon;
statusText = tr( "Offline" );
}
const int yPos = rightTopEdge.y();
const QRect connectIconRect( rightTopEdge.x() - STATUS_ICON_SIZE, yPos, STATUS_ICON_SIZE, STATUS_ICON_SIZE );
if ( state == Account::Connecting )
{
if ( !m_connectingSpinners.contains( acct ) )
{
AnimatedSpinner* anim = new AnimatedSpinner( connectIconRect.size(), true );
_detail::Closure* closure = new _detail::Closure( anim, SIGNAL( requestUpdate() ), const_cast<AccountDelegate*>(this), SLOT( doUpdateIndexWithAccount( Tomahawk::Accounts::Account* ) ), C_ARG( Tomahawk::Accounts::Account*, acct ) );
closure->setAutoDelete( false );
m_connectingSpinners[ acct ] = anim;
}
const QPixmap pm = m_connectingSpinners[acct]->pixmap();
painter->drawPixmap( connectIconRect, pm );
}
else
{
if ( m_connectingSpinners.contains( acct ) )
delete m_connectingSpinners.take( acct );
painter->drawPixmap( connectIconRect, p );
}
int leftEdge = connectIconRect.x();
if ( drawText )
{
int width = painter->fontMetrics().width( statusText );
int statusTextX = connectIconRect.x() - PADDING - width;
painter->drawText( QRect( statusTextX, yPos, width, painter->fontMetrics().height() ), statusText );
leftEdge = statusTextX;
}
return leftEdge;
}
void
AccountDelegate::drawCheckBox( QStyleOptionViewItemV4& opt, QPainter* p, const QWidget* w ) const
{
QStyle* style = w ? w->style() : QApplication::style();
opt.checkState == Qt::Checked ? opt.state |= QStyle::State_On : opt.state |= QStyle::State_Off;
style->drawPrimitive( QStyle::PE_IndicatorViewItemCheck, &opt, p, w );
}
void
AccountDelegate::drawConfigWrench ( QPainter* painter, QStyleOptionViewItemV4& opt, QStyleOptionToolButton& topt ) const
{
const QWidget* w = opt.widget;
QStyle* style = w ? w->style() : QApplication::style();
// draw it the same size as the check belox
topt.font = opt.font;
topt.icon = QIcon( RESPATH "images/configure.png" );
topt.iconSize = QSize( 14, 14 );
topt.subControls = QStyle::SC_ToolButton;
topt.activeSubControls = QStyle::SC_None;
topt.features = QStyleOptionToolButton::None;
bool pressed = ( m_configPressed == opt.index );
topt.state = pressed ? QStyle::State_On : QStyle::State_Raised;
if( opt.state & QStyle::State_MouseOver || pressed )
topt.state |= QStyle::State_HasFocus;
style->drawComplexControl( QStyle::CC_ToolButton, &topt, painter, w );
}
QRect
AccountDelegate::checkRectForIndex( const QStyleOptionViewItem& option, const QModelIndex& idx ) const
{
QStyleOptionViewItemV4 opt = option;
initStyleOption( &opt, idx );
// Top level item, return the corresponding rect
const int ypos = ( opt.rect.top() + opt.rect.height() / 2 ) - ( WRENCH_SIZE / 2 );
const QRect checkRect = QRect( PADDING, ypos, WRENCH_SIZE, WRENCH_SIZE );
return checkRect;
}
void
AccountDelegate::startInstalling( const QPersistentModelIndex& idx )
{
qDebug() << "START INSTALLING:" << idx.data( Qt::DisplayRole ).toString();
QStyleOptionViewItemV4 opt;
initStyleOption( &opt, idx );
AnimatedSpinner* anim = new AnimatedSpinner( checkRectForIndex( opt, idx ).size(), true );
_detail::Closure* closure = NewClosure( anim, SIGNAL( requestUpdate() ), this, SLOT( doUpdateIndex( const QPersistentModelIndex& ) ), idx );
closure->setAutoDelete( false );
m_loadingSpinners[ idx ] = anim;
update( idx );
}
void
AccountDelegate::doneInstalling ( const QPersistentModelIndex& idx )
{
qDebug() << "STOP INSTALLING:" << idx.data( Qt::DisplayRole ).toString();
Q_ASSERT( m_loadingSpinners.contains( idx ) );
if ( !m_loadingSpinners.contains( idx ) )
return;
delete m_loadingSpinners.take( idx );
update( idx );
}
void
AccountDelegate::errorInstalling( const QPersistentModelIndex& idx )
{
// Just hide the loading spinner as we do after a successful install
qDebug() << "ERROR INSTALLING index:" << idx;
doneInstalling( idx );
}
void
AccountDelegate::doUpdateIndex( const QPersistentModelIndex& idx )
{
emit update( idx );
}
void
AccountDelegate::doUpdateIndexWithAccount( Account* account )
{
// Urgh, have to go through the list and check based on the type
for ( int i = 0; i < m_model->rowCount(); i++ )
{
const QModelIndex index = m_model->index( i, 0, QModelIndex() );
const AccountModel::RowType rowType = static_cast< AccountModel::RowType >( index.data( AccountModel::RowTypeRole ).toInt() );
if ( rowType == AccountModel::TopLevelAccount ||
rowType == AccountModel::CustomAccount )
{
Account* acct = qobject_cast< Account* >( index.data( AccountModel::AccountData ).value< QObject* >() );
if ( account == acct )
{
emit update( index );
return;
}
}
else if ( rowType == AccountModel::TopLevelFactory || rowType == AccountModel::UniqueFactory )
{
const QList< Account* > accts = index.data( AccountModel::ChildrenOfFactoryRole ).value< QList< Tomahawk::Accounts::Account* > >();
if ( accts.contains( account ) )
{
emit update( index );
return;
}
}
}
}

90
src/AccountDelegate.h Normal file
View File

@@ -0,0 +1,90 @@
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
*
* Copyright 2011-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 ACCOUNTDELEGATE_H
#define ACCOUNTDELEGATE_H
#include <QStyledItemDelegate>
#include "accounts/AccountModel.h"
class AnimatedSpinner;
namespace Tomahawk
{
namespace Accounts
{
class Account;
class AccountDelegate : public QStyledItemDelegate
{
Q_OBJECT
public:
AccountDelegate( QObject* parent = 0);
virtual void paint ( QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index ) const;
virtual QSize sizeHint ( const QStyleOptionViewItem& option, const QModelIndex& index ) const;
public slots:
void startInstalling( const QPersistentModelIndex& idx );
void doneInstalling ( const QPersistentModelIndex& idx );
void errorInstalling ( const QPersistentModelIndex& idx );
void doUpdateIndex( const QPersistentModelIndex& idx );
protected:
virtual bool editorEvent( QEvent* event, QAbstractItemModel* model, const QStyleOptionViewItem& option, const QModelIndex& index );
signals:
void update( const QModelIndex& idx );
void openConfig( Tomahawk::Accounts::Account* );
void openConfig( Tomahawk::Accounts::AccountFactory* );
private slots:
void doUpdateIndexWithAccount( Tomahawk::Accounts::Account* account );
private:
void drawRoundedButton( QPainter* painter, const QRect& buttonRect, bool red = false ) const;
// Returns new left edge
int drawStatus( QPainter* painter, const QPointF& rightTopEdge, Account* acct, bool drawText = false ) const;
void drawCheckBox( QStyleOptionViewItemV4& opt, QPainter* p, const QWidget* w ) const;
void drawConfigWrench( QPainter* painter, QStyleOptionViewItemV4& option, QStyleOptionToolButton& topt ) const;
// returns new left edge
int drawAccountList( QPainter* painter, QStyleOptionViewItemV4& option, const QList< Account* > accounts, int rightEdge ) const;
QRect checkRectForIndex( const QStyleOptionViewItem &option, const QModelIndex &idx ) const;
QPixmap m_offlineIcon, m_onlineIcon, m_defaultCover, m_onHoverStar, m_ratingStarPositive, m_ratingStarNegative, m_removeIcon;
int m_hoveringOver;
QPersistentModelIndex m_hoveringItem, m_configPressed;
mutable QHash< QPersistentModelIndex, QRect > m_cachedButtonRects;
mutable QHash< QPersistentModelIndex, QRect > m_cachedStarRects;
mutable QHash< QPersistentModelIndex, QRect > m_cachedConfigRects;
mutable QHash< QPersistentModelIndex, QSize > m_sizeHints;
mutable QHash< QPersistentModelIndex, AnimatedSpinner* > m_loadingSpinners;
mutable QHash< Account*, AnimatedSpinner* > m_connectingSpinners;
mutable int m_accountRowHeight;
mutable QAbstractItemModel* m_model;
};
}
}
#endif // ACCOUNTDELEGATE_H

View File

@@ -0,0 +1,138 @@
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
*
* Copyright 2010-2011, Leo Franchi <lfranchi@kde.org>
*
* Tomahawk is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Tomahawk is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Tomahawk. If not, see <http://www.gnu.org/licenses/>.
*/
#include "AccountFactoryWrapper.h"
#include "accounts/Account.h"
#include "accounts/AccountManager.h"
#include "GuiHelpers.h"
#include "AccountFactoryWrapperDelegate.h"
#include "DelegateConfigWrapper.h"
#include "ui_AccountFactoryWrapper.h"
#include "Source.h"
using namespace Tomahawk::Accounts;
AccountFactoryWrapper::AccountFactoryWrapper( AccountFactory* factory, QWidget* parent )
: QDialog( parent, Qt::Sheet )
, m_factory( factory )
, m_ui( new Ui_AccountFactoryWrapper )
{
m_ui->setupUi( this );
setWindowTitle( factory->prettyName() );
m_ui->factoryIcon->setPixmap( factory->icon() );
m_ui->factoryDescription->setText( factory->description() );
m_addButton = m_ui->buttonBox->addButton( tr( "Add Account" ), QDialogButtonBox::ActionRole );
AccountFactoryWrapperDelegate* del = new AccountFactoryWrapperDelegate( m_ui->accountsList );
m_ui->accountsList->setItemDelegate( del );
connect( del, SIGNAL( openConfig( Tomahawk::Accounts::Account* ) ), this, SLOT( openAccountConfig( Tomahawk::Accounts::Account* ) ) );
connect( del, SIGNAL( removeAccount( Tomahawk::Accounts::Account* ) ), this, SLOT( removeAccount( Tomahawk::Accounts::Account* ) ) );
connect( del, SIGNAL( checkOrUncheck( QModelIndex, Tomahawk::Accounts::Account* , Qt::CheckState ) ), this, SLOT( accountCheckedOrUnchecked( QModelIndex ,Tomahawk::Accounts::Account* ,Qt::CheckState ) ) );
load();
connect( m_ui->buttonBox, SIGNAL( rejected() ), this, SLOT( reject() ) );
connect( m_ui->buttonBox, SIGNAL( accepted() ), this, SLOT( accept() ) );
connect( m_ui->buttonBox, SIGNAL( clicked( QAbstractButton*) ), this, SLOT( buttonClicked( QAbstractButton* ) ) );
connect ( AccountManager::instance(), SIGNAL( added( Tomahawk::Accounts::Account* ) ), this, SLOT( load() ) );
connect ( AccountManager::instance(), SIGNAL( removed( Tomahawk::Accounts::Account* ) ), this, SLOT( load() ) );
#ifdef Q_OS_MAC
setContentsMargins( 0, 0, 0, 0 );
m_ui->verticalLayout->setSpacing( 6 );
#endif
}
void
AccountFactoryWrapper::load()
{
m_ui->accountsList->clear();
foreach ( Account* acc, AccountManager::instance()->accounts() )
{
if ( AccountManager::instance()->factoryForAccount( acc ) == m_factory )
{
QTreeWidgetItem* item = new QTreeWidgetItem( m_ui->accountsList );
item->setData( 0, AccountRole, QVariant::fromValue< QObject *>( acc ) );
item->setCheckState( 0, acc->enabled() ? Qt::Checked : Qt::Unchecked );
}
}
if ( m_ui->accountsList->model()->rowCount() == 0 )
accept();
#ifndef Q_OS_MAC
const int padding = 7;
#else
const int padding = 8;
#endif
const int height = m_ui->accountsList->model()->rowCount( QModelIndex() ) * ACCOUNT_ROW_HEIGHT + padding;
m_ui->accountsList->setFixedHeight( height );
}
void
AccountFactoryWrapper::openAccountConfig( Account* account )
{
TomahawkUtils::openAccountConfig( account, this, false );
}
void
AccountFactoryWrapper::removeAccount( Tomahawk::Accounts::Account* acct )
{
AccountManager::instance()->removeAccount( acct );
load();
}
void
AccountFactoryWrapper::accountCheckedOrUnchecked( const QModelIndex& index, Account* acct, Qt::CheckState newstate )
{
QTreeWidgetItem* item = m_ui->accountsList->topLevelItem( index.row() );
Q_ASSERT( item );
if ( newstate == Qt::Checked )
{
item->setCheckState( 0, Qt::Checked );
AccountManager::instance()->enableAccount( acct );
}
else if ( newstate == Qt::Unchecked )
{
item->setCheckState( 0, Qt::Unchecked );
AccountManager::instance()->disableAccount( acct );
}
}
void
AccountFactoryWrapper::buttonClicked( QAbstractButton* button )
{
if ( button == m_addButton )
{
TomahawkUtils::createAccountFromFactory( m_factory, this );
}
else
reject();
}

View File

@@ -0,0 +1,62 @@
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
*
* Copyright 2010-2011, Leo Franchi <lfranchi@kde.org>
*
* Tomahawk is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Tomahawk is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Tomahawk. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef ACCOUNTFACTORYWRAPPER_H
#define ACCOUNTFACTORYWRAPPER_H
#include <QDialog>
#include <QModelIndex>
class QAbstractButton;
namespace Tomahawk {
namespace Accounts {
class AccountFactory;
class Account;
}
}
class Ui_AccountFactoryWrapper;
// class AccountFactoryWrapper_
class AccountFactoryWrapper : public QDialog
{
Q_OBJECT
public:
enum ExtraRoles {
AccountRole = Qt::UserRole + 140
};
explicit AccountFactoryWrapper( Tomahawk::Accounts::AccountFactory* factory, QWidget* parent = 0 );
virtual ~AccountFactoryWrapper() {}
public slots:
void openAccountConfig( Tomahawk::Accounts::Account* );
void removeAccount( Tomahawk::Accounts::Account* );
void accountCheckedOrUnchecked( const QModelIndex& , Tomahawk::Accounts::Account* , Qt::CheckState );
private slots:
void buttonClicked( QAbstractButton* );
void load();
private:
Tomahawk::Accounts::AccountFactory* m_factory;
Ui_AccountFactoryWrapper* m_ui;
QPushButton* m_addButton;
};
#endif // ACCOUNTFACTORYWRAPPER_H

View File

@@ -0,0 +1,110 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>AccountFactoryWrapper</class>
<widget class="QDialog" name="AccountFactoryWrapper">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>507</width>
<height>150</height>
</rect>
</property>
<property name="windowTitle">
<string>Dialog</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="factoryIcon">
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="factoryDescription">
<property name="text">
<string>Description goes here</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="Line" name="line">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item>
<widget class="QTreeWidget" name="accountsList">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="verticalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="autoScroll">
<bool>false</bool>
</property>
<property name="selectionMode">
<enum>QAbstractItemView::NoSelection</enum>
</property>
<property name="verticalScrollMode">
<enum>QAbstractItemView::ScrollPerItem</enum>
</property>
<property name="rootIsDecorated">
<bool>false</bool>
</property>
<property name="headerHidden">
<bool>true</bool>
</property>
<property name="expandsOnDoubleClick">
<bool>false</bool>
</property>
<column>
<property name="text">
<string notr="true">1</string>
</property>
</column>
</widget>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Close</set>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

View File

@@ -0,0 +1,187 @@
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
*
* Copyright 2010-2011, Leo Franchi <lfranchi@kde.org>
*
* Tomahawk is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Tomahawk is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Tomahawk. If not, see <http://www.gnu.org/licenses/>.
*/
#include "AccountFactoryWrapperDelegate.h"
#include "accounts/Account.h"
#include "AccountFactoryWrapper.h"
#include "utils/TomahawkUtils.h"
#include "Source.h"
#include <QApplication>
#include <QPainter>
#include <QMouseEvent>
using namespace Tomahawk::Accounts;
#define ICON_SIZE 15
#define CONFIG_WRENCH_SIZE 20
#define PADDING 4
AccountFactoryWrapperDelegate::AccountFactoryWrapperDelegate( QObject* parent )
: QStyledItemDelegate( parent )
{
m_removePixmap.load( RESPATH "images/list-remove.png" );
m_onlineIcon.load( RESPATH "images/sipplugin-online.png" );
m_offlineIcon.load( RESPATH "images/sipplugin-offline.png" );
m_removePixmap = m_removePixmap.scaled( ICON_SIZE, ICON_SIZE, Qt::KeepAspectRatio, Qt::SmoothTransformation );
m_onlineIcon = m_onlineIcon.scaled( ICON_SIZE, ICON_SIZE, Qt::KeepAspectRatio, Qt::SmoothTransformation );
m_offlineIcon = m_offlineIcon.scaled( ICON_SIZE, ICON_SIZE, Qt::KeepAspectRatio, Qt::SmoothTransformation );
m_configIcon.addFile( RESPATH "images/configure.png", QSize( CONFIG_WRENCH_SIZE - 8, CONFIG_WRENCH_SIZE - 8 ) );
}
void
AccountFactoryWrapperDelegate::paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const
{
QStyleOptionViewItemV4 opt = option;
initStyleOption( &opt, index );
const int center = opt.rect.height() / 2 + opt.rect.top();
const int topIcon = center - ICON_SIZE/2;
// draw the background
const QWidget* w = opt.widget;
QStyle* style = w ? w->style() : QApplication::style();
style->drawPrimitive( QStyle::PE_PanelItemViewItem, &opt, painter, w );
Account* acc = qobject_cast< Account* >( index.data( AccountFactoryWrapper::AccountRole ).value< QObject* >() );
Q_ASSERT( acc );
// Checkbox on left edge, then text
const QRect checkRect( PADDING/4, PADDING/4 + opt.rect.top(), opt.rect.height() - PADDING/4, opt.rect.height() - PADDING/4 );
m_cachedCheckRects[ index ] = checkRect;
QStyleOptionViewItemV4 opt2 = opt;
opt2.rect = checkRect;
opt.checkState == Qt::Checked ? opt2.state |= QStyle::State_On : opt2.state |= QStyle::State_Off;
style->drawPrimitive( QStyle::PE_IndicatorViewItemCheck, &opt2, painter, w );
// name on left
painter->drawText( opt.rect.adjusted( checkRect.right() + PADDING, PADDING, -PADDING, -PADDING ), Qt::AlignLeft | Qt::AlignVCenter, acc->accountFriendlyName() );
// remove, config, status on right
const QRect pmRect( opt.rect.right() - PADDING - m_removePixmap.width(), topIcon, ICON_SIZE, ICON_SIZE );
painter->drawPixmap( pmRect, m_removePixmap );
m_cachedButtonRects[ index ] = pmRect;
const QRect confRect( pmRect.left() - PADDING - CONFIG_WRENCH_SIZE, center - CONFIG_WRENCH_SIZE/2, CONFIG_WRENCH_SIZE, CONFIG_WRENCH_SIZE );
QStyleOptionToolButton topt;
topt.rect = confRect;
topt.pos = confRect.topLeft();
topt.font = opt.font;
topt.icon = m_configIcon;
topt.iconSize = QSize( CONFIG_WRENCH_SIZE - 8, CONFIG_WRENCH_SIZE - 8 );
topt.subControls = QStyle::SC_ToolButton;
topt.activeSubControls = QStyle::SC_None;
topt.features = QStyleOptionToolButton::None;
bool pressed = ( m_configPressed == opt.index );
topt.state = pressed ? QStyle::State_On : QStyle::State_Raised;
if( opt.state & QStyle::State_MouseOver || pressed )
topt.state |= QStyle::State_HasFocus;
style->drawComplexControl( QStyle::CC_ToolButton, &topt, painter, w );
m_cachedConfigRects[ index ] = confRect;
QPixmap p;
QString statusText;
Account::ConnectionState state = acc->connectionState();
if ( state == Account::Connected )
{
p = m_onlineIcon;
statusText = tr( "Online" );
}
else if ( state == Account::Connecting )
{
p = m_offlineIcon;
statusText = tr( "Connecting..." );
}
else
{
p = m_offlineIcon;
statusText = tr( "Offline" );
}
const QRect connectIconRect( confRect.left() - PADDING - ICON_SIZE, topIcon, ICON_SIZE, ICON_SIZE );
painter->drawPixmap( connectIconRect, p );
int width = painter->fontMetrics().width( statusText );
painter->drawText( QRect( connectIconRect.left() - PADDING - width, center - painter->fontMetrics().height()/2, width, painter->fontMetrics().height() ), statusText );
}
QSize
AccountFactoryWrapperDelegate::sizeHint(const QStyleOptionViewItem&, const QModelIndex&) const
{
return QSize( 200, ACCOUNT_ROW_HEIGHT );
}
bool
AccountFactoryWrapperDelegate::editorEvent( QEvent* event, QAbstractItemModel*, const QStyleOptionViewItem&, const QModelIndex& index )
{
if ( event->type() != QEvent::MouseButtonPress &&
event->type() != QEvent::MouseButtonRelease &&
event->type() != QEvent::MouseButtonDblClick &&
event->type() != QEvent::MouseMove )
return false;
if ( event->type() == QEvent::MouseButtonPress )
{
// Show the config wrench as depressed on click
QMouseEvent* me = static_cast< QMouseEvent* >( event );
if ( me->button() == Qt::LeftButton && m_cachedConfigRects.contains( index ) && m_cachedConfigRects[ index ].contains( me->pos() ) )
{
m_configPressed = index;
Account* acct = qobject_cast< Account* >( index.data( AccountFactoryWrapper::AccountRole ).value< QObject* >() );
Q_ASSERT( acct ); // Should not be showing a config wrench if there is no account!
emit openConfig( acct );
return true;
}
} else if ( event->type() == QEvent::MouseButtonRelease || event->type() == QEvent::MouseButtonDblClick )
{
QMouseEvent* me = static_cast< QMouseEvent* >( event );
if ( m_configPressed.isValid() )
emit update( m_configPressed );
m_configPressed = QModelIndex();
Account* acct = qobject_cast< Account* >( index.data( AccountFactoryWrapper::AccountRole ).value< QObject* >() );
if ( m_cachedCheckRects.contains( index ) && m_cachedCheckRects[ index ].contains( me->pos() ) )
{
// Check box for this row
// eat the double click events inside the check rect
if( event->type() == QEvent::MouseButtonDblClick ) {
return true;
}
Qt::CheckState curState = static_cast< Qt::CheckState >( index.data( Qt::CheckStateRole ).toInt() );
Qt::CheckState newState = curState == Qt::Checked ? Qt::Unchecked : Qt::Checked;
emit checkOrUncheck( index, acct, newState );
}
if ( m_cachedButtonRects.contains( index ) && m_cachedButtonRects[ index ].contains( me->pos() ) )
{
emit removeAccount( acct );
return true;
}
}
return false;
}

View File

@@ -0,0 +1,61 @@
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
*
* Copyright 2010-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 ACCOUNTFACTORYWRAPPERDELEGATE_H
#define ACCOUNTFACTORYWRAPPERDELEGATE_H
#include <QStyledItemDelegate>
#define ACCOUNT_ROW_HEIGHT 20
namespace Tomahawk {
namespace Accounts {
class Account;
}
}
class AccountFactoryWrapperDelegate : public QStyledItemDelegate
{
Q_OBJECT
public:
explicit AccountFactoryWrapperDelegate( QObject* parent = 0 );
virtual void paint( QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index ) const;
virtual QSize sizeHint( const QStyleOptionViewItem& option, const QModelIndex& index ) const;
virtual bool editorEvent(QEvent* event, QAbstractItemModel* model, const QStyleOptionViewItem& option, const QModelIndex& index);
signals:
void update( const QModelIndex& );
void openConfig( Tomahawk::Accounts::Account* );
void removeAccount( Tomahawk::Accounts::Account* );
void checkOrUncheck( const QModelIndex& row, Tomahawk::Accounts::Account* account, Qt::CheckState newState );
private:
QPixmap m_removePixmap, m_offlineIcon, m_onlineIcon;
QIcon m_configIcon;
QModelIndex m_configPressed;
mutable QHash< QPersistentModelIndex, QRect > m_cachedCheckRects;
mutable QHash< QPersistentModelIndex, QRect > m_cachedButtonRects;
mutable QHash< QPersistentModelIndex, QRect > m_cachedConfigRects;
};
#endif // ACCOUNTFACTORYWRAPPERDELEGATE_H

View File

@@ -1,6 +1,7 @@
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
*
* Copyright 2010-2011, Christian Muehlhaeuser <muesli@tomahawk-player.org>
* Copyright 2010-2011, Jeff Mitchell <jeff@tomahawk-player.org>
*
* Tomahawk is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -16,23 +17,24 @@
* along with Tomahawk. If not, see <http://www.gnu.org/licenses/>.
*/
#include "audiocontrols.h"
#include "ui_audiocontrols.h"
#include "AudioControls.h"
#include "ui_AudioControls.h"
#include <QtNetwork/QNetworkReply>
#include <QtGui/QDropEvent>
#include <QtGui/QMouseEvent>
#include "audio/audioengine.h"
#include "playlist/playlistview.h"
#include "database/database.h"
#include "widgets/imagebutton.h"
#include "utils/tomahawkutils.h"
#include "utils/logger.h"
#include "album.h"
#include "dropjob.h"
#include "globalactionmanager.h"
#include "viewmanager.h"
#include "audio/AudioEngine.h"
#include "playlist/PlaylistView.h"
#include "database/Database.h"
#include "widgets/ImageButton.h"
#include "utils/TomahawkUtils.h"
#include "utils/Logger.h"
#include "Album.h"
#include "DropJob.h"
#include "SocialWidget.h"
#include "GlobalActionManager.h"
#include "ViewManager.h"
using namespace Tomahawk;
@@ -40,9 +42,10 @@ using namespace Tomahawk;
AudioControls::AudioControls( QWidget* parent )
: QWidget( parent )
, ui( new Ui::AudioControls )
, m_repeatMode( PlaylistInterface::NoRepeat )
, m_repeatMode( PlaylistModes::NoRepeat )
, m_shuffled( false )
, m_lastSliderCheck( 0 )
, m_parent( parent )
{
ui->setupUi( this );
setAcceptDrops( true );
@@ -81,6 +84,7 @@ AudioControls::AudioControls( QWidget* parent )
ui->repeatButton->setPixmap( RESPATH "images/repeat-off-pressed.png", QIcon::Off, QIcon::Active );
ui->volumeLowButton->setPixmap( RESPATH "images/volume-icon-muted.png" );
ui->volumeHighButton->setPixmap( RESPATH "images/volume-icon-full.png" );
ui->socialButton->setPixmap( RESPATH "images/share.png" );
ui->loveButton->setPixmap( RESPATH "images/not-loved.png" );
ui->loveButton->setCheckable( true );
@@ -92,16 +96,12 @@ AudioControls::AudioControls( QWidget* parent )
ui->metaDataArea->setStyleSheet( "QWidget#metaDataArea {\nborder-width: 4px;\nborder-image: url(" RESPATH "images/now-playing-panel.png) 4 4 4 4 stretch stretch; }" );
ui->seekSlider->setEnabled( true );
ui->seekSlider->setTimeLine( &m_sliderTimeLine );
ui->volumeSlider->setRange( 0, 100 );
ui->volumeSlider->setValue( AudioEngine::instance()->volume() );
m_phononTickCheckTimer.setSingleShot( true );
m_sliderTimeLine.setCurveShape( QTimeLine::LinearCurve );
ui->seekSlider->setTimeLine( &m_sliderTimeLine );
m_defaultCover = QPixmap( RESPATH "images/no-album-no-case.png" ).scaled( ui->coverImage->size(), Qt::IgnoreAspectRatio, Qt::SmoothTransformation );
connect( &m_phononTickCheckTimer, SIGNAL( timeout() ), SLOT( phononTickCheckTimeout() ) );
connect( &m_sliderTimeLine, SIGNAL( frameChanged( int ) ), ui->seekSlider, SLOT( setValue( int ) ) );
@@ -121,8 +121,9 @@ AudioControls::AudioControls( QWidget* parent )
connect( ui->shuffleButton, SIGNAL( clicked() ), SLOT( onShuffleClicked() ) );
connect( ui->artistTrackLabel, SIGNAL( clickedArtist() ), SLOT( onArtistClicked() ) );
connect( ui->artistTrackLabel, SIGNAL( clickedTrack() ), SLOT( onTrackClicked() ) );
connect( ui->albumLabel, SIGNAL( clickedAlbum() ), SLOT( onAlbumClicked() ) );
connect( ui->artistTrackLabel, SIGNAL( clickedTrack() ), SLOT( onTrackClicked() ) );
connect( ui->albumLabel, SIGNAL( clickedAlbum() ), SLOT( onAlbumClicked() ) );
connect( ui->socialButton, SIGNAL( clicked() ), SLOT( onSocialButtonClicked() ) );
connect( ui->loveButton, SIGNAL( clicked( bool ) ), SLOT( onLoveButtonClicked( bool ) ) );
// <From AudioEngine>
@@ -201,17 +202,22 @@ AudioControls::onPlaybackStarted( const Tomahawk::result_ptr& result )
ui->seekSlider->setRange( 0, duration );
ui->seekSlider->setValue( 0 );
ui->seekSlider->setEnabled( AudioEngine::instance()->canSeek() );
m_phononTickCheckTimer.stop();
m_sliderTimeLine.stop();
m_sliderTimeLine.setDuration( duration );
m_sliderTimeLine.setFrameRange( 0, duration );
m_sliderTimeLine.setCurveShape( QTimeLine::LinearCurve );
m_sliderTimeLine.setCurrentTime( 0 );
m_seekMsecs = -1;
ui->seekSlider->setVisible( true );
int updateRate = (double)1000 / ( (double)ui->seekSlider->contentsRect().width() / (double)( duration / 1000 ) );
m_sliderTimeLine.setUpdateInterval( qBound( 40, updateRate, 500 ) );
m_noTimeChange = false;
m_lastSliderCheck = 0;
}
@@ -222,12 +228,12 @@ AudioControls::onPlaybackLoading( const Tomahawk::result_ptr& result )
{
if ( !m_currentTrack.isNull() )
{
disconnect( m_currentTrack->album().data(), SIGNAL( updated() ), this, SLOT( onAlbumCoverUpdated() ) );
disconnect( m_currentTrack->toQuery().data(), SIGNAL( updated() ), this, SLOT( onCoverUpdated() ) );
disconnect( m_currentTrack->toQuery().data(), SIGNAL( socialActionsLoaded() ), this, SLOT( onSocialActionsLoaded() ) );
}
m_currentTrack = result;
connect( m_currentTrack->album().data(), SIGNAL( updated() ), SLOT( onAlbumCoverUpdated() ) );
connect( m_currentTrack->toQuery().data(), SIGNAL( updated() ), SLOT( onCoverUpdated() ) );
connect( m_currentTrack->toQuery().data(), SIGNAL( socialActionsLoaded() ), SLOT( onSocialActionsLoaded() ) );
ui->artistTrackLabel->setResult( result );
@@ -239,39 +245,42 @@ AudioControls::onPlaybackLoading( const Tomahawk::result_ptr& result )
ui->timeLabel->setText( TomahawkUtils::timeToString( 0 ) );
ui->timeLeftLabel->setFixedWidth( ui->timeLeftLabel->fontMetrics().width( QString( duration.length() + 1, QChar( '0' ) ) ) );
ui->timeLeftLabel->setText( "-" + duration );
m_lastTextSecondShown = 0;
ui->stackedLayout->setCurrentWidget( ui->pauseButton );
ui->loveButton->setEnabled( true );
ui->loveButton->setVisible( true );
ui->socialButton->setEnabled( true );
ui->socialButton->setVisible( true );
setAlbumCover();
setCover();
setSocialActions();
}
void
AudioControls::onAlbumCoverUpdated()
AudioControls::onCoverUpdated()
{
Album* album = qobject_cast< Album* >( sender() );
if ( !album || album != m_currentTrack->album().data() )
Query* query = qobject_cast< Query* >( sender() );
if ( !query || !m_currentTrack || query != m_currentTrack->toQuery().data() )
return;
setAlbumCover();
setCover();
}
void
AudioControls::setAlbumCover()
AudioControls::setCover()
{
if ( !m_currentTrack->album()->cover().isNull() )
if ( !m_currentTrack->toQuery()->cover( ui->coverImage->size() ).isNull() )
{
QPixmap cover;
cover.loadFromData( m_currentTrack->album()->cover() );
ui->coverImage->setPixmap( cover.scaled( ui->coverImage->size(), Qt::IgnoreAspectRatio, Qt::SmoothTransformation ) );
cover = m_currentTrack->toQuery()->cover( ui->coverImage->size() );
ui->coverImage->setPixmap( cover, false );
}
else
ui->coverImage->setPixmap( m_defaultCover );
ui->coverImage->setPixmap( TomahawkUtils::defaultPixmap( TomahawkUtils::DefaultAlbumCover, TomahawkUtils::ScaledCover, ui->coverImage->size() ), true );
}
@@ -279,7 +288,7 @@ void
AudioControls::onSocialActionsLoaded()
{
Query* query = qobject_cast< Query* >( sender() );
if ( !query || query != m_currentTrack->toQuery().data() )
if ( !query || !m_currentTrack || !query->equals( m_currentTrack->toQuery() ) )
return;
setSocialActions();
@@ -316,7 +325,6 @@ AudioControls::onPlaybackResumed()
{
tDebug( LOGEXTRA ) << Q_FUNC_INFO;
ui->stackedLayout->setCurrentWidget( ui->pauseButton );
ui->loveButton->setVisible( true );
m_sliderTimeLine.resume();
}
@@ -343,7 +351,7 @@ AudioControls::onPlaybackStopped()
ui->ownerLabel->setText( "" );
ui->timeLabel->setText( "" );
ui->timeLeftLabel->setText( "" );
ui->coverImage->setPixmap( QPixmap() );
ui->coverImage->setPixmap( QPixmap(), true );
ui->seekSlider->setVisible( false );
m_sliderTimeLine.stop();
m_sliderTimeLine.setCurrentTime( 0 );
@@ -351,12 +359,22 @@ AudioControls::onPlaybackStopped()
ui->stackedLayout->setCurrentWidget( ui->playPauseButton );
ui->loveButton->setEnabled( false );
ui->loveButton->setVisible( false );
ui->socialButton->setEnabled( false );
ui->socialButton->setVisible( false );
}
void
AudioControls::onPlaybackTimer( qint64 msElapsed )
{
const int seconds = msElapsed / 1000;
if ( seconds != m_lastTextSecondShown && !m_currentTrack.isNull() )
{
ui->timeLabel->setText( TomahawkUtils::timeToString( seconds ) );
ui->timeLeftLabel->setText( "-" + TomahawkUtils::timeToString( m_currentTrack->duration() - seconds ) );
m_lastTextSecondShown = seconds;
}
//tDebug( LOGEXTRA ) << Q_FUNC_INFO << "msElapsed =" << msElapsed << "and timer current time =" << m_sliderTimeLine.currentTime() << "and m_seekMsecs =" << m_seekMsecs;
if ( msElapsed > 0 && msElapsed != m_lastSliderCheck && m_seekMsecs == -1 && msElapsed - 500 < m_lastSliderCheck )
return;
@@ -373,13 +391,10 @@ AudioControls::onPlaybackTimer( qint64 msElapsed )
if ( sender() != &m_phononTickCheckTimer )
m_phononTickCheckTimer.start( 1000 );
const int seconds = msElapsed / 1000;
ui->timeLabel->setText( TomahawkUtils::timeToString( seconds ) );
ui->timeLeftLabel->setText( "-" + TomahawkUtils::timeToString( m_currentTrack->duration() - seconds ) );
int currentTime = m_sliderTimeLine.currentTime();
if ( m_noTimeChange )
{
if ( m_sliderTimeLine.currentTime() != msElapsed )
if ( currentTime != msElapsed )
{
m_sliderTimeLine.setPaused( true );
m_noTimeChange = false;
@@ -388,12 +403,12 @@ AudioControls::onPlaybackTimer( qint64 msElapsed )
m_sliderTimeLine.resume();
}
}
else if ( m_sliderTimeLine.currentTime() >= msElapsed || m_seekMsecs != -1 )
else if ( currentTime >= msElapsed || m_seekMsecs != -1 )
{
m_sliderTimeLine.setPaused( true );
m_noTimeChange = false;
if ( m_sliderTimeLine.currentTime() == msElapsed )
if ( currentTime == msElapsed )
m_noTimeChange = true;
m_sliderTimeLine.setCurrentTime( msElapsed );
@@ -403,12 +418,10 @@ AudioControls::onPlaybackTimer( qint64 msElapsed )
}
else if ( m_sliderTimeLine.duration() > msElapsed && m_sliderTimeLine.state() == QTimeLine::NotRunning && AudioEngine::instance()->state() == AudioEngine::Playing )
{
ui->seekSlider->setEnabled( AudioEngine::instance()->canSeek() );
m_sliderTimeLine.start();
}
else if ( m_sliderTimeLine.state() == QTimeLine::Paused && AudioEngine::instance()->state() != AudioEngine::Paused )
{
ui->seekSlider->setEnabled( AudioEngine::instance()->canSeek() );
m_sliderTimeLine.resume();
}
@@ -417,13 +430,13 @@ AudioControls::onPlaybackTimer( qint64 msElapsed )
void
AudioControls::onRepeatModeChanged( PlaylistInterface::RepeatMode mode )
AudioControls::onRepeatModeChanged( PlaylistModes::RepeatMode mode )
{
m_repeatMode = mode;
switch ( m_repeatMode )
{
case PlaylistInterface::NoRepeat:
case PlaylistModes::NoRepeat:
{
// switch to RepeatOne
ui->repeatButton->setPixmap( RESPATH "images/repeat-off-rest.png" );
@@ -431,7 +444,7 @@ AudioControls::onRepeatModeChanged( PlaylistInterface::RepeatMode mode )
}
break;
case PlaylistInterface::RepeatOne:
case PlaylistModes::RepeatOne:
{
// switch to RepeatAll
ui->repeatButton->setPixmap( RESPATH "images/repeat-1-on-rest.png" );
@@ -439,7 +452,7 @@ AudioControls::onRepeatModeChanged( PlaylistInterface::RepeatMode mode )
}
break;
case PlaylistInterface::RepeatAll:
case PlaylistModes::RepeatAll:
{
// switch to NoRepeat
ui->repeatButton->setPixmap( RESPATH "images/repeat-all-on-rest.png" );
@@ -458,24 +471,24 @@ AudioControls::onRepeatClicked()
{
switch ( m_repeatMode )
{
case PlaylistInterface::NoRepeat:
case PlaylistModes::NoRepeat:
{
// switch to RepeatOne
ViewManager::instance()->setRepeatMode( PlaylistInterface::RepeatOne );
ViewManager::instance()->setRepeatMode( PlaylistModes::RepeatOne );
}
break;
case PlaylistInterface::RepeatOne:
case PlaylistModes::RepeatOne:
{
// switch to RepeatAll
ViewManager::instance()->setRepeatMode( PlaylistInterface::RepeatAll );
ViewManager::instance()->setRepeatMode( PlaylistModes::RepeatAll );
}
break;
case PlaylistInterface::RepeatAll:
case PlaylistModes::RepeatAll:
{
// switch to NoRepeat
ViewManager::instance()->setRepeatMode( PlaylistInterface::NoRepeat );
ViewManager::instance()->setRepeatMode( PlaylistModes::NoRepeat );
}
break;
@@ -531,7 +544,8 @@ AudioControls::onAlbumClicked()
void
AudioControls::onTrackClicked()
{
ViewManager::instance()->showCurrentTrack();
ViewManager::instance()->show( m_currentTrack->toQuery() );
// ViewManager::instance()->showCurrentTrack();
}
@@ -574,16 +588,21 @@ AudioControls::droppedTracks( QList< query_ptr > tracks )
{
// queue and play the first no matter what
GlobalActionManager::instance()->handlePlayTrack( tracks.first() );
// just queue the rest
for ( int i = 1; i < tracks.size(); i++ )
{
ViewManager::instance()->queue()->model()->append( tracks[ i ] );
}
ViewManager::instance()->queue()->model()->append( tracks );
}
}
void
AudioControls::onSocialButtonClicked()
{
SocialWidget* sw = new SocialWidget( m_parent );
sw->setPosition( QCursor::pos() );
sw->setQuery( m_currentTrack->toQuery() );
sw->show();
}
void
AudioControls::onLoveButtonClicked( bool checked )
{

View File

@@ -1,6 +1,7 @@
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
*
* Copyright 2010-2011, Christian Muehlhaeuser <muesli@tomahawk-player.org>
* Copyright 2010-2011, Jeff Mitchell <jeff@tomahawk-player.org>
*
* Tomahawk is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -23,9 +24,9 @@
#include <QtCore/QTimer>
#include <QtCore/QTimeLine>
#include "result.h"
#include "playlistinterface.h"
#include "query.h"
#include "Result.h"
#include "PlaylistInterface.h"
#include "Query.h"
class QDropEvent;
class QDragEnterEvent;
@@ -49,9 +50,9 @@ signals:
void pausePressed();
public slots:
void onRepeatModeChanged( Tomahawk::PlaylistInterface::RepeatMode mode );
void onRepeatModeChanged( Tomahawk::PlaylistModes::RepeatMode mode );
void onShuffleModeChanged( bool enabled );
protected:
void changeEvent( QEvent* e );
void dragEnterEvent ( QDragEnterEvent* );
@@ -60,7 +61,7 @@ protected:
private slots:
void phononTickCheckTimeout();
void onPlaybackStarted( const Tomahawk::result_ptr& result );
void onPlaybackLoading( const Tomahawk::result_ptr& result );
void onPlaybackPaused();
@@ -77,24 +78,22 @@ private slots:
void onArtistClicked();
void onAlbumClicked();
void onTrackClicked();
void onSocialButtonClicked();
void onLoveButtonClicked( bool );
void onAlbumCoverUpdated();
void droppedTracks( QList<Tomahawk::query_ptr> );
void onCoverUpdated();
void onSocialActionsLoaded();
private:
void setAlbumCover();
void setCover();
void setSocialActions();
Ui::AudioControls *ui;
QPixmap m_defaultCover;
Ui::AudioControls* ui;
Tomahawk::result_ptr m_currentTrack;
Tomahawk::PlaylistInterface::RepeatMode m_repeatMode;
Tomahawk::PlaylistModes::RepeatMode m_repeatMode;
bool m_shuffled;
QTimer m_phononTickCheckTimer;
@@ -102,6 +101,9 @@ private:
qint64 m_seekMsecs;
qint64 m_lastSliderCheck;
bool m_noTimeChange;
qint64 m_lastTextSecondShown;
QWidget* m_parent;
};
#endif // AUDIOCONTROLS_H

View File

@@ -142,7 +142,7 @@
<number>0</number>
</property>
<item>
<widget class="QLabel" name="coverImage">
<widget class="FadingPixmap" name="coverImage">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
@@ -151,14 +151,14 @@
</property>
<property name="minimumSize">
<size>
<width>58</width>
<height>58</height>
<width>60</width>
<height>60</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>58</width>
<height>58</height>
<width>60</width>
<height>60</height>
</size>
</property>
<property name="alignment">
@@ -287,6 +287,22 @@
</property>
</spacer>
</item>
<item>
<widget class="ImageButton" name="socialButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="cursor">
<cursorShape>PointingHandCursor</cursorShape>
</property>
<property name="text">
<string>social</string>
</property>
</widget>
</item>
<item>
<widget class="ImageButton" name="loveButton">
<property name="sizePolicy">
@@ -554,12 +570,17 @@
<customwidget>
<class>ImageButton</class>
<extends>QPushButton</extends>
<header>widgets/imagebutton.h</header>
<header>widgets/ImageButton.h</header>
</customwidget>
<customwidget>
<class>QueryLabel</class>
<extends>QLabel</extends>
<header>widgets/querylabel.h</header>
<header>widgets/QueryLabel.h</header>
</customwidget>
<customwidget>
<class>FadingPixmap</class>
<extends>QLabel</extends>
<header>widgets/FadingPixmap.h</header>
</customwidget>
</customwidgets>
<resources/>

View File

@@ -58,4 +58,7 @@ if (APPLE)
FILE(COPY ${CMAKE_SOURCE_DIR}/admin/mac/sparkle_pub.pem
DESTINATION "${CMAKE_BINARY_DIR}/tomahawk.app/Contents/Resources")
FILE(COPY /usr/bin/SetFile DESTINATION "${CMAKE_BINARY_DIR}/tomahawk.app/Contents/MacOS")
FILE(COPY /usr/bin/GetFileInfo DESTINATION "${CMAKE_BINARY_DIR}/tomahawk.app/Contents/MacOS")
endif (APPLE)

View File

@@ -37,115 +37,78 @@ ENDIF()
#ENDFOREACH( moddir )
SET( tomahawkSources ${tomahawkSources}
web/api_v1.cpp
web/Api_v1.cpp
musicscanner.cpp
shortcuthandler.cpp
scanmanager.cpp
ubuntuunityhack.cpp
tomahawkapp.cpp
MusicScanner.cpp
ShortcutHandler.cpp
ScanManager.cpp
UbuntuUnityHack.cpp
TomahawkApp.cpp
main.cpp
)
IF(LIBLASTFM_FOUND)
SET(tomahawkSources ${tomahawkSources}
scrobbler.cpp
Scrobbler.cpp
)
ENDIF(LIBLASTFM_FOUND)
SET( tomahawkSourcesGui ${tomahawkSourcesGui}
sourcetree/sourcesmodel.cpp
sourcetree/sourcesproxymodel.cpp
sourcetree/sourcetreeview.cpp
sourcetree/sourcedelegate.cpp
sourcetree/animationhelper.cpp
sourcetree/items/sourcetreeitem.cpp
sourcetree/items/sourceitem.cpp
sourcetree/items/playlistitems.cpp
sourcetree/items/categoryitems.cpp
sourcetree/items/genericpageitems.cpp
sourcetree/items/temporarypageitem.cpp
sourcetree/items/groupitem.cpp
sourcetree/items/historyitem.cpp
sourcetree/SourcesModel.cpp
sourcetree/SourcesProxyModel.cpp
sourcetree/SourceTreeView.cpp
sourcetree/SourceDelegate.cpp
sourcetree/AnimationHelper.cpp
sourcetree/items/SourceTreeItem.cpp
sourcetree/items/SourceItem.cpp
sourcetree/items/PlaylistItems.cpp
sourcetree/items/CategoryItems.cpp
sourcetree/items/GenericPageItems.cpp
sourcetree/items/TemporaryPageItem.cpp
sourcetree/items/GroupItem.cpp
sourcetree/items/HistoryItem.cpp
breakpad/BreakPad.cpp
utils/GuiHelpers.cpp
tomahawktrayicon.cpp
audiocontrols.cpp
settingsdialog.cpp
diagnosticsdialog.cpp
configdelegatebase.cpp
sipconfigdelegate.cpp
resolverconfigdelegate.cpp
settingslistdelegate.cpp
resolversmodel.cpp
tomahawkwindow.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
)
SET( tomahawkHeaders ${tomahawkHeaders}
tomahawkapp.h
web/api_v1.h
musicscanner.h
scanmanager.h
ubuntuunityhack.h
shortcuthandler.h
)
IF(LIBLASTFM_FOUND)
SET(tomahawkHeaders ${tomahawkHeaders}
scrobbler.h
)
ENDIF(LIBLASTFM_FOUND)
IF(LIBATTICA_FOUND)
SET( tomahawkSourcesGui ${tomahawkSourcesGui} GetNewStuffDialog.cpp GetNewStuffDelegate.cpp GetNewStuffModel.cpp )
SET( tomahawkHeadersGui ${tomahawkHeadersGui} GetNewStuffDialog.h GetNewStuffDelegate.h GetNewStuffModel.h )
INCLUDE_DIRECTORIES( ${LIBATTICA_INCLUDE_DIR} )
ENDIF(LIBATTICA_FOUND)
SET( tomahawkHeadersGui ${tomahawkHeadersGui}
sourcetree/sourcesmodel.h
sourcetree/sourcesproxymodel.h
sourcetree/sourcetreeview.h
sourcetree/sourcedelegate.h
sourcetree/animationhelper.h
sourcetree/items/sourcetreeitem.h
sourcetree/items/sourceitem.h
sourcetree/items/playlistitems.h
sourcetree/items/categoryitems.h
sourcetree/items/genericpageitems.h
sourcetree/items/temporarypageitem.h
sourcetree/items/groupitem.h
sourcetree/items/historyitem.h
tomahawktrayicon.h
audiocontrols.h
settingsdialog.h
diagnosticsdialog.h
configdelegatebase.h
resolverconfigdelegate.h
sipconfigdelegate.h
settingslistdelegate.h
resolversmodel.h
delegateconfigwrapper.h
tomahawkwindow.h
LoadXSPFDialog.h
)
IF( WITH_BREAKPAD )
LIST(APPEND tomahawkSourcesGui breakpad/BreakPad.cpp)
ENDIF()
SET( tomahawkUI ${tomahawkUI}
tomahawkwindow.ui
diagnosticsdialog.ui
stackedsettingsdialog.ui
proxydialog.ui
TomahawkWindow.ui
DiagnosticsDialog.ui
StackedSettingsDialog.ui
ProxyDialog.ui
audiocontrols.ui
accounts/lastfm/LastFmConfig.ui
accounts/spotify/SpotifyAccountConfig.ui
GetNewStuffDialog.ui
AudioControls.ui
LoadXSPFDialog.ui
AccountFactoryWrapper.ui
SocialWidget.ui
)
INCLUDE_DIRECTORIES(
@@ -171,6 +134,7 @@ INCLUDE_DIRECTORIES(
${TAGLIB_INCLUDES}
${PHONON_INCLUDES}
${QJSON_INCLUDE_DIR}
${LIBATTICA_INCLUDE_DIR}
${LIBECHONEST_INCLUDE_DIR}
${LIBECHONEST_INCLUDE_DIR}/..
)
@@ -187,42 +151,41 @@ ENDIF( UNIX )
IF( APPLE )
INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/thirdparty/SPMediaKeyTap )
SET( tomahawkHeaders ${tomahawkHeaders} mac/tomahawkapp_mac.h mac/macshortcuthandler.h )
SET( tomahawkSources ${tomahawkSources} mac/tomahawkapp_mac.mm mac/macshortcuthandler.cpp )
IF(HAVE_SPARKLE)
SET( tomahawkHeaders ${tomahawkHeaders} ${SPARKLE}/Headers )
ENDIF(HAVE_SPARKLE)
SET( tomahawkSources ${tomahawkSources} mac/TomahawkApp_Mac.mm mac/MacShortcutHandler.cpp )
ENDIF( APPLE )
IF(GLOOX_FOUND)
INCLUDE_DIRECTORIES( ${GLOOX_INCLUDE_DIR} )
SET( tomahawkHeaders ${tomahawkHeaders} xmppbot/xmppbot.h )
SET( tomahawkSources ${tomahawkSources} xmppbot/xmppbot.cpp )
SET( tomahawkSources ${tomahawkSources} xmppbot/XmppBot.cpp )
ENDIF(GLOOX_FOUND)
ADD_SUBDIRECTORY( sip )
ADD_SUBDIRECTORY( accounts )
ADD_SUBDIRECTORY( infoplugins )
IF(QCA2_FOUND)
INCLUDE_DIRECTORIES( ${QCA2_INCLUDE_DIR} )
ENDIF(QCA2_FOUND)
INCLUDE(GNUInstallDirs)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Config.h.in
${CMAKE_CURRENT_BINARY_DIR}/config.h)
include( ${CMAKE_SOURCE_DIR}/lang/translations.cmake )
SET( final_src ${final_src} ${tomahawkMoc} ${tomahawkSources} ${tomahawkHeaders} ${trans_outfile})
SET( final_src ${final_src} ${tomahawkMoc} ${tomahawkSources} ${trans_outfile})
IF( BUILD_GUI )
LIST(APPEND tomahawkHeaders ${tomahawkHeadersGui})
LIST(APPEND tomahawkSources ${tomahawkSourcesGui})
qt4_wrap_ui( tomahawkUI_H ${tomahawkUI} )
IF( WITH_CRASHREPORTER )
ADD_SUBDIRECTORY( breakpad/CrashReporter )
ENDIF()
ENDIF()
kde4_add_app_icon( tomahawkSources "${CMAKE_SOURCE_DIR}/data/icons/tomahawk-icon-*.png" )
qt4_add_resources( RC_SRCS "../resources.qrc" )
qt4_wrap_cpp( tomahawkMoc ${tomahawkHeaders} )
SET( final_src ${final_src} ${tomahawkUI_H} ${tomahawkMoc} ${tomahawkSources} ${RC_SRCS} )
IF( UNIX AND NOT APPLE )
@@ -230,13 +193,14 @@ IF( UNIX AND NOT APPLE )
ENDIF( UNIX AND NOT APPLE )
IF( APPLE )
ADD_EXECUTABLE( tomahawk MACOSX_BUNDLE ${final_src} )
SET_TARGET_PROPERTIES(tomahawk PROPERTIES MACOSX_BUNDLE_INFO_PLIST "${CMAKE_BINARY_DIR}/Info.plist"
)
SET_TARGET_PROPERTIES(tomahawk PROPERTIES MACOSX_BUNDLE_INFO_PLIST "${CMAKE_BINARY_DIR}/Info.plist")
ENDIF( APPLE )
IF( WIN32 )
ADD_EXECUTABLE( tomahawk WIN32 ${final_src} )
ENDIF( WIN32 )
SET_TARGET_PROPERTIES(tomahawk PROPERTIES AUTOMOC TRUE)
MESSAGE( STATUS "OS_SPECIFIC_LINK_LIBRARIES: ${OS_SPECIFIC_LINK_LIBRARIES}" )
SET(LINK_LIBRARIES "")
@@ -249,9 +213,11 @@ ENDIF(GLOOX_FOUND)
IF(QCA2_FOUND)
SET(LINK_LIBRARIES ${LINK_LIBRARIES} ${QCA2_LIBRARIES} )
ENDIF(QCA2_FOUND)
IF(WITH_BREAKPAD)
SET(LINK_LIBRARIES ${LINK_LIBRARIES} tomahawk_breakpad)
ENDIF()
TARGET_LINK_LIBRARIES( tomahawk
tomahawk_breakpad
${LINK_LIBRARIES}
${TOMAHAWK_LIBRARIES}
${PHONON_LIBS}

View File

@@ -17,9 +17,11 @@
#cmakedefine LEOPARD
#cmakedefine HAVE_SPARKLE
#cmakedefine WITH_BREAKPAD
#cmakedefine WITH_CRASHREPORTER
#cmakedefine LIBLASTFM_FOUND
#cmakedefine GLOOX_FOUND
#cmakedefine QCA2_FOUND
#cmakedefine LIBATTICA_FOUND
#endif // CONFIG_H_IN

View File

@@ -19,7 +19,7 @@
#ifndef CONFIGDELEGATEBASE_H
#define CONFIGDELEGATEBASE_H
#include "dllmacro.h"
#include "DllMacro.h"
#include <QStyledItemDelegate>
@@ -36,16 +36,15 @@ public:
virtual bool editorEvent ( QEvent* event, QAbstractItemModel* model, const QStyleOptionViewItem& option, const QModelIndex& index );
// if you want to use a checkbox, you need to have this say where to paint it
virtual QRect checkRectForIndex( const QStyleOptionViewItem& option, const QModelIndex& idx ) const = 0;
virtual QRect checkRectForIndex( const QStyleOptionViewItem& option, const QModelIndex& idx, int role ) const = 0;
// if you want to use a config wrench, you need to have this say where to paint it
virtual QRect configRectForIndex( const QStyleOptionViewItem& option, const QModelIndex& idx ) const = 0;
virtual QList<int> extraCheckRoles() const { return QList<int>(); }
signals:
void configPressed( const QModelIndex& idx );
protected:
void drawCheckBox( QStyleOptionViewItemV4& opt, QPainter* p, const QWidget* w ) const;
void drawConfigWrench( QPainter* painter, QStyleOptionViewItemV4& option, QStyleOptionToolButton& topt ) const;
private:
QModelIndex m_configPressed;

View File

@@ -0,0 +1,158 @@
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
*
* Copyright 2010-2011, Leo Franchi <lfranchi@kde.org>
*
* Tomahawk is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Tomahawk is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Tomahawk. If not, see <http://www.gnu.org/licenses/>.
*/
#include "DelegateConfigWrapper.h"
#include <QMessageBox>
DelegateConfigWrapper::DelegateConfigWrapper( QWidget* conf, QWidget* aboutWidget, const QString& title, QWidget* parent, Qt::WindowFlags flags )
: QDialog( parent, flags )
, m_widget( conf )
, m_aboutW( aboutWidget )
, m_deleted( false )
{
m_widget->setWindowFlags( Qt::Sheet );
#ifdef Q_WS_MAC
m_widget->setVisible( true );
#endif
setWindowTitle( title );
QVBoxLayout* v = new QVBoxLayout( this );
v->setContentsMargins( 0, 0, 0, 0 );
v->addWidget( m_widget );
QDialogButtonBox::StandardButtons buttons = QDialogButtonBox::Ok | QDialogButtonBox::Cancel;
if ( m_aboutW )
{
m_aboutW->hide();
buttons |= QDialogButtonBox::Help;
}
m_buttons = new QDialogButtonBox( buttons, Qt::Horizontal, this );
m_okButton = m_buttons->button( QDialogButtonBox::Ok );
connect( m_buttons, SIGNAL( clicked( QAbstractButton*) ), this, SLOT( closed( QAbstractButton* ) ) );
connect( this, SIGNAL( rejected() ), this, SLOT( rejected() ) );
if ( m_aboutW )
{
connect( m_buttons->button( QDialogButtonBox::Help ), SIGNAL( clicked( bool ) ), this, SLOT( aboutClicked( bool ) ) );
m_buttons->button( QDialogButtonBox::Help )->setText( tr( "About" ) );
}
v->addWidget( m_buttons );
setLayout( v );
#ifdef Q_WS_MAC
setSizeGripEnabled( false );
setMinimumSize( sizeHint() );
setMaximumSize( sizeHint() ); // to remove the resize grip on osx this is the only way
if( conf->metaObject()->indexOfSignal( "sizeHintChanged()" ) > -1 )
connect( conf, SIGNAL( sizeHintChanged() ), this, SLOT( updateSizeHint() ) );
#else
m_widget->setVisible( true );
#endif
}
void
DelegateConfigWrapper::setShowDelete( bool del )
{
if ( del )
m_deleteButton = m_buttons->addButton( tr( "Delete Account" ), QDialogButtonBox::DestructiveRole );
}
void
DelegateConfigWrapper::toggleOkButton( bool dataError )
{
// if dataError is True we want to set the button enabled to false
m_okButton->setEnabled( !dataError );
}
void
DelegateConfigWrapper::closed( QAbstractButton* b )
{
QDialogButtonBox* buttons = qobject_cast< QDialogButtonBox* >( sender() );
if ( buttons->standardButton( b ) == QDialogButtonBox::Help )
return;
// let the config widget live to see another day
layout()->removeWidget( m_widget );
m_widget->setParent( 0 );
m_widget->setVisible( false );
if ( buttons->standardButton( b ) == QDialogButtonBox::Ok )
done( QDialog::Accepted );
else if ( b == m_deleteButton )
{
m_deleted = true;
emit closedWithDelete();
reject();
}
else
done( QDialog::Rejected );
}
void
DelegateConfigWrapper::rejected()
{
layout()->removeWidget( m_widget );
m_widget->setParent( 0 );
m_widget->setVisible( false );
}
void
DelegateConfigWrapper::updateSizeHint()
{
hide();
setSizeGripEnabled( false );
setMinimumSize( sizeHint() );
setMaximumSize( sizeHint() );
show();
}
void
DelegateConfigWrapper::aboutClicked( bool )
{
Q_ASSERT( m_aboutW );
m_aboutW->show();
QDialog d( this );
d.setWindowTitle( tr( "About this Account" ) );
QVBoxLayout* v = new QVBoxLayout( &d );
v->addWidget( m_aboutW );
QDialogButtonBox* bbox = new QDialogButtonBox( QDialogButtonBox::Ok, Qt::Horizontal, &d );
v->addWidget( bbox );
d.setLayout( v );
connect( bbox, SIGNAL( clicked( QAbstractButton* ) ), &d, SLOT( accept() ) );
d.exec();
v->removeWidget( m_aboutW );
m_aboutW->setParent( 0 );
m_aboutW->hide();
}

View File

@@ -0,0 +1,61 @@
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
*
* Copyright 2010-2011, Leo Franchi <lfranchi@kde.org>
*
* Tomahawk is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Tomahawk is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Tomahawk. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef RESOLVER_CONFIG_WRAPPER
#define RESOLVER_CONFIG_WRAPPER
#include <QDialog>
#include <QDialogButtonBox>
#include <QVBoxLayout>
#include <QPushButton>
#include <QDebug>
class DelegateConfigWrapper : public QDialog
{
Q_OBJECT
public:
DelegateConfigWrapper( QWidget* conf, QWidget* aboutWidget, const QString& title, QWidget* parent, Qt::WindowFlags flags = 0 );
~DelegateConfigWrapper() {}
void setShowDelete( bool del );
bool deleted() const { return m_deleted; }
public slots:
void toggleOkButton( bool dataError );
void closed( QAbstractButton* b );
// we get a rejected() signal emitted if the user presses escape (and no clicked() signal )
void rejected();
void updateSizeHint();
signals:
void closedWithDelete();
private slots:
void aboutClicked( bool );
private:
QDialogButtonBox* m_buttons;
QWidget* m_widget, *m_aboutW;
QPushButton *m_okButton, *m_deleteButton;
bool m_deleted;
};
#endif

View File

@@ -1,6 +1,7 @@
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
*
* Copyright 2011, Dominik Schmidt <dev@dominik-schmidt.de>
* Copyright 2011, Jeff Mitchell <jeff@tomahawk-player.org>
*
* Tomahawk is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -16,14 +17,14 @@
* along with Tomahawk. If not, see <http://www.gnu.org/licenses/>.
*/
#include "diagnosticsdialog.h"
#include "ui_diagnosticsdialog.h"
#include "DiagnosticsDialog.h"
#include "ui_DiagnosticsDialog.h"
#include "config.h"
#include <sip/SipHandler.h>
#include <network/servent.h>
#include <sourcelist.h>
#include "accounts/AccountManager.h"
#include "network/Servent.h"
#include "SourceList.h"
#include <QTextEdit>
#include <QDialogButtonBox>
@@ -31,7 +32,8 @@
#include <QApplication>
#include <QClipboard>
#include "utils/logger.h"
#include "utils/Logger.h"
#include "sip/SipHandler.h"
DiagnosticsDialog::DiagnosticsDialog( QWidget *parent )
@@ -90,40 +92,43 @@ void DiagnosticsDialog::updateLogView()
log.append("\n\n");
// Peers
log.append("SIP PLUGINS:\n");
QList< Tomahawk::source_ptr > sources = SourceList::instance()->sources( true );
Q_FOREACH(SipPlugin *sip, SipHandler::instance()->allPlugins())
// 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 )
{
Q_ASSERT(sip);
Q_ASSERT( account && account->sipPlugin() );
if ( !account || !account->sipPlugin() )
continue;
QString stateString;
switch( sip->connectionState() )
switch( account->connectionState() )
{
case SipPlugin::Connecting:
case Tomahawk::Accounts::Account::Connecting:
stateString = "Connecting";
break;
case SipPlugin::Connected:
case Tomahawk::Accounts::Account::Connected:
stateString = "Connected";
break;
case SipPlugin::Disconnected:
case Tomahawk::Accounts::Account::Disconnected:
stateString = "Disconnected";
break;
case SipPlugin::Disconnecting:
case Tomahawk::Accounts::Account::Disconnecting:
stateString = "Disconnecting";
}
log.append(
QString(" %2 (%1): %3 (%4)\n")
.arg(sip->name())
.arg(sip->friendlyName())
.arg(sip->accountName())
.arg(stateString)
QString( " %2 (%1): %3 (%4)\n" )
.arg( account->accountServiceName() )
.arg( account->sipPlugin()->friendlyName() )
.arg( account->accountFriendlyName())
.arg( stateString )
);
Q_FOREACH( const QString &peerId, sip->peersOnline() )
foreach( const QString &peerId, account->sipPlugin()->peersOnline() )
{
/* enable this again, when we check the source has this peerId
/* enable this again, when we check the Source.has this peerId
bool connected = false;
Q_FOREACH( const Tomahawk::source_ptr &source, sources )
{
@@ -165,7 +170,6 @@ void DiagnosticsDialog::updateLogView()
}
log.append("\n");
}
ui->logView->setPlainText(log);
}

View File

@@ -1,323 +0,0 @@
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
*
* Copyright 2010-2011, Leo Franchi <lfranchi@kde.org>
*
* Tomahawk is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Tomahawk is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Tomahawk. If not, see <http://www.gnu.org/licenses/>.
*/
#include "GetNewStuffDelegate.h"
#include "GetNewStuffModel.h"
#include "utils/tomahawkutils.h"
#include "utils/logger.h"
#include <QtGui/QPainter>
#include <QApplication>
#include <QMouseEvent>
#include "AtticaManager.h"
#define PADDING 4
#define PADDING_BETWEEN_STARS 2
#define STAR_SIZE 12
#ifdef Q_WS_MAC
#define SIZEHINT_HEIGHT 70
#else
#define SIZEHINT_HEIGHT 60
#endif
GetNewStuffDelegate::GetNewStuffDelegate( QObject* parent )
: QStyledItemDelegate ( parent )
, m_widestTextWidth( 0 )
, m_hoveringOver( -1 )
{
m_defaultCover.load( RESPATH "images/sipplugin-online.png" );
m_ratingStarPositive.load( RESPATH "images/starred.png" );
m_ratingStarNegative.load( RESPATH "images/star-unstarred.png" );
m_onHoverStar.load( RESPATH "images/star-hover.png" );
m_ratingStarPositive = m_ratingStarPositive.scaled( STAR_SIZE, STAR_SIZE, Qt::KeepAspectRatio, Qt::SmoothTransformation );
m_ratingStarNegative = m_ratingStarNegative.scaled( STAR_SIZE, STAR_SIZE, Qt::KeepAspectRatio, Qt::SmoothTransformation );
m_onHoverStar = m_onHoverStar.scaled( STAR_SIZE, STAR_SIZE, Qt::KeepAspectRatio, Qt::SmoothTransformation );
const int w = SIZEHINT_HEIGHT - 2*PADDING;
m_defaultCover = m_defaultCover.scaled( w, w, Qt::KeepAspectRatio, Qt::SmoothTransformation );
// save the widest wifth
QFont f( QApplication::font() );
f.setPointSize( f.pointSize() - 1 );
QFontMetrics fm( f );
QStringList l = QStringList() << tr( "Installed" ) << tr( "Installing" ) << tr( "Failed" ) << tr( "Uninstalling" );
foreach ( const QString& str, l )
{
if ( fm.width( str ) > m_widestTextWidth )
m_widestTextWidth = fm.width( str );
}
}
void
GetNewStuffDelegate::paint( QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index ) const
{
QStyleOptionViewItemV4 opt = option;
initStyleOption( &opt, index );
QApplication::style()->drawPrimitive( QStyle::PE_PanelItemViewItem, &opt, painter, opt.widget );
painter->setRenderHint( QPainter::Antialiasing );
QFont titleFont = opt.font;
titleFont.setBold( true );
titleFont.setPointSize( titleFont.pointSize() + 2 );
QFontMetrics titleMetrics( titleFont );
QFont authorFont = opt.font;
authorFont.setItalic( true );
authorFont.setPointSize( authorFont.pointSize() - 1 );
QFontMetrics authorMetrics( authorFont );
QFont descFont = authorFont;
descFont.setItalic( false );
QFontMetrics descMetrics( descFont );
QFont installFont = opt.font;
installFont.setPointSize( installFont.pointSize() - 1 );
QFontMetrics installMetrics( descFont );
const int height = opt.rect.height();
const int center = height / 2 + opt.rect.top();
// Pixmap
QPixmap p = index.data( Qt::DecorationRole ).value< QPixmap >();
const int pixmapWidth = height - 2*PADDING;
QRect pixmapRect( PADDING, PADDING + opt.rect.top(), pixmapWidth, pixmapWidth );
if ( p.isNull() ) // default image... TODO
p = m_defaultCover;
else
p = p.scaled( pixmapRect.size(), Qt::KeepAspectRatio, Qt::SmoothTransformation );
painter->drawPixmap( pixmapRect, p );
// Go from right edge now, stars, install button, and downloaded info
// install / status button
AtticaManager::ResolverState state = static_cast< AtticaManager::ResolverState >( index.data( GetNewStuffModel::StateRole ).toInt() );
QString actionText;
switch( state )
{
case AtticaManager::Uninstalled:
actionText = tr( "Install" );
break;
case AtticaManager::Installing:
actionText = tr( "Installing" );
break;
case AtticaManager::Upgrading:
actionText = tr( "Upgrading" );
break;
case AtticaManager::Failed:
actionText = tr( "Failed" );
break;
case AtticaManager::Installed:
actionText = tr( "Uninstall" );
break;
case AtticaManager::NeedsUpgrade:
actionText = tr( "Upgrade" );
break;
}
const int btnWidth = m_widestTextWidth + 7;
const int leftEdge = opt.rect.width() - PADDING - btnWidth - 3;
const QRect btnRect( leftEdge, center - ( installMetrics.height() + 4 ) / 2, btnWidth, installMetrics.height() + 4 );
m_cachedButtonRects[ QPair<int, int>(index.row(), index.column()) ] = btnRect;
QPen saved = painter->pen();
painter->setPen( opt.palette.color( QPalette::Active, QPalette::AlternateBase ) );
QPainterPath btnPath;
const int radius = 3;
//btnPath.addRoundedRect( btnRect, 3, 3 );
// draw top half gradient
const int btnCenter = btnRect.bottom() - ( btnRect.height() / 2 );
btnPath.moveTo( btnRect.left(), btnCenter );
btnPath.lineTo( btnRect.left(), btnRect.top() + radius );
btnPath.quadTo( QPoint( btnRect.topLeft() ), QPoint( btnRect.left() + radius, btnRect.top() ) );
btnPath.lineTo( btnRect.right() - radius, btnRect.top() );
btnPath.quadTo( QPoint( btnRect.topRight() ), QPoint( btnRect.right(), btnRect.top() + radius ) );
btnPath.lineTo( btnRect.right(),btnCenter );
btnPath.lineTo( btnRect.left(), btnCenter );
QLinearGradient g;
g.setColorAt( 0, QColor(54, 127, 211) );
g.setColorAt( 0.5, QColor(43, 104, 182) );
//painter->setPen( bg.darker() );
painter->fillPath( btnPath, g );
//painter->drawPath( btnPath );
btnPath = QPainterPath();
btnPath.moveTo( btnRect.left(), btnCenter );
btnPath.lineTo( btnRect.left(), btnRect.bottom() - radius );
btnPath.quadTo( QPoint( btnRect.bottomLeft() ), QPoint( btnRect.left() + radius, btnRect.bottom() ) );
btnPath.lineTo( btnRect.right() - radius, btnRect.bottom() );
btnPath.quadTo( QPoint( btnRect.bottomRight() ), QPoint( btnRect.right(), btnRect.bottom() - radius ) );
btnPath.lineTo( btnRect.right(), btnCenter );
btnPath.lineTo( btnRect.left(), btnCenter );
g.setColorAt( 0, QColor(34, 85, 159) );
g.setColorAt( 0.5, QColor(35, 79, 147) );
painter->fillPath( btnPath, g );
painter->setFont( installFont );
painter->drawText( btnRect, Qt::AlignCenter, actionText );
painter->setPen( saved );
// rating stars
int rating = index.data( GetNewStuffModel::RatingRole ).toInt();
const int ratingWidth = 5 * ( m_ratingStarPositive.width() + PADDING_BETWEEN_STARS );
int runningEdge = ( btnRect.right() - btnRect.width() / 2 ) - ratingWidth / 2;
for ( int i = 1; i < 6; i++ )
{
QRect r( runningEdge, btnRect.top() - m_ratingStarPositive.height() - PADDING, m_ratingStarPositive.width(), m_ratingStarPositive.height() );
if ( i == 1 )
m_cachedStarRects[ QPair<int, int>(index.row(), index.column()) ] = r;
const bool userHasRated = index.data( GetNewStuffModel::UserHasRatedRole ).toBool();
if ( !userHasRated && // Show on-hover animation if the user hasn't rated it yet, and is hovering over it
m_hoveringOver > -1 &&
m_hoveringItem == index )
{
if ( i <= m_hoveringOver ) // positive star
painter->drawPixmap( r, m_onHoverStar );
else
painter->drawPixmap( r, m_ratingStarNegative );
}
else
{
if ( i <= rating ) // positive or rated star
{
if ( userHasRated )
painter->drawPixmap( r, m_onHoverStar );
else
painter->drawPixmap( r, m_ratingStarPositive );
}
else
painter->drawPixmap( r, m_ratingStarNegative );
}
runningEdge += m_ratingStarPositive.width() + PADDING_BETWEEN_STARS;
}
// downloaded num times, underneath button
QString count = tr( "%1 downloads" ).arg( index.data( GetNewStuffModel::DownloadCounterRole ).toInt() );
const QRect countRect( btnRect.left(), btnRect.bottom() + PADDING, btnRect.width(), opt.rect.bottom() - PADDING - btnRect.bottom() );
QFont countFont = descFont;
countFont.setPointSize( countFont.pointSize() - 2 );
countFont.setBold( true );
painter->setFont( countFont );
painter->drawText( countRect, Qt::AlignCenter | Qt::TextWordWrap, count );
// author and version
QString author = index.data( GetNewStuffModel::AuthorRole ).toString();
const int authorWidth = authorMetrics.width( author );
const int topTextLine = opt.rect.top() + PADDING;
const QRect authorRect( btnRect.x() - 3*PADDING - authorWidth, topTextLine, authorWidth + 6, authorMetrics.height() );
painter->setFont( authorFont );
painter->drawText( authorRect, Qt::AlignCenter, author );
const QRect versionRect = authorRect.translated( 0, authorRect.height() );
QString version = index.data( GetNewStuffModel::VersionRole ).toString();
painter->drawText( versionRect, Qt::AlignCenter, version );
// title
QString title = index.data( Qt::DisplayRole ).toString();
const int rightTitleEdge = authorRect.left() - PADDING;
const int leftTitleEdge = pixmapRect.right() + PADDING;
const QRect textRect( leftTitleEdge, topTextLine, rightTitleEdge - leftTitleEdge, versionRect.bottom() - opt.rect.top() - PADDING );
painter->setFont( titleFont );
painter->drawText( textRect, Qt::AlignVCenter | Qt::AlignLeft, title );
// description
QString desc = index.data( GetNewStuffModel::DescriptionRole ).toString();
const int descWidth = btnRect.left() - leftTitleEdge - PADDING;
const QRect descRect( leftTitleEdge, versionRect.bottom(), descWidth, opt.rect.bottom() - versionRect.bottom() + PADDING );
painter->setFont( descFont );
painter->drawText( descRect, Qt::AlignLeft | Qt::TextWordWrap, desc );
}
QSize
GetNewStuffDelegate::sizeHint( const QStyleOptionViewItem& option, const QModelIndex& index ) const
{
Q_UNUSED( option );
Q_UNUSED( index );
return QSize( 200, SIZEHINT_HEIGHT );
}
bool
GetNewStuffDelegate::editorEvent( QEvent* event, QAbstractItemModel* model, const QStyleOptionViewItem& option, const QModelIndex& index )
{
Q_UNUSED( option );
if ( event->type() != QEvent::MouseButtonRelease &&
event->type() != QEvent::MouseMove )
return false;
if ( event->type() == QEvent::MouseButtonRelease && m_cachedButtonRects.contains( QPair<int, int>( index.row(), index.column() ) ) )
{
QRect rect = m_cachedButtonRects[ QPair<int, int>( index.row(), index.column() ) ];
QMouseEvent* me = static_cast< QMouseEvent* >( event );
if ( rect.contains( me->pos() ) )
{
model->setData( index, true );
return true;
}
}
if ( m_cachedStarRects.contains( QPair<int, int>( index.row(), index.column() ) ) )
{
QRect fullStars = m_cachedStarRects[ QPair<int, int>( index.row(), index.column() ) ];
const int starsWidth = 5 * ( m_ratingStarPositive.width() + PADDING_BETWEEN_STARS );
fullStars.setWidth( starsWidth );
QMouseEvent* me = static_cast< QMouseEvent* >( event );
if ( fullStars.contains( me->pos() ) )
{
const int eachStar = starsWidth / 5;
const int clickOffset = me->pos().x() - fullStars.x();
const int whichStar = (clickOffset / eachStar) + 1;
if ( event->type() == QEvent::MouseButtonRelease )
{
model->setData( index, whichStar, GetNewStuffModel::RatingRole );
}
else if ( event->type() == QEvent::MouseMove )
{
// 0-indexed
m_hoveringOver = whichStar;
m_hoveringItem = index;
}
return true;
}
}
if ( m_hoveringOver > -1 )
{
emit update( m_hoveringItem );
m_hoveringOver = -1;
m_hoveringItem = QPersistentModelIndex();
}
return false;
}

View File

@@ -1,50 +0,0 @@
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
*
* Copyright 2010-2011, Leo Franchi <lfranchi@kde.org>
*
* Tomahawk is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Tomahawk is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Tomahawk. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef GETNEWSTUFFDELEGATE_H
#define GETNEWSTUFFDELEGATE_H
#include <QStyledItemDelegate>
class
GetNewStuffDelegate : public QStyledItemDelegate
{
Q_OBJECT
public:
explicit GetNewStuffDelegate( QObject* parent = 0 );
virtual void paint( QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index ) const;
virtual QSize sizeHint( const QStyleOptionViewItem& option, const QModelIndex& index ) const;
signals:
void update( const QModelIndex& idx );
protected:
virtual bool editorEvent( QEvent* event, QAbstractItemModel* model, const QStyleOptionViewItem& option, const QModelIndex& index );
private:
QPixmap m_defaultCover, m_onHoverStar, m_ratingStarPositive, m_ratingStarNegative;
int m_widestTextWidth;
int m_hoveringOver;
QPersistentModelIndex m_hoveringItem;
mutable QHash< QPair<int, int>, QRect > m_cachedButtonRects;
mutable QHash< QPair<int, int>, QRect > m_cachedStarRects;
};
#endif // GETNEWSTUFFDELEGATE_H

View File

@@ -1,54 +0,0 @@
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
*
* Copyright 2011, Leo Franchi <lfranchi@kde.org>
*
* Tomahawk is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Tomahawk is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Tomahawk. If not, see <http://www.gnu.org/licenses/>.
*/
#include "GetNewStuffDialog.h"
#include "ui_GetNewStuffDialog.h"
#include "GetNewStuffDelegate.h"
#include "GetNewStuffModel.h"
GetNewStuffDialog::GetNewStuffDialog( QWidget* parent, Qt::WindowFlags f )
: QDialog( parent, f )
, ui( new Ui::GetNewStuffDialog )
, m_model( new GetNewStuffModel( this ) )
{
ui->setupUi( this );
ui->listView->setModel( m_model );
GetNewStuffDelegate* del = new GetNewStuffDelegate( ui->listView );
connect( del, SIGNAL( update( QModelIndex ) ), ui->listView, SLOT( update( QModelIndex ) ) );
ui->listView->setItemDelegate( del );
ui->listView->setVerticalScrollMode( QAbstractItemView::ScrollPerPixel );
ui->listView->setMouseTracking( true );
setMinimumSize( 560, 350 );
#ifdef Q_WS_MAC
setMaximumSize( 560, 350 );
setSizeGripEnabled( false );
ui->listView->setAttribute( Qt::WA_MacShowFocusRect, false );
#endif
}
GetNewStuffDialog::~GetNewStuffDialog()
{
delete ui;
}

View File

@@ -1,67 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>GetNewStuffDialog</class>
<widget class="QDialog" name="GetNewStuffDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>449</width>
<height>282</height>
</rect>
</property>
<property name="windowTitle">
<string>Download New Resolvers</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QListView" name="listView"/>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections>
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>GetNewStuffDialog</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>248</x>
<y>254</y>
</hint>
<hint type="destinationlabel">
<x>157</x>
<y>274</y>
</hint>
</hints>
</connection>
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>GetNewStuffDialog</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>316</x>
<y>260</y>
</hint>
<hint type="destinationlabel">
<x>286</x>
<y>274</y>
</hint>
</hints>
</connection>
</connections>
</ui>

View File

@@ -1,156 +0,0 @@
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
*
* Copyright 2010-2011, Leo Franchi <lfranchi@kde.org>
*
* Tomahawk is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Tomahawk is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Tomahawk. If not, see <http://www.gnu.org/licenses/>.
*/
#include "GetNewStuffModel.h"
#include "utils/tomahawkutils.h"
#include "utils/logger.h"
#include <QPixmap>
#include <QUrl>
#include "AtticaManager.h"
GetNewStuffModel::GetNewStuffModel( QObject* parent )
: QAbstractListModel ( parent )
{
if ( AtticaManager::instance()->resolversLoaded() )
m_contentList = AtticaManager::instance()->resolvers();
connect( AtticaManager::instance(), SIGNAL( resolversReloaded( Attica::Content::List ) ), this, SLOT( resolversReloaded( Attica::Content::List ) ) );
connect( AtticaManager::instance(), SIGNAL( resolverStateChanged( QString ) ), this, SLOT( resolverStateChanged( QString ) ) );
}
GetNewStuffModel::~GetNewStuffModel()
{
}
void
GetNewStuffModel::resolversReloaded( const Attica::Content::List& resolvers )
{
beginResetModel();
m_contentList = resolvers;
endResetModel();
}
void
GetNewStuffModel::resolverStateChanged( const QString& resolverId )
{
for ( int i = 0; i < m_contentList.count(); i++ )
{
const Attica::Content resolver = m_contentList[ i ];
if ( resolver.id() == resolverId )
{
QModelIndex idx = index( i, 0, QModelIndex() );
emit dataChanged( idx, idx );
}
}
}
QVariant
GetNewStuffModel::data( const QModelIndex& index, int role ) const
{
if ( !index.isValid() || !hasIndex( index.row(), index.column(), index.parent() ) )
return QVariant();
Attica::Content resolver = m_contentList[ index.row() ];
switch ( role )
{
case Qt::DisplayRole:
return resolver.name();
case Qt::DecorationRole:
return QVariant::fromValue< QPixmap >( AtticaManager::instance()->iconForResolver( resolver ) );
case DownloadUrlRole:
// TODO
return QUrl();
case RatingRole:
return resolver.rating() / 20; // rating is out of 100
case DownloadCounterRole:
return resolver.downloads();
case VersionRole:
return resolver.version();
case DescriptionRole:
return resolver.description();
case TypeRole:
return ResolverType;
case AuthorRole:
return resolver.author();
case StateRole:
return (int)AtticaManager::instance()->resolverState( resolver );
case UserHasRatedRole:
return AtticaManager::instance()->userHasRated( resolver );
}
return QVariant();
}
int
GetNewStuffModel::rowCount( const QModelIndex& parent ) const
{
Q_UNUSED( parent );
return m_contentList.count();
}
bool
GetNewStuffModel::setData( const QModelIndex &index, const QVariant &value, int role )
{
Q_UNUSED( value );
if ( !hasIndex( index.row(), index.column(), index.parent() ) )
return false;
Attica::Content resolver = m_contentList[ index.row() ];
AtticaManager::ResolverState state = AtticaManager::instance()->resolverState( resolver );
if ( role == Qt::EditRole )
{
switch( state )
{
case AtticaManager::Uninstalled:
// install
AtticaManager::instance()->installResolver( resolver );
break;
case AtticaManager::Installing:
case AtticaManager::Upgrading:
// Do nothing, busy
break;
case AtticaManager::Installed:
// Uninstall
AtticaManager::instance()->uninstallResolver( resolver );
break;
case AtticaManager::NeedsUpgrade:
AtticaManager::instance()->upgradeResolver( resolver );
break;
default:
//FIXME -- this handles e.g. Failed
break;
};
} else if ( role == RatingRole )
{
// For now only allow rating if a resolver is installed!
if ( state != AtticaManager::Installed && state != AtticaManager::NeedsUpgrade )
return false;
if ( AtticaManager::instance()->userHasRated( resolver ) )
return false;
m_contentList[ index.row() ].setRating( value.toInt() * 20 );
AtticaManager::instance()->uploadRating( m_contentList[ index.row() ] );
}
emit dataChanged( index, index );
return true;
}

View File

@@ -1,64 +0,0 @@
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
*
* Copyright 2010-2011, Leo Franchi <lfranchi@kde.org>
*
* Tomahawk is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Tomahawk is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Tomahawk. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef GETNEWSTUFFMODEL_H
#define GETNEWSTUFFMODEL_H
#include <QModelIndex>
#include <attica/content.h>
#include <QPixmap>
class GetNewStuffModel: public QAbstractListModel
{
Q_OBJECT
public:
enum NewStuffRoles {
// DisplayRole is title
// DecorationRole is qicon for item
DownloadUrlRole = Qt::UserRole + 1,
RatingRole = Qt::UserRole + 2,
DownloadCounterRole = Qt::UserRole + 3,
VersionRole = Qt::UserRole + 4,
DescriptionRole = Qt::UserRole + 5,
TypeRole = Qt::UserRole + 6, // Category in attica-speak. What sort of item this is (resolver, etc).
AuthorRole = Qt::UserRole + 7,
StateRole = Qt::UserRole + 8,
UserHasRatedRole = Qt::UserRole + 9
};
enum Types {
ResolverType = 0,
};
explicit GetNewStuffModel( QObject* parent = 0 );
virtual ~GetNewStuffModel();
virtual QVariant data( const QModelIndex& index, int role = Qt::DisplayRole ) const;
virtual int rowCount( const QModelIndex& parent = QModelIndex() ) const;
virtual bool setData( const QModelIndex &index, const QVariant &value, int role );
private slots:
void resolversReloaded( const Attica::Content::List& );
void resolverStateChanged( const QString& resolverId );
private:
Attica::Content::List m_contentList;
};
#endif // GETNEWSTUFFMODEL_H

View File

@@ -1,6 +1,7 @@
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
*
* Copyright 2010-2011, Christian Muehlhaeuser <muesli@tomahawk-player.org>
* Copyright 2010-2011, Jeff Mitchell <jeff@tomahawk-player.org>
*
* Tomahawk is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -28,7 +29,6 @@
#define TOMAHAWK_APPLICATION QApplication
#include <QApplication>
#include "tomahawkwindow.h"
#endif

View File

@@ -17,6 +17,8 @@
*/
#include "LoadXSPFDialog.h"
#include "TomahawkSettings.h"
#include "Source.h"
#include "ui_LoadXSPFDialog.h"
#include <QFileDialog>
@@ -44,7 +46,11 @@ LoadXSPFDialog::~LoadXSPFDialog()
void
LoadXSPFDialog::getLocalFile()
{
QString url = QFileDialog::getOpenFileName( this, tr( "Load XSPF File" ), QDir::homePath(), tr( "XSPF Files (*.xspf)" ) );
const QString path = TomahawkSettings::instance()->importXspfPath();
QString url = QFileDialog::getOpenFileName( this, tr( "Load XSPF File" ), path, tr( "XSPF Files (*.xspf)" ) );
if ( !url.isEmpty() )
TomahawkSettings::instance()->setImportXspfPath( QFileInfo( url ).absoluteDir().absolutePath() );
m_ui->lineEdit->setText( url );
}

View File

@@ -19,7 +19,7 @@
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>Playlist Url</string>
<string>Playlist URL</string>
</property>
</widget>
</item>

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