1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-09-07 12:40:45 +02:00

Compare commits

...

774 Commits
0.0.2 ... win7

Author SHA1 Message Date
Leo Franchi
9a58b9072d test win7 translucency 2011-06-01 19:22:26 -04:00
Leo Franchi
b4e0674e2b SHow initial config dialog as sheet on osx, WIP 2011-06-01 17:41:44 -04:00
Christian Muehlhaeuser
aeedf286eb * Added Pipeline status view. WIP. 2011-06-01 04:21:35 +02:00
Christian Muehlhaeuser
c52e7e4cdb * Allow seeking in songs - if possible. 2011-06-01 04:21:01 +02:00
Leo Franchi
b356798229 Add an 'Add to my ' option for non-local playlists to copy locally 2011-05-31 22:10:37 -04:00
Leo Franchi
615b2ff5cb And remove cruft. 2011-05-31 18:21:41 -04:00
Leo Franchi
7176b7f0a9 Add the SPMediaKeyTap thirdparty lib. 2011-05-31 18:20:29 -04:00
Leo Franchi
5cd9e49629 Add support for SPMediaKeyTap.
This lets tomahawk stop iTunes from opening when a user presses one of the media keys. Thanks to
the Clementine project and tyler.s.rhodes@gmail.com for much of the code in this patch.
2011-05-31 18:17:46 -04:00
Christopher Reichert
30323c2d8a Shuffle Mode and Repeat mode are now stored on a playlist by playlist basis
in Tomahawk.conf
2011-05-31 10:43:45 -05:00
Christian Muehlhaeuser
2aab17ba8e * Updated tomahawk.nsi, now depends on the vlc stuff being extracted to ../vlc/ 2011-05-30 21:19:15 +00:00
Leo Franchi
9236da101e Expire logplayback commands in the UI after 10minites, they are stale
Fixes TWK-39
2011-05-30 13:42:38 -04:00
Jeff Mitchell
d71bdb2fef Update dtor logic of other threads 2011-05-30 09:45:42 -04:00
Christian Muehlhaeuser
76aa0461ad * More InfoSystem DTOR fixes. 2011-05-30 15:18:28 +02:00
Christian Muehlhaeuser
af2553294f * More AudioEngine debug. 2011-05-30 06:18:20 +02:00
Christian Muehlhaeuser
873fe1297a * Fixed crash in DbCmd_Resolve. 2011-05-30 04:59:59 +02:00
Leo Franchi
f5749a5db2 Fix adding of controls that wouldn't go to the right place. 2011-05-29 19:03:22 -04:00
Leo Franchi
07cb94b1bc Add a new source item for temporary pages.
This fixes TWK-182. Also, ensure that what is selected on the left is always
in sync with what is on the right. In addition, expand the parent nodes when selecting
an item automatically in the tree.
2011-05-29 16:57:46 -04:00
Frank Osterfeld
f2952f783e Fix case 2011-05-29 21:20:09 +02:00
Frank Osterfeld
eef99c9e39 Initialize variable. 2011-05-29 21:20:09 +02:00
Christian Muehlhaeuser
8dbdf728b1 * Add some debug output for rotzbouw. 2011-05-29 14:17:53 +02:00
Christian Muehlhaeuser
423e4df7b0 Merge branch 'master' of https://github.com/tomahawk-player/tomahawk 2011-05-29 11:42:46 +02:00
Christian Muehlhaeuser
9d92201c0c * Tweaked shutdown order. 2011-05-29 11:42:32 +02:00
Christian Muehlhaeuser
635c490924 * Fixed InfoSystem DTOR freezing. 2011-05-29 11:22:25 +02:00
Leo Franchi
c24e90c978 allow to delete with the backspace as well as delete key 2011-05-28 20:19:37 -04:00
Leo Franchi
efa3708e79 Add some padding on the right edge of the dyn controls 2011-05-28 20:19:18 -04:00
Leo Franchi
ee8a0d6691 oops, fix oversight 2011-05-28 20:00:32 -04:00
Leo Franchi
75cea47cfa byebye random special characters, hello w hitespace 2011-05-28 19:58:03 -04:00
Leo Franchi
dcef395273 add stuff to Changelog for 0.1.0, thanks J for all your work trawling through history! 2011-05-28 19:56:22 -04:00
Leo Franchi
a9b792f603 allow deleting playlists with the delete key. fixes TWK-113 2011-05-28 19:46:27 -04:00
Leo Franchi
d61f38a206 Only emit a rename signal if we are the currently active view. Fixes TWK-202. 2011-05-28 17:29:29 -04:00
Leo Franchi
f03e74c777 ooops, include slid through 2011-05-28 17:13:07 -04:00
Leo Franchi
12ac4079b1 activate current page in the sourcetree if new playlist dialog is cancelled 2011-05-28 17:10:27 -04:00
Leo Franchi
9f087b7da3 Add Christopher's copyright and less debug 2011-05-28 16:55:35 -04:00
Leo Franchi
fb06624821 Add a new "Create Playlist" dialog that is shown when the user presses New Playlist.
This lets the user select between a normal playlist and an automatic playlist.  Thanks for Christopher Reichert for the patch!
2011-05-28 16:49:49 -04:00
Dominik Schmidt
5c11841cec Make tomahawk.nsi ready for 64bit 2011-05-28 16:54:24 +02:00
Jeff Mitchell
ee583f20da If Tomahawk crashed during one of these functions it could leave some messed up stuff in your config file, so separate out the two operations into distinct ones that can be run independently and do case-sensitive matching. 2011-05-27 08:31:08 -04:00
Leo Franchi
ba3ce4bdb9 better grammar
(cherry picked from commit 7676f43a79e12c890c1b57f716249c68fc0ea6ac)
2011-05-26 22:18:34 -04:00
Dominik Schmidt
106bf6c08b Install tomahawklib on linux correctly too 2011-05-27 03:45:23 +02:00
Dominik Schmidt
8f9c03b3ad Update tomahawk.nsi 2011-05-27 01:41:41 +02:00
Dominik Schmidt
fca66bcf39 Install libtomahawklib.dll to correct place in windows 2011-05-26 23:41:07 +02:00
Dominik Schmidt
2be3e93d39 Install qxtweb-standalone.dll on windows 2011-05-26 22:52:24 +02:00
Dominik Schmidt
39549f776b Bump jreen submodule revision. 2011-05-26 22:20:48 +02:00
Dominik Schmidt
b0c0667bde Fix taglib includes 2011-05-26 22:20:33 +02:00
Dominik Schmidt
e7bdc077d2 Don't use QJSON_LDFLAGS on windows 2011-05-26 21:52:38 +02:00
Leo Franchi
f4cef4fff0 lets be safe 2011-05-26 09:39:39 -04:00
Leo Franchi
0172515a86 Fix dropping ou the sourcetree, qtreeview is really crappy in this case 2011-05-26 09:38:23 -04:00
Leo Franchi
fd29a966eb remove vestiges of debug 2011-05-26 08:55:12 -04:00
Leo Franchi
d5df5f7676 Set cache mode so cmake doesn't forget our own set variable and fallback to pkgconfig-set one. 2011-05-26 08:43:32 -04:00
Jeff Mitchell
6e19a85d73 Was trying to work on the crash on shutdown by making sure we explicitly delete items in tomahawkapp. Except where there are FIXMEs all are now explicitly deleted, in reverse order of instantiation. So far no help, but figured might as well keep the changes. 2011-05-26 00:48:08 -04:00
Jeff Mitchell
f9a6775126 Add warning about cached artist images 2011-05-25 23:45:02 -04:00
Jeff Mitchell
f6756682f1 Cleanup from my previous fix 2011-05-25 23:43:09 -04:00
Jeff Mitchell
e3e90744bf Fix jabber(/other?) networking. The only part of this commit related to the fix is the line replacing m_client->setConnection with return. I don't know why that line causes what seems to be a total block in the network but it does, and removing it doesn't seem to hurt anything.
Oddly, if refreshProxy doesn't check for m_client->connection() to be null, it segfaults. But, if that function is never run (and that function is the only place setting the connection directly), it works just fine (if no proxy is needed). So maybe it's leftover code but I really don't konw.
2011-05-25 23:35:21 -04:00
Leo Franchi
f27d3b9fe9 fix debug/poll and give new stations a better name from a seed 2011-05-25 21:37:20 -04:00
Leo Franchi
5f2791f2b3 Allow users to drop tracks onto New Station, and creates a station seeded with song filters 2011-05-25 20:02:18 -04:00
Dominik Schmidt
d1b8b2851d Update tomahawk.nsi for qca-ossl and missing dlls for vlc plugins 2011-05-26 01:38:05 +02:00
Jeff Mitchell
03f6b416b6 Revamp proxy system. Use a factory, and allow for noproxy hosts. Don't try to set the proxies everywhere, set the application proxy factory and fall back to it. Except for specifically-threaded things. 2011-05-25 17:38:14 -04:00
Leo Franchi
af0fe52cd1 Don't rely on mood/style fetch being faster than dynamic control loading 2011-05-25 17:25:33 -04:00
Jeff Mitchell
c59747e1e1 Fix QJson linking 2011-05-25 11:48:05 -04:00
Christian Muehlhaeuser
f878e47575 * Finally fixed OS X release scripts. I think. 2011-05-25 05:56:09 +02:00
Christian Muehlhaeuser
bc7aa1ebbd * Fixed OS X release scripts. 2011-05-25 05:39:18 +02:00
Christian Muehlhaeuser
a16274ec43 * Fixed OS X build scripts to not contain hard-coded paths. 2011-05-25 05:16:28 +02:00
Christian Muehlhaeuser
e29b6ed2db Merge remote-tracking branch 'origin/osxrelease' 2011-05-25 04:38:22 +02:00
Christian Muehlhaeuser
3a9f0e9f86 * Fixed DbCmd_LogPlayback. 2011-05-25 04:20:11 +02:00
Christian Muehlhaeuser
b2c9028b54 * Don't sync empty DbCmd_DeleteFiles & irrelevant DbCmd_LogPlaybacks. 2011-05-25 04:17:53 +02:00
Dominik Schmidt
caa8878b25 Use my packaged vlc in tomahawk.nsi instead of pre released binaries (those are crashing because they were compiled incompatibly). 2011-05-25 03:50:05 +02:00
Dominik Schmidt
20ad274dae More cross-compilation fixes. 2011-05-25 03:50:05 +02:00
Dominik Schmidt
1370756e0a Add vlc to tomahawk.nsi and add update-vlc.sh for downloading and stripping vlc 2011-05-25 03:50:05 +02:00
Dominik Schmidt
86cc828378 Fix cross compilation 2011-05-25 03:50:05 +02:00
Dominik Schmidt
95f5d214c5 Bye bye, jdns. We're not using you anymore, you can find your own way in jreen :P 2011-05-25 03:50:05 +02:00
Dominik Schmidt
d546cc6156 Bump jreen submodule revision. 2011-05-25 03:50:05 +02:00
Dominik Schmidt
e2698fecce Fix crash in liblastfm2 on windows. 2011-05-25 03:50:05 +02:00
Dominik Schmidt
8ca392464e Update tomahawk.nsi. 2011-05-25 03:50:05 +02:00
Dominik Schmidt
7b9c3b8bb9 Get finally rid of our own copy of jdns. 2011-05-25 03:50:05 +02:00
Christian Muehlhaeuser
39b9086d17 * Fixed getting year during resolving from database. 2011-05-25 03:15:15 +02:00
Leo Franchi
456e57cf20 If no artist or description or song is specified, default to song-radio.
This makes a bunch of stations/playlists with mood/style only work
2011-05-24 08:10:08 -04:00
Dominik Schmidt
0b80cd65bd Update and simplify tomahawk.nsi 2011-05-24 05:59:52 +02:00
Leo Franchi
8ae2525ef4 libechonest 1.1.8 released 2011-05-23 23:36:37 -04:00
Leo Franchi
85c1227b7f Support mood & style types in tomahawk links 2011-05-23 23:19:21 -04:00
Leo Franchi
aafec62d45 Fix hang in suggestion list loading and share amongst all controls 2011-05-23 23:18:40 -04:00
Leo Franchi
597e459db1 Add completion for artists with echonest artist/suggest path 2011-05-23 23:11:10 -04:00
Leo Franchi
9b4c826e10 update required liben to 1.1.7 2011-05-23 21:17:09 -04:00
Leo Franchi
31b8ca4cb6 Clean up error and info display a little bit 2011-05-23 21:17:09 -04:00
Leo Franchi
2f5dd43e5b add a Song search type to dynamic playlists. 2011-05-23 21:17:09 -04:00
Leo Franchi
03c7c0e35f add support for Echo Nest "style" and "mood" parameters to playlists 2011-05-23 21:17:09 -04:00
Dominik Schmidt
0e92d6913c sipjreen: send Hey-I'm-an-automatic-presence-message as error message, will prevent ping-ponging at least for 0.1+ 2011-05-23 23:41:43 +02:00
Leo Franchi
da0385dfc6 remove stale param 2011-05-22 20:45:22 -04:00
Leo Franchi
1e6091189d Generate proper autoplaylist/station urls 2011-05-22 20:45:22 -04:00
Leo Franchi
428828426c fix artist hotttnesss link, switch to /station/ and /autoplaylist/, and artist_limitto 2011-05-22 20:45:22 -04:00
Dominik Schmidt
f70183a0e9 Try adding ${QT_INCLUDES} to portfwd includes 2011-05-23 02:00:49 +02:00
Dominik Schmidt
864dc8d096 Build portfwd dynamically 2011-05-23 01:51:44 +02:00
Leo Franchi
8dc7bca9dd Export XSPF to file instead of clipboard 2011-05-22 19:27:47 -04:00
Leo Franchi
f9442372d9 Show copy command for all playlists 2011-05-22 19:19:16 -04:00
Leo Franchi
5bf79e1686 Copy XSPF to clipboard for normal playlists. TODO: Upload to a server and provide a link 2011-05-22 19:17:44 -04:00
Leo Franchi
d1ee642c12 Support copying and parsing station and automatic playlist tomahawk:// links 2011-05-22 18:43:06 -04:00
Leo Franchi
6b877e3364 Load the year for results.
Fixes TWK-183. This will take some thinking post-0.1 as years are stored by trackid right now so if you get a peer's database with a clashing trackid we'll not handle that properly
2011-05-21 10:03:12 -04:00
Dominik Schmidt
6714865384 siptwitter: Do proper QTweetLib/ includes 2011-05-21 05:15:33 +02:00
Dominik Schmidt
b2f2e063de I knew this was too complicated 2011-05-21 04:53:42 +02:00
Dominik Schmidt
2590ae4ece Make siptwitter optional and rely on system qtweetlib on default 2011-05-21 04:39:27 +02:00
Leo Franchi
a564d53ff3 Crash safety 2011-05-20 15:18:26 -04:00
Jeff Mitchell
f3406e18b6 Add a module to find whether KDE4 is installed rather than whether it has a proper development environment, and use that for controlling protocol file installation 2011-05-20 11:47:16 -04:00
Leo Franchi
cd29484d52 fix playlist rename hookups 2011-05-19 22:19:16 -04:00
Christian Muehlhaeuser
cd0cb9efab * Use enum instead of int. 2011-05-20 03:54:27 +02:00
Christian Muehlhaeuser
303c32ba6f * Always connect model and view before loading a playlist so the spinner appears. 2011-05-20 03:40:28 +02:00
Christian Muehlhaeuser
c07ab346f4 * Deleting the engine might help preventing a crash in this case. 'Edgy' 2011-05-20 03:28:28 +02:00
Christian Muehlhaeuser
2cf8cd8b40 * Another getting-stuck protection for the pipeline. 2011-05-20 03:21:28 +02:00
Christian Muehlhaeuser
83b7de2d0b * Don't allow removed resolvers to break the pipeline. 2011-05-20 03:09:19 +02:00
Christian Muehlhaeuser
c5d7cbf2ef * Prevent locking? 2011-05-20 03:04:30 +02:00
Christian Muehlhaeuser
10f636e6ea * Protect pipeline from resolvers being removed. 2011-05-20 02:52:19 +02:00
Christian Muehlhaeuser
5b9ab4b478 * Hopefully the last set of debug spam cleanup :-) 2011-05-20 01:34:15 +02:00
Christian Muehlhaeuser
b2b836ff01 * Fixed unnamed DbCmd_SourceOffline & removed more debug output. Sigh :-) 2011-05-20 01:16:06 +02:00
Christian Muehlhaeuser
2f11b397dd * Remove more of the crazy amounts of debug output we've collected in the past few weeks. 2011-05-20 01:09:39 +02:00
Christian Muehlhaeuser
0fab2a9836 * Removed debug output and cleaned up sources a bit. 2011-05-20 00:43:33 +02:00
Jeff Mitchell
bf765dfc2e Possibly fix jherskowitz's problem testing authentication for last.fm. It seems that the info plugin was using toLower() to sanitize user names but the config dialog wasn't. Also some code cleanup/sync. 2011-05-19 18:09:56 -04:00
Christian Muehlhaeuser
8c29aeecfe * Remove nasty debug output. 2011-05-20 00:07:11 +02:00
Leo Franchi
43c4cebe12 Fix some warnings 2011-05-19 17:54:19 -04:00
Leo Franchi
3ede2ea281 Streamline the avatar code to use the proper icon role 2011-05-19 17:54:03 -04:00
Leo Franchi
e9b991e4c0 update the playlistview when a playlist is renamed, fixes TWK-168 2011-05-19 17:29:58 -04:00
Leo Franchi
b37127858f stop jumping around 2011-05-19 17:11:02 -04:00
Leo Franchi
d0e50a73f0 Sort playlists above stations
and the + items last
2011-05-19 16:54:41 -04:00
Christian Muehlhaeuser
234fdf07ba * Renamed jreen/ to jabber/ 2011-05-19 22:50:15 +02:00
Christian Muehlhaeuser
0253f0c1d4 * Removed old gloox-based jabber SIP. 2011-05-19 22:48:09 +02:00
Leo Franchi
6cc864e669 we no longer depend on gloox 2011-05-19 16:35:10 -04:00
Leo Franchi
d7e3272613 Copy result if available when creating a link 2011-05-19 15:43:37 -04:00
Christian Muehlhaeuser
3fdbfbd670 * Remove any resource from jabber friendly-names. 2011-05-19 15:28:41 +02:00
Dominik Schmidt
b53c052cfb Change jreen submodule url, 'git submodule sync' everyone! 2011-05-19 09:49:34 +02:00
Christian Muehlhaeuser
c47970f6c7 * Only log playbacks which were played for at least 10 seconds (locally) and 20 seconds (remotely). 2011-05-19 08:41:34 +02:00
Christian Muehlhaeuser
191dd48c87 * Don't log empty DeleteFiles DbCmds. 2011-05-19 08:21:26 +02:00
Christian Muehlhaeuser
ab221b2344 * Hide filter when it's disabled. 2011-05-19 08:04:02 +02:00
Christian Muehlhaeuser
03451c9197 * Made Artist- / TreeView the default view. Disabled album mode for this release. 2011-05-19 08:00:57 +02:00
Christian Muehlhaeuser
c2982e7312 * Fixed showing 'playlist' in a station's or automatic playlist's context menu. (TWK-171) 2011-05-19 07:11:01 +02:00
Christian Muehlhaeuser
9bac08deda * Fixed stations being stuck as busy after creating them. 2011-05-19 07:02:05 +02:00
Christian Muehlhaeuser
c919455d3f * Updated ChangeLog. 2011-05-19 05:57:32 +02:00
Christian Muehlhaeuser
9f1778a519 * Added LoadingSpinner support to ArtistView / TreeModel. 2011-05-19 05:46:41 +02:00
Christian Muehlhaeuser
f5bf6279bb * Bumped version number to 0.1.0. 2011-05-19 05:46:07 +02:00
Christian Muehlhaeuser
ad62bf87dc * Streamlined creating new playlists with entries.
* Made XSPFLoader, NewPlaylistWidget & GlobalActionManager use the new Playlist API.
* This prevents race-conditions.
* Fixed not being able to re-order playlist items.
2011-05-19 05:33:54 +02:00
Christian Muehlhaeuser
273eb9654f * Wait for the playlist to be created before we add stuff to it. 2011-05-19 04:42:01 +02:00
Christian Muehlhaeuser
4c4af2658b * Fix compiling when sparkle is enabled. 2011-05-19 03:30:12 +02:00
Christian Muehlhaeuser
5a64fc1361 * Protect DynamicPlaylists, too.
* Only load the five most recent playlists & 25 tracks in the WelcomeWidget.
2011-05-19 03:12:46 +02:00
Christian Muehlhaeuser
0d23934200 * Prevent creating a new revision while already updating a playlist. 2011-05-19 02:20:13 +02:00
Dominik Schmidt
7b154fbc12 Include config.h in tomahawkwindow.cpp 2011-05-19 00:37:48 +02:00
Christian Muehlhaeuser
7b773f4972 * Added some debug output for Leo. 2011-05-19 00:27:23 +02:00
Leo Franchi
f16451196b Don't allow dropping of playlist items onto the current playlist in the sourcetree. 2011-05-18 18:14:13 -04:00
Jeff Mitchell
73ffa506c7 Warnings-- 2011-05-18 18:09:07 -04:00
Jeff Mitchell
18708f7c28 Update qtweetlib; removes need to compile in oauth consumer token/secret and fixes bug needing custom qtweetstatus 2011-05-18 18:02:27 -04:00
Dominik Schmidt
da1089bbd9 Bump jreen submodule version 2011-05-18 22:22:17 +02:00
Jeff Mitchell
0a26584b98 Remove overzealous assert -- it's nice to assume that you'll never be passed invalid data, but nicer to assume you will :-) 2011-05-18 11:50:03 -04:00
Christian Muehlhaeuser
3cee48dc15 * Removed include/ folder and did some clean-ups. 2011-05-18 04:06:03 +02:00
Leo Franchi
917f904cbf hide queue whenever it is emptied, manually or by play progressing 2011-05-17 16:25:49 +02:00
Leo Franchi
1812477809 Fix bug where playable tracks were ignored in station previews 2011-05-17 16:00:27 +02:00
Leo Franchi
98c9ddf2b1 Add a timeout after last edit in artist line edits 2011-05-17 16:00:11 +02:00
Jeff Mitchell
6f37e942ce Add some debug 2011-05-16 15:26:27 -04:00
Jeff Mitchell
ef5f96c104 Safety fix 2011-05-16 13:46:48 -04:00
Jeff Mitchell
0006acb408 Add avatar/profile pic support to Twitter SIP 2011-05-16 13:09:20 -04:00
Dominik Schmidt
451695faab Update tomahawk.nsi 2011-05-14 18:45:25 +02:00
Dominik Schmidt
925485d916 win32: some compilation/linking fixes, still does not build 2011-05-14 01:07:03 +02:00
Jeff Mitchell
43194e777a Add missing file, doh 2011-05-13 12:19:22 -04:00
Jeff Mitchell
08d268a961 Use custom qtweetstatus until a compilation error is fixed upstream 2011-05-13 12:07:06 -04:00
Jeff Mitchell
1f7257e061 Add qtweetlib blocks files 2011-05-13 12:00:59 -04:00
Jeff Mitchell
4b801849d3 Add QTweetLib as a submodule 2011-05-13 11:52:23 -04:00
Jeff Mitchell
ade334dec1 Remove our copy; will use git submodule 2011-05-13 11:50:08 -04:00
Leo Franchi
12d0dec63c Set a top-level layout for the proxy dialog.
Also tweak the margins a bit and remove the sizegrip from being visible on osx.
2011-05-13 09:40:30 +02:00
Jeff Mitchell
aedc1b362d Fix liblastfm2 mingw32 compilation 2011-05-12 22:35:45 -04:00
Jeff Mitchell
dc8f52076d Remove option to turn on watch changes. QFileSystemWatcher is now deprecated and doesn't work right anyways. The logic is still there as it's mostly fine, but we need a new method for tracking. 2011-05-12 15:07:04 -04:00
Jeff Mitchell
f8d30b5d24 Changlogify SOCKS proxy 2011-05-12 15:05:44 -04:00
Jeff Mitchell
2fb1c0a817 Re-add proxy dialog, and add option for using proxy for DNS lookups (or not) 2011-05-12 14:56:03 -04:00
Jeff Mitchell
dee9c14579 Add a toggle to control whether DNS lookups happen through the proxy or not. Fixes connections in some cases. 2011-05-12 11:42:28 -04:00
Jeff Mitchell
d0ccbf4416 Fix crash in jreen and others by not processing events in infosystem's destructor. Instead, sleep for only 50ms at a time. 2011-05-12 10:39:03 -04:00
Christian Muehlhaeuser
04cbc78ff7 * Don't leak memory when setting new avatar on a Source. 2011-05-12 15:54:37 +02:00
Jeff Mitchell
853c0a0170 Add hack notice 2011-05-12 09:46:42 -04:00
Leo Franchi
0da5a958bb update changelog 2011-05-12 14:55:27 +02:00
Leo Franchi
5566eddd05 Remove sizegrip on sliding sheets on osx 2011-05-12 14:41:15 +02:00
Dominik Schmidt
968971a3cf Merge branch 'master' of git://github.com/tomahawk-player/tomahawk
Conflicts:
	src/libtomahawk/sip/SipHandler.cpp
2011-05-12 13:49:45 +02:00
Dominik Schmidt
2862b01691 Add Tomahawk version reported by SipPlugin to the diagnostics dialog. 2011-05-12 13:42:31 +02:00
Christian Muehlhaeuser
b453c387cd * Fixed not closing obsolete transfers. 2011-05-12 03:58:33 +02:00
Christian Muehlhaeuser
efb8d14ec9 * Fixed shutdown blocker in DbSyncConnection. 2011-05-12 02:09:33 +02:00
Christian Muehlhaeuser
4401fe15ac * Ignore pipeline results during shutdown. 2011-05-12 01:04:20 +02:00
Christian Muehlhaeuser
06e00a83c8 * Don't create pixmaps in the wrong thread. 2011-05-12 01:02:08 +02:00
Christian Muehlhaeuser
44585933dc * Auto advance to the next track in TreeView.
* Show proper icon for TreeView.
* Drag operations for tracks in TreeView / -Model.
* Various shutdown fixes.
* Properly hook up SipHandler signals again.
2011-05-12 00:36:28 +02:00
Dominik Schmidt
1f7f360d36 Don't log invalid sipinfos to the console but show them in the diagnostics window 2011-05-11 18:52:46 +02:00
Dominik Schmidt
986bc1119a sipjreen: warnings-- 2011-05-11 18:44:13 +02:00
Dominik Schmidt
fac969d39b sipjreen: Ignore error messages. 2011-05-11 18:44:13 +02:00
Dominik Schmidt
bcd90a81be Dont rely on valid sipinfos in diagnostics dialog 2011-05-11 18:44:13 +02:00
Leo Franchi
e2fac74d1d install_name_tool_ize_to_make_shit_work_kthxbbq 2011-05-11 15:44:47 +02:00
Leo Franchi
4634651d52 Merge branch 'master' into osxrelesae 2011-05-11 15:23:49 +02:00
Leo Franchi
272a67b703 Immediately update delegate with widget config change 2011-05-11 14:11:15 +02:00
Leo Franchi
15c02540d6 Immediately update delegate with widget config change 2011-05-11 14:08:42 +02:00
Dominik Schmidt
7ac7925ec6 sipjreen: avoid dangling pointer if the XmlConsole is not used 2011-05-10 02:30:36 +02:00
Dominik Schmidt
350be106c6 sipjreen: Add secret XmlConsole
Imported from qutim. Ruslan Nigmatullin gave me his compliance with
licensing this file as GPL3(+) (right now it lacks license headers
completely and might be GPL2+ in qutim).
2011-05-10 02:21:15 +02:00
Leo Franchi
bc9befa8a6 Merge remote branch 'origin/master' into osxrelesae 2011-05-09 17:28:50 +02:00
Dominik Schmidt
aeef7345af Log who a message the SipHandler receives is from 2011-05-09 17:22:34 +02:00
Leo Franchi
66c6cd56a8 slim vlc plugins and check for new resolver name format 2011-05-09 16:57:07 +02:00
Leo Franchi
d2631cf775 Merge remote branch 'origin/master' into osxrelesae 2011-05-09 16:26:22 +02:00
Dominik Schmidt
1d6153044c Export QDebug operator<<( QDebug dbg, const SipInfo &info ) 2011-05-09 14:45:38 +02:00
Dominik Schmidt
f171c8901b Export SipInfo class 2011-05-09 11:40:46 +02:00
Dominik Schmidt
eade3c5f26 Fix broken if-else 2011-05-09 11:33:03 +02:00
Dominik Schmidt
06f33c5d81 Add missing return, compiled here fine :\ 2011-05-09 11:27:08 +02:00
Dominik Schmidt
2e69f91671 Use QHostInfo instead of QHostAddress 2011-05-09 11:19:58 +02:00
Dominik Schmidt
9c30600793 Use SipInfo in SipHandler & SipPlugin and fix Jabber to use the new API 2011-05-09 11:19:58 +02:00
Dominik Schmidt
9cd07349dc Don't assert on qDebug( SipInfo() ) 2011-05-09 11:19:58 +02:00
Dominik Schmidt
733e06b372 Add SipInfo class 2011-05-09 11:19:57 +02:00
Christian Muehlhaeuser
7ba8581ac3 * Fix potential issue which caused Pipeline to get stuck. 2011-05-09 01:22:49 +02:00
Christian Muehlhaeuser
7b4c425ec5 * Print out some more debug in case we run into problems. 2011-05-09 01:10:31 +02:00
Christian Muehlhaeuser
f2eb8a7a75 * Improved Pipeline. 2011-05-09 00:31:25 +02:00
Dominik Schmidt
48d029468d sipjreen: googlewrapper: hardcode server and port so it works through proxies and with all google apps jids when the domain has no jdns entry 2011-05-08 20:00:32 +02:00
Christian Muehlhaeuser
47158465d9 * Fixed pipeline. Speeds it up, allows for parallel execution of multiple same-weighted resolvers. 2011-05-08 19:12:56 +02:00
Dominik Schmidt
012b72d4fd Remove legacy dependency on gnutls 2011-05-08 18:54:16 +02:00
Dominik Schmidt
12462ead58 Oops, fix build 2011-05-08 15:51:16 +02:00
Dominik Schmidt
6118432dd7 Add proxy support to the sip plugins and the sip handler 2011-05-08 15:44:32 +02:00
Dominik Schmidt
6c8252cefb Bump jreen submodule revision 2011-05-08 15:43:35 +02:00
Dominik Schmidt
5c732098f7 sipjreen: turn stupid assert into a sensible error message 2011-05-08 15:43:01 +02:00
Leo Franchi
cdcc6516df Merge remote branch 'origin/master' into osxrelesae 2011-05-07 20:29:29 -04:00
Christian Muehlhaeuser
1987b4c378 * Fix result-hint crash. 2011-05-08 02:27:56 +02:00
Leo Franchi
942e5f892b autodetect and populate resovlers named foo_tomahawkresolver* in the binary dir of tomahawk 2011-05-07 18:50:07 -04:00
Leo Franchi
2c08d2d186 Merge remote branch 'origin/master' into osxrelesae 2011-05-07 18:34:35 -04:00
Christian Muehlhaeuser
e8430e0501 * Depend on libEchonest 1.1.5. 2011-05-08 00:23:52 +02:00
Leo Franchi
7adb08f701 Default to watch for changes off until we handle ru nning out of watches 2011-05-07 18:05:45 -04:00
Leo Franchi
7258f05070 show default music location if none is saved yet 2011-05-07 18:04:34 -04:00
Christian Muehlhaeuser
5294922a02 * Don't use non-file / non-servent resultHints for now. 2011-05-07 23:54:30 +02:00
Leo Franchi
9944534581 deposx fixes for osx 2011-05-07 17:36:49 -04:00
Christian Muehlhaeuser
1b74430ea2 * Fixed dupes in resources.qrc. 2011-05-07 21:30:14 +02:00
Leo Franchi
b8f6192014 fix menu addition 2011-05-07 10:16:58 -04:00
Leo Franchi
0c5536bf78 Only show separator on non-osx since it makes the otherwise empty Help menu show up 2011-05-07 10:13:19 -04:00
Leo Franchi
d657c43d72 Don't get a QNetworkReply* for http urls as we just discard it later 2011-05-07 09:37:23 -04:00
Jeff Mitchell
84f6fa9b33 Don't keep state of a QNetworkReply in a member variable. Get it on-demand. 2011-05-07 09:34:22 -04:00
Dominik Schmidt
e36037a45e Merge branch 'diag-dialog' 2011-05-07 13:53:20 +02:00
Leo Franchi
f982689443 stop spinner if tracks are removed 2011-05-06 12:55:55 -04:00
Leo Franchi
e1cdc4820a change SIP menu entry to friendlyname rather than JREEN 2011-05-06 12:17:09 -04:00
Leo Franchi
8b2ade25de make stations behave when multiple result signals are emitted by the pipeline 2011-05-06 11:55:24 -04:00
Leo Franchi
8c3745896c add resolved tracks as we get them when previewing, and stop previewing if we're running 2011-05-06 11:02:21 -04:00
Leo Franchi
3a6abc3f5e remove autoconnect options from config pages---now checking/unchecking sip plugins in the config dialog does the same thing and it was confusing 2011-05-06 10:59:42 -04:00
Leo Franchi
aaebdc6a4b Don't let users edit readonly playlists with Delete key 2011-05-06 07:43:12 -04:00
Dominik Schmidt
b4eda751e0 sipjreen: emit peerOffline for all contacts when connection is lost, not when the plugin is asked to disconnect 2011-05-06 11:51:27 +02:00
Dominik Schmidt
81c85b3fd5 DiagnosticsDialog: Add current time (+ some micro formatting in the log) 2011-05-06 11:49:51 +02:00
Leo Franchi
5f67b3453b update sourcelist on db dync 2011-05-05 21:58:57 -04:00
Dominik Schmidt
31c3c50292 DiagnosticsDialog: Add more details on peers. Ugly caching in SipHandler, wanna avoid ugly-back-and-forth-json-parsing until we have a proper SipInfo class 2011-05-06 02:13:01 +02:00
Dominik Schmidt
6e06e36573 DiagnosticsDialog: Add SipInfo (visibility, ip and port) 2011-05-06 01:13:01 +02:00
Dominik Schmidt
d7d883cd3c DiagnosticsDialog: add update and copy-to-clipboard button 2011-05-06 00:52:27 +02:00
Dominik Schmidt
8b3e1dc372 DiagnosticsDialog: Add SipPlugin log 2011-05-06 00:27:23 +02:00
Dominik Schmidt
fcb9eb33e4 Add peersOnline() to SipPlugin 2011-05-06 00:25:06 +02:00
Dominik Schmidt
5a9425a930 Add a basic DiagnosticsDialog without actual functionality 2011-05-05 22:22:16 +02:00
Leo Franchi
7b43376e61 Don't hookup signals twice 2011-05-05 14:59:13 -04:00
Leo Franchi
08c78dbd97 some error caching in sip plugin 2011-05-05 14:59:13 -04:00
Leo Franchi
fa18cf9ced Up max fds on osx to the max we can set 2011-05-05 08:16:30 -04:00
Leo Franchi
8d039cdc91 Show Connecting... state for jabber and in delegate 2011-05-04 22:56:04 -04:00
Jeff Mitchell
f751c1559b Make config for twitter sip lowercase like everywhere else 2011-05-04 19:09:04 -04:00
Jeff Mitchell
18101c32b0 Fix regression when posting twitter status message 2011-05-04 18:34:57 -04:00
Jeff Mitchell
2c8eaef8ff Fix signal/slot typo 2011-05-04 18:17:19 -04:00
Dominik Schmidt
4638b7c21a sipjreen: handle invisible peers correctly 2011-05-04 21:35:34 +02:00
Leo Franchi
40c3196a4f fix menus 2011-05-04 14:15:50 -04:00
Leo Franchi
ebd78c06b0 only show clicked wrench as down 2011-05-04 11:56:00 -04:00
Leo Franchi
3bc05bc73b fix checkrect hit area in delegate too 2011-05-04 11:42:53 -04:00
Leo Franchi
59b64bfdd9 open config dialogs as a sheet on osx, and call gmail google 2011-05-04 10:42:54 -04:00
Leo Franchi
3dc317377f oops, Kuba was right, version is not tomahawk version 2011-05-04 09:22:11 -04:00
Leo Franchi
231c2569f6 move desktop file to admin/unix, and set current version in cmake 2011-05-04 09:17:54 -04:00
Leo Franchi
948631846e Merge pull request #29 from zizzfizzix/desktop-file.
Add a .desktop file on linux. Thanks Kuba!
2011-05-04 05:59:55 -07:00
Dominik Schmidt
e2890c1e93 sipjreen: do proper reconnection handling now. even with translated errors :P 2011-05-04 14:50:02 +02:00
Dominik Schmidt
d8023b285f sipjreen: improve staying-online 2011-05-04 14:36:05 +02:00
Leo Franchi
607ebf1c24 move location of autoconnect checkbox 2011-05-03 23:36:35 -04:00
Leo Franchi
188b14de39 aint over till it's over 2011-05-03 23:31:09 -04:00
Leo Franchi
5d098438c0 last icon resize tonight 2011-05-03 23:26:12 -04:00
Leo Franchi
b7d2d129c8 icon sizes 2011-05-03 23:25:28 -04:00
Leo Franchi
d96061bd0d add files 2011-05-03 23:21:31 -04:00
Leo Franchi
f774ae4731 icon update
add zeroconf config too
2011-05-03 23:21:00 -04:00
Leo Franchi
c854a090e6 Add autoconnect to twitter dialog. Make dialogs prettier 2011-05-03 22:44:29 -04:00
Jeff Mitchell
aa9a3124ef Make dirlister also delete in-thread 2011-05-03 22:29:44 -04:00
Jeff Mitchell
8b229dd4e3 Fix other area scanner is destroyed to do it in-thread 2011-05-03 22:18:13 -04:00
Jeff Mitchell
a2a2f036a2 Fix build, doh 2011-05-03 22:14:00 -04:00
Jeff Mitchell
20045b2e14 Merge branch 'master' of github.com:tomahawk-player/tomahawk 2011-05-03 22:13:19 -04:00
Jeff Mitchell
f4508fc79a Properly delete scanner in-thread 2011-05-03 22:13:16 -04:00
Leo Franchi
255b251230 fix creating plugin through config dialog signal hookups 2011-05-03 22:12:22 -04:00
Leo Franchi
af0ac5a848 fix build 2011-05-03 22:11:23 -04:00
Leo Franchi
208bbb49b7 migrate legacy gmail accounts to gmail rather than jabber 2011-05-03 22:01:32 -04:00
Jeff Mitchell
a81bca6ce1 Merge remote branch 'origin/master' into leos-crash
Conflicts:
	src/sip/twitter/twitter.cpp
	src/sip/twitter/twitterconfigwidget.cpp
2011-05-03 21:58:24 -04:00
Jeff Mitchell
bcfea87607 Remove more extra debugging, and fix a couple omissions 2011-05-03 21:53:39 -04:00
Jeff Mitchell
1a1c9a68ed Remove extra liblastfm2 debug 2011-05-03 21:48:14 -04:00
Leo Franchi
7d1067dafa fix some crashes 2011-05-03 19:37:58 -04:00
Leo Franchi
ea5cefd2d4 Auto-create zeroconf plugin with new installs
Actually save no-config-widget plugins to settings too
2011-05-03 19:17:00 -04:00
Leo Franchi
81fe1c8061 allow factories to be marked as unique 2011-05-03 19:10:36 -04:00
Jeff Mitchell
33530084b0 Properly delete infosystem objects in the correct thread 2011-05-03 18:44:09 -04:00
Leo Franchi
7be0cdb714 show zeroconf icon 2011-05-03 18:42:46 -04:00
Leo Franchi
3b734df57e tweak icons, make things work more 2011-05-03 18:41:01 -04:00
Jeff Mitchell
eb31702711 More debug 2011-05-03 18:06:42 -04:00
Leo Franchi
811ac70fa6 fix config rect handling 2011-05-03 18:04:27 -04:00
Jeff Mitchell
7f26f34fdd Revamp how the plugins interact with the infosystemworker 2011-05-03 18:00:14 -04:00
Leo Franchi
63738b58c0 disable inline factories and use +/- button for now 2011-05-03 17:49:43 -04:00
Jeff Mitchell
de28596438 We're making progress...move back into a thread 2011-05-03 17:06:04 -04:00
Jeff Mitchell
97ca55fd53 A fix for the introduced crash in liblastfm, ready for more lfranchi debugging 2011-05-03 16:58:10 -04:00
Leo Franchi
52c2fd2a5a spacing tweaks, they will never end 2011-05-03 16:50:30 -04:00
Leo Franchi
c72f6cf508 fix merge config changes 2011-05-03 16:38:45 -04:00
Jeff Mitchell
dd4d268c11 readd possibly crash code 2011-05-03 16:21:27 -04:00
Leo Franchi
ea7e8f6ede Merge remote-tracking branch 'origin/master'
Conflicts:
	src/libtomahawk/sip/SipPlugin.cpp
	src/resolverconfigdelegate.cpp
	src/sip/jreen/jabber.cpp
	src/sip/jreen/jabber.h
2011-05-03 16:16:16 -04:00
Leo Franchi
e1aee9b299 Merge branch 'master' of github.com:tomahawk-player/tomahawk
Conflicts:
	src/libtomahawk/tomahawksettings.cpp
	src/libtomahawk/tomahawksettings.h
	src/sip/jreen/jabber.cpp
	src/sip/jreen/jabber.h
	src/tomahawkapp.cpp
	src/tomahawkwindow.h
	thirdparty/jreen
2011-05-03 15:56:08 -04:00
Kuba Serafinowski
6531c9f1e4 Install .desktop along with icons for it 2011-05-03 21:32:18 +02:00
Kuba Serafinowski
ec4961394a add .dessktop file 2011-05-03 21:31:23 +02:00
Jeff Mitchell
b8bb29161f More debug and a fix 2011-05-03 14:48:17 -04:00
Jeff Mitchell
a8ad8cd774 I can haz lfranchi crash fix? 2011-05-03 14:34:31 -04:00
Jeff Mitchell
e802201341 Merge branch 'master' into leos-crash 2011-05-03 14:18:12 -04:00
Jeff Mitchell
fe478a0759 Switch around when the oauthtwitter gets its nam and add some debug 2011-05-03 14:18:05 -04:00
Dominik Schmidt
7a595aaa76 remove last warning ;-) 2011-05-03 20:00:49 +02:00
Leo Franchi
e001c6a197 more build fixes 2011-05-03 13:56:26 -04:00
Jeff Mitchell
b42e36a240 Add another bit of debug 2011-05-03 13:56:00 -04:00
Leo Franchi
48246e9ec1 more build fixes 2011-05-03 13:49:55 -04:00
Jeff Mitchell
3b84824f11 Gah our startup is so breaky. 2011-05-03 13:49:10 -04:00
Leo Franchi
93212251b6 fix build 2011-05-03 13:47:57 -04:00
Jeff Mitchell
e615362672 add more debug 2011-05-03 13:41:24 -04:00
Dominik Schmidt
d4109d8575 Remove warnings (aka make it compile with -Werror) 2011-05-03 19:40:51 +02:00
Jeff Mitchell
8b2ce768d1 Move scrobbler init far down where it belongs 2011-05-03 13:13:04 -04:00
Jeff Mitchell
e6819d48a8 Move nam init further up 2011-05-03 13:08:04 -04:00
Jeff Mitchell
44173808cb Hopefully fix startup crash in single-threaded infosystemworker mode 2011-05-03 12:36:23 -04:00
Dominik Schmidt
6239f90cf0 sipjreen: remove unneeded m_connected state - m_client knows better about it 2011-05-03 17:12:54 +02:00
Dominik Schmidt
117bff483d Add setProxy() method to SipPlugin interface 2011-05-03 16:53:29 +02:00
Dominik Schmidt
5b961e1a58 sipjreen: fix build 2011-05-03 16:12:32 +02:00
Dominik Schmidt
2772e69a40 sipjreen: implement setProxy() 2011-05-03 15:58:47 +02:00
Dominik Schmidt
99563bfde6 sipjreen: constify parameters in SipMessageExtension 2011-05-03 15:22:43 +02:00
Dominik Schmidt
137c608fa2 sipjreen: hopefully fix a bug that could happen with visible:false peers 2011-05-03 15:22:43 +02:00
Jeff Mitchell
7330c9364d Add debug towards figuring out leo's crash 2011-05-03 08:33:21 -04:00
Jeff Mitchell
bbfd4c91e7 Fix scrobbling. Thanks lfranchi for being my rubber duck. 2011-05-03 08:03:17 -04:00
Jeff Mitchell
085e6f11bd A bit more safety -- kind of redundant with the mutex, but doesn't hurt to have it 2011-05-03 08:03:01 -04:00
Leo Franchi
5b0ed433f5 fix recent playlists 2011-05-02 23:05:59 -04:00
Leo Franchi
bc1ce656ae quiet up debug 2011-05-02 22:29:29 -04:00
Leo Franchi
8b95f7330b also send args on first startup, not completely working 2011-05-02 22:17:53 -04:00
Leo Franchi
0f47027c9c Cache playlist guids to speed up reloading 2011-05-02 22:14:45 -04:00
Leo Franchi
aec8c97eac Add context menu item to create track links 2011-05-02 22:05:29 -04:00
Leo Franchi
aff34374cb update when new playlists are reset 2011-05-02 18:58:06 -04:00
Leo Franchi
1bb69c0fc9 add Open command to url handling 2011-05-02 18:56:30 -04:00
Leo Franchi
bbbd1a48bb add new welcomeplaylistmodel 2011-05-02 18:22:40 -04:00
Leo Franchi
1bde1fe1bb fix indenting 2011-05-02 18:22:25 -04:00
Leo Franchi
40d3b87af5 make welcomewidget and recently played playlist behave 2011-05-02 18:22:16 -04:00
Leo Franchi
59d72df046 Merge remote-tracking branch 'origin/master' into cleanmaster 2011-05-02 16:29:42 -04:00
Jeff Mitchell
58692f424d Fix condition where duplicate connections could happen from twitter 2011-05-02 16:27:34 -04:00
Dominik Schmidt
81065243f4 sipjreen: regressions--: handle server and port settings correctly 2011-05-02 22:11:47 +02:00
Dominik Schmidt
92f23bc20b sipjreen: regressions--: subscription handling
UPDATE JREEN to make it work!
2011-05-02 17:08:15 +02:00
Jeff Mitchell
9ed8caf277 Use liblastfm NAC in infosystemworker too, if available 2011-05-02 10:14:59 -04:00
Leo Franchi
68a3df17c4 change around some commands 2011-05-02 09:13:21 -04:00
Leo Franchi
55be3010e5 work on new welcome widget 2011-05-02 09:13:21 -04:00
Dominik Schmidt
e8be8e95b5 Weird, where did this come from?! 2011-05-02 04:07:31 +02:00
Dominik Schmidt
819fc4881e Merge branch 'master' of git://github.com/tomahawk-player/tomahawk 2011-05-02 04:04:12 +02:00
Dominik Schmidt
0d43d54c3b ugly hacks to make liblastfm compile on windows 2011-05-02 04:04:04 +02:00
Leo Franchi
6340b82921 Use a unique bookmarks playlist guid 2011-05-01 21:07:45 -04:00
Dominik Schmidt
d6c73e44e0 sipjreen: regressions--: update menu correctly 2011-05-02 01:37:27 +02:00
Dominik Schmidt
ea159cb2f4 sipjreen: warnings-- 2011-05-02 00:05:15 +02:00
Dominik Schmidt
a8441ffb4c sipjreen: regressions--: request subscription when adding someone to the roster 2011-05-01 23:30:18 +02:00
Dominik Schmidt
26d383eeab Update to latest jreen with subscription api, some fixes for crashes and proxy support 2011-05-01 22:35:57 +02:00
Dominik Schmidt
eba947854b Unpimple sipjreen 2011-05-01 22:33:45 +02:00
Christian Muehlhaeuser
e863324c40 * Move debug output before ASSERT. 2011-05-01 17:12:18 +02:00
Leo Franchi
2b408744d7 play the track if nothing is playing. doesn't select in the playlist yet, thinking of an elegant solution 2011-05-01 11:08:01 -04:00
Leo Franchi
24f58b45d3 Select playlist in sidebar when creating bookmark playlist 2011-05-01 10:57:10 -04:00
Jeff Mitchell
d5c182c151 Switch around a couple of qnam slots 2011-05-01 10:29:31 -04:00
Jeff Mitchell
7f7c55a293 Only delete qnam objects in liblastfm2 that it creates itself 2011-05-01 10:27:43 -04:00
Christian Muehlhaeuser
e8f2eedcb9 * Don't assert on unknown sources, but print out debug. 2011-05-01 15:30:15 +02:00
Christian Muehlhaeuser
4c3f5b0399 * Should fix compiling on OS X. 2011-05-01 14:54:48 +02:00
Christian Muehlhaeuser
5379d35084 * Should fix compiling on OS X. 2011-05-01 14:43:18 +02:00
Christian Muehlhaeuser
82a5058e4c * Fix AudioEngine killing Phonon's QIODevice. 2011-05-01 13:05:04 +02:00
Jeff Mitchell
af49afac35 work around isLocalFile not existing 2011-05-01 03:01:34 -04:00
Jeff Mitchell
032e6f8d6f Update local liblastfm2 to deal better with threads and qnams 2011-05-01 02:22:01 -04:00
Jeff Mitchell
2a4b0b2956 First part of more threadsafety, mostly for liblastfm2's qnam 2011-05-01 02:22:01 -04:00
Leo Franchi
c2b7ea9411 Merge remote-tracking branch 'origin/master' into cleanmaster 2011-05-01 01:29:41 -04:00
Leo Franchi
ab2e91fdd6 Allow url result-hints, load them from XSPFs too.
Add support for various tomahawk:// links
2011-05-01 01:27:34 -04:00
Jeff Mitchell
683d4a4529 Find local phonon installs if they exist instead of filtering them out 2011-05-01 01:24:29 -04:00
Jeff Mitchell
3f3a2798c7 have the worker let any interested plugins know when the nam changes, and have the echonestplugin make use of that to set the appropriate nam for the thread 2011-05-01 01:04:48 -04:00
Jeff Mitchell
4768f9acd7 Attempt to fix Leo's crash in destruction of infosystemworker 2011-04-30 21:55:23 -04:00
Jeff Mitchell
2a39355fb6 Add pushInfo API to InfoSystem, and switch the LastFM Plugin over to
using it
2011-04-30 17:10:36 -04:00
Jeff Mitchell
eec9283aff Don't start on the script resolver page (I'm assuming this was
accidental?)
2011-04-30 17:10:23 -04:00
Jeff Mitchell
9dae7ded86 Fix crash on config dialog close 2011-04-30 15:19:05 -04:00
Leo Franchi
fca9da24cf support deleting sip plugins via context menu 2011-04-30 14:12:04 -04:00
Jeff Mitchell
dfc518cedc Use a new QNAM in the thread to avoid reparenting problems 2011-04-30 14:07:20 -04:00
Leo Franchi
5b6317b282 pong 2011-04-30 13:29:22 -04:00
Leo Franchi
1ce8c7dc3e die margin die 2011-04-30 13:26:31 -04:00
Jeff Mitchell
37b9dea002 Split infosystemworker into its own header 2011-04-30 13:25:17 -04:00
Leo Franchi
a9eb684a8b UI tweaks for linux this time 2011-04-30 13:24:25 -04:00
Leo Franchi
8004eb08c3 more osx UI fixes.. 2011-04-30 13:04:10 -04:00
Jeff Mitchell
1b656fe874 Clean up some of the threadification 2011-04-30 12:55:18 -04:00
Jeff Mitchell
750331d920 Merge branch 'master' into infosystem-threadify 2011-04-30 12:51:21 -04:00
Jeff Mitchell
63b1f4eae7 Don't allow a phonon version less than 4.5.0 as it causes problems 2011-04-30 11:25:54 -04:00
Jeff Mitchell
4fb41ff417 Initial work on threadifying 2011-04-30 11:10:29 -04:00
Leo Franchi
2d2426732c fix whitespace 2011-04-30 09:24:51 -04:00
Leo Franchi
3d0d61524f Merge branch 'tiegz-master' 2011-04-30 09:12:28 -04:00
Leo Franchi
5b633a25ee more ui tweaks 2011-04-29 18:41:48 -04:00
Leo Franchi
a765937c9b really kill the home icon 2011-04-29 18:40:54 -04:00
Leo Franchi
c724205531 tweak soem margins 2011-04-29 18:20:28 -04:00
Leo Franchi
6be3027be5 Merge remote-tracking branch 'origin/master' 2011-04-29 18:05:42 -04:00
Leo Franchi
cfff4a91cb make it a new config dialog 2011-04-29 18:04:55 -04:00
Jeff Mitchell
2af7c9f18e Fix a bug and start the skeleton for the thread-based worker 2011-04-29 17:01:58 -04:00
Leo Franchi
bba33f0bf8 Make the treeview work, and config work, and lots of things work 2011-04-29 16:05:48 -04:00
Jeff Mitchell
48f1745614 Hopefully fix problems with the auto-message going to gtalk users 2011-04-29 08:30:07 -04:00
Leo Franchi
e2f0bc6c17 add files 2011-04-28 07:37:53 -04:00
Leo Franchi
b2a0e41eab Merge branch 'master' of github.com:tomahawk-player/tomahawk into upstream 2011-04-28 07:36:35 -04:00
Leo Franchi
bf0b58fe60 Support year in external resolvers too 2011-04-28 07:36:12 -04:00
Leo Franchi
eb8a4f6711 Some more work on the config UI 2011-04-28 07:35:16 -04:00
Leo Franchi
2380838347 Support year in external resolvers too 2011-04-28 07:33:40 -04:00
Leo Franchi
e673c01d3c add a google wrapper around the jreen jabber plugin 2011-04-27 17:55:50 -04:00
Leo Franchi
33e940f708 Set sourcetree to itunes/mail-like grey and blue on osx. Somehow this was lost during my merge. 2011-04-26 23:35:48 -04:00
Leo Franchi
8d777ff6a9 Initial work towards SIP Factoryizing. Migrates and stuff, too. Config dialog unfinished. 2011-04-25 21:55:26 -04:00
Leo Franchi
3f740ce4a0 require QJson 0.7.0 2011-04-25 16:49:54 -04:00
Leo Franchi
6945b503cf remove Home action from toolbar as it's now the recently played item in the sourcelist 2011-04-25 15:59:45 -04:00
Leo Franchi
033987eedb use the sourceitem decoration role instead so we get teh supercollection icon 2011-04-24 21:06:33 -04:00
Leo Franchi
2507f8306c Revert change of jreen namespace, as we were tracking Jreen trunk correctly but
our submodule was behind on clean checkouts. Updated now.

Revert "The Jreen guys went and changed capitalization of their namespace, which"

This reverts commit 41f1ac9713.
2011-04-23 12:47:45 -04:00
Leo Franchi
dd685d600d Update jreen submodule to newest trunk. 2011-04-23 12:43:45 -04:00
Jeff Mitchell
41f1ac9713 The Jreen guys went and changed capitalization of their namespace, which
is why build was failing.

Jreen--

or, I guess,
jreen++
2011-04-22 10:46:29 -04:00
Leo Franchi
056efe2cd9 show name when editing first 2011-04-22 17:39:01 -04:00
Leo Franchi
519e1bb71e allow to rename playlist when creating via drag
Merge branch 'master' into sourcelistrefactor

Conflicts:
	src/tomahawkwindow.cpp
2011-04-22 17:09:23 -04:00
Leo Franchi
632889b590 fix a few more things 2011-04-22 16:32:38 -04:00
Leo Franchi
062cf35324 sort playlists by date added
allow users to drag tracks onto the New Playlist item to seed a new plsylist
2011-04-22 16:07:44 -04:00
Leo Franchi
8cdc9931b1 Add some tooltips, thanks Pranav 2011-04-22 16:00:58 -04:00
Leo Franchi
e6c7a73110 make welcome widget not abuse the filesystem 2011-04-22 15:31:40 -04:00
Leo Franchi
6a323832a9 split out items in their own parts
make generic item take a funcptr so we keep the link going
2011-04-22 14:43:44 -04:00
Jeff Mitchell
02272c0f87 Use the explicitly-configured server when one exists, otherwise do DNS querying 2011-04-22 13:11:57 -04:00
Jeff Mitchell
7239d3fdfd Add a QCache to cache recent hits in memory 2011-04-22 13:02:35 -04:00
Jeff Mitchell
e3aa497b62 Fix crashes and bad accesses 2011-04-22 13:02:01 -04:00
Leo Franchi
4ffe635486 FindPhonon already spits out all the messages we need 2011-04-22 10:02:44 -04:00
Leo Franchi
695e029709 Add FindPhonon.cmake from kde, and uses phonon/ includes as that's the "proper" include path for both qt- and kde-phonon 2011-04-22 09:59:53 -04:00
Jeff Mitchell
89606c49d4 Warnings-- 2011-04-22 09:58:43 -04:00
Jeff Mitchell
a8253c4abd Merge remote branch 'origin/master' into single-file-cache 2011-04-22 09:52:02 -04:00
Leo Franchi
dd5c7b0af4 fix up
Merge branch 'master' into sourcelistrefactor

Conflicts:
	src/sourcetree/sourcetreeview.cpp
2011-04-22 09:29:04 -04:00
Christian Muehlhaeuser
15014f137b * Merged phonon into master. 2011-04-22 15:27:33 +02:00
Christian Muehlhaeuser
7b10f99b53 * This wasn't supposed to end up in phonon branch. 2011-04-22 15:24:25 +02:00
Christian Muehlhaeuser
48265c8262 * Removed phonon warning. 2011-04-22 15:11:24 +02:00
Christian Muehlhaeuser
34ac2b6b86 * Merged master into phonon branch. 2011-04-22 15:08:59 +02:00
Leo Franchi
a8d8a485e5 Add support for stations and automatic playlists back to the sourcetree
don't look at this commit for too long or some parts might cause your eyes to fall out of your head. i apoligize in advance.
2011-04-21 23:29:05 -04:00
Christian Muehlhaeuser
ae36ce956a * Always show source's current friendly name, not a cached copy of it. 2011-04-22 02:08:58 +02:00
Jeff Mitchell
1640872bd9 Update infosystemcache to load from disk on demand. It still uses a (much smaller) amount of memory for one optimization: tracking known hashes to file paths. This prevents re-reading directory trees over and over and constantly refiltering them. 2011-04-21 12:11:51 -04:00
Leo Franchi
127548e3a2 Merge remote-tracking branch 'origin/master' into sourcelistrefactor
Conflicts:
	src/sourcetree/sourcetreeitem.cpp
	src/sourcetree/sourcetreeview.cpp
	thirdparty/jreen
2011-04-21 11:32:14 -04:00
Leo Franchi
61bf30de57 Merge remote-tracking branch 'origin/master' into sourcelistrefactor 2011-04-21 11:22:33 -04:00
Jeff Mitchell
d727f3a319 Merge branch 'master' into single-file-cache 2011-04-21 10:38:55 -04:00
Dominik Schmidt
3e20fd1f6a Let SipHandler set the avatar for MyCollection 2011-04-21 13:42:26 +02:00
Leo Franchi
990e160a2e allow renaming of local playlists 2011-04-20 22:21:43 -04:00
Leo Franchi
74b310eb00 do lots of stuff.
rename playlistmanager to viewmanager. link pages in the viewmanager to indexes in the sourcetree, so it is never out of sync. yay!
2011-04-20 22:14:45 -04:00
Frank Osterfeld
3182a294d7 Do not truncate FLAC playback.
If "finish" is set, play until the buffer is empty.
2011-04-20 23:34:13 +02:00
Dominik Schmidt
84019e5d11 Add DLLEXPORT macro to SipHandler 2011-04-20 21:43:14 +02:00
Dominik Schmidt
26be5c954d Merge branch 'jreen-avatars'
Conflicts:
	src/libtomahawk/source.h
2011-04-20 21:31:44 +02:00
Dominik Schmidt
d9a4b71414 Use the AvatarManager and show avatars in the MainWindow. 2011-04-20 21:26:16 +02:00
Dominik Schmidt
ddb7e012df sipjreen: Add AvatarManager class 2011-04-20 21:12:04 +02:00
Dominik Schmidt
47fd7b8285 Add avatar support to controlconnection, source and sourcetreeview. 2011-04-20 20:36:49 +02:00
Dominik Schmidt
def3e3d868 Move SipHandler from application to library 2011-04-20 20:22:06 +02:00
Jeff Mitchell
e36b6bd41e Merge remote branch 'origin/master' into single-file-cache 2011-04-20 13:01:41 -04:00
Jeff Mitchell
439521424b Merge branch 'master' into single-file-cache 2011-04-20 12:59:30 -04:00
Alejandro Wainzinger
af9d2d388c Lower the amount of time PortFwdThread waits until destruction. Greatly reduces shutdown time in the case where it can't communicate properly. 2011-04-20 12:58:59 -04:00
Christian Muehlhaeuser
2e80475a9d * Moved --demo stuff to Source class. 2011-04-20 16:21:12 +02:00
Alejandro Wainzinger
cbd5196080 Fix CMake. 2011-04-19 22:26:18 -04:00
Dominik Schmidt
d87398c47a First shitty implementation of loading avatars 2011-04-20 00:26:13 +02:00
Jeff Mitchell
248e3e7a4a Rename some values and make slots and other functions use const values,
for sanity checking
2011-04-19 16:37:37 -04:00
Jeff Mitchell
edaabc0ae6 Efficiency++ 2011-04-19 15:57:13 -04:00
Jeff Mitchell
9310755e92 Fix loading files, and preventing duplicates 2011-04-19 15:53:26 -04:00
Jeff Mitchell
66358d2103 Use hex in the filename 2011-04-19 15:22:29 -04:00
Jeff Mitchell
b916125756 Whoops, actually start the sync timer! 2011-04-19 09:48:42 -04:00
Jeff Mitchell
d391b9bd66 Per-file cache entry saving and loading 2011-04-19 09:43:53 -04:00
Jeff Mitchell
b9f80edea9 Move infosystem register meta types to the location as the other register
statements
2011-04-19 08:48:02 -04:00
Jeff Mitchell
43834a17bc Add sync timer to cache to avoid saving everything at shutdown (runs
once a minute)
2011-04-19 08:38:47 -04:00
Christian Muehlhaeuser
af0b7f9a74 * Merged master into phonon branch. 2011-04-19 00:03:55 +02:00
Dominik Schmidt
ed93084315 Merge branch 'jreen-tpqt4-comp' 2011-04-18 22:35:42 +02:00
Dominik Schmidt
04b4c69ab3 sipjreen: Add I'm-not-a-person-auto-response 2011-04-18 22:35:30 +02:00
Dominik Schmidt
01980ab6d1 sipjreen: Add authError signal 2011-04-18 22:35:18 +02:00
Dominik Schmidt
35d51a2cd2 sipjreen: Fix some signal and slot connections 2011-04-18 22:35:09 +02:00
Jeff Mitchell
309024a467 Switch some calls from InfoCustomData to InfoCriteriaHash, much simplifying 2011-04-18 10:40:45 -04:00
Jeff Mitchell
8bafe8bb9a Rename InfoCacheCriteria into something more generic since many plugins will probably use it for input data 2011-04-18 10:12:37 -04:00
Dominik Schmidt
5b01ae5268 On default use system jreen package, allow the user to enforce in-tree compilation with -DINTERNAL_JREEN=ON. 2011-04-17 21:25:24 +02:00
Dominik Schmidt
b52b87f818 Updated jreen submodule 2011-04-17 19:49:03 +02:00
Leo Franchi
22de39b96a add files 2011-04-17 11:51:59 -04:00
Leo Franchi
4eaff359f0 make collectionitems icons used not hardcoded, and add supercollection icon 2011-04-17 11:51:59 -04:00
Leo Franchi
9ee970489c add icon for playlists
add recently played item in source list
add create playlist icon, show playlists node for local source
remove H ome from toolbar as it's in the sidebar now
2011-04-17 11:51:58 -04:00
Leo Franchi
2f7167037a refactor the sourcetreeitem a bit so an item always exists properly as soon as it is constructed
that way the model's rowForItem() will work with any just-constructed SourceTreeItem

make the treeview open the playlists when you open the collection.
2011-04-17 11:50:49 -04:00
Leo Franchi
ed27dcdeec Move drop handling into source model
Add a Add Station item (needs flag change)
Cleanup
restore dynamic playlists to wo rking though hidden so we don't crash
fix lots of minor things in the sourcelist
2011-04-17 11:48:58 -04:00
Leo Franchi
4f5948db71 standardize loading signal, i think this was a typo.. 2011-04-17 11:46:19 -04:00
Leo Franchi
3378b1ef82 add supercollection back
turn off proxy and cleanup trying to find signal issue
fix parent() that was causing all sorts of weird inserted bugs
fix removing to not work on a copy!
2011-04-17 11:43:29 -04:00
Leo Franchi
e13bd93a58 Refactor the sourcetree to make it more extensible 2011-04-17 11:42:53 -04:00
Dominik Schmidt
cadc72da2e sipjreen: Clean up debug output and add legacy mode 2011-04-16 17:27:39 +02:00
Dominik Schmidt
5610abfcde Merge remote branch 'origin/master' into jreen-tpqt4-comp
Conflicts:
	CMakeLists.txt
	src/sip/jreen/jabber_p.cpp
	src/tomahawkapp.cpp
2011-04-16 15:32:46 +02:00
Dominik Schmidt
3254e602e3 Merge branch 'master' into jreen-tpqt4-comp 2011-04-16 15:07:17 +02:00
Christian Muehlhaeuser
7f570c325d * Updates README and ChangeLog. 2011-04-16 13:36:09 +02:00
Jeff Mitchell
f7c440ed4f Don't let cache requests go through until the cache is fully loaded 2011-04-16 03:40:15 -04:00
Jeff Mitchell
5334dbf037 Whoops. C'mon, do what I mean, not what I tell you to do. 2011-04-16 03:31:40 -04:00
Jeff Mitchell
9202113a43 Attempt to speed up infosystemcache loading on startup 2011-04-16 03:03:59 -04:00
Christian Muehlhaeuser
cdd3684dba * Fixed style. 2011-04-16 01:31:20 +02:00
Leo Franchi
ed2c1513a8 wasn't meant to commit that 2011-04-15 19:14:48 -04:00
Leo Franchi
fe08bf2175 and set properly 2011-04-15 19:13:54 -04:00
Leo Franchi
ab72ee2302 if we are created remotely, use their creation date 2011-04-15 19:12:40 -04:00
Christian Muehlhaeuser
dca94f864d * Fixed style / typo. 2011-04-16 00:18:20 +02:00
Leo Franchi
1ecb799694 add a createdOn property to playlists, and sort sourcetree 2011-04-15 17:27:27 -04:00
Leo Franchi
e503f74db1 update changelog 2011-04-15 14:01:59 -04:00
Leo Franchi
3671f35928 don't crash if we try to feed QxT a result that we don't have a proper length for 2011-04-15 14:00:11 -04:00
Leo Franchi
dde278a1cc changielog 2011-04-15 08:45:20 -04:00
Frank Osterfeld
db4fc8bd03 Fix compiler warnings. 2011-04-15 13:46:51 +02:00
Christian Muehlhaeuser
71a3f223c2 * Merged master into branch phonon. 2011-04-15 11:06:26 +02:00
Christian Muehlhaeuser
aad9dd4d75 * Fixed rejecting default covers for artist images, too. 2011-04-15 10:25:32 +02:00
Christian Muehlhaeuser
5e38fc5725 * Updated ChangeLog. 2011-04-15 09:15:45 +02:00
Christian Muehlhaeuser
abd5c3c567 * Fixed bad url detection in last.fm plugin. 2011-04-15 09:09:20 +02:00
Christian Muehlhaeuser
66e3d07aee * Use canonicalPath() wherever dealing with file- & dir-paths. 2011-04-15 07:50:38 +02:00
Frank Osterfeld
9af6ff7911 Do not crash when the collection folders contains cycles (symlinks).
Example: /my/collection/subfolder/link -> /my/collection
Use canonicalFilePath to detect cycles and also check m_newdirtimes for an existing timestamp before recursing into subfolders.
2011-04-15 13:52:49 +08:00
Christian Muehlhaeuser
04d30913f9 * Show artist images in ArtistView (lazy-loading).
* Added artist image api to LastFmPlugin.
2011-04-15 07:35:42 +02:00
Frank Osterfeld
df8a333aee Convert QSet<QStringList*> to QVector<QStringList>.
This one possibly leaked, there is no need to use pointers here.
2011-04-15 09:11:28 +08:00
Leo Franchi
f16277ac5f more assert fixes 2011-04-14 20:40:00 -04:00
Leo Franchi
ab964957d2 elide 2011-04-14 20:26:08 -04:00
Leo Franchi
ef1ded8636 remove useless file 2011-04-14 20:11:29 -04:00
Leo Franchi
fe43c1dd01 Add config migration 2011-04-14 20:09:59 -04:00
Leo Franchi
714c306032 Refactor the resolver config UI for More Prettiness
Allow resolvers to configure themselves and whatnot
2011-04-14 20:09:59 -04:00
Jeff Mitchell
4b13467e4c Don't add directories to the watcher if watch for changes is disabled 2011-04-14 16:50:38 -04:00
Leo Franchi
3ce41c50bc Don't assert if a scrobble failed, that's no fun. 2011-04-14 10:42:16 -04:00
Christian Muehlhaeuser
8231127a3b * Only show tracks without an album tag below the 'Unknown' album node in TreeModel. 2011-04-14 07:47:57 +02:00
Christian Muehlhaeuser
3e05151008 * Support showing tracks without an album tag in the TreeView. 2011-04-14 07:26:27 +02:00
Christian Muehlhaeuser
f5219525b4 * Added alphaBlend method to TomahawkUtils. DRY. 2011-04-14 05:00:27 +02:00
Christian Muehlhaeuser
e3c90784e1 * Properly shutdown InfoSystem again.
* Default sizes & restoring of TreeHeader columns.
* Fix square cover painting in TreeItemDelegate.
2011-04-14 04:40:04 +02:00
Christian Muehlhaeuser
9f4c3bb461 * Moved InfoSystem into libTomahawk.
* Made InfoSystem a singleton.
* Don't access InfoSystem via TomahawkApp any longer.
* Progress on ArtistView & TreeModel.
2011-04-14 00:39:39 +02:00
Christian Muehlhaeuser
43a08b7957 * Work in progress: The ArtistView & TreeModel. 2011-04-14 00:36:37 +02:00
Christian Muehlhaeuser
d4745e1e40 * Further progress making a clean(er) tree model. 2011-04-14 00:33:17 +02:00
Christian Muehlhaeuser
f2308beb18 * Split up PlItem into Track- and TreeModelItem. 2011-04-14 00:33:16 +02:00
Leo Franchi
1c409e40f2 more crash fixes..... 2011-04-13 10:34:40 -04:00
Leo Franchi
34fe17a3e6 assert less :( 2011-04-13 08:58:36 -04:00
Frank Osterfeld
9b5be063bd use setTrackModel, as CollectionView::setModel() suggests.
Fixes assertion when selecting a collection.
2011-04-13 14:08:55 +02:00
Frank Osterfeld
9d28c11089 build on OS X
These flags break the build and are also disabled for all the other plugins.
2011-04-13 14:08:11 +02:00
Tieg Zaharia
e76ca1fdef OSX: adds 'Window' menu with 'Minimize'/'Zoom' actions 2011-04-12 20:25:47 -04:00
Jeff Mitchell
aca94b1b55 Fix some bad function usage asserts 2011-04-12 18:19:59 -04:00
Frank Osterfeld
b214dd01f8 randomize XMPP resource name so that multiple Tomahawk/JReen instances do not collide. 2011-04-13 05:20:14 +08:00
Frank Osterfeld
800c06e678 initialize m_dragging variable (fixes valgrind warning). 2011-04-13 05:20:14 +08:00
Frank Osterfeld
d3ca52cba3 link on OS X 2011-04-13 05:20:14 +08:00
Jeff Mitchell
5455ee0f21 Unused warning cleanups 2011-04-12 16:52:25 -04:00
Jeff Mitchell
e2a3c48e6e Rejig the parameters and add QASSERTs. Chris, I decided to take your advice about the asserts -- it will help in the future to make sure people don't mistakenly use the wrong function in new code either. 2011-04-12 15:21:05 -04:00
Jeff Mitchell
4a6bc942fa First round of warning cleanups. Leo, please look at the changes in the playlist stuff, make sure I didn't screw anything up 2011-04-12 12:21:03 -04:00
Jeff Mitchell
0c3ec4a6cf Fix Jreen compilation when KDE4 is found 2011-04-12 11:24:54 -04:00
Jeff Mitchell
3b873dfeda Limit policy setting to 2.8.4 or higher 2011-04-12 11:00:07 -04:00
Jeff Mitchell
0d6c335e45 Suppress warning with newer cmake 2011-04-12 10:53:32 -04:00
Leo Franchi
f5f16b6b26 update the Info.plist version as a part of cmake so we don't forget next time :) 2011-04-11 17:10:31 -04:00
Leo Franchi
79542e60e6 Merge branch 'stable'
Conflicts:
	CMakeLists.txt
2011-04-11 15:40:07 -04:00
Leo Franchi
24d9cce3a8 Install a .protocol file on KDE so tomahawk:// links work there too 2011-04-11 15:36:29 -04:00
Leo Franchi
b3eaa1a761 Merge branch 'stable'
Conflicts:
	ChangeLog
	src/tomahawkwindow.cpp
2011-04-11 11:03:31 -04:00
Leo Franchi
1cb3516dc6 As per domme's suggestion, use ::fromUserInput to make loading xspfs work everywhere 2011-04-11 11:01:26 -04:00
Leo Franchi
c24a95e49f support loading local .xspfs from files
(cherry picked from commit 4095f4b5aa)
2011-04-11 10:22:00 -04:00
Leo Franchi
4095f4b5aa support loading local .xspfs from files 2011-04-11 10:11:40 -04:00
Leo Franchi
5235cc9093 less debug 2011-04-10 21:04:18 -04:00
Leo Franchi
41c553fac7 undo oops 2011-04-10 21:03:47 -04:00
Leo Franchi
a9a9ffa40f Changes to make Spotify resolver work 2011-04-10 21:03:47 -04:00
Alejandro Wainzinger
252a48196c Move signal connections of scrobbler into scrobbler, easier to read. 2011-04-10 16:46:35 -07:00
Alejandro Wainzinger
5ae0a7138c Make compile on OS X. (liblastfm2) 2011-04-10 02:24:32 -07:00
Christian Muehlhaeuser
c0994e3c24 * Fixed crash bug caused by multiple sources going on- and offline at a time. 2011-04-09 11:03:52 +02:00
Jeff Mitchell
7639d8da9e Happy Birthday, muesli 2011-04-07 17:58:45 -04:00
Jeff Mitchell
a13388f2c4 Rejig Jreen/Gloox cmake stuff to report correct status 2011-04-07 11:19:20 -04:00
Jeff Mitchell
bf744ac8bb Ah-whoops, knew I forgot something in my previous commit 2011-04-07 10:41:08 -04:00
Jeff Mitchell
db6a93e55c Now when inserting into the cache a max age time is specified. It can be refreshed by issuing a new max age time when doing a getCachedInfo call (optional). 2011-04-07 10:40:11 -04:00
Leo Franchi
196397f210 fix build 2011-04-07 09:16:21 -04:00
Leo Franchi
80c8e61cf8 Merge branch 'stable'
Conflicts:
	src/main.cpp
	src/tomahawkapp.cpp
2011-04-07 08:57:43 -04:00
Leo Franchi
c6442e4dfd changelog++ 2011-04-06 23:15:16 -04:00
Christian Muehlhaeuser
3b3ff063dc * Updated Changelog. 2011-04-07 05:07:14 +02:00
Christian Muehlhaeuser
87c554c6f0 * Fixed TomahawkApp CTOR for secondary instances. 2011-04-07 04:47:41 +02:00
Jeff Mitchell
83909e53f9 Don't unconditionally scan for changes on startup 2011-04-06 19:58:24 -04:00
Jeff Mitchell
8690a76df7 Fix hang-on-exit in ScanManager. Turns out all it needed was to be explicitly deleted; I guess the parenting wasn't working right, or something? 2011-04-06 19:51:58 -04:00
Jeff Mitchell
0c52b37bb2 InfoSystemCache saving and loading from disk works. We might have to tweak exactly how it's stored on disk at some point, depending on efficiency, but this works. 2011-04-06 19:42:50 -04:00
Christian Muehlhaeuser
621770eada Merge remote-tracking branch 'origin/stable' 2011-04-06 11:49:13 +02:00
Christian Muehlhaeuser
17c1cdc2c1 * Renamed PlItem to TrackModelItem. 2011-04-06 11:48:49 +02:00
Christian Muehlhaeuser
d5f21dc9f2 * Remove debug output. 2011-04-06 08:19:10 +02:00
Christian Muehlhaeuser
01befb0955 * Added better quality icon images and merged stable. 2011-04-06 08:06:54 +02:00
Christian Muehlhaeuser
495621b715 Merge remote-tracking branch 'origin/stable' 2011-04-06 07:33:45 +02:00
Christian Muehlhaeuser
51a3eb39be * Fixed page-history related crash when deleting / creating playlists. 2011-04-06 07:26:57 +02:00
Dominik Schmidt
60142eb92d Merge branch 'master' into jreen-tpqt4-comp
Conflicts:
	CMakeLists.txt
	src/tomahawkapp.cpp
2011-04-06 06:58:33 +02:00
Dominik Schmidt
c1385761b6 Find jreen headers in source, HACK 2011-04-06 06:43:24 +02:00
Christian Muehlhaeuser
ab2443792a * Don't manually delete the root item. This speeds up shut down, since the proxy will be disconnected before the root item gets deleted (automatically). 2011-04-06 06:18:00 +02:00
Jeff Mitchell
dc43452bfc Fix build 2011-04-05 21:15:04 -04:00
Jeff Mitchell
17733fea1d Fix build 2011-04-05 21:14:32 -04:00
Leo Franchi
69011e3f90 cleanup 2011-04-05 21:06:24 -04:00
Leo Franchi
3d93a82d08 go back to previous page in history when deleting a playlist 2011-04-05 21:04:34 -04:00
Leo Franchi
a1848f46bd Set a query loaded from a source as already resolved 2011-04-05 21:04:34 -04:00
Jeff Mitchell
1ef9b7c241 Update twitter connect caching 2011-04-05 20:59:11 -04:00
Jeff Mitchell
47fb4f3b50 Update twitter connect caching 2011-04-05 20:58:47 -04:00
Jeff Mitchell
73d88dcf7b Keep track of offered dbid to a peer and check offer key to make sure it matches 2011-04-05 20:51:48 -04:00
Jeff Mitchell
394f3ee383 Keep track of offered dbid to a peer and check offer key to make sure it matches 2011-04-05 20:50:53 -04:00
Jeff Mitchell
a52ecfb5b8 Do some explicit string emptiness checking in Twitter 2011-04-05 20:21:14 -04:00
Jeff Mitchell
db8088b30f Actually start writing cached info to disk 2011-04-05 20:20:49 -04:00
Jeff Mitchell
baa039bbf6 Do some explicit string emptiness checking in Twitter 2011-04-05 20:18:37 -04:00
Jeff Mitchell
da7a45950a Merge remote branch 'origin/stable' 2011-04-05 13:50:31 -04:00
Jeff Mitchell
b87732e9c6 Add kdevelop stuff to gitignore 2011-04-05 13:49:17 -04:00
Leo Franchi
f8619d4aa5 hm, add a newline where it belongs 2011-04-05 13:21:33 -04:00
Leo Franchi
f8452b4fdc only connect if there is that signal, no more warnings 2011-04-05 13:14:01 -04:00
Dominik Schmidt
9d95644b9f Add debug when sending messages 2011-04-05 17:15:02 +02:00
Dominik Schmidt
e944293d02 Build jreen on default 2011-04-05 17:14:11 +02:00
Leo Franchi
8881fab205 clean up after ourselves 2011-04-04 18:50:10 -04:00
Leo Franchi
806b3a3281 change loading animation, show animation while resolving a playlist 2011-04-04 18:43:51 -04:00
Dominik Schmidt
4cb2532fab Heyyeeyeeey - hey stupid 2011-04-04 23:22:49 +02:00
Dominik Schmidt
3a0874bcdd More debug and fails-- 2011-04-04 23:20:35 +02:00
Dominik Schmidt
0cfb98b0af Squash me 2011-04-04 21:14:05 +02:00
Dominik Schmidt
16eb50e02d Forgot to add tomahawksipmessage stanza extension files 2011-04-04 20:46:21 +02:00
Dominik Schmidt
e7ddedef5a Test it, baby! 2011-04-04 20:31:10 +02:00
Leo Franchi
b6d12701e7 Merge branch 'stable' 2011-04-04 14:22:58 -04:00
Leo Franchi
9cc74abccc Keep the dynamic playlist description up to date when it is changed 2011-04-04 14:21:47 -04:00
Dominik Schmidt
63d7fc0b38 Do some cleanup and add comments in jreen sip plugin 2011-04-04 16:44:39 +02:00
Christian Muehlhaeuser
87e813e215 Merge remote-tracking branch 'origin/stable' 2011-04-04 13:55:24 +02:00
Christian Muehlhaeuser
fdc2f5d3e9 * Fixed thread afinity issue related to WebKit. 2011-04-04 13:25:10 +02:00
Jeff Mitchell
f2c74f4ddb Merge branch 'stable' 2011-04-04 05:18:36 -04:00
Jeff Mitchell
b08f4f1daf Changelogify++ 2011-04-04 05:18:22 -04:00
Christian Muehlhaeuser
92bc03ee3e * Merged stable. 2011-04-04 10:55:58 +02:00
Christian Muehlhaeuser
60b9d48d73 * Updated Changelog. 2011-04-04 10:48:48 +02:00
Christian Muehlhaeuser
5e2d196ba0 * Fixed mtimes issue with windows paths. 2011-04-04 10:36:07 +02:00
Christian Muehlhaeuser
16fd65667f * Merged stable changes to master. 2011-04-04 09:02:40 +02:00
Jeff Mitchell
74fd092355 Ok. Now the watched scanning is really fixed, in the sense that I can no longer break it. Until someone finds another way. 2011-04-03 13:50:52 -04:00
Jeff Mitchell
f66a062796 Hopefully fix removing files actually being removed from db during watch scan 2011-04-03 13:31:02 -04:00
Christian Muehlhaeuser
8729c91c95 * Fixed crash on startup with empty config. 2011-04-03 13:07:20 +02:00
Jeff Mitchell
680b204d11 Make caching work. Doesn't save/load to disk yet but it's ready to be used as a memcache at least. 2011-04-03 05:44:32 -04:00
Jeff Mitchell
2b85beb704 Requests for cover art from lastfm now go through the infosystem caching mechanism. It's not actually storing a cache yet but the information flow works (at least, for cache misses :-) ) 2011-04-02 22:51:10 -04:00
Leo Franchi
1da0a34d89 tomahawk:// handler stuff on windows 2011-04-02 21:49:21 -04:00
Jeff Mitchell
daa822cd14 Some minor work on infosystem 2011-04-02 21:44:48 -04:00
Jeff Mitchell
c3df88d0f8 More debug, and fixed watch behavior :-) 2011-04-02 20:51:14 -04:00
Leo Franchi
743575b91a use our export macro that works on windows :) 2011-04-02 19:34:39 -04:00
Jeff Mitchell
a848561e60 Add some debugging for Chris and fix duplicate paths being queued 2011-04-02 19:29:53 -04:00
Leo Franchi
d2e867b9ee switch to using KDSingleApplicationGuard instead of QtUniqueApp as it's broken on windows.
KDSingleApplicationGuard is from KDTools and this is the GPL-licensed version.
2011-04-02 13:47:48 -04:00
Jeff Mitchell
ea744456c9 Don't start scanning on a fresh config/db 2011-04-02 11:07:04 -04:00
Christian Muehlhaeuser
5255fd2a78 * Properly thread QtScriptResolver. 2011-04-02 10:24:58 +02:00
Christian Muehlhaeuser
0a593aeb05 * Only keep track of the 50 most recent tracks in WelcomeWidget. Don't auto-resolve playback-logs any longer. 2011-04-02 10:24:58 +02:00
Christian Muehlhaeuser
6af30bfd2f * Cleaned up style. 2011-04-02 10:24:58 +02:00
Jeff Mitchell
01f2fe6adc Fix missing condition, wrong method, and put more info in the ChangeLog 2011-04-02 01:17:48 -04:00
Jeff Mitchell
2214b750be Changelogify 2011-04-02 00:58:43 -04:00
Jeff Mitchell
569c23a30e Whitespacing 2011-04-02 00:56:36 -04:00
Jeff Mitchell
3bc496eaaf Implement watched folders and scan-on-startup. Folders are scanned after 10 seconds without a change. Also handles deferring scans of directories if attempted during an ongoing scan, both for recursive and non-recursive scans.
Fixes TWK-30 / THK-30.
2011-04-02 00:52:20 -04:00
Christian Muehlhaeuser
d818a7f697 * Added ready() signal to Database class. 2011-04-02 06:10:05 +02:00
Jeff Mitchell
06f0dd8768 More work on dir watchers -- it's mostly there except for the actual DB modifications 2011-04-01 17:05:40 -04:00
Jeff Mitchell
de92b0b726 Initial work on a dir watcher for the scanner 2011-03-31 22:08:32 -04:00
Jeff Mitchell
47451e4fba Add more debugging and remove the don't-try-to-reconnect behavior 2011-03-31 15:12:08 -04:00
Jeff Mitchell
0c4e304ee5 Make debug output a little more helpful 2011-03-31 12:19:12 -04:00
Christian Muehlhaeuser
14f5508140 * Merged stable branch to master. 2011-03-31 04:28:39 +02:00
Julian Bäume
59391e3841 load translation based on system locale
this loads the resource that contains translations for the locale the
user has set.
2011-03-31 10:25:14 +08:00
Julian Bäume
a55124ed75 ship the translations within the binary
build qm-files for translation

create resource file for translations, contains german translations, for now.

this is some kind of hack to make it work. rcc doesn’t allow
out-of-source builds, so the commands need to be specified by hand, to
copy things around between source and binary directories.
2011-03-31 10:25:14 +08:00
Christian Muehlhaeuser
543c3125ac * Cherry-picked latest tomahawk.nsi changes from master. 2011-03-31 04:20:57 +02:00
Christian Muehlhaeuser
f5ba469b0a Merge branch 'master' of https://github.com/stever/tomahawk 2011-03-31 04:09:14 +02:00
Steven Robertson
56deed391e Added check for running tomahawk.exe process and option to kill the process (or ignore) and proceed. 2011-03-31 00:14:20 +01:00
Frank Osterfeld
a05795bf6b fix case 2011-03-30 19:11:32 +02:00
Frank Osterfeld
b6d6969281 pass parent to messageboxes 2011-03-30 19:11:32 +02:00
Frank Osterfeld
492c2acf18 i18n: tr() and avoid string puzzle 2011-03-30 19:10:41 +02:00
Dominik Schmidt
ff0d5613bb Set features at the right time 2011-03-30 15:52:49 +02:00
Leo Franchi
8fbcf0cec9 Merge branch 'master' of https://github.com/stever/tomahawk into stever-master 2011-03-30 09:44:44 -04:00
Dominik Schmidt
6386611871 Let the testing begin 2011-03-30 15:15:15 +02:00
Dominik Schmidt
f52205d2cc Update jreen plugin to newer jreen and sip plugin interface 2011-03-30 05:05:22 +02:00
Jeff Mitchell
35c2fccd6c Various proxy-related fixes. Still doesn't work properly...parts of it do but gloox jabber doesn't. (Haven't tested twitter yet.) 2011-03-29 19:35:18 -04:00
Julian Bäume
c61813915d initial german translation
it's not finished, but a first start
2011-03-30 07:09:01 +08:00
Jeff Mitchell
77e37bb325 Merge branch 'stable' 2011-03-29 17:30:45 -04:00
Jeff Mitchell
52fcc7b53f Update some debug in twitter 2011-03-29 17:29:19 -04:00
Jeff Mitchell
3657579c32 Re-match the regex 2011-03-29 17:29:12 -04:00
Jeff Mitchell
b8721ad75a Add some twitter debug 2011-03-29 17:29:02 -04:00
Jeff Mitchell
f767818966 Update some debug in twitter 2011-03-29 17:27:50 -04:00
Jeff Mitchell
a09167050f Re-match the regex 2011-03-29 17:06:50 -04:00
Jeff Mitchell
3d25e6aefe Add some twitter debug 2011-03-29 16:33:44 -04:00
Jeff Mitchell
de4df0060e Merge branch 'stable' 2011-03-29 16:22:16 -04:00
Jeff Mitchell
b59399aecb Changelogify 2011-03-29 16:22:08 -04:00
Jeff Mitchell
0a0e27c717 Hopefully fix TWK-13 crash bug. 2011-03-29 16:20:04 -04:00
Jeff Mitchell
7c8b65a1d3 Hopefully fix TWK-13 crash bug. 2011-03-29 09:58:14 -04:00
Jeff Mitchell
b70491cc63 Disable acl box for now 2011-03-29 08:11:23 -04:00
Jeff Mitchell
e968298d7d Coarse-grained ACL support is now implemented. This controls whether someone is allowed to connect to you in a global sense, and remembers the chosen value. For now there is no GUI way to revert this, but it is easily done via Tomahawk.conf 2011-03-29 02:42:46 -04:00
Jeffrey Finkelstein
6a605789e1 fixed typo - changed "indemify" to "indemnify" 2011-03-29 11:32:12 +08:00
Jeff Mitchell
942cc89a22 More work on the ACL system. 2011-03-28 19:25:25 -04:00
Jeff Mitchell
8d7f4a193b Rename some classes/variables 2011-03-28 17:59:33 -04:00
Jeff Mitchell
40b202df74 Merge branch 'stable' 2011-03-28 17:31:01 -04:00
Jeff Mitchell
81141e4d50 Add a placeholder text for the jabberid field 2011-03-28 17:30:43 -04:00
Jeff Mitchell
e4fefe0600 Merge branch 'stable' 2011-03-28 17:26:06 -04:00
Jeff Mitchell
896d6ad9f4 Clean up port logic 2011-03-28 17:25:43 -04:00
Jeff Mitchell
ae5fa0c33a Initial work on ACL system. Also makes much of Tomahawk handle a QStringList for collection directories. 2011-03-28 16:41:22 -04:00
Steven Robertson
4f0322ec2f Merged upstream and added nsis uninstaller path fix. 2011-03-28 19:01:48 +01:00
Jeff Mitchell
1dd0f26fff Remove MusixMatchHash 2011-03-28 13:31:00 -04:00
Leo Franchi
1e3fe13a5b update sparkle rss from server and fix changelog to 0.0.2 2011-03-28 12:45:22 -04:00
Jeff Mitchell
dd61f4a3cc For sanity don't use "using namespace" in jabber_p.cpp and properly use namespaces. Google style guide doesn't let you do the former for very good reason. 2011-03-28 12:00:11 -04:00
Jeff Mitchell
9b71d1df0a Merge branch 'stable' 2011-03-28 11:12:53 -04:00
Jeff Mitchell
f198cf51cc Properly use the configured port number 2011-03-28 11:12:28 -04:00
Christian Muehlhaeuser
b6442ae76c Merge remote-tracking branch 'origin/stable' 2011-03-28 09:25:49 +02:00
Christian Muehlhaeuser
7b714f1735 Merge branch 'stable' of github.com:tomahawk-player/tomahawk 2011-03-28 05:58:26 +02:00
Christian Muehlhaeuser
b9d218b823 Merge remote-tracking branch 'origin/stable' 2011-03-28 05:01:50 +02:00
Jeff Mitchell
1cd969af7f Initial baby steps towards the info system cache 2011-03-27 22:38:00 -04:00
Jeff Mitchell
e590aa7739 Whitespacing 2011-03-27 22:37:59 -04:00
Leo Franchi
ecd8b302c4 build liblastfm2 statically on non-win32, and don't build fingerprinter.
got multiple reports of tomahawk not finding liblastfm2 due to rpath or other issues, and we are building our o ther 3rdparty deps statically like this.
2011-03-27 22:06:55 -04:00
Christian Muehlhaeuser
db4f514181 Merge remote-tracking branch 'origin/stable' 2011-03-28 03:35:58 +02:00
Jeff Mitchell
21eea9f0de Merge branch 'stable' 2011-03-27 19:11:04 -04:00
Jeff Mitchell
8d471ae1f1 Merge branch 'stable'
Conflicts:
	ChangeLog
2011-03-27 19:01:17 -04:00
Jeff Mitchell
96b4fbccc6 Merge branch 'stable'
Conflicts:
	ChangeLog
2011-03-27 18:55:49 -04:00
Dominik Schmidt
250202a095 Added fixed-jabber-auth to changelog 2011-03-27 23:57:18 +02:00
Jeff Mitchell
cedcfdb714 Merge branch 'stable' 2011-03-27 16:10:40 -04:00
Jeff Mitchell
2d5f8307d4 Merge branch 'stable' 2011-03-27 13:57:22 -04:00
Jeff Mitchell
a54d38ed68 Merge branch 'stable' 2011-03-27 12:58:31 -04:00
Dominik Schmidt
5167891846 Set CLUCENE_MIN_VERSION default value to the version we need, needed until macro_optional_find_package is fixed to support versions 2011-03-27 16:16:02 +02:00
Christian Muehlhaeuser
d687219055 * Merged stable to master. 2011-03-27 06:57:33 +02:00
Jeff Mitchell
dffcd89c7c Don't just look at a user's latest tweet -- look at the latest tweet that matches our regex. Alternately for DMs look at latest matching regex or matching TOMAHAWKPEER format. Also some consolidation. 2011-03-27 00:51:37 -04:00
Dominik Schmidt
cb405cde15 Make the sip plugin aware of subscription requests again 2011-03-27 05:44:16 +02:00
Leo Franchi
1697b27aca fix compile on osx
don't use API that doesn't exist in snow leopard---same code is in liblastfmv1. if jono wants to rewrite the path detection code in snow leopard-compatible APIs, we can use that
2011-03-26 18:29:35 -04:00
Jeff Mitchell
f16812143f Display a helpful message when someone gives non-JSON data to the xmpp bot 2011-03-26 16:49:26 -04:00
Jeff Mitchell
8faa782650 You can now send global, mentions, or private (direct message) Got Tomahawk? tweets 2011-03-26 16:23:16 -04:00
Jeff Mitchell
3182df93dd Don't install liblastfm2 headers 2011-03-26 12:25:35 -04:00
Jeff Mitchell
575ee1548a Fetch cover art using LastFm via the InfoSystem plugin 2011-03-26 11:47:54 -04:00
Jeff Mitchell
5c09fd2360 Make a Last FM InfoSystem plugin and use it to handle now playing and scrobbling 2011-03-26 09:36:31 -04:00
Christian Muehlhaeuser
0530faf15c * Updated README. 2011-03-26 07:06:35 +01:00
Christian Muehlhaeuser
74ea476ad6 Merge remote-tracking branch 'origin/stable' 2011-03-26 02:40:12 +01:00
Jeff Mitchell
6b7300c1b3 Possibly fix crash related to twitter authentication 2011-03-25 18:22:51 -04:00
Jeff Mitchell
376d543fd1 Merge branch 'liblastfm2' 2011-03-25 17:22:43 -04:00
Leo Franchi
c90a875de7 add some eliding so playlists with long name don't increase the window size
minor cleanup in ElidedLabel
2011-03-25 15:54:21 -04:00
Jeff Mitchell
247c65fbcc Emit finished when there's no actual data to return 2011-03-25 10:04:14 -04:00
Christian Muehlhaeuser
f6d4e0c63a * Re-added launch page to installer. 2011-03-25 13:55:28 +00:00
Leo Franchi
db7b2d2523 don't assume that exit() will clean up the stack 2011-04-06 21:34:59 -04:00
Leo Franchi
ed0574f6b7 fix epic fail of boolean condition 2011-04-06 17:20:31 -04:00
Jeff Mitchell
6b1bb4da61 Merge remote branch 'origin/master' into liblastfm2 2011-03-25 09:40:56 -04:00
Christian Muehlhaeuser
81f4ec2337 * Update revision. 2011-03-25 12:10:30 +00:00
Christian Muehlhaeuser
8568245355 * Preparing release version 0.0.3. 2011-03-25 12:10:29 +00:00
Christian Muehlhaeuser
e824fcc7b3 * Gather more debug to fix mtimes issue. 2011-04-04 10:01:14 +02:00
Christian Muehlhaeuser
efaf180b80 * Forgot the wildcard match. 2011-04-04 09:34:17 +02:00
Christian Muehlhaeuser
9e20674b84 * Properly escaped mtimes sql query and removed further debug. 2011-04-04 09:27:25 +02:00
Christian Muehlhaeuser
89c3f266a7 * Manually merged stever's tomahawk.nsi patch. 2011-03-25 10:23:43 +00:00
Christian Muehlhaeuser
3ba36fc38e * Cleaned up debug output, lots. 2011-04-04 07:59:32 +02:00
Christian Muehlhaeuser
f78df2c087 * Added assert to catch dupe source. 2011-04-04 07:59:22 +02:00
Christian Muehlhaeuser
b252418074 * Hopefully fixed dupe-file issue. 2011-04-04 07:57:37 +02:00
Christian Muehlhaeuser
5e9ea36228 * Fixed result sorting order, always prefers local results with equal score now. 2011-04-04 07:56:56 +02:00
Christian Muehlhaeuser
1ac61194cf * Mutex-locked logging - write/flush isn't exactly an atomic operation. 2011-04-04 06:56:33 +02:00
Christian Muehlhaeuser
cffa96a81f * Updated Changelog. 2011-04-03 14:40:05 +02:00
Steven Robertson
d4569b1d38 EnsureTomahawkShutdown not required in uninstaller. 2011-04-03 20:27:29 +08:00
Christian Muehlhaeuser
8791a6dbdc * Respect style's default fore / bg colors when painting a PlaylistItem. 2011-04-03 11:27:03 +02:00
Christian Muehlhaeuser
84f6886e8d * Made PlaylistItemDelegate's paint method a lot faster with manual alpha-blending. 2011-04-03 11:20:35 +02:00
Christian Muehlhaeuser
b625b9a265 * Unthread QtScriptResolver. WebKit is too lame for us. 2011-04-03 10:23:05 +02:00
Leo Franchi
40d4636352 tomahawk:// handler stuff on windows 2011-04-03 00:14:47 -04:00
Leo Franchi
37f29966a8 use our export macro that works on windows :) 2011-04-03 00:14:42 -04:00
Leo Franchi
a080323e2e switch to using KDSingleApplicationGuard instead of QtUniqueApp as it's broken on windows.
KDSingleApplicationGuard is from KDTools and this is the GPL-licensed version.

Conflicts:

	src/main.cpp
2011-04-03 00:14:24 -04:00
Christian Muehlhaeuser
727d8c83ef * Updated Changelog. 2011-04-02 11:39:49 +02:00
Christian Muehlhaeuser
5cde25cefe * Properly thread QtScriptResolver. 2011-04-02 11:05:32 +02:00
Christian Muehlhaeuser
70ddc32e42 * Only keep track of the 50 most recent tracks in WelcomeWidget. Don't auto-resolve playback-logs any longer. 2011-04-02 11:04:57 +02:00
Christian Muehlhaeuser
48f69c3180 * Disabled launching Tomahawk from within the Windows installer. It caused starting Tomahawk with admin privileges. 2011-04-01 11:52:15 +02:00
Jeff Mitchell
85be5653e5 Add more debugging and remove the don't-try-to-reconnect behavior 2011-03-31 15:45:19 -04:00
Jeff Mitchell
811c7b8754 Make debug output a little more helpful 2011-03-31 12:19:23 -04:00
Jeff Mitchell
b7a1cb8d99 Add liblastfm2 and make tomahawk build against it 2011-03-24 19:27:01 -04:00
Christian Muehlhaeuser
254aacdf76 Merge remote-tracking branch 'origin' into phonon 2011-03-17 05:42:13 +01:00
Christian Muehlhaeuser
d4fbbc92d3 * Don't create invalid URLs when streaming from HTTP. 2011-03-16 17:11:23 +01:00
Christian Muehlhaeuser
c0dbd7678e Merge remote-tracking branch 'origin' into phonon 2011-03-16 17:11:02 +01:00
Christian Muehlhaeuser
286dc813dd Merge remote-tracking branch 'origin' into phonon 2011-03-16 16:38:21 +01:00
Christian Muehlhaeuser
e2bad14bee Merge remote-tracking branch 'origin' into phonon 2011-03-16 16:25:09 +01:00
Christian Muehlhaeuser
ca25beddbc Merge remote-tracking branch 'origin' into phonon 2011-03-16 15:54:16 +01:00
Christian Muehlhaeuser
0c3ddf8e84 Merge remote-tracking branch 'origin' into phonon 2011-03-16 15:22:06 +01:00
Christian Muehlhaeuser
df4c7afad2 Merge remote-tracking branch 'origin' into phonon 2011-03-16 14:45:35 +01:00
Christian Muehlhaeuser
dc277a82f7 Merge remote-tracking branch 'origin' into phonon 2011-03-16 12:23:33 +01:00
Christian Muehlhaeuser
26c6e9f5b3 * Fix non-youtube http urls. 2011-03-16 11:49:49 +01:00
Christian Muehlhaeuser
eb95158ee3 Merge remote-tracking branch 'origin' into phonon 2011-03-16 07:20:00 +01:00
Christian Muehlhaeuser
f710d6d48f Merge remote-tracking branch 'origin' into phonon 2011-03-16 05:18:10 +01:00
Christian Muehlhaeuser
5e82beb51b * Fixed phonon branch. 2011-03-16 04:25:27 +01:00
Christian Muehlhaeuser
dd7a527277 Merge remote-tracking branch 'origin' into phonon 2011-03-16 02:28:07 +01:00
Christian Muehlhaeuser
eeef965aec * Fixed auto-deleting Phonon's MediaSource. 2011-03-16 01:59:40 +01:00
Christian Muehlhaeuser
393b860a3d Merge remote-tracking branch 'origin' into phonon 2011-03-16 01:52:20 +01:00
Christian Muehlhaeuser
7a4e196b79 * Fixed loading tracks via HTTP. 2011-03-15 17:19:56 +01:00
Christian Muehlhaeuser
671cbc627c Merge remote-tracking branch 'origin' into phonon 2011-03-15 17:18:56 +01:00
Christian Muehlhaeuser
bbebc8b0fb Merge remote-tracking branch 'origin' into phonon 2011-03-15 06:47:01 +01:00
Christian Muehlhaeuser
0b9326a9d4 Merge remote-tracking branch 'origin' into phonon 2011-03-14 03:10:49 +01:00
Christian Muehlhaeuser
a91d0b3ea7 Merge remote-tracking branch 'origin' into phonon 2011-03-14 00:21:17 +01:00
Christian Muehlhaeuser
d79db494ef Merge remote-tracking branch 'origin' into phonon 2011-03-05 02:03:40 +01:00
Christian Muehlhaeuser
d745bd5d56 * Merge master into phonon branch. Fixes compiling on Arch Linux. 2011-03-04 09:02:26 +01:00
Christian Muehlhaeuser
4c46055e88 * Fixed phonon branch. 2011-03-04 08:48:12 +01:00
Christian Muehlhaeuser
49e59e7ac9 Merge remote branch 'origin' into phonon 2011-02-28 11:50:34 +01:00
Christian Muehlhaeuser
3fb7d07a32 Merge remote branch 'origin' into phonon 2011-02-28 10:50:52 +01:00
Christian Muehlhaeuser
fbee3325be Merge remote branch 'origin' into phonon 2011-02-28 10:37:52 +01:00
Christian Muehlhaeuser
86cd01cc04 Merge remote branch 'origin' into phonon 2011-02-28 09:27:25 +01:00
Christian Muehlhaeuser
f0563d1e0f Merge remote branch 'origin' into phonon 2011-02-28 09:21:28 +01:00
Christian Muehlhaeuser
ef23f5bee1 Merge remote branch 'origin' into phonon 2011-02-28 08:17:08 +01:00
Christian Muehlhaeuser
d573b3bf9e Merge remote branch 'origin' into phonon 2011-02-28 02:14:05 +01:00
Christian Muehlhaeuser
fd70ca0a1b Merge remote branch 'origin' into phonon 2011-02-28 01:45:00 +01:00
Christian Muehlhaeuser
6e0c84a944 Merge remote branch 'origin' into phonon 2011-02-27 21:06:49 +01:00
Christian Muehlhaeuser
02a6adb22b Merge remote branch 'origin' into phonon 2011-02-27 21:00:49 +01:00
Christian Muehlhaeuser
2e0f72650a Merge remote branch 'origin' into phonon 2011-02-27 20:33:25 +01:00
Christian Muehlhaeuser
23e6670edf Merge remote branch 'origin' into phonon 2011-02-27 20:27:39 +01:00
Christian Muehlhaeuser
c6d3599e47 Merge remote branch 'origin' into phonon 2011-02-27 20:20:35 +01:00
Christian Muehlhaeuser
1073b7e194 * Merge master into phonon branch. 2011-02-27 20:20:24 +01:00
Christian Muehlhaeuser
ad3e9a0304 * Merged origin. 2011-02-27 04:09:58 +01:00
Christian Muehlhaeuser
be268933e5 Merge remote branch 'origin' into phonon 2011-02-24 04:21:32 +01:00
Christian Muehlhaeuser
c94c232c53 * Removed old audio-engine dependancies from README. 2011-02-24 04:21:21 +01:00
Christian Muehlhaeuser
0e6bd91ba8 Merge remote branch 'origin' into phonon 2011-02-24 04:14:28 +01:00
Christian Muehlhaeuser
92348266c2 Merge remote branch 'origin' into phonon 2011-02-24 03:53:14 +01:00
Christian Muehlhaeuser
06d56aaa33 Merge remote branch 'origin' into phonon 2011-02-24 03:25:57 +01:00
Christian Muehlhaeuser
a61ee6433b * Support scanning various mimetypes, now that we got Phonon. 2011-02-24 02:39:48 +01:00
Christian Muehlhaeuser
0de2211dde Merge remote branch 'origin' into phonon 2011-02-24 02:20:29 +01:00
Christian Muehlhaeuser
82b8892b99 * Fixed handling Phonon's StoppedState. 2011-02-24 02:20:05 +01:00
Christian Muehlhaeuser
11caacb96c Merge remote branch 'origin' into phonon 2011-02-23 23:51:10 +01:00
Christian Muehlhaeuser
c50f0626db * Getting rid of old & obsolete audioengine / transcoder stuff. 2011-02-23 19:05:04 +01:00
Christian Muehlhaeuser
755c091a56 Merge remote branch 'origin' into phonon 2011-02-23 17:12:46 +01:00
Christian Muehlhaeuser
7163b33af7 Merge remote branch 'origin' into phonon 2011-02-23 10:46:18 +01:00
Christian Muehlhaeuser
f1d9c5c8ee * Fixed phonon branch. 2011-02-23 01:34:09 +01:00
Christian Muehlhaeuser
413c3ed36e * Fixed merging mistake. 2011-01-22 08:15:44 +01:00
Christian Muehlhaeuser
f82f98785f * Merged and fixed master into phonon. 2011-01-22 07:58:20 +01:00
Christian Muehlhaeuser
876e3333de * Fixed automatic track progression. 2011-01-14 16:09:46 +01:00
Christian Muehlhaeuser
876a11a1e4 * Fixed AudioEngine's time reporting. 2011-01-14 15:53:44 +01:00
Christian Muehlhaeuser
41512c4b61 * Initial work on phonon-powered AudioEngine. 2011-01-14 15:10:19 +01:00
Steven Robertson
b3d0a577bb Updating the installer images. 2010-11-24 09:39:29 +00:00
799 changed files with 43378 additions and 55047 deletions

2
.gitignore vendored
View File

@@ -10,3 +10,5 @@ moc_*
*~
/tomahawk
thirdparty/qtweetlib/WARNING-twitter-api-keys
.kdev4
tomahawk.kdev4

5
.gitmodules vendored
View File

@@ -1,3 +1,6 @@
[submodule "thirdparty/jreen"]
path = thirdparty/jreen
url = git://gitorious.org/jreen/jreen.git
url = git://github.com/euroelessar/jreen.git
[submodule "thirdparty/qtweetlib/QTweetLib"]
path = thirdparty/qtweetlib/QTweetLib
url = git://github.com/minimoog/QTweetLib.git

View File

@@ -1,18 +1,25 @@
PROJECT( tomahawk )
CMAKE_MINIMUM_REQUIRED( VERSION 2.8 )
IF( ${CMAKE_VERSION} VERSION_GREATER 2.8.3 )
CMAKE_POLICY(SET CMP0017 NEW)
ENDIF( ${CMAKE_VERSION} VERSION_GREATER 2.8.3 )
###
### Tomahawk application info
###
SET( ORGANIZATION_NAME "Tomahawk" )
SET( ORGANIZATION_DOMAIN "tomahawk-player.org" )
SET( APPLICATION_NAME "Tomahawk" )
SET( VERSION "0.0.2" )
SET( TOMAHAWK_ORGANIZATION_NAME "Tomahawk" )
SET( TOMAHAWK_ORGANIZATION_DOMAIN "tomahawk-player.org" )
SET( TOMAHAWK_APPLICATION_NAME "Tomahawk" )
SET( TOMAHAWK_VERSION "0.1.0" )
# set paths
SET( CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}" "${CMAKE_SOURCE_DIR}/CMakeModules" )
SET( THIRDPARTY_DIR ${CMAKE_SOURCE_DIR}/thirdparty )
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}")
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}")
SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}")
# Check if we need qtgui:
IF( "${gui}" STREQUAL "no" )
@@ -29,11 +36,20 @@ INCLUDE( MacroOptionalFindPackage )
INCLUDE( MacroLogFeature )
# required
macro_optional_find_package(LibLastFm 0.3.3)
macro_log_feature(LIBLASTFM_FOUND "LastFm" "Qt library for the Last.fm webservices" "https://github.com/mxcl/liblastfm" FALSE "" "liblastfm is needed for scrobbling tracks to Last.fm and fetching cover artwork")
#While we distribute our own liblastfm2, don't need to look for it
#macro_optional_find_package(LibLastFm 0.3.3)
#macro_log_feature(LIBLASTFM_FOUND "LastFm" "Qt library for the Last.fm webservices" "https://github.com/mxcl/liblastfm" FALSE "" "liblastfm is needed for scrobbling tracks to Last.fm and fetching cover artwork")
set(LIBLASTFM_FOUND true)
macro_optional_find_package(LibEchonest 1.1.1)
macro_log_feature(LIBECHONEST_FOUND "Echonest" "Qt library for communicating with The Echo Nest" "http://projects.kde.org/libechonest" TRUE "" "libechonest is needed for dynamic playlists and the infosystem")
find_package(Phonon REQUIRED)
if(PHONON_VERSION STRLESS "4.5.0")
message(FATAL_ERROR "Phonon version 4.5.0 or higher is required, you have version ${PHONON_VERSION}")
else()
message(STATUS "Phonon found; ensure that phonon-vlc is at least 0.4")
endif()
macro_optional_find_package(LibEchonest 1.1.7)
macro_log_feature(LIBECHONEST_FOUND "Echonest" "Qt library for communicating with The Echo Nest" "http://projects.kde.org/libechonest" TRUE "" "libechonest 1.1.8 is needed for dynamic playlists and the infosystem")
macro_optional_find_package(CLucene 0.9.23)
macro_log_feature(CLucene_FOUND "CLucene" "The open-source, C++ search engine" "http://clucene.sf.net" TRUE "" "CLucene is used for indexing the collection")
@@ -44,45 +60,62 @@ macro_log_feature(QJSON_FOUND "QJson" "Qt library that maps JSON data to QVarian
macro_optional_find_package(Taglib 1.6.0)
macro_log_feature(TAGLIB_FOUND "TagLib" "Audio Meta-Data Library" "http://developer.kde.org/~wheeler/taglib.html" TRUE "" "taglib is needed for reading meta data from audio files")
# this installs headers and such and should really be handled in a separate package by packagers
IF( INTERNAL_JREEN )
ADD_SUBDIRECTORY( ${THIRDPARTY_DIR}/jreen )
SET( LIBJREEN_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR}/thirdparty/jreen/include )
SET( LIBJREEN_LIBRARY jreen )
SET( LIBJREEN_LIBRARIES ${LIBJREEN_LIBRARY} )
SET( LIBJREEN_FOUND true )
MESSAGE(STATUS "INTERNAL libjreen: ${LIBJREEN_INCLUDE_DIR}, ${LIBJREEN_LIBRARY}")
ELSE( INTERNAL_JREEN )
macro_optional_find_package(Jreen)
ENDIF( INTERNAL_JREEN )
macro_log_feature(LIBJREEN_FOUND "Jreen" "Qt XMPP Library" "http://gitorious.org/jreen/jreen" FALSE "" "Jreen is needed for the Jabber SIP plugin. \n\n Use -DINTERNAL_JREEN=ON to build the git submodule inside Tomahawk \n Be aware this installs a full jreen with headers and everything!\n")
# this installs headers and such and should really be handled in a separate package by packagers
IF( INTERNAL_QTWEETLIB )
ADD_SUBDIRECTORY( ${THIRDPARTY_DIR}/qtweetlib )
# copy headers to build/QTweetLib so we can use proper includes inside the code
FILE( COPY ${CMAKE_SOURCE_DIR}/thirdparty/qtweetlib/QTweetLib/src/ DESTINATION ${CMAKE_BINARY_DIR}/QTweetLib )
SET( QTWEETLIB_INCLUDE_DIR ${CMAKE_BINARY_DIR} )
SET( QTWEETLIB_LIBRARY tomahawk_qtweetlib )
SET( QTWEETLIB_LIBRARIES ${QTWEETLIB_LIBRARY} )
SET( QTWEETLIB_FOUND true )
MESSAGE(STATUS "INTERNAL libQTweetLib: ${QTWEETLIB_INCLUDE_DIR}, ${QTWEETLIB_LIBRARY}")
ELSE( INTERNAL_QTWEETLIB )
macro_optional_find_package(QTweetLib)
ENDIF( INTERNAL_QTWEETLIB )
macro_log_feature(QTWEETLIB_FOUND "QTweetLib" "Qt Twitter Library" "https://github.com/minimoog/QTweetLib" FALSE "" "QTweetLib is needed for the Twitter SIP plugin. \n\n Use -DINTERNAL_QTWEETLIB=ON to build the git submodule inside Tomahawk \n")
### libportfwd
SET( LIBPORTFWD_INCLUDE_DIR ${THIRDPARTY_DIR}/libportfwd/include )
SET( LIBPORTFWD_LIBRARY tomahawk_portfwd )
SET( LIBPORTFWD_LIBRARIES ${LIBPORTFWD_LIBRARY} )
ADD_SUBDIRECTORY( ${THIRDPARTY_DIR}/libportfwd )
# we need pthreads too
find_package(Threads)
find_package(KDE4Installed)
find_package(KDE4)
IF(KDE4_FOUND)
#KDE4 adds and removes some compiler flags that we don't like
STRING( REPLACE "-std=iso9899:1990" "" CLEAN_C_FLAGS ${CMAKE_C_FLAGS} )
SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexceptions" )
ELSE()
SET( CLEAN_C_FLAGS ${CMAKE_C_FLAGS} )
ENDIF()
include( CheckTagLibFileName )
check_taglib_filename( COMPLEX_TAGLIB_FILENAME )
# optional
macro_optional_find_package(Jreen)
IF( ENABLE_JREEN AND NOT LIBJREEN_FOUND )
ADD_SUBDIRECTORY( thirdparty/jreen )
SET( LIBJREEN_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR}/thirdparty/jreen/include )
IF( UNIX AND NOT APPLE )
SET( LIBJREEN_LIBRARY ${CMAKE_CURRENT_BINARY_DIR}/thirdparty/jreen/libjreen.so )
ENDIF( UNIX AND NOT APPLE )
IF( WIN32 )
SET( LIBJREEN_LIBRARY ${CMAKE_CURRENT_BINARY_DIR}/thirdparty/jreen/libjreen.dll )
ENDIF( WIN32 )
SET( LIBJREEN_FOUND true )
MESSAGE(STATUS "Internal libjreen: ${LIBJREEN_INCLUDE_DIR}, ${LIBJREEN_LIBRARY}")
ENDIF( ENABLE_JREEN AND NOT LIBJREEN_FOUND )
IF( WIN32 )
find_library(QTSPARKLE_LIBRARIES qtsparkle)
ENDIF( WIN32 )
macro_log_feature(JREEN_FOUND "Jreen" "Qt XMPP library" "http://gitorious.org/jreen" FALSE "" "Jreen is needed for the alternative/new Jabber SIP plugin. Built automatically inside Tomahawk, if not installed systemwide and ENABLE_JREEN is true")
macro_optional_find_package(Gloox 1.0)
IF( ENABLE_JREEN )
set( GLOOX_FOUND false )
ENDIF( ENABLE_JREEN)
macro_log_feature(GLOOX_FOUND "Gloox" "A portable high-level Jabber/XMPP library for C++" "http://camaya.net/gloox" FALSE "" "Gloox is needed for the Jabber SIP plugin and the XMPP-Bot")
#show dep log
macro_display_feature_log()
MESSAGE("WARNING!")
MESSAGE("Phonon is going to replace our own audio abstraction layer soon so we didn't")
MESSAGE("add checks for libmad, libvorbis and libflac. Make sure they are installed!")
MESSAGE("")
MESSAGE("-----------------------------------------------------------------------------")
SET( INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}" )
@@ -92,9 +125,10 @@ CONFIGURE_FILE(
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
IMMEDIATE @ONLY)
ADD_CUSTOM_TARGET(uninstall
"${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
# KDE4 defines an uninstall target for us automatically
IF( NOT KDE4_FOUND )
ADD_CUSTOM_TARGET(uninstall "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
ENDIF()
IF( NOT APPLE )
# Make linking as strict on linux as it is on osx. Then we don't break linking on mac so often
@@ -103,5 +137,6 @@ ENDIF( NOT APPLE )
ADD_SUBDIRECTORY( thirdparty )
ADD_SUBDIRECTORY( src/libtomahawk )
SET( TOMAHAWK_LIBRARIES tomahawklib )
ADD_SUBDIRECTORY( src )
ADD_SUBDIRECTORY( admin )

View File

@@ -6,15 +6,15 @@
# LIBJREEN_FOUND, whether libjreen was found
find_path(LIBJREEN_INCLUDE_DIR NAMES jreen.h
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}
PATH_SUFFIXES jreen
)
find_library( LIBJREEN_LIBRARY NAMES jreen
@@ -25,6 +25,8 @@ find_library( LIBJREEN_LIBRARY NAMES jreen
/usr/lib64
/usr/local/lib
/opt/kde4/lib
${CMAKE_INSTALL_PREFIX}/lib
${CMAKE_INSTALL_PREFIX}/lib64
${KDE4_LIB_DIR}
)
@@ -33,7 +35,7 @@ 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)
set(LIBJREEN_FOUND FALSE)
if (LIBJREEN_FIND_REQUIRED)
message(FATAL_ERROR "Could NOT find required package libjreen")
endif(LIBJREEN_FIND_REQUIRED)

View File

@@ -0,0 +1,20 @@
# Simple hack to detect wether KDE4 is *installed* -- not anything about the development environment!
FILE(TO_CMAKE_PATH "$ENV{KDEDIRS}" _KDEDIRS)
# For KDE4 kde-config has been renamed to kde4-config
FIND_PROGRAM(KDE4_KDECONFIG_EXECUTABLE NAMES kde4-config
# the suffix must be used since KDEDIRS can be a list of directories which don't have bin/ appended
PATH_SUFFIXES bin
HINTS
${CMAKE_INSTALL_PREFIX}
${_KDEDIRS}
/opt/kde4
ONLY_CMAKE_FIND_ROOT_PATH
)
IF (KDE4_KDECONFIG_EXECUTABLE)
SET (KDE4_INSTALLED TRUE)
message(STATUS "KDE4 is installed, will install protocol file")
ENDIF (KDE4_KDECONFIG_EXECUTABLE)

View File

@@ -0,0 +1,71 @@
# Find libphonon
# Once done this will define
#
# PHONON_FOUND - system has Phonon Library
# PHONON_INCLUDES - the Phonon include directory
# PHONON_LIBS - link these to use Phonon
# PHONON_VERSION - the version of the Phonon Library
# Copyright (c) 2008, Matthias Kretz <kretz@kde.org>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
macro(_phonon_find_version)
set(_phonon_namespace_header_file "${PHONON_INCLUDE_DIR}/phonon/phononnamespace.h")
if (APPLE AND EXISTS "${PHONON_INCLUDE_DIR}/Headers/phononnamespace.h")
set(_phonon_namespace_header_file "${PHONON_INCLUDE_DIR}/Headers/phononnamespace.h")
endif (APPLE AND EXISTS "${PHONON_INCLUDE_DIR}/Headers/phononnamespace.h")
file(READ ${_phonon_namespace_header_file} _phonon_header LIMIT 5000 OFFSET 1000)
string(REGEX MATCH "define PHONON_VERSION_STR \"(4\\.[0-9]+\\.[0-9a-z]+)\"" _phonon_version_match "${_phonon_header}")
set(PHONON_VERSION "${CMAKE_MATCH_1}")
message(STATUS "Phonon Version: ${PHONON_VERSION}")
endmacro(_phonon_find_version)
if(PHONON_FOUND)
# Already found, nothing more to do except figuring out the version
_phonon_find_version()
else(PHONON_FOUND)
if(PHONON_INCLUDE_DIR AND PHONON_LIBRARY)
set(PHONON_FIND_QUIETLY TRUE)
endif(PHONON_INCLUDE_DIR AND PHONON_LIBRARY)
# As discussed on kde-buildsystem: first look at CMAKE_PREFIX_PATH, then at the suggested PATHS (kde4 install dir)
find_library(PHONON_LIBRARY NAMES phonon phonon4 PATHS ${KDE4_LIB_INSTALL_DIR} ${QT_LIBRARY_DIR})
# then at the default system locations (CMAKE_SYSTEM_PREFIX_PATH, i.e. /usr etc.)
find_library(PHONON_LIBRARY NAMES phonon phonon4)
find_path(PHONON_INCLUDE_DIR NAMES phonon/phonon_export.h PATHS ${KDE4_INCLUDE_INSTALL_DIR} ${QT_INCLUDE_DIR} ${INCLUDE_INSTALL_DIR} ${QT_LIBRARY_DIR})
find_path(PHONON_INCLUDE_DIR NAMES phonon/phonon_export.h)
if(PHONON_INCLUDE_DIR AND PHONON_LIBRARY)
set(PHONON_LIBS ${phonon_LIB_DEPENDS} ${PHONON_LIBRARY})
set(PHONON_INCLUDES ${PHONON_INCLUDE_DIR}/KDE ${PHONON_INCLUDE_DIR})
set(PHONON_FOUND TRUE)
_phonon_find_version()
else(PHONON_INCLUDE_DIR AND PHONON_LIBRARY)
set(PHONON_FOUND FALSE)
endif(PHONON_INCLUDE_DIR AND PHONON_LIBRARY)
if(PHONON_FOUND)
if(NOT PHONON_FIND_QUIETLY)
message(STATUS "Found Phonon: ${PHONON_LIBRARY}")
message(STATUS "Found Phonon Includes: ${PHONON_INCLUDES}")
endif(NOT PHONON_FIND_QUIETLY)
else(PHONON_FOUND)
if(Phonon_FIND_REQUIRED)
if(NOT PHONON_INCLUDE_DIR)
message(STATUS "Phonon includes NOT found!")
endif(NOT PHONON_INCLUDE_DIR)
if(NOT PHONON_LIBRARY)
message(STATUS "Phonon library NOT found!")
endif(NOT PHONON_LIBRARY)
message(FATAL_ERROR "Phonon library or includes NOT found!")
else(Phonon_FIND_REQUIRED)
message(STATUS "Unable to find Phonon")
endif(Phonon_FIND_REQUIRED)
endif(PHONON_FOUND)
mark_as_advanced(PHONON_INCLUDE_DIR PHONON_LIBRARY PHONON_INCLUDES)
endif(PHONON_FOUND)

View File

@@ -43,4 +43,8 @@ else (QJSON_INCLUDE_DIR AND QJSON_LIBRARIES)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(QJSON DEFAULT_MSG QJSON_LIBRARIES QJSON_INCLUDE_DIR)
if ( UNIX AND NOT APPLE )
set ( QJSON_LIBRARIES "${QJSON_LIBRARIES} ${QJSON_LDFLAGS}" CACHE INTERNAL "")
endif ()
endif (QJSON_INCLUDE_DIR AND QJSON_LIBRARIES)

View File

@@ -0,0 +1,31 @@
# - Try to find QTweetLib
#
# QTWEETLIB_FOUND - system has QTweetLib
# QTWEETLIB_INCLUDE_DIRS - the QTweetLib include directories
# QTWEETLIB_LIBRARIES - link these to use QTweetLib
#
# (c) Dominik Schmidt <dev@dominik-schmidt.de>
#
# Dependencies
find_package(Qt4 REQUIRED)
# Include dir
find_path(QTWEETLIB_INCLUDE_DIR
NAMES QTweetLib/qtweetlib_global.h
PATHS ${KDE4_INCLUDE_DIR}
)
# Finally the library itself
find_library(QTWEETLIB_LIBRARY
NAMES QTweetLib
PATHS ${KDE4_LIB_DIR}
)
SET( QTWEETLIB_LIBRARIES ${QTWEETLIB_LIBRARY} ${QJSON_LIBRARIES} )
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(QTweetLib DEFAULT_MSG QTWEETLIB_LIBRARY QTWEETLIB_INCLUDE_DIR)
MARK_AS_ADVANCED(QTWEETLIB_LIBRARIES QTWEETLIB_INCLUDE_DIR)

View File

@@ -1,3 +1,65 @@
Version 0.1.0:
* Fixed stations so they resolve against all available sources instead of
only local and friend's collections.
* Add a Song seed for stations and automatic playlists, and allow dragging of
any tracks to the New Stations entry to create a pre-seeded station.
* Added auto-completion for artists while filling in a station or automatic
playlist.
* SOCKS5 proxy support. Noproxy hosts are also supported but no wildcard
support (yet).
* Support loading of - and exporting to - .xspf playlists
* Added Tomahawk:// protocol support and share links for many things including
tracks, playlists, and stations.
* Autoload automatically detected resolvers on startup.
* Fix issue where track resolving spinner never stopped if tracks were
removed from playlist while resolving.
* Twitter & Jabber profile pictures are shown.
* Fix issues with stations where multiple tracks could be added at once.
* Allow multiple accounts of the same type.
* Add new Google account type that is a thin wrapper around a Jabber plugin.
* Overhaul the settings dialog interface.
* Resolvers can now be enabled and disabled, and some can be configured
directly in Tomahawk, for example the new Spotify resolver.
* Split playlists and stations in sources sidebar. Show Recently Played
as a node under the Super Collection.
* Fix massive speed bottleneck on startup in the case of many recently
played playlists.
* Removed filter and song view from Super Collection, coming back in the next
release.
* Browse and play collections in our snappy tree-mode, which also shows
images for artists and albums.
* Fixed crash that could occur when playing a track from a browser.
* Fixed a crash caused by sources going on or offline.
* Huge optimizations in the resolving pipeline.
* Improved the handling of automatic status messages for Google Talk
* Switch to Phonon sound system, allowing us to support a wide variety
of audio formats.
* UI tweaks and cleanup.
* (OS X) Open configuration dialogs as sliding sheets.
* (OS X) Increase our available file watches to the maximum that the system
reports.
* (OS X) Added 'Window' menu with zoom/minimize actions
Version 0.0.3:
* Show spinner while resolving playlists.
* Go back to previous page visible when deleting a playlist.
* Fixed issue where automatic playlists and station summaries were not
updated in the playlist header.
* Fixed an issue which caused duplicate items when rescanning.
* Revert change introduced in 0.0.2 causing Twitter protocol to not try
to reconnect to a peer if it couldn't connect the first time the plugin
was connected. This caused confusing (and for most unwanted) behavior.
* Fix crashes in Twitter authentication.
* Properly honor the chosen port number if a static host and port are
marked as preferred.
* Don't automatically try to resolve all incoming playback logs. This
speeds up importing sources a lot.
* Faster painting of playlists with lots of unresolved tracks.
* Prefer local results when results' score is equal.
* (Windows) The tomahawk:// protocol handler works on Windows now.
* (Windows) Fixed launching Tomahawk from Windows installer with admin privileges.
* (Windows) Prevent launching a second instance on Windows.
Version 0.0.2:
* Don't reconnect to Jabber if the settings dialog is closed successfully
but the Jabber settings haven't changed.
@@ -12,7 +74,6 @@ Version 0.0.2:
the Tomahawk XMPP presence.
* Incompatible change: Twitter SIP protocol has changed slightly. 0.0.1
clients will not be able to talk to newer clients.
* Hopefully fixed crashes during Twitter authentication.
* Don't let long playlist or summary names force a large Tomahawk window.
* Tomahawk now asks you to authorize new contacts.

116
README
View File

@@ -1,82 +1,23 @@
Quickstart on Ubuntu
--------------------
$ sudo apt-get install build-essential cmake libtag1c2a libtag1-dev liblastfm-dev libqt4-dev \
libqt4-sql-sqlite libvorbis-dev libmad0-dev libflac++-dev libasound2-dev \
libboost-dev zlib1g-dev libgnutls-dev pkg-config
Gloox 1.0 (XMPP library)
------------------------
On Ubuntu 10.10 (and higher):
$ sudo apt-get install libgloox-dev
Otherwise see: http://camaya.net/glooxdownload
You need to build gloox 1.0 from source, Ubuntu 10.04 only packages version 0.9.
Download and unpack tarball:
$ ./configure --without-openssl --with-gnutls --without-libidn --with-zlib --without-examples --without-tests
$ CXXFLAGS=-fPIC make
$ sudo make install
QJson (Qt JSON library)
-----------------------
On Ubuntu 10.04 (and higher):
$ sudo apt-get install libqjson-dev
Otherwise see: http://sourceforge.net/projects/qjson/files/ (developed using version 0.7.1)
Download and unpack tarball:
$ ./configure && make
$ sudo make install
libEchonest 1.1.4
---------------
See: http://projects.kde.org/projects/playground/libs/libechonest/
Download and unpack tarball:
$ mkdir build && cd build
$ cmake ..
$ make
$ sudo make install
CLucene 0.9.23
---------------
See: http://clucene.sourceforge.net/download.shtml
Clone from git and build CLucene:
$ git clone git://clucene.git.sourceforge.net/gitroot/clucene/clucene
$ cd clucene && mkdir build && cd build
$ cmake ..
$ make
$ sudo make install
Quickstart on OS X
Compiling Tomahawk
------------------
Install homebrew
$ ruby -e "$(curl -fsSL https://gist.github.com/raw/323731/install_homebrew.rb)"
$ brew install cmake qt qjson gloox libmad libvorbis flac taglib boost liblastfm
Install libEchnoest & CLucene as per the above instructions.
If liblastfm gives problems, do the below:
$ brew edit liblastfm
Change the url to https://github.com/davidsansome/liblastfm/tarball/0.3.1
$ brew install liblastfm
Copy the md5 hash it returns.
$ brew edit liblastfm
Replace the md5 hash with the new one you copied.
$ brew install liblastfm
Now compile Tomahawk
--------------------
$ mkdir build && cd build
$ cmake ..
$ make
Start the application on Linux:
$ ./tomahawk
Start the application on OS X:
$ open tomahawk.app
Detailed building instructions for Ubuntu
-----------------------------------------
See: http://wiki.tomahawk-player.org/mediawiki/index.php/Building_Ubuntu_Binary_on_Maverick_(10.10)
Detailed building instructions for OS X
---------------------------------------
See: http://wiki.tomahawk-player.org/mediawiki/index.php/Building_OS_X_Application_Bundle_on_Snow_Leopard_(10.6)
Dependencies
@@ -85,40 +26,15 @@ Dependencies
CMake 2.8.0 http://www.cmake.org/
Qt 4.7.0 http://qt.nokia.com/
QJson 0.7.1 http://qjson.sourceforge.net/
Gloox 1.0 (0.9.x will fail) http://camaya.net/gloox/
SQLite 3.6.22 http://www.sqlite.org/
TagLib 1.6.2 http://developer.kde.org/~wheeler/taglib.html
Boost 1.3x http://www.boost.org/
CLucene 0.9.23 (0.9.21 will fail) http://clucene.sourceforge.net/download.shtml
libmad 0.15.1b http://www.underbit.com/products/mad/
libvorbis 1.2.3 http://xiph.org/vorbis/
libogg 1.1.4 http://xiph.org/ogg/
libflac++ 1.2.0 http://flac.sourceforge.net/
liblastfm 0.3.3 http://github.com/mxcl/liblastfm/
libechonest 1.1.4 http://projects.kde.org/projects/playground/libs/libechonest/
libechonest 1.1.8 http://projects.kde.org/projects/playground/libs/libechonest/
Third party libraries that we ship with our source:
RtAudio 4.0.7 http://www.music.mcgill.ca/~gary/rtaudio/
MiniUPnP http://miniupnp.free.fr/
To build the app:
-----------------
$ mkdir build && cd build
$ cmake ..
$ make
To run the app:
---------------
Only run the next two commands if you installed any of the dependencies from source on Linux.
$ export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
$ sudo ldconfig -v
Start the application on Linux:
$ ./tomahawk
Start the application on OS X:
$ open tomahawk.app
liblastfm 0.4.0 http://github.com/jonocole/liblastfm/
Enjoy!

View File

@@ -13,9 +13,9 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleVersion</key>
<string>0.0.2.0</string>
<string>TOMAHAWK_VERSION</string>
<key>CFBundleShortVersionString</key>
<string>0.0.2</string>
<string>TOMAHAWK_VERSION</string>
<key>CFBundleSignature</key>
<string>tomahawk</string>
<key>CFBundleIconFile</key>

View File

@@ -46,10 +46,18 @@ shift
mkdir -p Contents/MacOS
mkdir -p Contents/MacOS/sqldrivers
mkdir -p Contents/MacOS/imageformats
mkdir -p Contents/MacOS/phonon_backend
mkdir -p Contents/MacOS/crypto
cp -R $QT_PLUGINS_DIR/sqldrivers/libqsqlite.dylib Contents/MacOS/sqldrivers/
cp -R $QT_PLUGINS_DIR/imageformats/libqgif.dylib Contents/MacOS/imageformats/
cp -R $QT_PLUGINS_DIR/imageformats/libqjpeg.dylib Contents/MacOS/imageformats/
cp -R $QT_PLUGINS_DIR/imageformats/libqico.dylib Contents/MacOS/imageformats/
cp -R $QT_PLUGINS_DIR/imageformats/libqmng.dylib Contents/MacOS/imageformats/
cp -R $QT_PLUGINS_DIR/imageformats/libqsvg.dylib Contents/MacOS/imageformats/
cp -R $QT_PLUGINS_DIR/imageformats/libqtiff.dylib Contents/MacOS/imageformats/
cp -R $QT_PLUGINS_DIR/crypto/libqca-ossl.dylib Contents/MacOS/crypto/
cp -R $QT_PLUGINS_DIR/phonon_backend/phonon_vlc.so Contents/MacOS/phonon_backend/
#cleanup
find Contents/Frameworks -name Headers -o -name \*.prl -o -name \*_debug | xargs rm -rf

16
admin/mac/add-spotify.sh Executable file
View File

@@ -0,0 +1,16 @@
#!/bin/sh
# author: lfranchi@kde.org
# usage: Run from inside the bundle root directory, eg. Tomahawk.app
# The first parameter should be the spotify resolver binary to copy.
# eg: add-spotify.sh /path/to/spotify_tomahawkresolver
################################################################################
mkdir -p Contents/Frameworks
cp -R /Library/Frameworks/libspotify.framework Contents/Frameworks
install_name_tool -change /usr/local/Cellar/qt/4.7.3/lib/QtCore.framework/Versions/4/QtCore @executable_path/../Frameworks/QtCore.framework/Versions/4/QtCore $1
install_name_tool -change /usr/local/Cellar/qt/4.7.3/lib/QtNetwork.framework/Versions/4/QtNetwork @executable_path/../Frameworks/QtNetwork.framework/Versions/4/QtNetwork $1
install_name_tool -change libqjson.0.dylib @executable_path/libqjson.0.7.1.dylib $1
install_name_tool -change /usr/local/Cellar/qjson/0.7.1/lib/libqjson.0.7.1.dylib @executable_path/libqjson.0.7.1.dylib $1
mkdir -p Contents/MacOS
cp $1 Contents/MacOS/

View File

@@ -36,7 +36,7 @@ echo "Goes here: $QTDIR"
export QMAKESPEC='macx-g++'
export QTDIR
export VERSION
export QTVERSION='4.7.2'
export QTVERSION='4.7.3'
################################################################################
@@ -50,20 +50,35 @@ VERSION=$1
cd tomahawk.app
$ROOT/../admin/mac/add-Qt-to-bundle.sh \
'QtCore QtGui QtXml QtNetwork QtSql QtXmlPatterns QtWebKit phonon'
header "Running install_name_tool"
$ROOT/../admin/mac/deposx.sh
# 'QtCore QtGui QtXml QtNetwork QtSql QtXmlPatterns QtWebKit QtDbus phonon'
header "Renaming files"
mv Contents/Resources/tomahawkSources.icns Contents/Resources/Tomahawk.icns
mv Contents/MacOS/tomahawk Contents/MacOS/Tomahawk
# cp $ROOT/../admin/mac/Info.plist Contents/Info.plist
header "Copying VLC plugins into bundle"
mkdir -p Contents/plugins
cp -R /usr/local/Cellar/vlc-git/HEAD/lib/vlc/plugins/ Contents/plugins
rm -rf Contents/plugins/video_* Contents/plugins/gui Contents/plugins/*/libold* Contents/plugins/*/libvcd* Contents/plugins/*/libdvd* \
Contents/plugins/*/liblibass* Contents/plugins/*/libx264* Contents/plugins/*/libschroe* Contents/plugins/*/liblibmpeg2* \
Contents/plugins/*/libstream_out_* Contents/plugins/*/libmjpeg_plugin* Contents/plugins/*/libh264_plugin* Contents/plugins/*/libzvbi_plugin* Contents/plugins/*/lib*sub*
header "Running install_name_tool"
$ROOT/../admin/mac/deposx.sh
header "Copying Sparkle pubkey & framework, and qt.conf"
cp $ROOT/../admin/mac/sparkle_pub.pem Contents/Resources
cp -R /Library/Frameworks/Sparkle.framework Contents/Frameworks
cp $ROOT/../admin/mac/qt.conf Contents/Resources
header "Adding spotify resolver to bundle if spotify_tomahawkresolver found in $ROOT"
if [ -e $ROOT/spotify_tomahawkresolver ]
then
header "Found, so adding spotify resolver."ac
$ROOT/../admin/mac/add-spotify.sh $ROOT/spotify_tomahawkresolver
fi
header "Creating DMG"
cd ..
mv tomahawk.app Tomahawk.app

View File

@@ -23,6 +23,8 @@ cd Contents
QTLIBS=`ls Frameworks | cut -d. -f1`
LIBS=`cd MacOS && ls -fR1 | grep dylib`
PLUGINFOLDERS=`ls plugins | cut -d. -f1`
################################################################################
@@ -61,30 +63,39 @@ function deposx_change
function deplib_change
{
install_name_tool -change /usr/local/Cellar/liblastfm/0.3.3/lib/liblastfm.0.dylib @executable_path/liblastfm.0.dylib $1
install_name_tool -change /usr/local/Cellar/qjson/0.7.1/lib/libqjson.0.7.1.dylib @executable_path/libqjson.0.7.1.dylib $1
install_name_tool -change /usr/local/lib/libechonest.1.1.dylib @executable_path/libechonest.1.1.dylib $1
install_name_tool -change /usr/local/lib/libclucene-core.0.9.23.dylib @executable_path/libclucene-core.0.9.23.dylib $1
install_name_tool -change /usr/local/lib/libclucene-shared.0.9.23.dylib @executable_path/libclucene-shared.0.9.23.dylib $1
install_name_tool -change /usr/local/Cellar/gloox/1.0/lib/libgloox.8.dylib @executable_path/libgloox.8.dylib $1
install_name_tool -change /usr/local/Cellar/taglib/1.6.3/lib/libtag.1.dylib @executable_path/libtag.1.dylib $1
install_name_tool -change /usr/local/Cellar/libogg/1.2.0/lib/libogg.0.dylib @executable_path/libogg.0.dylib $1
install_name_tool -change /usr/local/Cellar/libvorbis/1.3.1/lib/libvorbis.0.dylib @executable_path/libvorbis.0.dylib $1
install_name_tool -change /usr/local/Cellar/libvorbis/1.3.1/lib/libvorbisfile.3.dylib @executable_path/libvorbisfile.3.dylib $1
install_name_tool -change /usr/local/Cellar/mad/0.15.1b/lib/libmad.0.dylib @executable_path/libmad.0.dylib $1
install_name_tool -change /usr/local/Cellar/flac/1.2.1/lib/libFLAC++.6.dylib @executable_path/libFLAC++.6.dylib $1
install_name_tool -change /usr/local/Cellar/flac/1.2.1/lib/libFLAC.8.dylib @executable_path/libFLAC.8.dylib $1
install_name_tool -change $ORIGROOT/src/libtomahawk/libtomahawklib.dylib @executable_path/libtomahawklib.dylib $1
install_name_tool -change /usr/local/lib/libclucene-core.1.dylib @executable_path/libclucene-core.1.dylib $1
install_name_tool -change /usr/local/lib/libclucene-shared.1.dylib @executable_path/libclucene-shared.1.dylib $1
install_name_tool -change /usr/local/Cellar/taglib/1.7/lib/libtag.1.7.0.dylib @executable_path/libtag.1.7.0.dylib $1
# install_name_tool -change /usr/local/Cellar/gloox/1.0/lib/libgloox.8.dylib @executable_path/libgloox.8.dylib $1
# install_name_tool -change /usr/local/Cellar/libogg/1.2.0/lib/libogg.0.dylib @executable_path/libogg.0.dylib $1
# install_name_tool -change /usr/local/Cellar/libvorbis/1.3.1/lib/libvorbis.0.dylib @executable_path/libvorbis.0.dylib $1
# install_name_tool -change /usr/local/Cellar/libvorbis/1.3.1/lib/libvorbisfile.3.dylib @executable_path/libvorbisfile.3.dylib $1
# install_name_tool -change /usr/local/Cellar/mad/0.15.1b/lib/libmad.0.dylib @executable_path/libmad.0.dylib $1
# install_name_tool -change /usr/local/Cellar/flac/1.2.1/lib/libFLAC++.6.dylib @executable_path/libFLAC++.6.dylib $1
# install_name_tool -change /usr/local/Cellar/flac/1.2.1/lib/libFLAC.8.dylib @executable_path/libFLAC.8.dylib $1
install_name_tool -change /usr/local/Cellar/kde-phonon/4.5.0/lib/libphonon.4.dylib @executable_path/libphonon.4.dylib $1
install_name_tool -change /usr/local/Cellar/kde-phonon/4.5.0/lib/libphonon.4.5.0.dylib @executable_path/libphonon.4.dylib $1
install_name_tool -change $ORIGROOT/libtomahawklib.dylib @executable_path/libtomahawklib.dylib $1
install_name_tool -change $ORIGROOT/libtomahawk_sipjabber.dylib @executable_path/libtomahawk_sipjabber.dylib $1
install_name_tool -change $ORIGROOT/libtomahawk_sipgoogle.dylib @executable_path/libtomahawk_sipgoogle.dylib $1
install_name_tool -change $ORIGROOT/libtomahawk_siptwitter.dylib @executable_path/libtomahawk_siptwitter.dylib $1
install_name_tool -change $ORIGROOT/libtomahawk_sipzeroconf.dylib @executable_path/libtomahawk_sipzeroconf.dylib $1
install_name_tool -change $ORIGROOT/thirdparty/jdns/libtomahawk_jdns.dylib @executable_path/libtomahawk_jdns.dylib $1
install_name_tool -change $ORIGROOT/thirdparty/qtweetlib/libtomahawk_qtweetlib.dylib @executable_path/libtomahawk_qtweetlib.dylib $1
install_name_tool -change $ORIGROOT/libtomahawk_qtweetlib.dylib @executable_path/libtomahawk_qtweetlib.dylib $1
install_name_tool -change $ORIGROOT/libtomahawk_portfwd.dylib @executable_path/libtomahawk_portfwd.dylib $1
install_name_tool -change $ORIGROOT/libjreen.dylib @executable_path/libjreen.dylib $1
install_name_tool -change /usr/local/Cellar/jreen/HEAD/lib/libjreen.dylib @executable_path/libjreen.dylib $1
install_name_tool -change /usr/local/Cellar/qca/2.0.2/lib/qca.framework/Versions/2/qca @executable_path/../Frameworks/qca.framework/Versions/2/qca $1
install_name_tool -change /usr/local/Cellar/gettext/0.18.1.1/lib/libintl.8.dylib @executable_path/libintl.8.dylib $1
install_name_tool -change /usr/local/Cellar/vlc-git/HEAD/lib/libvlc.5.dylib @executable_path/libvlc.5.dylib $1
install_name_tool -change /usr/local/Cellar/vlc-git/HEAD/lib/libvlccore.4.dylib @executable_path/libvlccore.4.dylib $1
install_name_tool -change libqjson.0.7.1.dylib @executable_path/libqjson.0.7.1.dylib $1
install_name_tool -change libqjson.0.dylib @executable_path/libqjson.0.7.1.dylib $1
install_name_tool -change libechonest.1.1.dylib @executable_path/libechonest.1.1.dylib $1
install_name_tool -change libclucene-core.0.9.23.dylib @executable_path/libclucene-core.0.9.23.dylib $1
install_name_tool -change libclucene-shared.0.9.23.dylib @executable_path/libclucene-shared.0.9.23.dylib $1
install_name_tool -change libclucene-core.1.dylib @executable_path/libclucene-core.1.dylib $1
install_name_tool -change libclucene-shared.1.dylib @executable_path/libclucene-shared.1.dylib $1
}
################################################################################
@@ -100,25 +111,35 @@ do
done
import_lib /usr/local/Cellar/qjson/0.7.1/lib/libqjson.0.7.1.dylib
import_lib /usr/local/Cellar/liblastfm/0.3.3/lib/liblastfm.0.dylib
import_lib /usr/local/Cellar/gloox/1.0/lib/libgloox.8.dylib
import_lib /usr/local/Cellar/taglib/1.6.3/lib/libtag.1.dylib
import_lib /usr/local/Cellar/libogg/1.2.0/lib/libogg.0.dylib
import_lib /usr/local/Cellar/libvorbis/1.3.1/lib/libvorbis.0.dylib
import_lib /usr/local/Cellar/libvorbis/1.3.1/lib/libvorbisfile.3.dylib
import_lib /usr/local/Cellar/mad/0.15.1b/lib/libmad.0.dylib
import_lib /usr/local/Cellar/flac/1.2.1/lib/libFLAC++.6.dylib
import_lib /usr/local/Cellar/flac/1.2.1/lib/libFLAC.8.dylib
import_lib /usr/local/Cellar/taglib/1.7/lib/libtag.1.7.0.dylib
#import_lib /usr/local/Cellar/gloox/1.0/lib/libgloox.8.dylib
#import_lib /usr/local/Cellar/libogg/1.2.0/lib/libogg.0.dylib
#import_lib /usr/local/Cellar/libvorbis/1.3.1/lib/libvorbis.0.dylib
#import_lib /usr/local/Cellar/libvorbis/1.3.1/lib/libvorbisfile.3.dylib
#import_lib /usr/local/Cellar/mad/0.15.1b/lib/libmad.0.dylib
#import_lib /usr/local/Cellar/flac/1.2.1/lib/libFLAC++.6.dylib
#import_lib /usr/local/Cellar/flac/1.2.1/lib/libFLAC.8.dylib
import_lib /usr/local/lib/libechonest.1.1.dylib
import_lib /usr/local/lib/libclucene-core.0.9.23.dylib
import_lib /usr/local/lib/libclucene-shared.0.9.23.dylib
import_lib /usr/local/lib/libclucene-core.1.dylib
import_lib /usr/local/lib/libclucene-shared.1.dylib
import_lib /usr/local/Cellar/kde-phonon/4.5.0/lib/libphonon.4.dylib
import_lib /usr/local/Cellar/vlc-git/HEAD/lib/libvlc.5.dylib
import_lib /usr/local/Cellar/vlc-git/HEAD/lib/libvlccore.4.dylib
import_lib /usr/local/Cellar/gettext/0.18.1.1/lib/libintl.8.dylib
import_lib ../../libtomahawk_sipjabber.dylib
import_lib ../../libtomahawk_siptwitter.dylib
import_lib ../../libtomahawk_sipzeroconf.dylib
import_lib ../../src/libtomahawk/libtomahawklib.dylib
import_lib ../../thirdparty/jdns/libtomahawk_jdns.dylib
import_lib ../../thirdparty/qtweetlib/libtomahawk_qtweetlib.dylib
import_lib $ORIGROOT/libjreen.dylib
import_lib $ORIGROOT/libtomahawklib.dylib
import_lib $ORIGROOT/libtomahawk_sipjabber.dylib
import_lib $ORIGROOT/libtomahawk_sipgoogle.dylib
import_lib $ORIGROOT/libtomahawk_siptwitter.dylib
import_lib $ORIGROOT/libtomahawk_sipzeroconf.dylib
import_lib $ORIGROOT/libtomahawk_qtweetlib.dylib
import_lib $ORIGROOT/libtomahawk_portfwd.dylib
cp -R /usr/local/Cellar/qca/2.0.2/lib/qca.framework Frameworks/
chmod 644 Frameworks/qca.framework/Versions/2/qca
deplib_change Frameworks/qca.framework/Versions/2/qca
deposx_change Frameworks/qca.framework/Versions/2/qca
# now Qt
for x in $QTLIBS
@@ -128,4 +149,16 @@ do
deposx_change Frameworks/$x.framework/Versions/4/$x
install_name_tool -id @executable_path/../Frameworks/$x.framework/Versions/4/$x \
Frameworks/$x.framework/Versions/4/$x
deplib_change "Frameworks/$x.framework/Versions/4/$x"
done
# now VLC plugins
for x in plugins/$PLUGINFOLDERS
do
for plugin in `ls plugins/$x | cut -f1`
do
echo "Fixing VLC plugin: $plugin"
chmod 644 plugins/$x/$plugin
deplib_change plugins/$x/$plugin
done
done

View File

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

View File

@@ -16,10 +16,10 @@
<item>
<title>Version 0.0.2 (Tomahawk Player Beta - It Lives?)</title>
<sparkle:releaseNotesLink>
https://github.com/tomahawk-player/tomahawk/raw/stable/ChangeLog
https://github.com/tomahawk-player/tomahawk/raw/0.0.2/ChangeLog
</sparkle:releaseNotesLink>
<pubDate>Mon, 28 Mar 2011 06:13:01 +0100</pubDate>
<enclosure url="http://download.tomahawk-player.org/sparkle/updates/tomahawk-0.0.2.tar.bz2" sparkle:version="0.0.2" length="19835237" type="application/octet-stream" sparkle:dsaSignature="MCwCFGb6yhKUO3+lH3eNaURvwtctLVMUAhQM8mp8yEwcU3ZoaJMTqb387dYccA==" />
<enclosure url="http://download.tomahawk-player.org/sparkle/updates/tomahawk-0.0.2.tar.bz2" sparkle:version="0.0.2" length="19831287" type="application/octet-stream" sparkle:dsaSignature="MC0CFC0Hwq9x9BWMF/8sA+c5KfzKoBzFAhUAk9r0IJlxQf9qEJk4IL6bbTWTiuI=" />
</item>
</channel>
</rss>

View File

@@ -16,10 +16,10 @@
<item>
<title>Version 0.0.2 (Tomahawk Player - It Lives!)</title>
<sparkle:releaseNotesLink>
https://github.com/tomahawk-player/tomahawk/raw/stable/ChangeLog
https://github.com/tomahawk-player/tomahawk/raw/0.0.2/ChangeLog
</sparkle:releaseNotesLink>
<pubDate>Mon, 28 Mar 2011 06:13:01 +0100</pubDate>
<enclosure url="http://download.tomahawk-player.org/sparkle/updates/tomahawk-0.0.2.tar.bz2" sparkle:version="0.0.2" length="19835237" type="application/octet-stream" sparkle:dsaSignature="MCwCFGb6yhKUO3+lH3eNaURvwtctLVMUAhQM8mp8yEwcU3ZoaJMTqb387dYccA==" />
<enclosure url="http://download.tomahawk-player.org/sparkle/updates/tomahawk-0.0.2.tar.bz2" sparkle:version="0.0.2" length="19831287" type="application/octet-stream" sparkle:dsaSignature="MC0CFC0Hwq9x9BWMF/8sA+c5KfzKoBzFAhUAk9r0IJlxQf9qEJk4IL6bbTWTiuI=" />
</item>
</channel>
</rss>

View File

@@ -0,0 +1,11 @@
[Desktop Entry]
Type=Application
Version=1.0
Name=Tomahawk
GenericName=Music Player
TryExec=tomahawk
Exec=tomahawk
Comment=Tomahawk - Social Music Player
Icon=tomahawk
Terminal=false
Categories=Qt;AudioVideo;Audio;Player;

View File

@@ -1,5 +1,5 @@
[Protocol]
exec=/home/leo/kde/tomahawk/build/tomahawk "%u"
exec=/path/to/binary "%u"
protocol=tomahawk
input=none
output=none

View File

0
admin/win/nsi/RELEASE_NOTES.txt Executable file → Normal file
View File

0
admin/win/nsi/installer.ico Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

View File

@@ -0,0 +1,35 @@
{\rtf1\ansi\ansicpg1252\uc1\deff0\stshfdbch0\stshfloch0\stshfhich0\stshfbi0\deflang1033\deflangfe1033{\fonttbl{\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f39\fswiss\fcharset0\fprq2{\*\panose 020b0604030504040204}Verdana;}
{\f172\froman\fcharset238\fprq2 Times New Roman CE;}{\f173\froman\fcharset204\fprq2 Times New Roman Cyr;}{\f175\froman\fcharset161\fprq2 Times New Roman Greek;}{\f176\froman\fcharset162\fprq2 Times New Roman Tur;}
{\f177\froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\f178\froman\fcharset178\fprq2 Times New Roman (Arabic);}{\f179\froman\fcharset186\fprq2 Times New Roman Baltic;}{\f180\froman\fcharset163\fprq2 Times New Roman (Vietnamese);}
{\f562\fswiss\fcharset238\fprq2 Verdana CE;}{\f563\fswiss\fcharset204\fprq2 Verdana Cyr;}{\f565\fswiss\fcharset161\fprq2 Verdana Greek;}{\f566\fswiss\fcharset162\fprq2 Verdana Tur;}{\f569\fswiss\fcharset186\fprq2 Verdana Baltic;}
{\f570\fswiss\fcharset163\fprq2 Verdana (Vietnamese);}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;
\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}{\stylesheet{
\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \snext0 Normal;}{\*\cs10 \additive \ssemihidden Default Paragraph Font;}{\*
\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\trcbpat1\trcfpat1\tscellwidthfts0\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv
\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs20\lang1024\langfe1024\cgrid\langnp1024\langfenp1024 \snext11 \ssemihidden Normal Table;}{\*\cs15 \additive \ul\cf2 \sbasedon10 \styrsid7485074 Hyperlink;}}
{\*\latentstyles\lsdstimax156\lsdlockeddef0}{\*\rsidtbl \rsid6712196\rsid7485074\rsid11352300\rsid15940516}{\*\generator Microsoft Word 11.0.5604;}{\info{\title Processes v1}{\author Hardwired}{\operator Hardwired}{\creatim\yr2004\mo12\dy12\hr23\min42}
{\revtim\yr2004\mo12\dy12\hr23\min51}{\version2}{\edmins9}{\nofpages1}{\nofwords80}{\nofchars458}{\nofcharsws537}{\vern24689}}\widowctrl\ftnbj\aenddoc\noxlattoyen\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\formshade\horzdoc\dgmargin\dghspace180
\dgvspace180\dghorigin1800\dgvorigin1440\dghshow1\dgvshow1
\jexpand\viewkind1\viewscale100\pgbrdrhead\pgbrdrfoot\splytwnine\ftnlytwnine\htmautsp\nolnhtadjtbl\useltbaln\alntblind\lytcalctblwd\lyttblrtgr\lnbrkrule\nobrkwrptbl\snaptogridincell\allowfieldendsel\wrppunct
\asianbrkrule\rsidroot7485074\newtblstyruls\nogrowautofit \fet0\sectd \linex0\endnhere\sectlinegrid360\sectdefaultcl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang {\pntxta .}}
{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}
{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}\pard\plain
\qj \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid7485074 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\b\f39\insrsid7485074\charrsid7485074 Processes v1.0}{\f39\insrsid7485074\charrsid7485074 .0.1
\par }{\f39\fs20\insrsid7485074
\par }\pard \qj \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid15940516 {\f39\fs20\insrsid15940516 This software binaries and source-code are free for any kind of use, including commercial use. }{
\f39\fs20\insrsid7485074\charrsid7485074 There is no restriction and no guaranty for using}{\f39\fs20\insrsid7485074\charrsid7485074 t}{\f39\fs20\insrsid7485074\charrsid7485074 his software}{\f39\fs20\insrsid7485074\charrsid7485074 and/or it
s source-code. }{\f39\fs20\insrsid15940516
\par I}{\f39\fs20\insrsid7485074\charrsid7485074 f you use the plug}{\f39\fs20\insrsid7485074\charrsid7485074 -}{\f39\fs20\insrsid7485074\charrsid7485074 in }{\f39\fs20\insrsid7485074\charrsid7485074 and/}{\f39\fs20\insrsid7485074\charrsid7485074 or it}{
\f39\fs20\insrsid7485074\charrsid7485074 s}{\f39\fs20\insrsid7485074\charrsid7485074 source-code, I would }{\f39\fs20\insrsid7485074\charrsid7485074 appreciate }{\f39\fs20\insrsid7485074\charrsid7485074 if my name is mentioned.}{
\f39\fs20\insrsid7485074\charrsid7485074
\par }\pard \qj \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid7485074 {\f39\fs20\insrsid7485074\charrsid7485074
\par }{\b\f39\fs20\insrsid7485074\charrsid7485074 Andrei Ciubotaru [Hardwired]
\par }{\f39\fs20\insrsid7485074\charrsid7485074 Lead Developer ICode&Ideas SRL (}{\field\flddirty{\*\fldinst {\f39\fs20\insrsid7485074\charrsid7485074 HYPERLINK "http://www.icode.ro/" }{\f39\fs20\insrsid7485074\charrsid7485074 {\*\datafield
00d0c9ea79f9bace118c8200aa004ba90b02000000170000001500000068007400740070003a002f002f007700770077002e00690063006f00640065002e0072006f002f000000e0c9ea79f9bace118c8200aa004ba90b2a00000068007400740070003a002f002f007700770077002e00690063006f00640065002e007200
6f002f000000}}}{\fldrslt {\cs15\f39\fs20\ul\cf2\insrsid7485074\charrsid7485074 http://www.icode.ro/}}}{\f39\fs20\insrsid7485074\charrsid7485074 )
\par }{\field{\*\fldinst {\f39\fs20\insrsid7485074 HYPERLINK "hardwiredteks@gmail.com" }{\f39\fs20\insrsid15940516\charrsid7485074 {\*\datafield
00d0c9ea79f9bace118c8200aa004ba90b02000000010000000303000000000000c00000000000004600001800000068617264776972656474656b7340676d61696c2e636f6d00ffffadde000000000000000000000000000000000000000000000000}}}{\fldrslt {
\cs15\f39\fs20\ul\cf2\insrsid7485074\charrsid7485074 hardwiredteks@gmail.com}}}{\f39\fs20\insrsid7485074\charrsid7485074 , }{\field{\*\fldinst {\f39\fs20\insrsid7485074 HYPERLINK "hardwired@icode.ro" }{\f39\fs20\insrsid15940516\charrsid7485074
{\*\datafield 00d0c9ea79f9bace118c8200aa004ba90b02000000010000000303000000000000c0000000000000460000130000006861726477697265644069636f64652e726f00ffffadde000000000000000000000000000000000000000000000000}}}{\fldrslt {
\cs15\f39\fs20\ul\cf2\insrsid7485074\charrsid7485074 hardwired@icode.ro}}}{\f39\fs20\insrsid7485074\charrsid7485074
\par }}

View File

@@ -0,0 +1,122 @@
----------------------------------------------------------------
----------------------------------------------------------------
Processes (Processes.dll)
Version: 1.0.1.0
Release: 24.february.2005
Description: Nullsoft Installer (NSIS) plug-in for managing?!
Windows processes.
Copyright: <09> 2004-2005 Hardwired. No rights reserved.
There is no restriction and no guaranty for using
this software.
Author: Andrei Ciubotaru [Hardwired]
Lead Developer ICode&Ideas SRL (http://www.icode.ro/)
hardwiredteks@gmail.com, hardwired@icode.ro
----------------------------------------------------------------
----------------------------------------------------------------
INTRODUCTION
The Need For Plug-in - I need it for the one of my installers.
Briefly: Use it when you need to find\kill a process when
installing\uninstalling some application. Also, use it when you
need to test the presence of a device driver.
SUPPORT
Supported platforms are: WinNT,Win2K,WinXP and Win2003 Server.
DESCRIPTION
Processes::FindProcess <process_name> ;without ".exe"
Searches the currently running processes for the given
process name.
return: 1 - the process was found
0 - the process was not found
Processes::KillProcess <process_name> ; without ".exe"
Searches the currently running processes for the given
process name. If the process is found then the it gets
killed.
return: 1 - the process was found and killed
0 - the process was not found or the process
cannot be killed (insuficient rights)
Processes::FindDevice <device_base_name>
Searches the installed devices drivers for the given
device base name.
(important: I said BASE NAME not FILENAME)
return: 1 - the device driver was found
0 - the device driver was not found
USAGE
First of all, does not matter where you use it. Ofcourse, the
routines must be called inside of a Section/Function scope.
Processes::FindProcess "process_name"
Pop $R0
StrCmp $R0 "1" make_my_day noooooo
make_my_day:
...
noooooo:
...
Processes::KillProcess "process_name"
Pop $R0
StrCmp $R0 "1" dead_meat why_wont_you_die
dead_meat:
...
why_wont_you_die:
...
Processes::FindDevice "device_base_name"
Pop $R0
StrCmp $R0 "1" blabla more_blabla
blabla:
...
more_blabla:
...
THANKS
Sunil Kamath for inspiring me. I wanted to use its FindProcDLL
but my requirements made it imposible.
Nullsoft for creating this very powerfull installer. One big,
free and full-featured (hmmm... and guiless for the moment) mean
install machine!:)
ME for being such a great coder...
... HAHAHAHAHAHAHA!
ONE MORE THING
If you use the plugin or it's source-code, I would apreciate
if my name is mentioned.
----------------------------------------------------------------
----------------------------------------------------------------

View File

@@ -0,0 +1,8 @@
// stdafx.cpp : source file that includes just the standard includes
// KillProcDLL.pch will be the pre-compiled header
// stdafx.obj will contain the pre-compiled type information
#include "stdafx.h"
// TODO: reference any additional headers you need in STDAFX.H
// and not in this file

View File

@@ -0,0 +1,34 @@
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//
#if !defined(AFX_STDAFX_H__780690DC_E128_403D_BC07_780D1B2CC101__INCLUDED_)
#define AFX_STDAFX_H__780690DC_E128_403D_BC07_780D1B2CC101__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
#include <windows.h>
#include <string> // String management...
//From exam28.cpp
#include <tlhelp32.h>
//#include <iostream.h>
#ifdef BORLANDC
#include <string.h>
#include <ctype.h>
#endif
//To make it a NSIS Plug-In
#include "exdll.h"
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_STDAFX_H__780690DC_E128_403D_BC07_780D1B2CC101__INCLUDED_)

View File

@@ -0,0 +1,37 @@
#include <windows.h>
#include "exdll.h"
HINSTANCE g_hInstance;
HWND g_hwndParent;
void __declspec(dllexport) myFunction(HWND hwndParent, int string_size,
char *variables, stack_t **stacktop)
{
g_hwndParent=hwndParent;
EXDLL_INIT();
// note if you want parameters from the stack, pop them off in order.
// i.e. if you are called via exdll::myFunction file.dat poop.dat
// calling popstring() the first time would give you file.dat,
// and the second time would give you poop.dat.
// you should empty the stack of your parameters, and ONLY your
// parameters.
// do your stuff here
{
char buf[1024];
wsprintf(buf,"$0=%s\n",getuservariable(INST_0));
MessageBox(g_hwndParent,buf,0,MB_OK);
}
}
BOOL WINAPI _DllMainCRTStartup(HANDLE hInst, ULONG ul_reason_for_call, LPVOID lpReserved)
{
g_hInstance=hInst;
return TRUE;
}

View File

@@ -0,0 +1,136 @@
#ifndef _EXDLL_H_
#define _EXDLL_H_
//
// only include this file from one place in your DLL.
// (it is all static, if you use it in two places it will fail)
//
#define EXDLL_INIT() { \
g_stringsize = string_size; \
g_stacktop = stacktop; \
g_variables = variables; }
//
// For page showing plug-ins
//
#define WM_NOTIFY_OUTER_NEXT (WM_USER+0x8)
#define WM_NOTIFY_CUSTOM_READY (WM_USER+0xd)
#define NOTIFY_BYE_BYE 'x'
typedef struct _stack_t
{
struct _stack_t *next;
char text[1]; // this should be the length of string_size
} stack_t;
static unsigned int g_stringsize;
static stack_t **g_stacktop;
static char *g_variables;
enum
{
INST_0, // $0
INST_1, // $1
INST_2, // $2
INST_3, // $3
INST_4, // $4
INST_5, // $5
INST_6, // $6
INST_7, // $7
INST_8, // $8
INST_9, // $9
INST_R0, // $R0
INST_R1, // $R1
INST_R2, // $R2
INST_R3, // $R3
INST_R4, // $R4
INST_R5, // $R5
INST_R6, // $R6
INST_R7, // $R7
INST_R8, // $R8
INST_R9, // $R9
INST_CMDLINE, // $CMDLINE
INST_INSTDIR, // $INSTDIR
INST_OUTDIR, // $OUTDIR
INST_EXEDIR, // $EXEDIR
INST_LANG, // $LANGUAGE
__INST_LAST
};
//
// utility functions (not required but often useful)
//
static int popstring( char *str )
{
stack_t *th;
if( !g_stacktop ||
!*g_stacktop )
return 1;
th = (*g_stacktop);
lstrcpy( str, th->text );
*g_stacktop = th->next;
GlobalFree( (HGLOBAL)th );
return 0;
}
static void pushstring( char *str )
{
stack_t *th;
if( !g_stacktop )
return;
th = (stack_t*)GlobalAlloc( GPTR, sizeof(stack_t) + g_stringsize );
lstrcpyn( th->text, str, g_stringsize );
th->next = *g_stacktop;
*g_stacktop = th;
}
static char *getuservariable( int varnum )
{
if( varnum < 0 ||
varnum >= __INST_LAST )
return NULL;
return (g_variables + varnum*g_stringsize);
}
static void setuservariable( int varnum, char *var )
{
if( var != NULL &&
varnum >= 0 &&
varnum < __INST_LAST )
lstrcpy( g_variables + varnum*g_stringsize, var );
}
#endif//_EXDLL_H_

View File

@@ -0,0 +1,411 @@
#include "stdafx.h"
#include "processes.h"
#include "string.h"
//-------------------------------------------------------------------------------------------
// global variables
lpfEnumProcesses EnumProcesses;
lpfEnumProcessModules EnumProcessModules;
lpfGetModuleBaseName GetModuleBaseName;
lpfEnumDeviceDrivers EnumDeviceDrivers;
lpfGetDeviceDriverBaseName GetDeviceDriverBaseName;
HINSTANCE g_hInstance;
HWND g_hwndParent;
HINSTANCE g_hInstLib;
//-------------------------------------------------------------------------------------------
// main DLL entry
BOOL WINAPI _DllMainCRTStartup( HANDLE hInst,
ULONG ul_reason_for_call,
LPVOID lpReserved )
{
g_hInstance = (struct HINSTANCE__ *)hInst;
return TRUE;
}
//-------------------------------------------------------------------------------------------
// loads the psapi routines
bool LoadPSAPIRoutines( void )
{
if( NULL == (g_hInstLib = LoadLibraryA( "PSAPI.DLL" )) )
return false;
EnumProcesses = (lpfEnumProcesses) GetProcAddress( g_hInstLib, "EnumProcesses" );
EnumProcessModules = (lpfEnumProcessModules) GetProcAddress( g_hInstLib, "EnumProcessModules" );
GetModuleBaseName = (lpfGetModuleBaseName) GetProcAddress( g_hInstLib, "GetModuleBaseNameA" );
EnumDeviceDrivers = (lpfEnumDeviceDrivers) GetProcAddress( g_hInstLib, "EnumDeviceDrivers" );
GetDeviceDriverBaseName = (lpfGetDeviceDriverBaseName) GetProcAddress( g_hInstLib, "GetDeviceDriverBaseNameA" );
if( ( NULL == EnumProcesses ) ||
( NULL == EnumProcessModules ) ||
( NULL == EnumDeviceDrivers ) ||
( NULL == GetModuleBaseName ) ||
( NULL == GetDeviceDriverBaseName ) )
{
FreeLibrary( g_hInstLib );
return false;
}
return true;
}
//-------------------------------------------------------------------------------------------
// free the psapi routines
bool FreePSAPIRoutines( void )
{
EnumProcesses = NULL;
EnumProcessModules = NULL;
GetModuleBaseName = NULL;
EnumDeviceDrivers = NULL;
if( FALSE == FreeLibrary( g_hInstLib ) )
return false;
return true;
}
//-------------------------------------------------------------------------------------------
// find a process by name
// return value: true - process was found
// false - process not found
bool FindProc( char *szProcess )
{
char szProcessName[ 1024 ];
char szCurrentProcessName[ 1024 ];
DWORD dPID[ 1024 ];
DWORD dPIDSize( 1024 );
DWORD dSize( 1024 );
HANDLE hProcess;
HMODULE phModule[ 1024 ];
//
// make the name lower case
//
memset( szProcessName, 0, 1024*sizeof(char) );
sprintf( szProcessName, "%s", szProcess );
strlwr( szProcessName );
//
// load PSAPI routines
//
if( false == LoadPSAPIRoutines() )
return false;
//
// enumerate processes names
//
if( FALSE == EnumProcesses( dPID, dSize, &dPIDSize ) )
{
FreePSAPIRoutines();
return false;
}
//
// walk trough and compare see if the process is running
//
for( int k( dPIDSize / sizeof( DWORD ) ); k >= 0; k-- )
{
memset( szCurrentProcessName, 0, 1024*sizeof(char) );
if( NULL != ( hProcess = OpenProcess( PROCESS_ALL_ACCESS, FALSE, dPID[ k ] ) ) )
{
if( TRUE == EnumProcessModules( hProcess, phModule, sizeof(HMODULE)*1024, &dPIDSize ) )
if( GetModuleBaseName( hProcess, phModule[ 0 ], szCurrentProcessName, 1024 ) > 0 )
{
strlwr( szCurrentProcessName );
if( NULL != strstr( szCurrentProcessName, szProcessName ) )
{
FreePSAPIRoutines();
CloseHandle( hProcess );
return true;
}
}
CloseHandle( hProcess );
}
}
//
// free PSAPI routines
//
FreePSAPIRoutines();
return false;
}
//-------------------------------------------------------------------------------------------
// kills a process by name
// return value: true - process was found
// false - process not found
bool KillProc( char *szProcess )
{
char szProcessName[ 1024 ];
char szCurrentProcessName[ 1024 ];
DWORD dPID[ 1024 ];
DWORD dPIDSize( 1024 );
DWORD dSize( 1024 );
HANDLE hProcess;
HMODULE phModule[ 1024 ];
//
// make the name lower case
//
memset( szProcessName, 0, 1024*sizeof(char) );
sprintf( szProcessName, "%s", szProcess );
strlwr( szProcessName );
//
// load PSAPI routines
//
if( false == LoadPSAPIRoutines() )
return false;
//
// enumerate processes names
//
if( FALSE == EnumProcesses( dPID, dSize, &dPIDSize ) )
{
FreePSAPIRoutines();
return false;
}
//
// walk trough and compare see if the process is running
//
for( int k( dPIDSize / sizeof( DWORD ) ); k >= 0; k-- )
{
memset( szCurrentProcessName, 0, 1024*sizeof(char) );
if( NULL != ( hProcess = OpenProcess( PROCESS_ALL_ACCESS, FALSE, dPID[ k ] ) ) )
{
if( TRUE == EnumProcessModules( hProcess, phModule, sizeof(HMODULE)*1024, &dPIDSize ) )
if( GetModuleBaseName( hProcess, phModule[ 0 ], szCurrentProcessName, 1024 ) > 0 )
{
strlwr( szCurrentProcessName );
if( NULL != strstr( szCurrentProcessName, szProcessName ) )
{
FreePSAPIRoutines();
//
// kill process
//
if( false == TerminateProcess( hProcess, 0 ) )
{
CloseHandle( hProcess );
return true;
}
//
// refresh systray
//
UpdateWindow( FindWindow( NULL, "Shell_TrayWnd" ) );
//
// refresh desktop window
//
UpdateWindow( GetDesktopWindow() );
CloseHandle( hProcess );
return true;
}
}
CloseHandle( hProcess );
}
}
//
// free PSAPI routines
//
FreePSAPIRoutines();
return false;
}
//-------------------------------------------------------------------------------------------
bool FindDev( char *szDriverName )
{
char szDeviceName[ 1024 ];
char szCurrentDeviceName[ 1024 ];
LPVOID lpDevices[ 1024 ];
DWORD dDevicesSize( 1024 );
DWORD dSize( 1024 );
TCHAR tszCurrentDeviceName[ 1024 ];
DWORD dNameSize( 1024 );
//
// make the name lower case
//
memset( szDeviceName, 0, 1024*sizeof(char) );
sprintf( szDeviceName, "%s", strlwr( szDriverName ) );
//
// load PSAPI routines
//
if( false == LoadPSAPIRoutines() )
return false;
//
// enumerate devices
//
if( FALSE == EnumDeviceDrivers( lpDevices, dSize, &dDevicesSize ) )
{
FreePSAPIRoutines();
return false;
}
//
// walk trough and compare see if the device driver exists
//
for( int k( dDevicesSize / sizeof( LPVOID ) ); k >= 0; k-- )
{
memset( szCurrentDeviceName, 0, 1024*sizeof(char) );
memset( tszCurrentDeviceName, 0, 1024*sizeof(TCHAR) );
if( 0 != GetDeviceDriverBaseName( lpDevices[ k ], tszCurrentDeviceName, dNameSize ) )
{
sprintf( szCurrentDeviceName, "%S", tszCurrentDeviceName );
if( 0 == strcmp( strlwr( szCurrentDeviceName ), szDeviceName ) )
{
FreePSAPIRoutines();
return true;
}
}
}
//
// free PSAPI routines
//
FreePSAPIRoutines();
return false;
}
//-------------------------------------------------------------------------------------------
extern "C" __declspec(dllexport) void FindProcess( HWND hwndParent,
int string_size,
char *variables,
stack_t **stacktop )
{
char szParameter[ 1024 ];
g_hwndParent = hwndParent;
EXDLL_INIT();
{
popstring( szParameter );
if( true == FindProc( szParameter ) )
wsprintf( szParameter, "1" );
else
wsprintf( szParameter, "0" );
setuservariable( INST_R0, szParameter );
}
}
//-------------------------------------------------------------------------------------------
extern "C" __declspec(dllexport) void KillProcess( HWND hwndParent,
int string_size,
char *variables,
stack_t **stacktop )
{
char szParameter[ 1024 ];
g_hwndParent = hwndParent;
EXDLL_INIT();
{
popstring( szParameter );
if( true == KillProc( szParameter ) )
wsprintf( szParameter, "1" );
else
wsprintf( szParameter, "0" );
setuservariable( INST_R0, szParameter );
}
}
//-------------------------------------------------------------------------------------------
extern "C" __declspec(dllexport) void FindDevice( HWND hwndParent,
int string_size,
char *variables,
stack_t **stacktop )
{
char szParameter[ 1024 ];
g_hwndParent = hwndParent;
EXDLL_INIT();
{
popstring( szParameter );
if( true == FindDev( szParameter ) )
wsprintf( szParameter, "1" );
else
wsprintf( szParameter, "0" );
setuservariable( INST_R0, szParameter );
}
}

View File

@@ -0,0 +1,49 @@
#pragma once
//-------------------------------------------------------------------------------------------
// PSAPI function pointers
typedef BOOL (WINAPI *lpfEnumProcesses) ( DWORD *, DWORD, DWORD * );
typedef BOOL (WINAPI *lpfEnumProcessModules) ( HANDLE, HMODULE *, DWORD, LPDWORD );
typedef DWORD (WINAPI *lpfGetModuleBaseName) ( HANDLE, HMODULE, LPTSTR, DWORD );
typedef BOOL (WINAPI *lpfEnumDeviceDrivers) ( LPVOID *, DWORD, LPDWORD );
typedef BOOL (WINAPI *lpfGetDeviceDriverBaseName)( LPVOID, LPTSTR, DWORD );
//-------------------------------------------------------------------------------------------
// Internal use routines
bool LoadPSAPIRoutines( void );
bool FreePSAPIRoutines( void );
bool FindProc( char *szProcess );
bool KillProc( char *szProcess );
bool FindDev( char *szDriverName );
//-------------------------------------------------------------------------------------------
// Exported routines
extern "C" __declspec(dllexport) void FindProcess( HWND hwndParent,
int string_size,
char *variables,
stack_t **stacktop );
extern "C" __declspec(dllexport) void KillProcess( HWND hwndParent,
int string_size,
char *variables,
stack_t **stacktop );
extern "C" __declspec(dllexport) void FindDevice( HWND hwndParent,
int string_size,
char *variables,
stack_t **stacktop );

Binary file not shown.

View File

@@ -0,0 +1,103 @@
// Microsoft Visual C++ generated resource script.
//
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "afxres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE
BEGIN
"#include ""afxres.h""\r\n"
"\0"
END
3 TEXTINCLUDE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,0,1
PRODUCTVERSION 1,0,0,1
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x4L
FILETYPE 0x2L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "Comments", "NSIS Plug-in for Windows process management. Only WinNT, Win2K, WinXP and Win2003 Server supported."
VALUE "CompanyName", "Andrei Ciubotaru [Hardwired]"
VALUE "FileDescription", "Windows Processes Management"
VALUE "FileVersion", "1, 0, 0, 1"
VALUE "InternalName", "Processes"
VALUE "LegalCopyright", "Copyright (c) 2004 Hardwired. No rights reserved."
VALUE "OriginalFilename", "Processes.dll"
VALUE "ProductName", "Processes"
VALUE "ProductVersion", "1, 0, 0, 1"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

View File

@@ -0,0 +1,21 @@
Microsoft Visual Studio Solution File, Format Version 8.00
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "processes", "processes.vcproj", "{3438467F-A719-46DC-93E5-137A8B691727}"
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfiguration) = preSolution
Debug = Debug
Release = Release
EndGlobalSection
GlobalSection(ProjectConfiguration) = postSolution
{3438467F-A719-46DC-93E5-137A8B691727}.Debug.ActiveCfg = Debug|Win32
{3438467F-A719-46DC-93E5-137A8B691727}.Debug.Build.0 = Debug|Win32
{3438467F-A719-46DC-93E5-137A8B691727}.Release.ActiveCfg = Release|Win32
{3438467F-A719-46DC-93E5-137A8B691727}.Release.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
EndGlobalSection
GlobalSection(ExtensibilityAddIns) = postSolution
EndGlobalSection
EndGlobal

View File

@@ -0,0 +1,122 @@
----------------------------------------------------------------
----------------------------------------------------------------
Processes (Processes.dll)
Version: 1.0.0.1
Release: 12.december.2004
Description:Nullsoft Installer (NSIS) plug-in for managing?!
Windows processes.
Copyright: <09> 2004 Hardwired. No rights reserved.
There is no restriction and no guaranty for using
this software.
Author: Andrei Ciubotaru [Hardwired]
Lead Developer ICode&Ideas SRL (http://www.icode.ro)
hardwiredteks@gmail.com, hardwired@icode.ro
----------------------------------------------------------------
----------------------------------------------------------------
INTRODUCTION
The Need For Plug-in - I need it for the one of my installers.
Briefly: Use it when you need to find\kill a process when
installing\uninstalling some application. Also, use it when you
need to test the presence of a device driver.
SUPPORT
Supported platforms are: WinNT,Win2K,WinXP and Win2003 Server.
DESCRIPTION
Processes::FindProcess <process_name.exe>
Searches the currently running processes for the given
process name.
return: 1 - the process was found
0 - the process was not found
Processes::KillProcess <process_name.exe>
Searches the currently running processes for the given
process name. If the process is found then the it gets
killed.
return: 1 - the process was found and killed
0 - the process was not found or the process
cannot be killed (insuficient rights)
Processes::FindDevice <device_base_name>
Searches the installed devices drivers for the given
device base name.
(important: I said BASE NAME not FILENAME)
return: 1 - the device driver was found
0 - the device driver was not found
USAGE
First of all, does not matter where you use it. Ofcourse, the
routines must be called inside of a Section/Function scope.
Processes::FindProcess "process_name.exe"
Pop $R0
StrCmp $R0 "1" make_my_day noooooo
make_my_day:
...
noooooo:
...
Processes::KillProcess "process_name.exe"
Pop $R0
StrCmp $R0 "1" dead_meat why_wont_you_die
dead_meat:
...
why_wont_you_die:
...
Processes::FindDevice "device_base_name"
Pop $R0
StrCmp $R0 "1" blabla more_blabla
blabla:
...
more_blabla:
...
THANKS
Sunil Kamath for inspiring me. I wanted to use its FindProcDLL
but my requirements made it imposible.
Nullsoft for creating this very powerfull installer. One big,
free and full-featured (hmmm... and guiless for the moment) mean
install machine!:)
ME for being such a great coder...
... HAHAHAHAHAHAHA!
ONE MORE THING
If you use the plugin or it's source-code, I would apreciate
if my name is mentioned.
----------------------------------------------------------------
----------------------------------------------------------------

View File

@@ -0,0 +1,222 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="7.10"
Name="processes"
SccProjectName="processes"
SccLocalPath=".">
<Platforms>
<Platform
Name="Win32"/>
</Platforms>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory=".\Debug"
IntermediateDirectory=".\Debug"
ConfigurationType="2"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;FINDPROCDLL_EXPORTS"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="3"
PrecompiledHeaderThrough="stdafx.h"
PrecompiledHeaderFile=".\Debug/processes.pch"
AssemblerListingLocation=".\Debug/"
ObjectFile=".\Debug/"
ProgramDataBaseFileName=".\Debug/"
WarningLevel="3"
SuppressStartupBanner="TRUE"
DebugInformationFormat="4"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
OutputFile=".\Debug/processes.dll"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
GenerateDebugInformation="TRUE"
ProgramDatabaseFile=".\Debug/processes.pdb"
ImportLibrary=".\Debug/processes.lib"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="_DEBUG"
MkTypLibCompatible="TRUE"
SuppressStartupBanner="TRUE"
TargetEnvironment="1"
TypeLibraryName=".\Debug/processes.tlb"
HeaderFileName=""/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1034"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="..\bin"
IntermediateDirectory="..\bin\processes"
ConfigurationType="2"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE"
CharacterSet="2"
WholeProgramOptimization="TRUE">
<Tool
Name="VCCLCompilerTool"
Optimization="3"
GlobalOptimizations="TRUE"
InlineFunctionExpansion="1"
FavorSizeOrSpeed="1"
OptimizeForWindowsApplication="TRUE"
PreprocessorDefinitions="NDEBUG;_WINDOWS;_USRDLL;FINDPROCDLL_EXPORTS"
StringPooling="TRUE"
RuntimeLibrary="0"
StructMemberAlignment="1"
EnableFunctionLevelLinking="TRUE"
UsePrecompiledHeader="3"
PrecompiledHeaderThrough="stdafx.h"
PrecompiledHeaderFile="..\bin\processes/processes.pch"
AssemblerListingLocation="..\bin\processes/"
ObjectFile="..\bin\processes/"
ProgramDataBaseFileName="..\bin\processes/"
WarningLevel="4"
SuppressStartupBanner="TRUE"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="libc.lib"
OutputFile="..\bin/Processes.dll"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
IgnoreAllDefaultLibraries="FALSE"
ProgramDatabaseFile="..\bin/processes.pdb"
OptimizeForWindows98="1"
ImportLibrary="..\bin/processes.lib"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="TRUE"
SuppressStartupBanner="TRUE"
TargetEnvironment="1"
TypeLibraryName=".\Release/processes.tlb"
HeaderFileName=""/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1033"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
<File
RelativePath="processes.cpp">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;FINDPROCDLL_EXPORTS;$(NoInherit)"
BasicRuntimeChecks="3"/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="1"
PreprocessorDefinitions="NDEBUG;_WINDOWS;_MBCS;_USRDLL;FINDPROCDLL_EXPORTS;$(NoInherit)"/>
</FileConfiguration>
</File>
<File
RelativePath=".\processes.rc">
</File>
<File
RelativePath="StdAfx.cpp">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;FINDPROCDLL_EXPORTS;$(NoInherit)"
BasicRuntimeChecks="3"
UsePrecompiledHeader="1"/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="1"
PreprocessorDefinitions="NDEBUG;_WINDOWS;_MBCS;_USRDLL;FINDPROCDLL_EXPORTS;$(NoInherit)"
UsePrecompiledHeader="1"/>
</FileConfiguration>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl">
<File
RelativePath="exdll.h">
</File>
<File
RelativePath=".\processes.h">
</File>
<File
RelativePath=".\resource.h">
</File>
<File
RelativePath="StdAfx.h">
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
</Filter>
<File
RelativePath="processes.txt">
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@@ -0,0 +1,15 @@
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by processes.rc
//
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 101
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1001
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif

0
admin/win/nsi/page_header.bmp Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

View File

@@ -1 +1 @@
96
105

0
admin/win/nsi/tomahawk.ini Executable file → Normal file
View File

311
admin/win/nsi/tomahawk.nsi Executable file → Normal file
View File

@@ -4,7 +4,7 @@
; Some installer script options (comment-out options not required)
;-----------------------------------------------------------------------------
;!define OPTION_LICENSE_AGREEMENT
;!define OPTION_UAC_PLUGIN_ENHANCED
!define OPTION_UAC_PLUGIN_ENHANCED
!define OPTION_SECTION_SC_START_MENU
!define OPTION_SECTION_SC_DESKTOP
!define OPTION_SECTION_SC_QUICK_LAUNCH
@@ -15,15 +15,18 @@
;-----------------------------------------------------------------------------
; Some paths.
;-----------------------------------------------------------------------------
!define MING_PATH "/usr/i686-w64-mingw32/sys-root/mingw"
!ifndef MING_PATH
!define MING_PATH "/usr/i686-w64-mingw32/sys-root/mingw"
!endif
!define MING_BIN "${MING_PATH}/bin"
!define MING_DLL_PATH "${MING_BIN}"
!define MING_LIB "${MING_PATH}/lib"
!define ROOT_PATH "..\..\.." ; assuming the script is in ROOT/admin/win/nsi
!define BUILD_PATH "${ROOT_PATH}\build"
!define QT_DLL_PATH "${MING_BIN}"
!define SQLITE_DLL_PATH "${MING_LIB}/qt4/plugins/sqldrivers"
!define IMAGEFORMATS_DLL_PATH "${MING_LIB}/qt4/plugins/imageformats"
!define VLC_PATH "${ROOT_PATH}\..\vlc"
!define VLC_PLUGIN_PATH "${VLC_PATH}\plugins"
;-----------------------------------------------------------------------------
; Increment installer revision number as part of this script.
@@ -33,9 +36,11 @@
!delfile revision.txt
!appendfile revision.txt ${REVISION}
!define VER_MAJOR "0"
!define VER_MINOR "0"
!define VER_BUILD "2"
!ifndef VER_MAJOR && VER_MINOR && VER_BUILD
!define VER_MAJOR "0"
!define VER_MINOR "1"
!define VER_BUILD "0rc2"
!endif
!define VERSION "${VER_MAJOR}.${VER_MINOR}.${VER_BUILD}"
@@ -58,17 +63,10 @@ InstType Full
InstType Minimal
CRCCheck On
SetCompressor /SOLID lzma
RequestExecutionLevel user ;Now using the UAC plugin.
ReserveFile tomahawk.ini
ReserveFile "${NSISDIR}\Plugins\InstallOptions.dll"
;The UAC plugin provides an elevated user.
;Otherwise request admin level here.
!ifdef OPTION_UAC_PLUGIN_ENHANCED
RequestExecutionLevel user
!else
RequestExecutionLevel admin
!endif
;-----------------------------------------------------------------------------
; Include some required header files.
;-----------------------------------------------------------------------------
@@ -79,16 +77,14 @@ ReserveFile "${NSISDIR}\Plugins\InstallOptions.dll"
!include Memento.nsh ;Remember user selections.
!include WinVer.nsh ;Windows version detection.
!include WordFunc.nsh ;Used by VersionCompare macro function.
!ifdef OPTION_UAC_PLUGIN_ENHANCED
!include UAC.nsh ;Used by the UAC elevation to install as user or admin.
!endif
!include UAC.nsh ;Used by the UAC elevation to install as user or admin.
;-----------------------------------------------------------------------------
; Memento selections stored in registry.
;-----------------------------------------------------------------------------
!define MEMENTO_REGISTRY_ROOT HKLM
!define MEMENTO_REGISTRY_KEY Software\Microsoft\Windows\CurrentVersion\Uninstall\Tomahawk
;-----------------------------------------------------------------------------
; Modern User Interface (MUI) defintions and setup.
;-----------------------------------------------------------------------------
@@ -146,18 +142,46 @@ UninstPage custom un.UnPageUserAppData un.UnPageUserAppDataLeave
##############################################################################
Function LaunchTomahawk
!ifdef OPTION_UAC_PLUGIN_ENHANCED
${UAC.CallFunctionAsUser} LaunchTomahawkAsUser
!else
Exec "$INSTDIR\tomahawk.exe"
!endif
${UAC.CallFunctionAsUser} LaunchTomahawkAsUser
FunctionEnd
!ifdef OPTION_UAC_PLUGIN_ENHANCED
Function LaunchTomahawkAsUser
Exec "$INSTDIR\tomahawk.exe"
FunctionEnd
!endif
##############################################################################
# #
# PROCESS HANDLING FUNCTIONS AND MACROS #
# #
##############################################################################
!macro CheckForProcess processName gotoWhenFound gotoWhenNotFound
Processes::FindProcess ${processName}
StrCmp $R0 "0" ${gotoWhenNotFound} ${gotoWhenFound}
!macroend
!macro ConfirmEndProcess processName
MessageBox MB_YESNO|MB_ICONEXCLAMATION \
"Found ${processName} process(s) which need to be stopped.$\nDo you want the installer to stop these for you?" \
IDYES process_${processName}_kill IDNO process_${processName}_ended
process_${processName}_kill:
DetailPrint "Killing ${processName} processes."
Processes::KillProcess ${processName}
Sleep 1500
StrCmp $R0 "1" process_${processName}_ended
DetailPrint "Process to kill not found!"
process_${processName}_ended:
!macroend
!macro CheckAndConfirmEndProcess processName
!insertmacro CheckForProcess ${processName} 0 no_process_${processName}_to_end
!insertmacro ConfirmEndProcess ${processName}
no_process_${processName}_to_end:
!macroend
Function EnsureTomahawkShutdown
!insertmacro CheckAndConfirmEndProcess "tomahawk.exe"
FunctionEnd
##############################################################################
# #
@@ -226,12 +250,10 @@ Function PageLeaveReinstall
Delete $R1
RMDir $INSTDIR
no_remove_uninstaller:
StrCmp $R0 "2" +2 0
StrCmp $R0 "2" 0 +3
UAC::Unload
Quit
BringToFront
!ifdef OPTION_UAC_PLUGIN_ENHANCED
UAC::Unload
Quit
!endif
reinst_done:
FunctionEnd
@@ -244,7 +266,7 @@ FunctionEnd
Section "Tomahawk Player" SEC_TOMAHAWK_PLAYER
SectionIn 1 2 3 RO
SetDetailsPrint listonly
SetDetailsPrint textonly
DetailPrint "Installing Tomahawk Player essentials."
SetDetailsPrint listonly
@@ -254,34 +276,28 @@ Section "Tomahawk Player" SEC_TOMAHAWK_PLAYER
;Main executable.
File "${INSTALL_PATH}\bin\tomahawk.exe"
File "${INSTALL_PATH}\lib\librtaudio.dll"
File "${INSTALL_PATH}\lib\libqxtweb-standalone.dll"
File "${INSTALL_PATH}\lib\libtomahawk_jdns.dll"
File "${INSTALL_PATH}\lib\libtomahawk_qtweetlib.dll"
File "${INSTALL_PATH}\lib\libtomahawklib.dll"
File "${INSTALL_PATH}\lib\libtomahawk_sipjabber.dll"
File "${INSTALL_PATH}\lib\libtomahawk_siptwitter.dll"
File "${INSTALL_PATH}\lib\libtomahawk_sipzeroconf.dll"
File "${INSTALL_PATH}\bin\libqxtweb-standalone.dll"
File "${INSTALL_PATH}\bin\libtomahawk_portfwd.dll"
File "${INSTALL_PATH}\bin\libtomahawk_lastfm2.dll"
File "${INSTALL_PATH}\bin\libtomahawklib.dll"
File "${INSTALL_PATH}\lib\libtomahawk_sip*.dll"
!endif
!ifndef INSTALL_PATH
;Main executable.
File "${BUILD_PATH}\tomahawk.exe"
File "${BUILD_PATH}\thirdparty\rtaudio\librtaudio.dll"
File "${BUILD_PATH}\thirdparty\qxt\qxtweb-standalone\libqxtweb-standalone.dll"
File "${BUILD_PATH}\thirdparty\jdns\libtomahawk_jdns.dll"
File "${BUILD_PATH}\thirdparty\qtweetlib\libtomahawk_qtweetlib.dll"
File "${BUILD_PATH}\src\libtomahawk\libtomahawklib.dll"
File "${BUILD_PATH}\libtomahawk_sipjabber.dll"
File "${BUILD_PATH}\libtomahawk_siptwitter.dll"
File "${BUILD_PATH}\libtomahawk_sipzeroconf.dll"
File "${BUILD_PATH}\libtomahawklib.dll"
File "${BUILD_PATH}\libqxtweb-standalone.dll"
File "${BUILD_PATH}\libtomahawk_portfwd.dll"
File "${BUILD_PATH}\libtomahawk_lastfm2.dll"
File "${BUILD_PATH}\libtomahawk_sip*.dll"
!endif
;License & release notes.
File "${ROOT_PATH}\LICENSE.txt"
File /oname=NOTES.txt RELEASE_NOTES.txt
;QT stuff:
;QT stuff:
File "${QT_DLL_PATH}\QtCore4.dll"
File "${QT_DLL_PATH}\QtGui4.dll"
File "${QT_DLL_PATH}\QtNetwork4.dll"
@@ -299,32 +315,59 @@ Section "Tomahawk Player" SEC_TOMAHAWK_PLAYER
File "${IMAGEFORMATS_DLL_PATH}\qgif4.dll"
File "${IMAGEFORMATS_DLL_PATH}\qjpeg4.dll"
SetOutPath "$INSTDIR"
;Cygwin/c++ stuff
;File "${MING_DLL_PATH}\cygmad-0.dll"
;File "${MING_DLL_PATH}\libgcc_s_dw2-1.dll"
;File "${MING_DLL_PATH}\mingwm10.dll"
File "${MING_DLL_PATH}\libgcc_s_sjlj-1.dll"
File "${MING_DLL_PATH}\libstdc++-6.dll"
;Audio stuff
File "${MING_DLL_PATH}\libmad-0.dll"
File "${MING_DLL_PATH}\libogg-0.dll"
File "${MING_DLL_PATH}\libvorbisfile-3.dll"
File "${MING_DLL_PATH}\libvorbis-0.dll"
File "${MING_DLL_PATH}\libFLAC-8.dll"
File "${MING_DLL_PATH}\libFLAC++-6.dll"
;Other
File "${MING_DLL_PATH}\libqjson.dll"
File "${MING_DLL_PATH}\libtag.dll"
File "${MING_DLL_PATH}\libgloox-8.dll"
File "${MING_DLL_PATH}\libpng15-15.dll"
File "${MING_DLL_PATH}\libjpeg-8.dll"
File "${MING_DLL_PATH}\zlib1.dll"
File "${MING_DLL_PATH}\libechonest.dll"
File "${MING_DLL_PATH}\liblastfm.dll"
;Cygwin/c++ stuff
;File "${MING_BIN}\cygmad-0.dll"
;File "${MING_BIN}\libgcc_s_dw2-1.dll"
;File "${MING_BIN}\mingwm10.dll"
File "${MING_BIN}\libgcc_s_sjlj-1.dll"
File "${MING_BIN}\libstdc++-6.dll"
;Phonon stuff
;Fix the phonon build to not use Dbus
File "${QT_DLL_PATH}\QtDbus4.dll"
File "${MING_BIN}\libdbus-1-3.dll"
File "${MING_BIN}\dbus-daemon.exe"
File "${MING_BIN}\libphonon.dll"
SetOutPath "$INSTDIR\phonon_backend"
File "${MING_BIN}\phonon_backend\phonon_vlc.dll"
SetOutPath "$INSTDIR"
;VLC
;SetOutPath "$INSTDIR\phonon_backend"
File "${VLC_PATH}\libvlc.dll"
File "${VLC_PATH}\libvlccore.dll"
SetOutPath "$INSTDIR\plugins"
File /r "${VLC_PLUGIN_PATH}\*.dll"
SetOutPath "$INSTDIR"
File "${MING_BIN}\libmad-0.dll" ; MP3
File "${MING_BIN}\libFLAC-8.dll" ; FLAC
File "${MING_BIN}\libogg-0.dll" ; OGG, FLAC
File "${MING_BIN}\libvorbis-0.dll" ; OGG
File "${MING_BIN}\libvorbisenc-2.dll" ; OGG
; Other
File "${MING_BIN}\libqjson.dll"
File "${MING_BIN}\libtag.dll"
File "${MING_BIN}\libpng15-15.dll"
File "${MING_BIN}\libjpeg-8.dll"
File "${MING_BIN}\zlib1.dll"
File "${MING_BIN}\libechonest.dll"
File "${MING_BIN}\libQTweetLib.dll"
; Jabber
File "${MING_BIN}\libjreen.dll"
File "${MING_BIN}\libqca.dll"
SetOutPath "$INSTDIR\crypto"
File "${MING_LIB}\qt4\plugins\crypto\libqca-ossl.dll"
SetOutPath "$INSTDIR"
File "${MING_BIN}\libssl-8.dll"
File "${MING_BIN}\libcrypto-8.dll"
File "${MING_LIB}\libclucene-core.dll"
File "${MING_LIB}\libclucene-shared.dll"
@@ -346,7 +389,7 @@ SectionGroup "Shortcuts"
CreateShortCut "$SMPROGRAMS\Tomahawk\LICENSE.lnk" "$INSTDIR\LICENSE.txt"
CreateShortCut "$SMPROGRAMS\Tomahawk\Tomahawk.lnk" "$INSTDIR\tomahawk.exe"
CreateShortCut "$SMPROGRAMS\Tomahawk\Release notes.lnk" "$INSTDIR\NOTES.txt"
CreateShortCut "$SMPROGRAMS\Tomahawk\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
CreateShortCut "$SMPROGRAMS\Tomahawk\Uninstall.lnk" "$INSTDIR\uninstall.exe"
SetShellVarContext current
${MementoSectionEnd}
!endif
@@ -390,7 +433,7 @@ Section -post
SetDetailsPrint textonly
DetailPrint "Writing Uninstaller"
SetDetailsPrint listonly
WriteUninstaller $INSTDIR\Uninstall.exe
WriteUninstaller $INSTDIR\uninstall.exe
;Registry keys required for installer version handling and uninstaller.
SetDetailsPrint textonly
@@ -418,6 +461,12 @@ Section -post
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Tomahawk" "NoModify" "1"
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Tomahawk" "NoRepair" "1"
; Register tomahawk:// protocol handler
WriteRegStr HKCR "tomahawk" "" "URL: Tomahawk Protocol"
WriteRegStr HKCR "tomahawk\DefaultIcon" "" $INSTDIR\tomahawk.exe,1
WriteRegStr HKCR "tomahawk\shell" "" "open"
WriteRegStr HKCR "tomahawk\shell\open\command" "" '"$INSTDIR\tomahawk.exe" "%1"'
SetDetailsPrint textonly
DetailPrint "Finsihed."
SectionEnd
@@ -477,6 +526,8 @@ Section Uninstall
DeleteRegValue HKLM "Software\Tomahawk" ""
DeleteRegKey HKLM "Software\Tomahawk"
DeleteRegKey HKCR "tomahawk"
;Start menu shortcuts.
!ifdef OPTION_SECTION_SC_START_MENU
SetShellVarContext all
@@ -498,7 +549,7 @@ Section Uninstall
;Remove all the Program Files.
RMDir /r $INSTDIR
;Uninstall User Data if option is checked, otherwise skip.
${If} $UnPageUserAppDataCheckbox_State == ${BST_CHECKED}
RMDir /r "$LOCALAPPDATA\Tomahawk"
@@ -514,7 +565,7 @@ SectionEnd
# #
##############################################################################
Function .onInit
Function .onInit
!insertmacro INSTALLOPTIONS_EXTRACT "tomahawk.ini"
;Remove Quick Launch option from Windows 7, as no longer applicable - usually.
@@ -526,27 +577,25 @@ Function .onInit
${MementoSectionRestore}
!ifdef OPTION_UAC_PLUGIN_ENHANCED
UAC_Elevate:
UAC::RunElevated
StrCmp 1223 $0 UAC_ElevationAborted ; UAC dialog aborted by user?
StrCmp 0 $0 0 UAC_Err ; Error?
StrCmp 1 $1 0 UAC_Success ;Are we the real deal or just the wrapper?
Quit
UAC_Err:
MessageBox MB_ICONSTOP "Unable to elevate, error $0"
Abort
UAC_ElevationAborted:
Abort
UAC_Success:
StrCmp 1 $3 +4 ;Admin?
StrCmp 3 $1 0 UAC_ElevationAborted ;Try again?
MessageBox MB_ICONSTOP "This installer requires admin access, try again"
goto UAC_Elevate
!endif
UAC_Elevate:
UAC::RunElevated
StrCmp 1223 $0 UAC_ElevationAborted ; UAC dialog aborted by user?
StrCmp 0 $0 0 UAC_Err ; Error?
StrCmp 1 $1 0 UAC_Success ;Are we the real deal or just the wrapper?
Quit
UAC_Err:
MessageBox MB_ICONSTOP "Unable to elevate, error $0"
Abort
UAC_ElevationAborted:
Abort
UAC_Success:
StrCmp 1 $3 +4 ;Admin?
StrCmp 3 $1 0 UAC_ElevationAborted ;Try again?
MessageBox MB_ICONSTOP "This installer requires admin access, try again"
goto UAC_Elevate
;Prevent multiple instances.
System::Call 'kernel32::CreateMutexA(i 0, i 0, t "tomahawkInstaller") i .r1 ?e'
@@ -554,19 +603,25 @@ Function .onInit
StrCmp $R0 0 +3
MessageBox MB_OK|MB_ICONEXCLAMATION "The installer is already running."
Abort
;Use available InstallLocation when possible. This is useful in the uninstaller
;via re-install, which would otherwise use a default location - a bug.
ReadRegStr $R0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Tomahawk" "InstallLocation"
StrCmp $R0 "" SkipSetInstDir
StrCpy $INSTDIR $R0
SkipSetInstDir:
;Shutdown Tomahawk in case Add/Remove re-installer option used.
Call EnsureTomahawkShutdown
FunctionEnd
Function .onInstSuccess
${MementoSectionSave}
!ifdef OPTION_UAC_PLUGIN_ENHANCED
UAC::Unload ;Must call unload!
!endif
UAC::Unload ;Must call unload!
FunctionEnd
Function .onInstFailed
!ifdef OPTION_UAC_PLUGIN_ENHANCED
UAC::Unload ;Must call unload!
!endif
UAC::Unload ;Must call unload!
FunctionEnd
##############################################################################
@@ -576,27 +631,25 @@ FunctionEnd
##############################################################################
Function un.onInit
!ifdef OPTION_UAC_PLUGIN_ENHANCED
UAC_Elevate:
UAC::RunElevated
StrCmp 1223 $0 UAC_ElevationAborted ; UAC dialog aborted by user?
StrCmp 0 $0 0 UAC_Err ; Error?
StrCmp 1 $1 0 UAC_Success ;Are we the real deal or just the wrapper?
Quit
UAC_Elevate:
UAC::RunElevated
StrCmp 1223 $0 UAC_ElevationAborted ; UAC dialog aborted by user?
StrCmp 0 $0 0 UAC_Err ; Error?
StrCmp 1 $1 0 UAC_Success ;Are we the real deal or just the wrapper?
Quit
UAC_Err:
MessageBox MB_ICONSTOP "Unable to elevate, error $0"
Abort
UAC_ElevationAborted:
Abort
UAC_Success:
StrCmp 1 $3 +4 ;Admin?
StrCmp 3 $1 0 UAC_ElevationAborted ;Try again?
MessageBox MB_ICONSTOP "This uninstaller requires admin access, try again"
goto UAC_Elevate
!endif
UAC_Err:
MessageBox MB_ICONSTOP "Unable to elevate, error $0"
Abort
UAC_ElevationAborted:
Abort
UAC_Success:
StrCmp 1 $3 +4 ;Admin?
StrCmp 3 $1 0 UAC_ElevationAborted ;Try again?
MessageBox MB_ICONSTOP "This uninstaller requires admin access, try again"
goto UAC_Elevate
;Prevent multiple instances.
System::Call 'kernel32::CreateMutexA(i 0, i 0, t "tomahawkUninstaller") i .r1 ?e'
@@ -607,13 +660,9 @@ Function un.onInit
FunctionEnd
Function un.onUnInstSuccess
!ifdef OPTION_UAC_PLUGIN_ENHANCED
UAC::Unload ;Must call unload!
!endif
UAC::Unload ;Must call unload!
FunctionEnd
Function un.onUnInstFailed
!ifdef OPTION_UAC_PLUGIN_ENHANCED
UAC::Unload ;Must call unload!
!endif
UAC::Unload ;Must call unload!
FunctionEnd

0
admin/win/nsi/welcome.bmp Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 151 KiB

After

Width:  |  Height:  |  Size: 151 KiB

View File

@@ -8,10 +8,18 @@
<item>
<title>Version 0.0.1 (Tomahawk Player Beta - It Lives?)</title>
<sparkle:releaseNotesLink>
https://github.com/tomahawk-player/tomahawk/raw/stable/ChangeLog
https://github.com/tomahawk-player/tomahawk/raw/0.0.1/ChangeLog
</sparkle:releaseNotesLink>
<pubDate>Fri, 25 Mar 2011 00:00:01 +0100</pubDate>
<enclosure url="http://download.tomahawk-player.org/tomahawk-beta-0.0.1.exe" sparkle:version="0.0.1" />
</item>
<item>
<title>Version 0.0.2 (Tomahawk Player Beta - It Lives?)</title>
<sparkle:releaseNotesLink>
https://github.com/tomahawk-player/tomahawk/raw/0.0.2/ChangeLog
</sparkle:releaseNotesLink>
<pubDate>Mon, 28 Mar 2011 05:00:02 +0100</pubDate>
<enclosure url="http://download.tomahawk-player.org/tomahawk-0.0.2.exe" sparkle:version="0.0.2" />
</item>
</channel>
</rss>

View File

@@ -11,7 +11,15 @@
https://github.com/tomahawk-player/tomahawk/raw/0.0.1/ChangeLog
</sparkle:releaseNotesLink>
<pubDate>Fri, 25 Mar 2011 00:00:01 +0100</pubDate>
<enclosure url="http://download.tomahawk-player.org/tomahawk-0.0.1.exe" sparkle:version="0.0.1" />
<enclosure url="http://download.tomahawk-player.org/tomahawk-beta-0.0.1.exe" sparkle:version="0.0.1" />
</item>
<item>
<title>Version 0.0.2 (Tomahawk Player - It Lives!)</title>
<sparkle:releaseNotesLink>
https://github.com/tomahawk-player/tomahawk/raw/0.0.2/ChangeLog
</sparkle:releaseNotesLink>
<pubDate>Mon, 28 Mar 2011 05:00:02 +0100</pubDate>
<enclosure url="http://download.tomahawk-player.org/tomahawk-0.0.2.exe" sparkle:version="0.0.2" />
</item>
</channel>
</rss>

20
admin/win/update-vlc.sh Normal file
View File

@@ -0,0 +1,20 @@
#!/bin/bash
echo "Remove old vlc dir..."
#rm -vf vlc-*.7z
rm -rf vlc/
echo "Download specified binary..."
#wget -c "http://downloads.sourceforge.net/project/vlc/1.1.9/win32/vlc-1.1.9-win32.7z?r=http%3A%2F%2Fwww.videolan.org%2Fvlc%2Fdownload-windows.html&ts=1306272584&use_mirror=leaseweb"
wget -c "http://nightlies.videolan.org/build/win32/trunk-20110524-1321/vlc-1.2.0-git-20110524-1321-win32.7z"
echo "Extract binary..."
7z x vlc-*.7z
mv -v vlc-*/ vlc/
echo "Strip unneeded plugins from vlc/plugins..."
cd vlc/plugins/
rm -rvf video_*/ gui/ */libold* */libvcd* */libdvd* */liblibass* */libx264* */libschroe* */liblibmpeg2* \
*/libstream_out_* */libmjpeg_plugin* */libh264_plugin* */libzvbi_plugin* */lib*sub*
echo "Downloaded and stripped VLC"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 156 KiB

After

Width:  |  Height:  |  Size: 110 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

BIN
data/images/add.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

BIN
data/images/configure.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 717 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.3 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 771 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 325 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

View File

@@ -0,0 +1,11 @@
-- Script to migate from db version 22 to 23.
-- Only change in this version is that playlists gained a createdOn date.
-- Set all playlists to created to now.
--
-- Separate each command with %%
ALTER TABLE playlist ADD COLUMN createdOn INTEGER NOT NULL DEFAULT 0;
UPDATE playlist SET createdOn = strftime( '%s','now' );
UPDATE settings SET v = '23' WHERE k == 'schema_version';

View File

@@ -18,28 +18,28 @@ QRadioButton::indicator {
}
QRadioButton::indicator::unchecked {
background-image: url(:/data/images/view-toggle-inactive-centre.png);
image: url(:/data/images/view-toggle-icon-artist-inactive.png);
background-image: url(:/data/images/view-toggle-inactive-right.png);
image: url(:/data/images/view-toggle-icon-list-inactive.png);
}
QRadioButton::indicator::checked {
background-image: url(:/data/images/view-toggle-active-centre.png);
image: url(:/data/images/view-toggle-icon-artist-active.png);
background-image: url(:/data/images/view-toggle-active-right.png);
image: url(:/data/images/view-toggle-icon-list-active.png);
}
QRadioButton::indicator::pressed {
background-image: url(:/data/images/view-toggle-pressed-centre.png);
image: url(:/data/images/view-toggle-icon-artist-active.png);
background-image: url(:/data/images/view-toggle-pressed-right.png);
image: url(:/data/images/view-toggle-icon-list-active.png);
}
QRadioButton#radioNormal::indicator::unchecked {
background-image: url(:/data/images/view-toggle-inactive-left.png);
image: url(:/data/images/view-toggle-icon-list-inactive.png);
image: url(:/data/images/view-toggle-icon-artist-inactive.png);
}
QRadioButton#radioNormal::indicator::checked {
background-image: url(:/data/images/view-toggle-active-left.png);
image: url(:/data/images/view-toggle-icon-list-active.png);
image: url(:/data/images/view-toggle-icon-artist-active.png);
}
QRadioButton#radioNormal::indicator::pressed {
background-image: url(:/data/images/view-toggle-pressed-left.png);
image: url(:/data/images/view-toggle-icon-list-active.png);
image: url(:/data/images/view-toggle-icon-artist-active.png);
}
QRadioButton#radioCloud::indicator::unchecked {
background-image: url(:/data/images/view-toggle-inactive-right.png);

View File

@@ -1,166 +0,0 @@
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
*
* Copyright 2010-2011, Christian Muehlhaeuser <muesli@tomahawk-player.org>
*
* Tomahawk is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Tomahawk is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Tomahawk. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef TOMAHAWK_INFOSYSTEM_H
#define TOMAHAWK_INFOSYSTEM_H
#include <QtCore/QObject>
#include <QtCore/QtDebug>
#include <QtCore/qmap.h>
#include <QtCore/qsharedpointer.h>
#include <QtCore/qset.h>
#include <QtCore/qlinkedlist.h>
#include <QtCore/qvariant.h>
namespace Tomahawk {
namespace InfoSystem {
enum InfoType {
InfoTrackID,
InfoTrackArtist,
InfoTrackAlbum,
InfoTrackGenre,
InfoTrackComposer,
InfoTrackDate,
InfoTrackNumber,
InfoTrackDiscNumber,
InfoTrackBitRate,
InfoTrackLength,
InfoTrackSampleRate,
InfoTrackFileSize,
InfoTrackBPM,
InfoTrackReplayGain,
InfoTrackReplayPeakGain,
InfoTrackLyrics,
InfoTrackLocation,
InfoTrackProfile,
InfoTrackEnergy,
InfoTrackDanceability,
InfoTrackTempo,
InfoTrackLoudness,
InfoArtistID,
InfoArtistName,
InfoArtistBiography,
InfoArtistBlog,
InfoArtistFamiliarity,
InfoArtistHotttness,
InfoArtistImages,
InfoArtistNews,
InfoArtistProfile,
InfoArtistReviews,
InfoArtistSongs,
InfoArtistSimilars,
InfoArtistTerms,
InfoArtistLinks,
InfoArtistVideos,
InfoAlbumID,
InfoAlbumName,
InfoAlbumArtist,
InfoAlbumDate,
InfoAlbumGenre,
InfoAlbumComposer,
InfoMiscTopHotttness,
InfoMiscTopTerms,
InfoNoInfo
};
typedef QMap< InfoType, QVariant > InfoMap;
typedef QMap< QString, QMap< QString, QString > > InfoGenericMap;
typedef QHash<QString, QVariant> InfoCustomDataHash;
typedef QHash<QString, QString> MusixMatchHash;
class InfoPlugin : public QObject
{
Q_OBJECT
public:
InfoPlugin(QObject *parent)
:QObject(parent)
{
qDebug() << Q_FUNC_INFO;
}
~InfoPlugin()
{
qDebug() << Q_FUNC_INFO;
}
virtual void getInfo(const QString &caller, const InfoType type, const QVariant &data, Tomahawk::InfoSystem::InfoCustomDataHash customData) = 0;
signals:
void info(QString caller, Tomahawk::InfoSystem::InfoType type, QVariant input, QVariant output, Tomahawk::InfoSystem::InfoCustomDataHash customData);
void finished(QString, Tomahawk::InfoSystem::InfoType);
protected:
InfoType m_type;
};
typedef QWeakPointer< InfoPlugin > InfoPluginPtr;
class InfoSystem : public QObject
{
Q_OBJECT
public:
InfoSystem(QObject *parent);
~InfoSystem()
{
qDebug() << Q_FUNC_INFO;
}
void registerInfoTypes(const InfoPluginPtr &plugin, const QSet< InfoType > &types);
void getInfo(const QString &caller, const InfoType type, const QVariant &data, InfoCustomDataHash customData);
void getInfo(const QString &caller, const InfoMap &input, InfoCustomDataHash customData);
signals:
void info(QString caller, Tomahawk::InfoSystem::InfoType, QVariant input, QVariant output, Tomahawk::InfoSystem::InfoCustomDataHash customData);
void finished(QString target);
public slots:
void infoSlot(QString target, Tomahawk::InfoSystem::InfoType type, QVariant input, QVariant output, Tomahawk::InfoSystem::InfoCustomDataHash customData);
void finishedSlot(QString target,Tomahawk::InfoSystem::InfoType type);
private:
QLinkedList< InfoPluginPtr > determineOrderedMatches(const InfoType type) const;
QMap< InfoType, QLinkedList<InfoPluginPtr> > m_infoMap;
// For now, statically instantiate plugins; this is just somewhere to keep them
QLinkedList<InfoPluginPtr> m_plugins;
QHash< QString, QHash< Tomahawk::InfoSystem::InfoType, int > > m_dataTracker;
};
}
}
Q_DECLARE_METATYPE(Tomahawk::InfoSystem::InfoGenericMap)
Q_DECLARE_METATYPE(Tomahawk::InfoSystem::InfoCustomDataHash);
Q_DECLARE_METATYPE(Tomahawk::InfoSystem::MusixMatchHash)
#endif // TOMAHAWK_INFOSYSTEM_H

1484
lang/tomahawk_de.ts Normal file

File diff suppressed because it is too large Load Diff

5
lang/tomahawk_i18n.qrc Normal file
View File

@@ -0,0 +1,5 @@
<!DOCTYPE RCC><RCC version="1.0">
<qresource prefix="/lang">
<file>tomahawk_de.qm</file>
</qresource>
</RCC>

25
lang/translations.cmake Normal file
View File

@@ -0,0 +1,25 @@
FILE (GLOB TS_FILES ${CMAKE_SOURCE_DIR}/lang/*.ts)
QT4_ADD_TRANSLATION(QM_FILES ${TS_FILES})
## HACK HACK HACK - around rcc limitations to allow out of source-tree building
SET( trans_file tomahawk_i18n )
SET( trans_srcfile ${CMAKE_SOURCE_DIR}/lang/${trans_file}.qrc)
SET( trans_infile ${CMAKE_CURRENT_BINARY_DIR}/${trans_file}.qrc)
SET( trans_outfile ${CMAKE_CURRENT_BINARY_DIR}/qrc_${trans_file}.cxx)
# Copy the QRC file to the output directory
ADD_CUSTOM_COMMAND(
OUTPUT ${trans_infile}
COMMAND ${CMAKE_COMMAND} -E copy ${trans_srcfile} ${trans_infile}
MAIN_DEPENDENCY ${trans_srcfile}
)
# Run the resource compiler (rcc_options should already be set)
ADD_CUSTOM_COMMAND(
OUTPUT ${trans_outfile}
COMMAND ${QT_RCC_EXECUTABLE}
ARGS ${rcc_options} -name ${trans_file} -o ${trans_outfile} ${trans_infile}
MAIN_DEPENDENCY ${trans_infile}
DEPENDS ${QM_FILES}
)

View File

@@ -1,91 +1,106 @@
<!DOCTYPE RCC><RCC version="1.0">
<qresource>
<file>./data/images/add-friend-button-pressed.png</file>
<file>./data/images/add-friend-button-rest.png</file>
<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/cover-shadow.png</file>
<file>./data/images/magnifying-glass.png</file>
<file>./data/images/no-album-art-placeholder.png</file>
<file>./data/images/now-playing-panel.png</file>
<file>./data/images/now-playing-speaker.png</file>
<file>./data/images/pause-pressed.png</file>
<file>./data/images/pause-rest.png</file>
<file>./data/images/play-pressed.png</file>
<file>./data/images/play-rest.png</file>
<file>./data/images/playlist-icon.png</file>
<file>./data/images/repeat-1-on-pressed.png</file>
<file>./data/images/repeat-1-on-rest.png</file>
<file>./data/images/repeat-all-on-pressed.png</file>
<file>./data/images/repeat-all-on-rest.png</file>
<file>./data/images/repeat-off-pressed.png</file>
<file>./data/images/repeat-off-rest.png</file>
<file>./data/images/search-box-dismiss-x.png</file>
<file>./data/images/search-box.png</file>
<file>./data/images/seek-and-volume-knob-pressed.png</file>
<file>./data/images/seek-and-volume-knob-rest.png</file>
<file>./data/images/seek-slider-bkg.png</file>
<file>./data/images/seek-slider-level.png</file>
<file>./data/images/shuffle-off-pressed.png</file>
<file>./data/images/shuffle-off-rest.png</file>
<file>./data/images/shuffle-on-pressed.png</file>
<file>./data/images/shuffle-on-rest.png</file>
<file>./data/images/skip-pressed.png</file>
<file>./data/images/skip-rest.png</file>
<file>./data/images/source-info.png</file>
<file>./data/images/source-off-pressed.png</file>
<file>./data/images/source-off-rest.png</file>
<file>./data/images/source-on-pressed.png</file>
<file>./data/images/source-on-rest.png</file>
<file>./data/images/status-alert-icon.png</file>
<file>./data/images/status-bar-bkg.png</file>
<file>./data/images/status-dismiss-x.png</file>
<file>./data/images/user-avatar.png</file>
<file>./data/images/view-toggle-active-centre.png</file>
<file>./data/images/view-toggle-active-left.png</file>
<file>./data/images/view-toggle-active-right.png</file>
<file>./data/images/view-toggle-icon-artist-active.png</file>
<file>./data/images/view-toggle-icon-artist-inactive.png</file>
<file>./data/images/view-toggle-icon-cloud-active.png</file>
<file>./data/images/view-toggle-icon-cloud-inactive.png</file>
<file>./data/images/view-toggle-icon-list-active.png</file>
<file>./data/images/view-toggle-icon-list-inactive.png</file>
<file>./data/images/view-toggle-inactive-centre.png</file>
<file>./data/images/view-toggle-inactive-left.png</file>
<file>./data/images/view-toggle-inactive-right.png</file>
<file>./data/images/view-toggle-pressed-centre.png</file>
<file>./data/images/view-toggle-pressed-left.png</file>
<file>./data/images/view-toggle-pressed-right.png</file>
<file>./data/images/list-add.png</file>
<file>./data/images/list-remove.png</file>
<file>./data/images/arrow-up-double.png</file>
<file>./data/images/arrow-down-double.png</file>
<file>./data/images/volume-icon-full.png</file>
<file>./data/images/arrow-right-double.png</file>
<file>./data/images/view-refresh.png</file>
<file>./data/images/volume-icon-muted.png</file>
<file>./data/images/volume-slider-bkg.png</file>
<file>./data/images/volume-slider-level.png</file>
<file>./data/images/echonest_logo.png</file>
<file>./data/images/loading-animation.gif</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/topbar-radiobuttons.css</file>
<file>./data/icons/tomahawk-icon-16x16.png</file>
<file>./data/icons/tomahawk-icon-32x32.png</file>
<file>./data/icons/tomahawk-icon-64x64.png</file>
<file>./data/icons/tomahawk-icon-128x128.png</file>
<file>./data/icons/tomahawk-icon-256x256.png</file>
<file>./data/icons/tomahawk-icon-512x512.png</file>
<file>./data/icons/audio-x-generic-22x22.png</file>
<file>./data/icons/audio-x-generic-32x32.png</file>
<file>./data/icons/audio-x-generic-16x16.png</file>
<file>./data/www/auth.html</file>
<file>./data/www/auth.na.html</file>
<file>./data/www/tomahawk_banner_small.png</file>
</qresource>
<RCC>
<qresource>
<file>./data/images/add-friend-button-pressed.png</file>
<file>./data/images/add-friend-button-rest.png</file>
<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/cover-shadow.png</file>
<file>./data/images/magnifying-glass.png</file>
<file>./data/images/no-album-art-placeholder.png</file>
<file>./data/images/now-playing-panel.png</file>
<file>./data/images/now-playing-speaker.png</file>
<file>./data/images/pause-pressed.png</file>
<file>./data/images/pause-rest.png</file>
<file>./data/images/play-pressed.png</file>
<file>./data/images/play-rest.png</file>
<file>./data/images/sipplugin-add.png</file>
<file>./data/images/sipplugin-remove.png</file>
<file>./data/images/playlist-icon.png</file>
<file>./data/images/repeat-1-on-pressed.png</file>
<file>./data/images/repeat-1-on-rest.png</file>
<file>./data/images/repeat-all-on-pressed.png</file>
<file>./data/images/repeat-all-on-rest.png</file>
<file>./data/images/repeat-off-pressed.png</file>
<file>./data/images/repeat-off-rest.png</file>
<file>./data/images/search-box-dismiss-x.png</file>
<file>./data/images/search-box.png</file>
<file>./data/images/seek-and-volume-knob-pressed.png</file>
<file>./data/images/seek-and-volume-knob-rest.png</file>
<file>./data/images/seek-slider-bkg.png</file>
<file>./data/images/seek-slider-level.png</file>
<file>./data/images/shuffle-off-pressed.png</file>
<file>./data/images/shuffle-off-rest.png</file>
<file>./data/images/shuffle-on-pressed.png</file>
<file>./data/images/shuffle-on-rest.png</file>
<file>./data/images/skip-pressed.png</file>
<file>./data/images/skip-rest.png</file>
<file>./data/images/source-info.png</file>
<file>./data/images/source-off-pressed.png</file>
<file>./data/images/source-off-rest.png</file>
<file>./data/images/source-on-pressed.png</file>
<file>./data/images/source-on-rest.png</file>
<file>./data/images/status-alert-icon.png</file>
<file>./data/images/status-bar-bkg.png</file>
<file>./data/images/status-dismiss-x.png</file>
<file>./data/images/user-avatar.png</file>
<file>./data/images/view-toggle-active-centre.png</file>
<file>./data/images/view-toggle-active-left.png</file>
<file>./data/images/view-toggle-active-right.png</file>
<file>./data/images/view-toggle-icon-artist-active.png</file>
<file>./data/images/view-toggle-icon-artist-inactive.png</file>
<file>./data/images/view-toggle-icon-cloud-active.png</file>
<file>./data/images/view-toggle-icon-cloud-inactive.png</file>
<file>./data/images/view-toggle-icon-list-active.png</file>
<file>./data/images/view-toggle-icon-list-inactive.png</file>
<file>./data/images/view-toggle-inactive-centre.png</file>
<file>./data/images/view-toggle-inactive-left.png</file>
<file>./data/images/view-toggle-inactive-right.png</file>
<file>./data/images/view-toggle-pressed-centre.png</file>
<file>./data/images/view-toggle-pressed-left.png</file>
<file>./data/images/view-toggle-pressed-right.png</file>
<file>./data/images/list-add.png</file>
<file>./data/images/list-remove.png</file>
<file>./data/images/arrow-up-double.png</file>
<file>./data/images/arrow-down-double.png</file>
<file>./data/images/volume-icon-full.png</file>
<file>./data/images/arrow-right-double.png</file>
<file>./data/images/view-refresh.png</file>
<file>./data/images/volume-icon-muted.png</file>
<file>./data/images/volume-slider-bkg.png</file>
<file>./data/images/volume-slider-level.png</file>
<file>./data/images/echonest_logo.png</file>
<file>./data/images/loading-animation.gif</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/add.png</file>
<file>./data/images/recently-played.png</file>
<file>./data/images/supercollection.png</file>
<file>./data/images/sipplugin-online.png</file>
<file>./data/images/sipplugin-offline.png</file>
<file>./data/images/advanced-settings.png</file>
<file>./data/images/account-settings.png</file>
<file>./data/images/music-settings.png</file>
<file>./data/images/resolvers-settings.png</file>
<file>./data/images/lastfm-settings.png</file>
<file>./data/stylesheets/topbar-radiobuttons.css</file>
<file>./data/icons/tomahawk-icon-16x16.png</file>
<file>./data/icons/tomahawk-icon-32x32.png</file>
<file>./data/icons/tomahawk-icon-64x64.png</file>
<file>./data/icons/tomahawk-icon-128x128.png</file>
<file>./data/icons/tomahawk-icon-256x256.png</file>
<file>./data/icons/tomahawk-icon-512x512.png</file>
<file>./data/icons/audio-x-generic-22x22.png</file>
<file>./data/icons/audio-x-generic-32x32.png</file>
<file>./data/icons/audio-x-generic-16x16.png</file>
<file>./data/www/auth.html</file>
<file>./data/www/auth.na.html</file>
<file>./data/www/tomahawk_banner_small.png</file>
<file>./data/sql/dbmigrate-22_to_23.sql</file>
</qresource>
</RCC>

View File

@@ -1,13 +1,15 @@
SET( OS_SPECIFIC_LINK_LIBRARIES
SET( OS_SPECIFIC_LINK_LIBRARIES
${OS_SPECIFIC_LINK_LIBRARIES}
alsaplayback
tomahawklib
)
IF( "${gui}" STREQUAL "no" )
ELSE()
SET( OS_SPECIFIC_LINK_LIBRARIES
${OS_SPECIFIC_LINK_LIBRARIES}
gnutls
)
ENDIF()
FILE( GLOB _icons "${CMAKE_SOURCE_DIR}/data/icons/tomahawk-icon-*.png" )
FOREACH( _file ${_icons} )
STRING( REPLACE "${CMAKE_SOURCE_DIR}/data/icons/tomahawk-icon-" "" _res ${_file} )
STRING( REPLACE ".png" "" _res ${_res} )
INSTALL( FILES ${_file} RENAME tomahawk.png DESTINATION share/icons/hicolor/${_res}/apps )
ENDFOREACH( _file )
INSTALL( FILES ${CMAKE_SOURCE_DIR}/data/icons/tomahawk-icon.svg RENAME tomahawk.svg DESTINATION share/icons/hicolor/scalable )
INSTALL( FILES ${CMAKE_SOURCE_DIR}/admin/unix/tomahawk.desktop DESTINATION share/applications )

View File

@@ -5,13 +5,13 @@ SET( OS_SPECIFIC_LINK_LIBRARIES
${COREAUDIO_LIBRARY}
${COREFOUNDATION_LIBRARY}
SPMediaKeyTap
/System/Library/Frameworks/AppKit.framework
/System/Library/Frameworks/Carbon.framework
/System/Library/Frameworks/DiskArbitration.framework
/System/Library/Frameworks/Foundation.framework
/System/Library/Frameworks/IOKit.framework
rtaudio
)
@@ -35,15 +35,18 @@ if (APPLE)
# Use two different sparkle update tracks for debug and release
# We have to change the URL in the Info.plist file :-/
IF( NOT CMAKE_BUILD_TYPE STREQUAL "Release" )
FILE(READ ${CMAKE_SOURCE_DIR}/admin/mac/Info.plist plist)
STRING( REPLACE "http://download.tomahawk-player.org/sparkle" # match this
"http://download.tomahawk-player.org/sparkle-debug" #replace with debug url
FILE(READ ${CMAKE_SOURCE_DIR}/admin/mac/Info.plist plist)
STRING( REPLACE "TOMAHAWK_VERSION"
${TOMAHAWK_VERSION}
edited_plist # save in this variable
"${plist}" # from the contents of this var
)
FILE( WRITE ${CMAKE_BINARY_DIR}/Info.plist "${edited_plist}" )
ELSE() # Just copy the release one
FILE( COPY ${CMAKE_SOURCE_DIR}/admin/mac/Info.plist DESTINATION ${CMAKE_BINARY_DIR} )
IF( NOT CMAKE_BUILD_TYPE STREQUAL "Release" )
STRING( REPLACE "http://download.tomahawk-player.org/sparkle" # match this
"http://download.tomahawk-player.org/sparkle-debug" #replace with debug url
edited_plist # save in this variable
"${edited_plist}" # from the contents of this var
)
ENDIF()
FILE( WRITE ${CMAKE_BINARY_DIR}/Info.plist "${edited_plist}" )
endif (APPLE)

View File

@@ -17,7 +17,6 @@ SET( CMAKE_VERBOSE_MAKEFILE ON )
SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" )
SET( CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" )
SET( CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" )
SET( TOMAHAWK_INC_DIR "${CMAKE_SOURCE_DIR}/include/" )
IF( NOT CMAKE_BUILD_TYPE STREQUAL "Release" )
MESSAGE( "Building in debug mode, enabling all debug updates" )
SET( DEBUG_BUILD ON )
@@ -32,12 +31,6 @@ ENDIF()
#ENDFOREACH( moddir )
SET( tomahawkSources ${tomahawkSources}
sip/SipHandler.cpp
infosystem/infosystem.cpp
infosystem/infoplugins/echonestplugin.cpp
infosystem/infoplugins/musixmatchplugin.cpp
web/api_v1.cpp
resolvers/scriptresolver.cpp
@@ -59,25 +52,30 @@ ENDIF(LIBLASTFM_FOUND)
SET( tomahawkSourcesGui ${tomahawkSourcesGui}
sourcetree/sourcesmodel.cpp
sourcetree/sourcesproxymodel.cpp
sourcetree/sourcetreeitem.cpp
sourcetree/sourcetreeitemwidget.cpp
sourcetree/sourcetreeview.cpp
sourcetree/items/sourcetreeitem.cpp
sourcetree/items/collectionitem.cpp
sourcetree/items/playlistitems.cpp
sourcetree/items/categoryitems.cpp
sourcetree/items/genericpageitems.cpp
transferview.cpp
PipelineStatusView.cpp
tomahawktrayicon.cpp
audiocontrols.cpp
settingsdialog.cpp
diagnosticsdialog.cpp
configdelegatebase.cpp
sipconfigdelegate.cpp
resolverconfigdelegate.cpp
resolversmodel.cpp
tomahawkwindow.cpp
win/qtwin.cpp
)
SET( tomahawkHeaders ${tomahawkHeaders}
"${TOMAHAWK_INC_DIR}/tomahawk/tomahawkapp.h"
"${TOMAHAWK_INC_DIR}/tomahawk/infosystem.h"
sip/SipHandler.h
infosystem/infoplugins/echonestplugin.h
infosystem/infoplugins/musixmatchplugin.h
tomahawkapp.h
web/api_v1.h
@@ -99,30 +97,44 @@ ENDIF(LIBLASTFM_FOUND)
SET( tomahawkHeadersGui ${tomahawkHeadersGui}
sourcetree/sourcesmodel.h
sourcetree/sourcesproxymodel.h
sourcetree/sourcetreeitem.h
sourcetree/sourcetreeitemwidget.h
sourcetree/sourcetreeview.h
sourcetree/items/sourcetreeitem.h
sourcetree/items/collectionitem.h
sourcetree/items/playlistitems.h
sourcetree/items/categoryitems.h
sourcetree/items/genericpageitems.h
transferview.h
PipelineStatusView.h
tomahawktrayicon.h
audiocontrols.h
settingsdialog.h
diagnosticsdialog.h
configdelegatebase.h
resolverconfigdelegate.h
sipconfigdelegate.h
resolversmodel.h
delegateconfigwrapper.h
tomahawkwindow.h
win/qtwin.h
)
SET( tomahawkUI ${tomahawkUI}
tomahawkwindow.ui
settingsdialog.ui
diagnosticsdialog.ui
stackedsettingsdialog.ui
proxydialog.ui
audiocontrols.ui
sourcetree/sourcetreeitemwidget.ui
)
INCLUDE_DIRECTORIES(
.
${TOMAHAWK_INC_DIR}
.
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_BINARY_DIR}/thirdparty/liblastfm2/src
audio
database
@@ -132,16 +144,14 @@ INCLUDE_DIRECTORIES(
topbar
utils
libtomahawk
libtomahawk/utils
mac
${THIRDPARTY_DIR}/alsa-playback
${THIRDPARTY_DIR}/rtaudio
${THIRDPARTY_DIR}/qxt/qxtweb-standalone/qxtweb
${THIRDPARTY_DIR}/qtweetlib/qtweetlib/src
${THIRDPARTY_DIR}/qtweetlib/tomahawk-custom
${TAGLIB_INCLUDES}
${PHONON_INCLUDES}
${QJSON_INCLUDE_DIR}
${LIBECHONEST_INCLUDE_DIR}
${LIBECHONEST_INCLUDE_DIR}/..
@@ -157,6 +167,8 @@ IF( UNIX )
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 )
@@ -180,7 +192,9 @@ qt4_wrap_cpp( tomahawkMoc ${tomahawkHeaders} )
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in
${CMAKE_CURRENT_BINARY_DIR}/config.h)
SET( final_src ${final_src} ${tomahawkMoc} ${tomahawkSources} ${tomahawkHeaders} )
include( ${CMAKE_SOURCE_DIR}/lang/translations.cmake )
SET( final_src ${final_src} ${tomahawkMoc} ${tomahawkSources} ${tomahawkHeaders} ${trans_outfile})
IF( "${gui}" STREQUAL "no" )
ELSE()
@@ -205,7 +219,7 @@ MESSAGE( STATUS "OS_SPECIFIC_LINK_LIBRARIES: ${OS_SPECIFIC_LINK_LIBRARIES}" )
SET(LINK_LIBRARIES "")
IF(LIBLASTFM_FOUND)
SET(LINK_LIBRARIES ${LINK_LIBRARIES} ${LIBLASTFM_LIBRARY} )
SET(LINK_LIBRARIES ${LINK_LIBRARIES} tomahawk_lastfm2 )
ENDIF(LIBLASTFM_FOUND)
IF(GLOOX_FOUND)
SET(LINK_LIBRARIES ${LINK_LIBRARIES} ${GLOOX_LIBRARIES} )
@@ -214,15 +228,14 @@ ENDIF(GLOOX_FOUND)
TARGET_LINK_LIBRARIES( tomahawk
${LINK_LIBRARIES}
${TOMAHAWK_LIBRARIES}
${PHONON_LIBS}
${OS_SPECIFIC_LINK_LIBRARIES}
${QT_LIBRARIES}
${MAC_EXTRA_LIBS}
${LIBECHONEST_LIBRARY}
${QXTWEB_LIBRARIES}
${QTWEETLIB_LIBRARIES}
${QJSON_LIBRARIES}
${TAGLIB_LIBRARIES}
${QTWEETLIB_LIBRARIES}
${CLUCENE_LIBRARIES}
)
@@ -237,4 +250,19 @@ ENDIF( APPLE )
INSTALL( TARGETS tomahawk BUNDLE DESTINATION . RUNTIME DESTINATION bin )
IF( UNIX AND NOT APPLE AND KDE4_INSTALLED ) #install protocol file
FILE( READ ${CMAKE_SOURCE_DIR}/admin/unix/tomahawk.protocol protocol )
STRING( REPLACE "/path/to/binary" # match this
"${CMAKE_INSTALL_PREFIX}/bin/tomahawk" # this is linux (kde) so pretty safe I think
edited_protocol # save in this variable
"${protocol}" # from the contents of this var
)
FILE( WRITE ${CMAKE_BINARY_DIR}/tomahawk.protocol "${edited_protocol}" )
IF( ${SERVICES_INSTALL_DIR} )
SET( PROTOCOL_INSTALL_DIR ${SERVICES_INSTALL_DIR} )
ELSE()
SET( PROTOCOL_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/share/kde4/services" )
ENDIF()
INSTALL( FILES ${CMAKE_BINARY_DIR}/tomahawk.protocol DESTINATION ${PROTOCOL_INSTALL_DIR} )
ENDIF()
#INCLUDE( "CPack.txt" )

View File

@@ -4,10 +4,8 @@ ADD_DEFINITIONS( /DNOMINMAX )
ADD_DEFINITIONS( /DWIN32_LEAN_AND_MEAN )
ADD_DEFINITIONS( -static-libgcc )
SET( QXTWEB_LIBRARIES qxtweb-standalone )
SET( TOMAHAWK_LIBRARIES ${CMAKE_BINARY_DIR}/src/libtomahawk/libtomahawklib.dll )
SET( QTWEETLIB_LIBRARIES ${CMAKE_BINARY_DIR}/thirdparty/qtweetlib/libtomahawk_qtweetlib.dll )
SET( QXTWEB_LIBRARIES ${CMAKE_BINARY_DIR}/thirdparty/qxt/qxtweb-standalone/libqxtweb-standalone.dll )
SET( OS_SPECIFIC_LINK_LIBRARIES
${OS_SPECIFIC_LINK_LIBRARIES}
@@ -15,7 +13,6 @@ SET( OS_SPECIFIC_LINK_LIBRARIES
${QTSPARKLE_LIBRARIES}
# third party shipped with tomahawk
${CMAKE_BINARY_DIR}/thirdparty/rtaudio/librtaudio.dll
# system libs
"secur32.dll"

104
src/PipelineStatusView.cpp Normal file
View File

@@ -0,0 +1,104 @@
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
*
* Copyright 2010-2011, Christian Muehlhaeuser <muesli@tomahawk-player.org>
*
* Tomahawk is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Tomahawk is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Tomahawk. If not, see <http://www.gnu.org/licenses/>.
*/
#include "PipelineStatusView.h"
#include <QHeaderView>
#include <QVBoxLayout>
#include "libtomahawk/pipeline.h"
using namespace Tomahawk;
PipelineStatusView::PipelineStatusView( AnimatedSplitter* parent )
: AnimatedWidget( parent )
, m_parent( parent )
{
setHiddenSize( QSize( 0, 0 ) );
setLayout( new QVBoxLayout() );
m_tree = new QTreeWidget( this );
layout()->setMargin( 0 );
layout()->addWidget( m_tree );
QStringList headers;
headers << tr( "Searching For" ) << tr( "Pending" );
m_tree->setHeaderLabels( headers );
m_tree->setSizePolicy( QSizePolicy::Preferred, QSizePolicy::Ignored );
m_tree->setColumnCount( 2 );
m_tree->setColumnWidth( 0, 200 );
m_tree->setColumnWidth( 1, 50 );
m_tree->header()->setStretchLastSection( true );
m_tree->setRootIsDecorated( false );
m_tree->setFrameShape( QFrame::NoFrame );
m_tree->setAttribute( Qt::WA_MacShowFocusRect, 0 );
new QTreeWidgetItem( m_tree );
connect( Pipeline::instance(), SIGNAL( resolving( Tomahawk::query_ptr ) ), SLOT( onPipelineUpdate( Tomahawk::query_ptr ) ) );
connect( Pipeline::instance(), SIGNAL( idle() ), SLOT( onPipelineUpdate() ) );
onPipelineUpdate();
}
void
PipelineStatusView::onPipelineUpdate( const query_ptr& query )
{
qDebug() << Q_FUNC_INFO;
QTreeWidgetItem* ti = m_tree->invisibleRootItem()->child( 0 );
if ( Pipeline::instance()->activeQueryCount() && !query.isNull() )
{
ti->setText( 0, QString( "%1 - %2" ).arg( query->artist() ).arg( query->track() ) );
ti->setText( 1, QString( "%1" ).arg( Pipeline::instance()->activeQueryCount() + Pipeline::instance()->pendingQueryCount() ) );
if ( isHidden() )
emit showWidget();
}
else
{
ti->setText( 0, tr( "Idle" ) );
ti->setText( 1, QString( "None" ) );
if ( !isHidden() )
emit hideWidget();
}
}
QSize
PipelineStatusView::sizeHint() const
{
unsigned int y = 0;
y += m_tree->header()->height();
y += m_tree->contentsMargins().top() + m_tree->contentsMargins().bottom();
if ( m_tree->invisibleRootItem()->childCount() )
{
unsigned int rowheight = m_tree->sizeHintForRow( 0 );
y += rowheight * m_tree->invisibleRootItem()->childCount() + 2;
}
return QSize( 0, y );
}

View File

@@ -1,5 +1,5 @@
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
*
*
* Copyright 2010-2011, Christian Muehlhaeuser <muesli@tomahawk-player.org>
*
* Tomahawk is free software: you can redistribute it and/or modify
@@ -16,41 +16,36 @@
* along with Tomahawk. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef MUSIXMATCHPLUGIN_H
#define MUSIXMATCHPLUGIN_H
#include "tomahawk/infosystem.h"
#ifndef PIPELINESTATUSVIEW_H
#define PIPELINESTATUSVIEW_H
class QNetworkReply;
#include <QDebug>
#include <QTreeWidget>
namespace Tomahawk
#include "typedefs.h"
#include "utils/animatedsplitter.h"
class StreamConnection;
class PipelineStatusView : public AnimatedWidget
{
Q_OBJECT
namespace InfoSystem
{
class MusixMatchPlugin : public InfoPlugin
{
Q_OBJECT
public:
MusixMatchPlugin(QObject *parent);
virtual ~MusixMatchPlugin();
void getInfo(const QString &caller, const InfoType type, const QVariant &data, InfoCustomDataHash customData);
private:
bool isValidTrackData( const QString &caller, const QVariant& data, InfoCustomDataHash &customData );
public slots:
void trackSearchSlot();
void trackLyricsSlot();
explicit PipelineStatusView( AnimatedSplitter* parent );
virtual ~PipelineStatusView()
{
qDebug() << Q_FUNC_INFO;
}
QSize sizeHint() const;
private slots:
void onPipelineUpdate( const Tomahawk::query_ptr& query = Tomahawk::query_ptr() );
private:
QString m_apiKey;
QTreeWidget* m_tree;
AnimatedSplitter* m_parent;
};
}
}
#endif // MUSIXMATCHPLUGIN_H
#endif // TRANSFERVIEW_H

View File

@@ -21,15 +21,14 @@
#include <QNetworkReply>
#include "tomahawk/tomahawkapp.h"
#include "audio/audioengine.h"
#include "playlist/playlistmanager.h"
#include "viewmanager.h"
#include "utils/imagebutton.h"
#include "utils/tomahawkutils.h"
#include "album.h"
#define LASTFM_DEFAULT_COVER "http://cdn.last.fm/flatness/catalogue/noimage"
static QString s_acInfoIdentifier = QString( "AUDIOCONTROLS" );
AudioControls::AudioControls( QWidget* parent )
@@ -44,11 +43,11 @@ AudioControls::AudioControls( QWidget* parent )
QFont font( ui->artistTrackLabel->font() );
font.setPixelSize( 12 );
#ifdef Q_WS_MAC
font.setPointSize( font.pointSize() - 2 );
#endif
ui->artistTrackLabel->setFont( font );
ui->artistTrackLabel->setElideMode( Qt::ElideMiddle );
ui->artistTrackLabel->setType( QueryLabel::ArtistAndTrack );
@@ -81,27 +80,23 @@ 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->setFixedHeight( 20 );
ui->seekSlider->setEnabled( false );
ui->seekSlider->setEnabled( true );
ui->seekSlider->setStyleSheet( "QSlider::groove::horizontal {"
"margin: 5px; border-width: 3px;"
"border-image: url(" RESPATH "images/seek-slider-bkg.png) 3 3 3 3 stretch stretch;"
"}"
"QSlider::handle::horizontal {"
"margin-left: 5px; margin-right: -5px; "
"width: 0px;"
//"margin-bottom: -7px; margin-top: -7px;"
//"height: 17px; width: 16px;"
//"background-image: url(" RESPATH "images/seek-and-volume-knob-rest.png);"
//"background-repeat: no-repeat;"
"}"
"QSlider::sub-page:horizontal {"
"margin: 5px; border-width: 3px;"
"border-image: url(" RESPATH "images/seek-slider-level.png) 3 3 3 3 stretch stretch;"
"}"
);
"QSlider::handle::horizontal {"
"margin-bottom: -7px; margin-top: -7px;"
"height: 17px; width: 16px;"
"background-image: url(" RESPATH "images/seek-and-volume-knob-rest.png);"
"background-repeat: no-repeat;"
"}" );
ui->volumeSlider->setFixedHeight( 20 );
ui->volumeSlider->setRange( 0, 100 );
@@ -121,9 +116,7 @@ AudioControls::AudioControls( QWidget* parent )
"height: 17px; width: 16px;"
"background-image: url(" RESPATH "images/seek-and-volume-knob-rest.png);"
"background-repeat: no-repeat;"
"}"
);
"}" );
/* m_playAction = new QAction( this );
m_pauseAction = new QAction( this );
@@ -135,6 +128,7 @@ AudioControls::AudioControls( QWidget* parent )
connect( m_prevAction, SIGNAL( triggered() ), (QObject*)APP->audioEngine(), SLOT( previous() ) );
connect( m_nextAction, SIGNAL( triggered() ), (QObject*)APP->audioEngine(), SLOT( next() ) ); */
connect( ui->seekSlider, SIGNAL( valueChanged( int ) ), AudioEngine::instance(), SLOT( seek( int ) ) );
connect( ui->volumeSlider, SIGNAL( valueChanged( int ) ), AudioEngine::instance(), SLOT( setVolume( int ) ) );
connect( ui->prevButton, SIGNAL( clicked() ), AudioEngine::instance(), SLOT( previous() ) );
connect( ui->playPauseButton, SIGNAL( clicked() ), AudioEngine::instance(), SLOT( play() ) );
@@ -143,10 +137,10 @@ AudioControls::AudioControls( QWidget* parent )
connect( ui->volumeLowButton, SIGNAL( clicked() ), AudioEngine::instance(), SLOT( lowerVolume() ) );
connect( ui->volumeHighButton, SIGNAL( clicked() ), AudioEngine::instance(), SLOT( raiseVolume() ) );
connect( ui->playPauseButton, SIGNAL( clicked() ), this, SIGNAL( playPressed() ) );
connect( ui->pauseButton, SIGNAL( clicked() ), this, SIGNAL( pausePressed() ) );
connect( ui->repeatButton, SIGNAL( clicked() ), SLOT( onRepeatClicked() ) );
connect( ui->shuffleButton, SIGNAL( clicked() ), SLOT( onShuffleClicked() ) );
@@ -160,12 +154,18 @@ AudioControls::AudioControls( QWidget* parent )
connect( AudioEngine::instance(), SIGNAL( paused() ), SLOT( onPlaybackPaused() ) );
connect( AudioEngine::instance(), SIGNAL( resumed() ), SLOT( onPlaybackResumed() ) );
connect( AudioEngine::instance(), SIGNAL( stopped() ), SLOT( onPlaybackStopped() ) );
connect( AudioEngine::instance(), SIGNAL( timerSeconds( unsigned int ) ), SLOT( onPlaybackTimer( unsigned int ) ) );
connect( AudioEngine::instance(), SIGNAL( timerMilliSeconds( qint64 ) ), SLOT( onPlaybackTimer( qint64 ) ) );
connect( AudioEngine::instance(), SIGNAL( volumeChanged( int ) ), SLOT( onVolumeChanged( int ) ) );
m_defaultCover = QPixmap( RESPATH "images/no-album-art-placeholder.png" )
.scaled( ui->coverImage->size(), Qt::IgnoreAspectRatio, Qt::SmoothTransformation );
connect( Tomahawk::InfoSystem::InfoSystem::instance(),
SIGNAL( info( QString, Tomahawk::InfoSystem::InfoType, QVariant, QVariant, Tomahawk::InfoSystem::InfoCustomData ) ),
SLOT( infoSystemInfo( QString, Tomahawk::InfoSystem::InfoType, QVariant, QVariant, Tomahawk::InfoSystem::InfoCustomData ) ) );
connect( Tomahawk::InfoSystem::InfoSystem::instance(), SIGNAL( finished( QString ) ), SLOT( infoSystemFinished( QString ) ) );
onPlaybackStopped(); // initial state
}
@@ -201,40 +201,6 @@ AudioControls::onVolumeChanged( int volume )
}
void
AudioControls::onCoverArtDownloaded()
{
if ( m_currentTrack.isNull() )
return;
QNetworkReply* reply = qobject_cast<QNetworkReply*>( sender() );
QUrl redir = reply->attribute( QNetworkRequest::RedirectionTargetAttribute ).toUrl();
if ( redir.isEmpty() )
{
const QByteArray ba = reply->readAll();
if ( ba.length() )
{
QPixmap pm;
pm.loadFromData( ba );
if ( pm.isNull() || reply->url().toString().startsWith( LASTFM_DEFAULT_COVER ) )
ui->coverImage->setPixmap( m_defaultCover );
else
ui->coverImage->setPixmap( pm.scaled( ui->coverImage->size(), Qt::IgnoreAspectRatio, Qt::SmoothTransformation ) );
}
}
else
{
// Follow HTTP redirect
QNetworkRequest req( redir );
QNetworkReply* reply = TomahawkUtils::nam()->get( req );
connect( reply, SIGNAL( finished() ), SLOT( onCoverArtDownloaded() ) );
}
reply->deleteLater();
}
void
AudioControls::onPlaybackStarted( const Tomahawk::result_ptr& result )
{
@@ -242,10 +208,61 @@ AudioControls::onPlaybackStarted( const Tomahawk::result_ptr& result )
onPlaybackLoading( result );
QString imgurl = "http://ws.audioscrobbler.com/2.0/?method=album.imageredirect&artist=%1&album=%2&size=medium&api_key=7a90f6672a04b809ee309af169f34b8b";
QNetworkRequest req( imgurl.arg( result->artist()->name() ).arg( result->album()->name() ) );
QNetworkReply* reply = TomahawkUtils::nam()->get( req );
connect( reply, SIGNAL( finished() ), SLOT( onCoverArtDownloaded() ) );
Tomahawk::InfoSystem::InfoCriteriaHash trackInfo;
trackInfo["artist"] = result->artist()->name();
trackInfo["album"] = result->album()->name();
Tomahawk::InfoSystem::InfoSystem::instance()->getInfo(
s_acInfoIdentifier, Tomahawk::InfoSystem::InfoAlbumCoverArt,
QVariant::fromValue< Tomahawk::InfoSystem::InfoCriteriaHash >( trackInfo ), Tomahawk::InfoSystem::InfoCustomData() );
}
void
AudioControls::infoSystemInfo( QString caller, Tomahawk::InfoSystem::InfoType type, QVariant input, QVariant output, Tomahawk::InfoSystem::InfoCustomData customData )
{
Q_UNUSED( input );
Q_UNUSED( customData );
qDebug() << Q_FUNC_INFO << caller << type << s_acInfoIdentifier << Tomahawk::InfoSystem::InfoAlbumCoverArt;
if ( caller != s_acInfoIdentifier || type != Tomahawk::InfoSystem::InfoAlbumCoverArt )
{
qDebug() << "Info of wrong type or not with our identifier";
return;
}
if ( m_currentTrack.isNull() )
{
qDebug() << "Current track is null when trying to apply fetched cover art";
return;
}
if ( !output.canConvert< Tomahawk::InfoSystem::InfoCustomData >() )
{
qDebug() << "Cannot convert fetched art from a QByteArray";
return;
}
Tomahawk::InfoSystem::InfoCustomData returnedData = output.value< Tomahawk::InfoSystem::InfoCustomData >();
const QByteArray ba = returnedData["imgbytes"].toByteArray();
if ( ba.length() )
{
QPixmap pm;
pm.loadFromData( ba );
if ( pm.isNull() )
ui->coverImage->setPixmap( m_defaultCover );
else
ui->coverImage->setPixmap( pm.scaled( ui->coverImage->size(), Qt::IgnoreAspectRatio, Qt::SmoothTransformation ) );
}
}
void
AudioControls::infoSystemFinished( QString target )
{
Q_UNUSED( target );
qDebug() << Q_FUNC_INFO;
}
@@ -261,13 +278,11 @@ AudioControls::onPlaybackLoading( const Tomahawk::result_ptr& result )
ui->ownerLabel->setText( result->friendlySource() );
ui->coverImage->setPixmap( m_defaultCover );
if ( ui->timeLabel->text().isEmpty() )
ui->timeLabel->setText( TomahawkUtils::timeToString( 0 ) );
ui->timeLabel->setText( TomahawkUtils::timeToString( 0 ) );
ui->timeLeftLabel->setText( "-" + TomahawkUtils::timeToString( result->duration() ) );
if ( ui->timeLeftLabel->text().isEmpty() )
ui->timeLeftLabel->setText( "-" + TomahawkUtils::timeToString( result->duration() ) );
ui->seekSlider->setRange( 0, m_currentTrack->duration() );
ui->seekSlider->setRange( 0, m_currentTrack->duration() * 1000 );
ui->seekSlider->setValue( 0 );
ui->seekSlider->setVisible( true );
/* m_playAction->setEnabled( false );
@@ -302,7 +317,7 @@ AudioControls::onPlaybackResumed()
ui->pauseButton->setVisible( true );
ui->pauseButton->setEnabled( true );
ui->playPauseButton->setVisible( false );
ui->playPauseButton->setEnabled( false );
ui->playPauseButton->setEnabled( false );
}
@@ -330,14 +345,19 @@ AudioControls::onPlaybackStopped()
void
AudioControls::onPlaybackTimer( unsigned int seconds )
AudioControls::onPlaybackTimer( qint64 msElapsed )
{
if ( m_currentTrack.isNull() )
return;
ui->seekSlider->blockSignals( true );
const int seconds = msElapsed / 1000;
ui->timeLabel->setText( TomahawkUtils::timeToString( seconds ) );
ui->timeLeftLabel->setText( "-" + TomahawkUtils::timeToString( m_currentTrack->duration() - seconds ) );
ui->seekSlider->setValue( seconds );
ui->seekSlider->setValue( msElapsed );
ui->seekSlider->blockSignals( false );
}
@@ -386,21 +406,21 @@ AudioControls::onRepeatClicked()
case PlaylistInterface::NoRepeat:
{
// switch to RepeatOne
PlaylistManager::instance()->setRepeatMode( PlaylistInterface::RepeatOne );
ViewManager::instance()->setRepeatMode( PlaylistInterface::RepeatOne );
}
break;
case PlaylistInterface::RepeatOne:
{
// switch to RepeatAll
PlaylistManager::instance()->setRepeatMode( PlaylistInterface::RepeatAll );
ViewManager::instance()->setRepeatMode( PlaylistInterface::RepeatAll );
}
break;
case PlaylistInterface::RepeatAll:
{
// switch to NoRepeat
PlaylistManager::instance()->setRepeatMode( PlaylistInterface::NoRepeat );
ViewManager::instance()->setRepeatMode( PlaylistInterface::NoRepeat );
}
break;
@@ -435,26 +455,26 @@ AudioControls::onShuffleModeChanged( bool enabled )
void
AudioControls::onShuffleClicked()
{
PlaylistManager::instance()->setShuffled( m_shuffled ^ true );
ViewManager::instance()->setShuffled( m_shuffled ^ true );
}
void
AudioControls::onArtistClicked()
{
PlaylistManager::instance()->show( m_currentTrack->artist() );
ViewManager::instance()->show( m_currentTrack->artist() );
}
void
AudioControls::onAlbumClicked()
{
PlaylistManager::instance()->show( m_currentTrack->album() );
ViewManager::instance()->show( m_currentTrack->album() );
}
void
AudioControls::onTrackClicked()
{
PlaylistManager::instance()->showCurrentTrack();
ViewManager::instance()->showCurrentTrack();
}

View File

@@ -23,6 +23,7 @@
#include "result.h"
#include "playlistinterface.h"
#include "infosystem/infosystem.h"
namespace Ui
{
@@ -40,7 +41,7 @@ public:
signals:
void playPressed();
void pausePressed();
public slots:
void onRepeatModeChanged( PlaylistInterface::RepeatMode mode );
void onShuffleModeChanged( bool enabled );
@@ -55,7 +56,7 @@ private slots:
void onPlaybackResumed();
void onPlaybackStopped();
void onPlaybackTimer( unsigned int seconds );
void onPlaybackTimer( qint64 msElapsed );
void onVolumeChanged( int volume );
void onRepeatClicked();
@@ -65,7 +66,8 @@ private slots:
void onAlbumClicked();
void onTrackClicked();
void onCoverArtDownloaded();
void infoSystemInfo( QString caller, Tomahawk::InfoSystem::InfoType type, QVariant input, QVariant output, Tomahawk::InfoSystem::InfoCustomData customData );
void infoSystemFinished( QString target );
private:
Ui::AudioControls *ui;

View File

@@ -1,14 +1,15 @@
#ifndef CONFIG_H_IN
#define CONFIG_H_IN
#cmakedefine ORGANIZATION_NAME "${ORGANIZATION_NAME}"
#cmakedefine ORGANIZATION_DOMAIN "${ORGANIZATION_DOMAIN}"
#cmakedefine APPLICATION_NAME "${APPLICATION_NAME}"
#cmakedefine VERSION "${VERSION}"
#cmakedefine TOMAHAWK_ORGANIZATION_NAME "${TOMAHAWK_ORGANIZATION_NAME}"
#cmakedefine TOMAHAWK_ORGANIZATION_DOMAIN "${TOMAHAWK_ORGANIZATION_DOMAIN}"
#cmakedefine TOMAHAWK_APPLICATION_NAME "${TOMAHAWK_APPLICATION_NAME}"
#cmakedefine TOMAHAWK_VERSION "${TOMAHAWK_VERSION}"
#cmakedefine DEBUG_BUILD
#define CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}"
#define CMAKE_SYSTEM "${CMAKE_SYSTEM}"
#cmakedefine SNOW_LEOPARD
#cmakedefine LEOPARD

119
src/configdelegatebase.cpp Normal file
View File

@@ -0,0 +1,119 @@
/*
Copyright (C) 2011 Leo Franchi <leo.franchi@kdab.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "configdelegatebase.h"
#include "utils/tomahawkutils.h"
#include <QPainter>
#include <QApplication>
#include <QMouseEvent>
ConfigDelegateBase::ConfigDelegateBase ( QObject* parent )
: QStyledItemDelegate ( parent )
{
}
QSize
ConfigDelegateBase::sizeHint( const QStyleOptionViewItem& option, const QModelIndex& index ) const
{
int width = QStyledItemDelegate::sizeHint( option, index ).width();
QStyleOptionViewItemV4 opt = option;
initStyleOption( &opt, index );
QFont name = opt.font;
name.setPointSize( name.pointSize() + 2 );
name.setBold( true );
QFont path = opt.font;
path.setItalic( true );
path.setPointSize( path.pointSize() - 1 );
QFontMetrics bfm( name );
QFontMetrics sfm( path );
return QSize( width, 2 * PADDING + bfm.height() + sfm.height() );
}
void
ConfigDelegateBase::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
ConfigDelegateBase::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( 16, 16 );
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 );
}
bool
ConfigDelegateBase::editorEvent ( QEvent* event, QAbstractItemModel* model, const QStyleOptionViewItem& option, const QModelIndex& index )
{
QStyleOptionViewItemV4 viewOpt( option );
initStyleOption( &viewOpt, index );
if( event->type() == QEvent::MouseButtonRelease || event->type() == QEvent::MouseButtonDblClick ) {
m_configPressed = QModelIndex();
QMouseEvent* me = static_cast< QMouseEvent* >( event );
if( me->button() != Qt::LeftButton || !checkRectForIndex( option, index ).contains( me->pos() ) )
return false;
// 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, Qt::CheckStateRole );
} else if( event->type() == QEvent::MouseButtonPress ) {
QMouseEvent* me = static_cast< QMouseEvent* >( event );
if( me->button() == Qt::LeftButton && configRectForIndex( option, index ).contains( me->pos() ) ) {
m_configPressed = index;
emit configPressed( index );
return true;
}
}
return QStyledItemDelegate::editorEvent( event, model, option, index );
}

54
src/configdelegatebase.h Normal file
View File

@@ -0,0 +1,54 @@
/*
Copyright (C) 2011 Leo Franchi <leo.franchi@kdab.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CONFIGDELEGATEBASE_H
#define CONFIGDELEGATEBASE_H
#include "dllmacro.h"
#include <QStyledItemDelegate>
#define PADDING 4
class QPainter;
class Q_DECL_EXPORT ConfigDelegateBase : public QStyledItemDelegate
{
Q_OBJECT
public:
ConfigDelegateBase( QObject* parent = 0 );
virtual QSize sizeHint ( const QStyleOptionViewItem& option, const QModelIndex& index ) const;
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;
// 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;
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;
};
#endif // CONFIGDELEGATEBASE_H

View File

@@ -0,0 +1,79 @@
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
*
* Copyright 2010-2011, Christian Muehlhaeuser <muesli@tomahawk-player.org>
*
* Tomahawk is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Tomahawk is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Tomahawk. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef RESOLVER_CONFIG_WRAPPER
#define RESOLVER_CONFIG_WRAPPER
#include <QDialog>
#include <QDialogButtonBox>
#include <QVBoxLayout>
class DelegateConfigWrapper : public QDialog
{
Q_OBJECT
public:
DelegateConfigWrapper( QWidget* conf, const QString& title, QWidget* parent, Qt::WindowFlags flags = 0 ) : QDialog( parent, flags ), m_widget( conf )
{
m_widget->setVisible( true );
m_widget->setWindowFlags( Qt::Sheet );
setWindowTitle( title );
QVBoxLayout* v = new QVBoxLayout( this );
v->setContentsMargins( 0, 0, 0, 0 );
v->addWidget( m_widget );
QDialogButtonBox* buttons = new QDialogButtonBox( QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal, this );
connect( buttons, SIGNAL( clicked( QAbstractButton*) ), this, SLOT( closed( QAbstractButton* ) ) );
connect( this, SIGNAL( rejected() ), this, SLOT( rejected() ) );
v->addWidget( buttons );
setLayout( v );
#ifdef Q_OS_MAC
setSizeGripEnabled( false );
setMinimumSize( sizeHint() );
setMaximumSize( sizeHint() ); // to remove the resize grip on osx this is the only way
#endif
}
public slots:
void closed( QAbstractButton* b )
{
// let the config widget live to see another day
layout()->removeWidget( m_widget );
m_widget->setParent( 0 );
m_widget->setVisible( false );
QDialogButtonBox* buttons = qobject_cast< QDialogButtonBox* >( sender() );
if( buttons->standardButton( b ) == QDialogButtonBox::Ok )
done( QDialog::Accepted );
else
done( QDialog::Rejected );
}
// we get a rejected() signal emitted if the user presses escape (and no clicked() signal )
void rejected()
{
layout()->removeWidget( m_widget );
m_widget->setParent( 0 );
m_widget->setVisible( false );
}
private:
QWidget* m_widget;
};
#endif

164
src/diagnosticsdialog.cpp Normal file
View File

@@ -0,0 +1,164 @@
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
*
* Copyright 2011, Dominik Schmidt <dev@dominik-schmidt.de>
*
* 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 "diagnosticsdialog.h"
#include "ui_diagnosticsdialog.h"
#include <sip/SipHandler.h>
#include <network/servent.h>
#include <sourcelist.h>
#include <QTextEdit>
#include <QDebug>
#include <QDialogButtonBox>
#include <QPushButton>
#include <QApplication>
#include <QClipboard>
DiagnosticsDialog::DiagnosticsDialog( QWidget *parent )
: QDialog( parent )
, ui( new Ui::DiagnosticsDialog )
{
ui->setupUi( this );
connect( ui->updateButton, SIGNAL( clicked() ), this, SLOT( updateLogView() ) );
connect( ui->clipboardButton, SIGNAL( clicked() ), this, SLOT( copyToClipboard() ) );
connect( ui->buttonBox, SIGNAL( rejected() ), this, SLOT( reject() ) );
updateLogView();
}
void DiagnosticsDialog::updateLogView()
{
QString log;
log.append(
QString("TOMAHAWK DIAGNOSTICS LOG -%1 \n\n")
.arg( QDateTime::currentDateTime().toString() )
);
// network
log.append(
"NETWORK:\n"
" General:\n"
);
if( Servent::instance()->visibleExternally() )
{
log.append(
QString(
" visible: true\n"
" host: %1\n"
" port: %2\n"
"\n"
).arg( Servent::instance()->externalAddress() )
.arg( Servent::instance()->externalPort() )
);
}
else
{
log.append(
QString(
" visible: false"
)
);
}
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())
{
Q_ASSERT(sip);
QString stateString;
switch( sip->connectionState() )
{
case SipPlugin::Connecting:
stateString = "Connecting";
break;
case SipPlugin::Connected:
stateString = "Connected";
break;
case SipPlugin::Disconnected:
stateString = "Disconnected";
break;
case SipPlugin::Disconnecting:
stateString = "Disconnecting";
}
log.append(
QString(" %2 (%1): %3 (%4)\n")
.arg(sip->name())
.arg(sip->friendlyName())
.arg(sip->accountName())
.arg(stateString)
);
Q_FOREACH( const QString &peerId, sip->peersOnline() )
{
bool connected = false;
Q_FOREACH( const Tomahawk::source_ptr &source, sources )
{
if( source->controlConnection() )
{
connected = true;
break;
}
}
QString versionString = SipHandler::instance()->versionString( peerId );
SipInfo sipInfo = SipHandler::instance()->sipInfo( peerId );
if( !sipInfo.isValid() )
log.append(
QString(" %1: %2 (%3) %4\n")
.arg( peerId )
.arg( "sipinfo invalid" )
.arg( connected ? "connected" : "not connected")
.arg( versionString )
);
else if( sipInfo.isVisible() )
log.append(
QString(" %1: %2:%3 (%4) %5\n")
.arg( peerId )
.arg( sipInfo.host().hostName() )
.arg( sipInfo.port() )
.arg( connected ? "connected" : "not connected")
.arg( versionString )
);
else
log.append(
QString(" %1: visible: false (%2) %3\n")
.arg( peerId )
.arg( connected ? "connected" : "not connected")
.arg( versionString )
);
}
log.append("\n");
}
ui->logView->setPlainText(log);
}
void DiagnosticsDialog::copyToClipboard()
{
QApplication::clipboard()->setText( ui->logView->toPlainText() );
}

46
src/diagnosticsdialog.h Normal file
View File

@@ -0,0 +1,46 @@
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
*
* Copyright 2011, Dominik Schmidt <dev@dominik-schmidt.de>
*
* 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 DIGANOSTICSDIALOG_H
#define DIAGNOSTICSDIALOG_H
#include <QDialog>
#include <QDebug>
namespace Ui
{
class DiagnosticsDialog;
}
class DiagnosticsDialog : public QDialog
{
Q_OBJECT
public:
explicit DiagnosticsDialog( QWidget* parent = 0 );
~DiagnosticsDialog() {};
private slots:
void updateLogView();
void copyToClipboard();
private:
Ui::DiagnosticsDialog* ui;
};
#endif // DIAGNOSTICSDIALOG_H

64
src/diagnosticsdialog.ui Normal file
View File

@@ -0,0 +1,64 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>DiagnosticsDialog</class>
<widget class="QDialog" name="DiagnosticsDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>621</width>
<height>434</height>
</rect>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>353</height>
</size>
</property>
<property name="windowTitle">
<string>Tomahawk Diagnostics</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QTextEdit" name="logView"/>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QPushButton" name="updateButton">
<property name="text">
<string>Update</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="clipboardButton">
<property name="text">
<string>Copy to Clipboard</string>
</property>
</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>
</item>
</layout>
</widget>
<resources>
<include location="../resources.qrc"/>
</resources>
<connections/>
</ui>

View File

@@ -21,14 +21,14 @@
#ifdef ENABLE_HEADLESS
#define TOMAHAWK_APPLICATION QtSingleCoreApplication
#define TOMAHAWK_APPLICATION QCoreApplication
#define TOMAHAWK_HEADLESS
#include "qtsingleapp/qtsingleapplication.h"
#include <QApplication>>
#else
#define TOMAHAWK_APPLICATION QtSingleApplication
#include "qtsingleapp/qtsingleapplication.h"
#define TOMAHAWK_APPLICATION QApplication
#include <QApplication>
#include "tomahawkwindow.h"
#endif

View File

@@ -1,114 +0,0 @@
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
*
* Copyright 2010-2011, Christian Muehlhaeuser <muesli@tomahawk-player.org>
*
* Tomahawk is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Tomahawk is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Tomahawk. If not, see <http://www.gnu.org/licenses/>.
*/
#include "tomahawk/infosystem.h"
#include "infoplugins/echonestplugin.h"
#include "infoplugins/musixmatchplugin.h"
using namespace Tomahawk::InfoSystem;
InfoSystem::InfoSystem(QObject *parent)
: QObject( parent )
{
qDebug() << Q_FUNC_INFO;
qRegisterMetaType<QMap< QString, QMap< QString, QString > > >("Tomahawk::InfoSystem::InfoGenericMap");
qRegisterMetaType<QHash<QString, QVariant > >("Tomahawk::InfoSystem::InfoCustomDataHash");
qRegisterMetaType<QHash<QString, QString > >("Tomahawk::InfoSystem::MusixMatchHash");
InfoPluginPtr enptr(new EchoNestPlugin(this));
m_plugins.append(enptr);
InfoPluginPtr mmptr(new MusixMatchPlugin(this));
m_plugins.append(mmptr);
}
void InfoSystem::registerInfoTypes(const InfoPluginPtr &plugin, const QSet< InfoType >& types)
{
qDebug() << Q_FUNC_INFO;
Q_FOREACH(InfoType type, types)
m_infoMap[type].append(plugin);
}
QLinkedList< InfoPluginPtr > InfoSystem::determineOrderedMatches(const InfoType type) const
{
//Dummy function for now that returns the various items in the QSet; at some point this will
//probably need to support ordering based on the data source
QLinkedList< InfoPluginPtr > providers;
Q_FOREACH(InfoPluginPtr ptr, m_infoMap[type])
providers << ptr;
return providers;
}
void InfoSystem::getInfo(const QString &caller, const InfoType type, const QVariant& data, InfoCustomDataHash customData)
{
qDebug() << Q_FUNC_INFO;
QLinkedList< InfoPluginPtr > providers = determineOrderedMatches(type);
if (providers.isEmpty())
{
emit info(QString(), Tomahawk::InfoSystem::InfoNoInfo, QVariant(), QVariant(), customData);
return;
}
InfoPluginPtr ptr = providers.first();
if (!ptr)
{
emit info(QString(), Tomahawk::InfoSystem::InfoNoInfo, QVariant(), QVariant(), customData);
return;
}
m_dataTracker[caller][type] = m_dataTracker[caller][type] + 1;
qDebug() << "current count in dataTracker for type" << type << "is" << m_dataTracker[caller][type];
connect(ptr.data(), SIGNAL(info(QString, Tomahawk::InfoSystem::InfoType, QVariant, QVariant, Tomahawk::InfoSystem::InfoCustomDataHash)),
this, SLOT(infoSlot(QString, Tomahawk::InfoSystem::InfoType, QVariant, QVariant, Tomahawk::InfoSystem::InfoCustomDataHash)), Qt::UniqueConnection);
connect(ptr.data(), SIGNAL(finished(QString, Tomahawk::InfoSystem::InfoType)),
this, SLOT(finishedSlot(QString, Tomahawk::InfoSystem::InfoType)), Qt::UniqueConnection);
ptr.data()->getInfo(caller, type, data, customData);
}
void InfoSystem::getInfo(const QString &caller, const InfoMap &input, InfoCustomDataHash customData)
{
Q_FOREACH( InfoType type, input.keys() )
getInfo(caller, type, input[type], customData);
}
void InfoSystem::infoSlot(QString target, Tomahawk::InfoSystem::InfoType type, QVariant input, QVariant output, Tomahawk::InfoSystem::InfoCustomDataHash customData)
{
qDebug() << Q_FUNC_INFO;
qDebug() << "current count in dataTracker is " << m_dataTracker[target][type];
if (m_dataTracker[target][type] == 0)
{
qDebug() << "Caller was not waiting for that type of data!";
return;
}
emit info(target, type, input, output, customData);
}
void InfoSystem::finishedSlot(QString target, Tomahawk::InfoSystem::InfoType type)
{
qDebug() << Q_FUNC_INFO;
m_dataTracker[target][type] = m_dataTracker[target][type] - 1;
qDebug() << "current count in dataTracker is " << m_dataTracker[target][type];
Q_FOREACH(Tomahawk::InfoSystem::InfoType testtype, m_dataTracker[target].keys())
{
if (m_dataTracker[target][testtype] != 0)
{
qDebug() << "found outstanding request of type" << testtype;
return;
}
}
qDebug() << "emitting finished with target" << target;
emit finished(target);
}

View File

@@ -4,6 +4,7 @@ SET( QT_USE_QTGUI TRUE )
SET( QT_USE_QTSQL TRUE )
SET( QT_USE_QTNETWORK TRUE )
SET( QT_USE_QTXML TRUE )
SET( QT_USE_QTUITOOLS TRUE )
include( ${QT_USE_FILE} )
@@ -16,31 +17,38 @@ set( libSources
sourcelist.cpp
pipeline.cpp
aclsystem.cpp
artist.cpp
album.cpp
collection.cpp
webcollection.cpp
playlist.cpp
resolver.cpp
query.cpp
result.cpp
source.cpp
viewpage.cpp
viewmanager.cpp
globalactionmanager.cpp
sip/SipPlugin.cpp
sip/SipHandler.cpp
sip/SipModel.cpp
sip/sipinfo.cpp
audio/madtranscode.cpp
audio/vorbistranscode.cpp
audio/flactranscode.cpp
audio/audioengine.cpp
database/database.cpp
database/fuzzyindex.cpp
database/databasecollection.cpp
database/localcollection.cpp
database/databaseworker.cpp
database/databaseimpl.cpp
database/databaseresolver.cpp
database/databasecommand.cpp
database/databasecommandloggable.cpp
database/databasecommand_resolve.cpp
database/databasecommand_allartists.cpp
database/databasecommand_allalbums.cpp
database/databasecommand_alltracks.cpp
database/databasecommand_addfiles.cpp
@@ -62,22 +70,30 @@ set( libSources
database/databasecommand_renameplaylist.cpp
database/databasecommand_loadops.cpp
database/databasecommand_updatesearchindex.cpp
database/databasecollection.cpp
database/databasecommand_setdynamicplaylistrevision.cpp
database/databasecommand_createdynamicplaylist.cpp
database/databasecommand_loaddynamicplaylist.cpp
database/databasecommand_loadalldynamicplaylists.cpp
database/databasecommand_loadallautoplaylists.cpp
database/databasecommand_loadallstations.cpp
database/databasecommand_deletedynamicplaylist.cpp
database/databasecommand_addclientauth.cpp
database/databasecommand_clientauthvalid.cpp
database/database.cpp
playlist/collectionmodel.cpp
infosystem/infosystemcache.cpp
infosystem/infosystem.cpp
infosystem/infosystemworker.cpp
infosystem/infoplugins/echonestplugin.cpp
infosystem/infoplugins/lastfmplugin.cpp
infosystem/infoplugins/musixmatchplugin.cpp
playlist/treemodel.cpp
playlist/treeproxymodel.cpp
playlist/treeheader.cpp
playlist/treeitemdelegate.cpp
playlist/collectionproxymodel.cpp
playlist/collectionflatmodel.cpp
playlist/collectionview.cpp
playlist/playlistmanager.cpp
playlist/plitem.cpp
playlist/playlistmodel.cpp
playlist/playlistproxymodel.cpp
playlist/playlistview.cpp
@@ -85,18 +101,21 @@ set( libSources
playlist/queueproxymodel.cpp
playlist/queueview.cpp
playlist/trackmodel.cpp
playlist/trackmodelitem.cpp
playlist/trackproxymodel.cpp
playlist/trackview.cpp
playlist/trackheader.cpp
playlist/treemodelitem.cpp
playlist/albumitem.cpp
playlist/albummodel.cpp
playlist/albumproxymodel.cpp
playlist/albumitemdelegate.cpp
playlist/albumview.cpp
playlist/artistview.cpp
playlist/topbar/topbar.cpp
playlist/topbar/clearbutton.cpp
playlist/topbar/searchlineedit.cpp
playlist/topbar/clearbutton.cpp
playlist/topbar/searchlineedit.cpp
playlist/topbar/lineedit.cpp
playlist/topbar/searchbutton.cpp
@@ -122,7 +141,7 @@ set( libSources
network/bufferiodevice.cpp
network/msgprocessor.cpp
network/filetransferconnection.cpp
network/streamconnection.cpp
network/dbsyncconnection.cpp
network/remotecollection.cpp
network/portfwdthread.cpp
@@ -139,14 +158,19 @@ set( libSources
utils/widgetdragfilter.cpp
utils/animatedsplitter.cpp
utils/xspfloader.cpp
utils/xspfgenerator.cpp
widgets/newplaylistwidget.cpp
widgets/playlisttypeselectordlg.cpp
widgets/welcomewidget.cpp
widgets/welcomeplaylistmodel.cpp
widgets/overlaywidget.cpp
widgets/infowidgets/sourceinfowidget.cpp
qtsingleapp/qtlocalpeer.cpp
qtsingleapp/qtsingleapplication.cpp
kdsingleapplicationguard/kdsingleapplicationguard.cpp
kdsingleapplicationguard/kdsharedmemorylocker.cpp
kdsingleapplicationguard/kdtoolsglobal.cpp
kdsingleapplicationguard/kdlockedsharedmemorypointer.cpp
)
set( libHeaders
@@ -155,12 +179,16 @@ set( libHeaders
pipeline.h
functimeout.h
aclsystem.h
collection.h
webcollection.h
query.h
resolver.h
result.h
source.h
viewpage.h
viewmanager.h
globalactionmanager.h
artist.h
album.h
@@ -168,11 +196,10 @@ set( libHeaders
playlist.h
sip/SipPlugin.h
sip/SipHandler.h
sip/SipModel.h
sip/sipinfo.h
audio/transcodeinterface.h
audio/madtranscode.h
audio/vorbistranscode.h
audio/flactranscode.h
audio/audioengine.h
database/database.h
@@ -183,6 +210,7 @@ set( libHeaders
database/databasecommand.h
database/databasecommandloggable.h
database/databasecommand_resolve.h
database/databasecommand_allartists.h
database/databasecommand_allalbums.h
database/databasecommand_alltracks.h
database/databasecommand_addfiles.h
@@ -205,30 +233,40 @@ set( libHeaders
database/databasecommand_loadops.h
database/databasecommand_updatesearchindex.h
database/databasecollection.h
database/localcollection.h
database/databasecommand_setdynamicplaylistrevision.h
database/databasecommand_createdynamicplaylist.h
database/databasecommand_loaddynamicplaylist.h
database/databasecommand_deletedynamicplaylist.h
database/databasecommand_loadalldynamicplaylists.h
database/databasecommand_loadallautoplaylists.h
database/databasecommand_loadallstations.h
database/databasecommand_addclientauth.h
database/databasecommand_clientauthvalid.h
infosystem/infosystem.h
infosystem/infosystemworker.h
infosystem/infosystemcache.h
infosystem/infoplugins/echonestplugin.h
infosystem/infoplugins/lastfmplugin.h
infosystem/infoplugins/musixmatchplugin.h
network/bufferiodevice.h
network/msgprocessor.h
network/remotecollection.h
network/filetransferconnection.h
network/streamconnection.h
network/dbsyncconnection.h
network/servent.h
network/connection.h
network/controlconnection.h
network/portfwdthread.h
playlist/collectionmodel.h
playlist/treemodel.h
playlist/treeproxymodel.h
playlist/treeheader.h
playlist/treeitemdelegate.h
playlist/collectionproxymodel.h
playlist/collectionflatmodel.h
playlist/collectionview.h
playlist/playlistmanager.h
playlist/plitem.h
playlist/playlistmodel.h
playlist/playlistproxymodel.h
playlist/playlistview.h
@@ -236,18 +274,21 @@ set( libHeaders
playlist/queueproxymodel.h
playlist/queueview.h
playlist/trackmodel.h
playlist/trackmodelitem.h
playlist/trackproxymodel.h
playlist/trackview.h
playlist/trackheader.h
playlist/treemodelitem.h
playlist/albumitem.h
playlist/albummodel.h
playlist/albumproxymodel.h
playlist/albumitemdelegate.h
playlist/albumview.h
playlist/artistview.h
playlist/topbar/topbar.h
playlist/topbar/clearbutton.h
playlist/topbar/searchlineedit.h
playlist/topbar/searchlineedit.h
playlist/topbar/lineedit.h
playlist/topbar/lineedit_p.h
playlist/topbar/searchbutton.h
@@ -281,20 +322,26 @@ set( libHeaders
utils/widgetdragfilter.h
utils/animatedsplitter.h
utils/xspfloader.h
utils/xspfgenerator.h
widgets/newplaylistwidget.h
widgets/playlisttypeselectordlg.h
widgets/welcomewidget.h
widgets/welcomeplaylistmodel.h
widgets/overlaywidget.h
widgets/infowidgets/sourceinfowidget.h
qtsingleapp/qtlocalpeer.h
qtsingleapp/qtsingleapplication.h
kdsingleapplicationguard/kdsingleapplicationguard.h
kdsingleapplicationguard/kdsharedmemorylocker.h
kdsingleapplicationguard/kdtoolsglobal.h
kdsingleapplicationguard/kdlockedsharedmemorypointer.h
)
set( libHeaders_NoMOC
playlist/dynamic/GeneratorInterface.h
set( libHeaders_NoMOC
playlist/dynamic/GeneratorInterface.h
)
set( libUI ${libUI}
widgets/playlisttypeselectordlg.ui
widgets/newplaylistwidget.ui
widgets/welcomewidget.ui
widgets/infowidgets/sourceinfowidget.ui
@@ -310,31 +357,20 @@ include_directories( . ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/.
${LIBECHONEST_INCLUDE_DIR}/..
${CLUCENE_INCLUDE_DIR}
${CLUCENE_LIBRARY_DIR}
${PHONON_INCLUDES}
${CMAKE_BINARY_DIR}/thirdparty/liblastfm2/src
../../include
../network
playlist
${THIRDPARTY_DIR}/libportfwd/include
${LIBPORTFWD_INCLUDE_DIR}
${THIRDPARTY_DIR}/qxt/qxtweb-standalone/qxtweb
${THIRDPARTY_DIR}/rtaudio
${THIRDPARTY_DIR}/alsa-playback
${THIRDPARTY_DIR}/jdns
${THIRDPARTY_DIR}/jdns/jdns
${THIRDPARTY_DIR}/jdns/jdnsshared
${THIRDPARTY_DIR}/qtweetlib/qtweetlib/src
${CMAKE_BINARY_DIR}/thirdparty/liblastfm2/src
)
IF( WIN32 )
SET( libSources ${libSources} audio/rtaudiooutput.cpp )
SET( libHeaders ${libHeaders} audio/rtaudiooutput.h )
SET( OS_SPECIFIC_LINK_LIBRARIES
${OS_SPECIFIC_LINK_LIBRARIES}
# Thirdparty
${CMAKE_BINARY_DIR}/thirdparty/rtaudio/librtaudio.dll
${QJSON_LDFLAGS}
# System
"iphlpapi.a"
"ws2_32.dll"
@@ -350,28 +386,17 @@ IF( APPLE )
FIND_LIBRARY( COREFOUNDATION_LIBRARY CoreFoundation )
MARK_AS_ADVANCED( COREAUDIO_LIBRARY COREFOUNDATION_LIBRARY )
SET( libSources ${libSources} audio/rtaudiooutput.cpp )
SET( libHeaders ${libHeaders} audio/rtaudiooutput.h )
SET( OS_SPECIFIC_LINK_LIBRARIES
${OS_SPECIFIC_LINK_LIBRARIES}
# Thirdparty
${QJSON_LIBRARIES}
rtaudio
# System
${COREAUDIO_LIBRARY}
${COREFOUNDATION_LIBRARY}
)
ENDIF( APPLE )
IF( UNIX AND NOT APPLE )
SET( OS_SPECIFIC_LINK_LIBRARIES
${OS_SPECIFIC_LINK_LIBRARIES}
# Thirdparty
alsaplayback
${QJSON_LDFLAGS}
)
ENDIF( UNIX AND NOT APPLE )
IF(LIBLASTFM_FOUND)
SET(LINK_LIBRARIES ${LINK_LIBRARIES} tomahawk_lastfm2 )
ENDIF(LIBLASTFM_FOUND)
qt4_wrap_ui( libUI_H ${libUI} )
qt4_wrap_cpp( libMoc ${libHeaders} )
@@ -381,26 +406,23 @@ SET( libSources ${libSources} ${libUI_H} ${libHeaders_NoMOC} )
add_library( tomahawklib SHARED ${libSources} ${libMoc} )
target_link_libraries( tomahawklib
# Internal
tomahawk_jdns
tomahawk_qtweetlib
# Thirdparty shipped with tomahawk
portfwd
# soon to be removed by phonon-dependency
FLAC++
ogg
vorbisfile
mad
${LIBPORTFWD_LIBRARIES}
# External deps
${QJSON_LIBRARIES}
${PHONON_LIBS}
${TAGLIB_LIBRARIES}
${CLUCENE_LIBRARIES}
${LIBECHONEST_LIBRARY}
${QT_LIBRARIES}
${OS_SPECIFIC_LINK_LIBRARIES}
${CMAKE_THREAD_LIBS_INIT}
${LINK_LIBRARIES}
)
INSTALL( TARGETS tomahawklib DESTINATION lib${LIB_SUFFIX} )
INSTALL( TARGETS tomahawklib
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib${LIB_SUFFIX}
ARCHIVE DESTINATION lib${LIB_SUFFIX}
)

View File

@@ -0,0 +1,150 @@
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
*
* Copyright 2010-2011, Christian Muehlhaeuser <muesli@tomahawk-player.org>
*
* Tomahawk is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Tomahawk is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Tomahawk. If not, see <http://www.gnu.org/licenses/>.
*/
#include "aclsystem.h"
#include <QtDebug>
#include <QMutexLocker>
#include <QVariant>
#include <tomahawksettings.h>
ACLSystem* ACLSystem::s_instance = 0;
ACLSystem*
ACLSystem::instance()
{
if( !s_instance )
new ACLSystem();
return s_instance;
}
ACLSystem::ACLSystem( QObject* parent )
: QObject( parent ),
m_saveTimer( this )
{
s_instance = this;
//qRegisterMetaType< QHash< QString, QHash< QString, ACL > > >("ACLSystem::ACLCacheHash");
QStringList savedEntries = TomahawkSettings::instance()->aclEntries();
if( !savedEntries.empty() && savedEntries.size() % 3 == 0 )
{
int index = 0;
while( index < savedEntries.length() )
{
if( !m_cache.contains( savedEntries.at( index ) ) )
m_cache[savedEntries.at( index ) ] = QHash< QString, ACL >();
m_cache[savedEntries.at( index )][savedEntries.at( index + 1 )] = (ACL)(savedEntries.at( index + 2 ).toInt() );
index += 3;
}
}
m_saveTimer.setSingleShot( false );
m_saveTimer.setInterval( 60000 );
connect( &m_saveTimer, SIGNAL( timeout() ), this, SLOT( saveTimerFired() ) );
m_saveTimer.start();
}
ACLSystem::~ACLSystem()
{
m_saveTimer.stop();
saveTimerFired();
}
ACLSystem::ACL
ACLSystem::isAuthorizedUser( const QString& dbid )
{
// qDebug() << Q_FUNC_INFO;
QMutexLocker locker( &m_cacheMutex );
qDebug() << "Current cache keys =" << m_cache.keys();
// qDebug() << "Looking up dbid";
if( !m_cache.contains( dbid ) )
return ACLSystem::NotFound;
else
{
QHash< QString, ACL > peerHash = m_cache[dbid];
if( peerHash.contains( "global" ) )
return peerHash["global"];
return ACLSystem::NotFound;
}
}
void
ACLSystem::authorizeUser( const QString& dbid, ACLSystem::ACL globalType )
{
// qDebug() << Q_FUNC_INFO;
if( globalType == ACLSystem::NotFound )
return;
QMutexLocker locker( &m_cacheMutex );
QHash< QString, ACL > peerHash;
if( m_cache.contains( dbid ) )
peerHash = m_cache[dbid];
peerHash["global"] = globalType;
m_cache[dbid] = peerHash;
}
ACLSystem::ACL
ACLSystem::isAuthorizedPath( const QString& dbid, const QString& path )
{
QMutexLocker locker( &m_cacheMutex );
if( !m_cache.contains( dbid ) )
return ACLSystem::NotFound;
QHash< QString, ACL > peerHash = m_cache[dbid];
if( !peerHash.contains( path ) )
{
if( peerHash.contains( "global" ) )
return peerHash["global"];
else
return ACLSystem::Deny;
}
return peerHash[path];
}
void
ACLSystem::authorizePath( const QString& dbid, const QString& path, ACLSystem::ACL type )
{
TomahawkSettings *s = TomahawkSettings::instance();
if( !s->scannerPaths().contains( path ) )
{
qDebug() << "path selected is not in our scanner path!";
return;
}
QMutexLocker locker( &m_cacheMutex );
QHash< QString, ACLSystem::ACL > peerHash;
if ( m_cache.contains( dbid ) )
peerHash = m_cache[dbid];
peerHash[path] = type;
m_cache[dbid] = peerHash;
}
void
ACLSystem::saveTimerFired()
{
QStringList saveCache;
foreach( QString dbid, m_cache.keys() )
{
foreach( QString path, m_cache[dbid].keys() )
saveCache << dbid << path << QString::number( (int)(m_cache[dbid][path]) );
}
TomahawkSettings::instance()->setAclEntries( saveCache );
}

View File

@@ -0,0 +1,64 @@
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
*
* Copyright 2010-2011, Christian Muehlhaeuser <muesli@tomahawk-player.org>
*
* Tomahawk is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Tomahawk is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Tomahawk. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef TOMAHAWK_ACLSYSTEM_H
#define TOMAHAWK_ACLSYSTEM_H
#include <QObject>
#include <QString>
#include <QHash>
#include <QTimer>
#include <QMutex>
#include "dllmacro.h"
class DLLEXPORT ACLSystem : public QObject
{
Q_OBJECT
public:
static ACLSystem* instance();
enum ACL {
Allow = 0,
Deny = 1,
NotFound = 2
};
ACLSystem( QObject *parent = 0 );
~ACLSystem();
ACL isAuthorizedUser( const QString &dbid );
void authorizeUser( const QString &dbid, ACL globalType );
ACL isAuthorizedPath( const QString &dbid, const QString &path );
void authorizePath( const QString &dbid, const QString &path, ACL type );
private slots:
void saveTimerFired();
private:
QHash< QString, QHash< QString, ACL > > m_cache;
QTimer m_saveTimer;
QMutex m_cacheMutex;
static ACLSystem* s_instance;
};
#endif // TOMAHAWK_ACLSYSTEM_H

View File

@@ -1,5 +1,5 @@
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
*
*
* Copyright 2010-2011, Christian Muehlhaeuser <muesli@tomahawk-player.org>
*
* Tomahawk is free software: you can redistribute it and/or modify
@@ -93,7 +93,7 @@ Album::tracks()
cmd->setAlbum( this );
cmd->setSortOrder( DatabaseCommand_AllTracks::AlbumPosition );
connect( cmd, SIGNAL( tracks( QList<Tomahawk::query_ptr> ) ),
connect( cmd, SIGNAL( tracks( QList<Tomahawk::query_ptr>, QVariant ) ),
SLOT( onTracksAdded( QList<Tomahawk::query_ptr> ) ) );
Database::instance()->enqueue( QSharedPointer<DatabaseCommand>( cmd ) );

View File

@@ -58,7 +58,7 @@ public:
virtual void setRepeatMode( PlaylistInterface::RepeatMode ) {}
virtual void setShuffled( bool ) {}
virtual void setFilter( const QString& pattern ) {}
virtual void setFilter( const QString& /*pattern*/ ) {}
signals:
void repeatModeChanged( PlaylistInterface::RepeatMode mode );

View File

@@ -1,5 +1,5 @@
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
*
*
* Copyright 2010-2011, Christian Muehlhaeuser <muesli@tomahawk-player.org>
*
* Tomahawk is free software: you can redistribute it and/or modify
@@ -95,7 +95,7 @@ Artist::tracks()
cmd->setArtist( this );
cmd->setSortOrder( DatabaseCommand_AllTracks::Album );
connect( cmd, SIGNAL( tracks( QList<Tomahawk::query_ptr> ) ),
connect( cmd, SIGNAL( tracks( QList<Tomahawk::query_ptr>, QVariant ) ),
SLOT( onTracksAdded( QList<Tomahawk::query_ptr> ) ) );
Database::instance()->enqueue( QSharedPointer<DatabaseCommand>( cmd ) );

View File

@@ -58,7 +58,7 @@ public:
virtual void setRepeatMode( PlaylistInterface::RepeatMode ) {}
virtual void setShuffled( bool ) {}
virtual void setFilter( const QString& pattern ) {}
virtual void setFilter( const QString& /*pattern*/ ) {}
signals:
void repeatModeChanged( PlaylistInterface::RepeatMode mode );

View File

@@ -1,5 +1,5 @@
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
*
*
* Copyright 2010-2011, Christian Muehlhaeuser <muesli@tomahawk-player.org>
*
* Tomahawk is free software: you can redistribute it and/or modify
@@ -19,7 +19,6 @@
#include "audioengine.h"
#include <QUrl>
#include <QMutexLocker>
#include "playlistinterface.h"
@@ -27,14 +26,6 @@
#include "database/databasecommand_logplayback.h"
#include "network/servent.h"
#include "madtranscode.h"
#ifndef NO_OGG
#include "vorbistranscode.h"
#endif
#ifndef NO_FLAC
#include "flactranscode.h"
#endif
AudioEngine* AudioEngine::s_instance = 0;
@@ -46,49 +37,48 @@ AudioEngine::instance()
AudioEngine::AudioEngine()
: QThread()
: QObject()
, m_isPlayingHttp( false )
, m_playlist( 0 )
, m_currentTrackPlaylist( 0 )
, m_queue( 0 )
, m_timeElapsed( 0 )
, m_i( 0 )
, m_expectStop( false )
{
s_instance = this;
qDebug() << "Init AudioEngine";
moveToThread( this );
qRegisterMetaType< AudioErrorCode >("AudioErrorCode");
#ifdef Q_WS_X11
m_audio = new AlsaPlayback();
#else
m_audio = new RTAudioOutput();
#endif
connect( m_audio, SIGNAL( timeElapsed( unsigned int ) ), SLOT( timerTriggered( unsigned int ) ), Qt::DirectConnection );
m_mediaObject = new Phonon::MediaObject( this );
m_audioOutput = new Phonon::AudioOutput( Phonon::MusicCategory, this );
Phonon::createPath( m_mediaObject, m_audioOutput );
start();
m_mediaObject->setTickInterval( 150 );
connect( m_mediaObject, SIGNAL( stateChanged( Phonon::State, Phonon::State ) ), SLOT( onStateChanged( Phonon::State, Phonon::State ) ) );
connect( m_mediaObject, SIGNAL( tick( qint64 ) ), SLOT( timerTriggered( qint64 ) ) );
}
AudioEngine::~AudioEngine()
{
qDebug() << Q_FUNC_INFO << "waiting for event loop to finish...";
quit();
wait( 1000 );
qDebug() << Q_FUNC_INFO;
m_input.clear();
delete m_audio;
m_mediaObject->stop();
// stop();
delete m_audioOutput;
delete m_mediaObject;
}
void
AudioEngine::playPause()
{
if( m_audio->isPlaying() )
if ( isPlaying() )
pause();
else
play();
}
@@ -97,10 +87,9 @@ AudioEngine::play()
{
qDebug() << Q_FUNC_INFO;
if ( m_audio->isPaused() )
if ( isPaused() )
{
QMutexLocker lock( &m_mutex );
m_audio->resume();
m_mediaObject->play();
emit resumed();
}
else
@@ -112,9 +101,8 @@ void
AudioEngine::pause()
{
qDebug() << Q_FUNC_INFO;
QMutexLocker lock( &m_mutex );
m_audio->pause();
m_mediaObject->pause();
emit paused();
}
@@ -123,18 +111,9 @@ void
AudioEngine::stop()
{
qDebug() << Q_FUNC_INFO;
QMutexLocker lock( &m_mutex );
if ( !m_input.isNull() )
{
m_input->close();
m_input.clear();
}
if ( !m_transcode.isNull() )
m_transcode->clearBuffers();
m_audio->stopPlayback();
m_expectStop = true;
m_mediaObject->stop();
setCurrentTrack( Tomahawk::result_ptr() );
emit stopped();
@@ -145,7 +124,6 @@ void
AudioEngine::previous()
{
qDebug() << Q_FUNC_INFO;
clearBuffers();
loadPreviousTrack();
}
@@ -154,19 +132,28 @@ void
AudioEngine::next()
{
qDebug() << Q_FUNC_INFO;
clearBuffers();
loadNextTrack();
}
void
AudioEngine::seek( int ms )
{
if ( isPlaying() || isPaused() )
{
qDebug() << Q_FUNC_INFO << ms;
m_mediaObject->seek( ms );
}
}
void
AudioEngine::setVolume( int percentage )
{
//qDebug() << Q_FUNC_INFO;
percentage = qBound( 0, percentage, 100 );
m_audio->setVolume( percentage );
m_audioOutput->setVolume( (qreal)percentage / 100.0 );
emit volumeChanged( percentage );
}
@@ -179,13 +166,9 @@ AudioEngine::mute()
void
AudioEngine::onTrackAboutToClose()
AudioEngine::onTrackAboutToFinish()
{
qDebug() << Q_FUNC_INFO;
// the only way the iodev we are reading from closes itself, is if
// there was a failure, usually network went away.
// but we might as well play the remaining data we received
// stop();
}
@@ -195,9 +178,7 @@ AudioEngine::loadTrack( const Tomahawk::result_ptr& result )
qDebug() << Q_FUNC_INFO << thread() << result;
bool err = false;
// in a separate scope due to the QMutexLocker!
{
QMutexLocker lock( &m_mutex );
QSharedPointer<QIODevice> io;
if ( result.isNull() )
@@ -205,22 +186,17 @@ AudioEngine::loadTrack( const Tomahawk::result_ptr& result )
else
{
setCurrentTrack( result );
io = Servent::instance()->getIODeviceForUrl( m_currentTrack );
if ( m_currentTrack->url().startsWith( "http://" ) )
{
m_readReady = false;
connect( io.data(), SIGNAL( downloadProgress( qint64, qint64 ) ), SLOT( onDownloadProgress( qint64, qint64 ) ) );
}
else
m_readReady = true;
if ( !io || io.isNull() )
if ( !isHttpResult( m_currentTrack->url() ) && !isLocalResult( m_currentTrack->url() ) )
{
qDebug() << "Error getting iodevice for item";
err = true;
io = Servent::instance()->getIODeviceForUrl( m_currentTrack );
if ( !io || io.isNull() )
{
qDebug() << "Error getting iodevice for item";
err = true;
}
}
else
connect( io.data(), SIGNAL( aboutToClose() ), SLOT( onTrackAboutToClose() ), Qt::DirectConnection );
}
if ( !err )
@@ -228,50 +204,42 @@ AudioEngine::loadTrack( const Tomahawk::result_ptr& result )
qDebug() << "Starting new song from url:" << m_currentTrack->url();
emit loading( m_currentTrack );
if ( !m_input.isNull() )
if ( !m_input.isNull() || m_isPlayingHttp )
{
m_input->close();
m_input.clear();
if ( !m_input.isNull() )
{
m_input->close();
m_input.clear();
}
m_expectStop = true;
}
if ( m_lastTrack.isNull() || ( m_currentTrack->mimetype() != m_lastTrack->mimetype() ) )
if ( !isHttpResult( m_currentTrack->url() ) && !isLocalResult( m_currentTrack->url() ) )
{
if ( !m_transcode.isNull() )
m_mediaObject->setCurrentSource( io.data() );
m_mediaObject->currentSource().setAutoDelete( false );
m_isPlayingHttp = false;
}
else
{
QUrl furl = m_currentTrack->url();
if ( m_currentTrack->url().contains( "?" ) )
{
m_transcode.clear();
furl = QUrl( m_currentTrack->url().left( m_currentTrack->url().indexOf( '?' ) ) );
furl.setEncodedQuery( QString( m_currentTrack->url().mid( m_currentTrack->url().indexOf( '?' ) + 1 ) ).toLocal8Bit() );
}
if ( m_currentTrack->mimetype() == "audio/mpeg" )
{
m_transcode = QSharedPointer<TranscodeInterface>(new MADTranscode());
}
#ifndef NO_OGG
else if ( m_currentTrack->mimetype() == "application/ogg" )
{
m_transcode = QSharedPointer<TranscodeInterface>(new VorbisTranscode());
}
#endif
#ifndef NO_FLAC
else if ( m_currentTrack->mimetype() == "audio/flac" )
{
m_transcode = QSharedPointer<TranscodeInterface>(new FLACTranscode());
}
#endif
else
qDebug() << "Could NOT find suitable transcoder! Stopping audio.";
if ( !m_transcode.isNull() )
connect( m_transcode.data(), SIGNAL( streamInitialized( long, int ) ), SLOT( setStreamData( long, int ) ), Qt::DirectConnection );
m_mediaObject->setCurrentSource( furl );
m_mediaObject->currentSource().setAutoDelete( true );
m_isPlayingHttp = true;
}
if ( !m_transcode.isNull() )
{
m_transcode->clearBuffers();
m_input = io;
m_input = io;
m_mediaObject->play();
emit started( m_currentTrack );
if ( m_audio->isPaused() )
m_audio->resume();
}
DatabaseCommand_LogPlayback* cmd = new DatabaseCommand_LogPlayback( m_currentTrack, DatabaseCommand_LogPlayback::Started );
Database::instance()->enqueue( QSharedPointer<DatabaseCommand>(cmd) );
}
}
@@ -281,17 +249,9 @@ AudioEngine::loadTrack( const Tomahawk::result_ptr& result )
return false;
}
// needs to be out of the mutexlocker scope
if ( m_transcode.isNull() )
{
stop();
emit error( AudioEngine::DecodeError );
}
return !m_transcode.isNull();
return true;
}
void
AudioEngine::loadPreviousTrack()
{
@@ -340,8 +300,6 @@ AudioEngine::playItem( PlaylistInterface* playlist, const Tomahawk::result_ptr&
{
qDebug() << Q_FUNC_INFO;
clearBuffers();
setPlaylist( playlist );
m_currentTrackPlaylist = playlist;
@@ -350,54 +308,58 @@ AudioEngine::playItem( PlaylistInterface* playlist, const Tomahawk::result_ptr&
void
AudioEngine::setStreamData( long sampleRate, int channels )
AudioEngine::onStateChanged( Phonon::State newState, Phonon::State oldState )
{
qDebug() << Q_FUNC_INFO << sampleRate << channels << thread();
qDebug() << Q_FUNC_INFO << oldState << newState;
if ( sampleRate < 44100 )
sampleRate = 44100;
m_audio->initAudio( sampleRate, channels );
if ( m_audio->startPlayback() )
if ( newState == Phonon::ErrorState )
{
emit started( m_currentTrack );
DatabaseCommand_LogPlayback* cmd = new DatabaseCommand_LogPlayback( m_currentTrack, DatabaseCommand_LogPlayback::Started );
Database::instance()->enqueue( QSharedPointer<DatabaseCommand>(cmd) );
qDebug() << "Phonon Error:" << m_mediaObject->errorString() << m_mediaObject->errorType();
}
else
if ( oldState == Phonon::PlayingState && newState == Phonon::StoppedState )
{
qDebug() << "Can't open device for audio output!";
stop();
emit error( AudioEngine::AudioDeviceError );
qDebug() << "Expecting stop?" << m_expectStop;
if ( !m_expectStop )
{
qDebug() << "Loading next track.";
m_expectStop = false;
loadNextTrack();
}
}
else if ( oldState == Phonon::PlayingState && newState == Phonon::PausedState )
{
qDebug() << m_mediaObject->currentTime() << m_mediaObject->totalTime();
if ( m_mediaObject->currentTime() == m_mediaObject->totalTime() )
{
qDebug() << "Loading next track.";
m_expectStop = false;
loadNextTrack();
}
}
qDebug() << Q_FUNC_INFO << sampleRate << channels << "done";
m_expectStop = false;
}
void
AudioEngine::timerTriggered( unsigned int seconds )
AudioEngine::timerTriggered( qint64 time )
{
m_timeElapsed = seconds;
emit timerSeconds( seconds );
if ( m_currentTrack->duration() == 0 )
if ( m_timeElapsed != time / 1000 )
{
emit timerPercentage( 0 );
}
else
{
emit timerPercentage( (unsigned int)( seconds / m_currentTrack->duration() ) );
}
}
m_timeElapsed = time / 1000;
emit timerSeconds( m_timeElapsed );
if ( m_currentTrack->duration() == 0 )
{
emit timerPercentage( 0 );
}
else
{
emit timerPercentage( ( (double)m_timeElapsed / (double)m_currentTrack->duration() ) * 100.0 );
}
}
void
AudioEngine::clearBuffers()
{
QMutexLocker lock( &m_mutex );
m_audio->clearBuffers();
emit timerMilliSeconds( time );
}
@@ -425,95 +387,15 @@ AudioEngine::setCurrentTrack( const Tomahawk::result_ptr& result )
}
void
AudioEngine::onDownloadProgress( qint64 recv, qint64 total )
bool
AudioEngine::isHttpResult( const QString& url ) const
{
if ( ( recv > 1024 * 32 ) || recv > total )
m_readReady = true;
return url.startsWith( "http://" );
}
void
AudioEngine::run()
bool
AudioEngine::isLocalResult( const QString& url ) const
{
QTimer::singleShot( 0, this, SLOT( engineLoop() ) );
exec();
qDebug() << "AudioEngine event loop stopped";
}
void
AudioEngine::engineLoop()
{
qDebug() << "AudioEngine thread:" << this->thread();
loop();
}
void
AudioEngine::loop()
{
m_i++;
//if( m_i % 500 == 0 ) qDebug() << Q_FUNC_INFO << thread();
{
QMutexLocker lock( &m_mutex );
/* if ( m_i % 200 == 0 )
{
if ( !m_input.isNull() )
qDebug() << "Outer audio loop" << m_input->bytesAvailable() << m_audio->needData();
}*/
if ( m_i % 10 == 0 && m_audio->isPlaying() )
m_audio->triggerTimers();
if( !m_transcode.isNull() &&
!m_input.isNull() &&
m_input->bytesAvailable() &&
m_audio->needData() &&
!m_audio->isPaused() )
{
//if ( m_i % 50 == 0 )
// qDebug() << "Inner audio loop";
if ( m_transcode->needData() > 0 )
{
QByteArray encdata = m_input->read( m_transcode->preferredDataSize() );
m_transcode->processData( encdata, m_input->atEnd() );
}
if ( m_transcode->haveData() )
{
QByteArray rawdata = m_transcode->data();
m_audio->processData( rawdata );
}
QTimer::singleShot( 0, this, SLOT( loop() ) );
return;
}
}
unsigned int nextdelay = 50;
// are we cleanly at the end of a track, and ready for the next one?
if ( !m_input.isNull() &&
m_input->atEnd() &&
m_readReady &&
!m_input->bytesAvailable() &&
!m_audio->haveData() &&
!m_audio->isPaused() )
{
qDebug() << "Starting next track then";
loadNextTrack();
// will need data immediately:
nextdelay = 0;
}
else if ( !m_input.isNull() && !m_input->isOpen() )
{
qDebug() << "AudioEngine IODev closed. errorString:" << m_input->errorString();
loadNextTrack();
nextdelay = 0;
}
QTimer::singleShot( nextdelay, this, SLOT( loop() ) );
return url.startsWith( "file://" );
}

View File

@@ -1,5 +1,5 @@
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
*
*
* Copyright 2010-2011, Christian Muehlhaeuser <muesli@tomahawk-player.org>
*
* Tomahawk is free software: you can redistribute it and/or modify
@@ -19,24 +19,21 @@
#ifndef AUDIOENGINE_H
#define AUDIOENGINE_H
#include <QThread>
#include <QMutex>
#include <QBuffer>
#include <QObject>
#include <phonon/MediaObject>
#include <phonon/AudioOutput>
#include "result.h"
#include "typedefs.h"
#include "rtaudiooutput.h"
#include "alsaplayback.h"
#include "transcodeinterface.h"
#include "dllmacro.h"
#define AUDIO_VOLUME_STEP 5
class PlaylistInterface;
class DLLEXPORT AudioEngine : public QThread
class DLLEXPORT AudioEngine : public QObject
{
Q_OBJECT
@@ -48,10 +45,10 @@ public:
explicit AudioEngine();
~AudioEngine();
unsigned int volume() const { if ( m_audio ) return m_audio->volume() * 100.0; else return 0; }; // in percent
bool isPaused() const { return m_audio->isPaused(); }
bool isPlaying() const { return m_audio->isPlaying(); }
unsigned int volume() const { return m_audioOutput->volume() * 100.0; } // in percent
bool isPlaying() const { return m_mediaObject->state() == Phonon::PlayingState; }
bool isPaused() const { return m_mediaObject->state() == Phonon::PausedState; }
/* Returns the PlaylistInterface of the currently playing track. Note: This might be different to the current playlist! */
PlaylistInterface* currentTrackPlaylist() const { return m_currentTrackPlaylist; }
@@ -67,6 +64,7 @@ public slots:
void previous();
void next();
void seek( int ms );
void setVolume( int percentage );
void lowerVolume() { setVolume( volume() - AUDIO_VOLUME_STEP ); }
void raiseVolume() { setVolume( volume() + AUDIO_VOLUME_STEP ); }
@@ -77,7 +75,7 @@ public slots:
void setPlaylist( PlaylistInterface* playlist );
void setQueue( PlaylistInterface* queue ) { m_queue = queue; }
void onTrackAboutToClose();
void onTrackAboutToFinish();
signals:
void loading( const Tomahawk::result_ptr& track );
@@ -89,6 +87,7 @@ signals:
void volumeChanged( int volume /* in percent */ );
void timerMilliSeconds( qint64 msElapsed );
void timerSeconds( unsigned int secondsElapsed );
void timerPercentage( unsigned int percentage );
@@ -101,39 +100,29 @@ private slots:
void loadPreviousTrack();
void loadNextTrack();
void onDownloadProgress( qint64 recv, qint64 total );
void setStreamData( long sampleRate, int channels );
void timerTriggered( unsigned int seconds );
void engineLoop();
void loop();
void onStateChanged( Phonon::State newState, Phonon::State oldState );
void timerTriggered( qint64 time );
void setCurrentTrack( const Tomahawk::result_ptr& result );
private:
void run();
void clearBuffers();
bool isHttpResult( const QString& ) const;
bool isLocalResult( const QString& ) const;
bool m_isPlayingHttp;
QSharedPointer<QIODevice> m_input;
QSharedPointer<TranscodeInterface> m_transcode;
#ifdef Q_WS_X11
AlsaPlayback* m_audio;
#else
RTAudioOutput* m_audio;
#endif
Tomahawk::result_ptr m_currentTrack;
Tomahawk::result_ptr m_lastTrack;
PlaylistInterface* m_playlist;
PlaylistInterface* m_currentTrackPlaylist;
PlaylistInterface* m_queue;
QMutex m_mutex;
bool m_readReady;
Phonon::MediaObject* m_mediaObject;
Phonon::AudioOutput* m_audioOutput;
unsigned int m_timeElapsed;
int m_i;
bool m_expectStop;
static AudioEngine* s_instance;
};

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