Compare commits
1 Commits
0.5.0
...
twitterfix
Author | SHA1 | Date | |
---|---|---|---|
|
37ca79aa61 |
@@ -12,8 +12,8 @@ SET( TOMAHAWK_APPLICATION_NAME "Tomahawk" )
|
||||
SET( TOMAHAWK_DESCRIPTION_SUMMARY "The social media player" )
|
||||
|
||||
SET( TOMAHAWK_VERSION_MAJOR 0 )
|
||||
SET( TOMAHAWK_VERSION_MINOR 5 )
|
||||
SET( TOMAHAWK_VERSION_PATCH 0 )
|
||||
SET( TOMAHAWK_VERSION_MINOR 4 )
|
||||
SET( TOMAHAWK_VERSION_PATCH 99 )
|
||||
|
||||
#SET( TOMAHAWK_VERSION_RC 0 )
|
||||
|
||||
@@ -25,7 +25,6 @@ option(BUILD_GUI "Build Tomahawk with GUI" ON)
|
||||
option(BUILD_RELEASE "Generate TOMAHAWK_VERSION without GIT info" OFF)
|
||||
option(WITH_BREAKPAD "Build with breakpad integration" ON)
|
||||
option(WITH_CRASHREPORTER "Build with CrashReporter" ON)
|
||||
option(WITH_BINARY_ATTICA "Enable support for downloading binary resolvers automatically" ON)
|
||||
option(LEGACY_KDE_INTEGRATION "Install tomahawk.protocol file, deprecated since 4.6.0" OFF)
|
||||
|
||||
IF( CMAKE_SYSTEM_PROCESSOR MATCHES "arm" )
|
||||
@@ -69,7 +68,7 @@ SET( CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" )
|
||||
SET( CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" )
|
||||
|
||||
# make predefined install dirs available everywhere
|
||||
INCLUDE( GNUInstallDirs )
|
||||
INCLUDE(GNUInstallDirs)
|
||||
|
||||
# installer creation
|
||||
INCLUDE( TomahawkCPack.cmake )
|
||||
@@ -101,8 +100,8 @@ if(PHONON_FOUND)
|
||||
message(STATUS "Phonon found; ensure that phonon-vlc is at least 0.4")
|
||||
endif()
|
||||
|
||||
macro_optional_find_package(LibEchonest 1.2.1)
|
||||
macro_log_feature(LIBECHONEST_FOUND "Echonest" "Qt library for communicating with The Echo Nest" "http://projects.kde.org/libechonest" TRUE "" "libechonest 1.2.1 is needed for dynamic playlists and the infosystem")
|
||||
macro_optional_find_package(LibEchonest 1.1.10)
|
||||
macro_log_feature(LIBECHONEST_FOUND "Echonest" "Qt library for communicating with The Echo Nest" "http://projects.kde.org/libechonest" TRUE "" "libechonest 1.1.10 is needed for dynamic playlists and the infosystem")
|
||||
|
||||
macro_optional_find_package(CLucene 0.9.23)
|
||||
macro_log_feature(CLucene_FOUND "CLucene" "The open-source, C++ search engine" "http://clucene.sf.net" TRUE "" "CLucene is used for indexing the collection")
|
||||
@@ -121,7 +120,7 @@ macro_log_feature(Boost_FOUND "Boost" "Provides free peer-reviewed portable C++
|
||||
macro_optional_find_package(QCA2)
|
||||
macro_log_feature(QCA2_FOUND "QCA2" "Provides encryption and signing functions required for Grooveshark resolver" "http://delta.affinix.com/qca/" FALSE "" "")
|
||||
|
||||
macro_optional_find_package(LibAttica 0.4.0)
|
||||
macro_optional_find_package(LibAttica)
|
||||
macro_log_feature(LIBATTICA_FOUND "libattica" "Provides support for automatic fetching and managing of resolvers from the tomahawk website" "https://projects.kde.org/projects/kdesupport/attica" TRUE "" "")
|
||||
|
||||
macro_optional_find_package(QuaZip)
|
||||
@@ -133,8 +132,11 @@ macro_log_feature(JREEN_FOUND "Jreen" "Qt XMPP Library" "http://qutim.org/jreen
|
||||
macro_optional_find_package(QTweetLib)
|
||||
macro_log_feature(QTWEETLIB_FOUND "QTweetLib" "Qt Twitter Library" "https://github.com/minimoog/QTweetLib" FALSE "" "QTweetLib is needed for the Twitter SIP plugin.\n")
|
||||
|
||||
macro_optional_find_package(LibLastFm 1.0.0)
|
||||
macro_log_feature(LIBLASTFM_FOUND "liblastfm" "Qt library for the Last.fm webservices" "https://github.com/eartle/liblastfm" TRUE "" "liblastfm is needed for scrobbling tracks to Last.fm and fetching cover artwork")
|
||||
# required
|
||||
#While we distribute our own liblastfm2, don't need to look for it
|
||||
#macro_optional_find_package(LibLastFm 0.3.3)
|
||||
#macro_log_feature(LIBLASTFM_FOUND "LastFm" "Qt library for the Last.fm webservices" "https://github.com/mxcl/liblastfm" FALSE "" "liblastfm is needed for scrobbling tracks to Last.fm and fetching cover artwork")
|
||||
set(LIBLASTFM_FOUND true)
|
||||
|
||||
#### submodules start
|
||||
# automatically init submodules here, don't delete this code we may add submodules again
|
||||
|
23
CMakeModules/FindGloox.cmake
Normal file
@@ -0,0 +1,23 @@
|
||||
# - Try to find GLOOX
|
||||
# Find GLOOX headers, libraries and the answer to all questions.
|
||||
#
|
||||
# GLOOX_FOUND True if gloox got found
|
||||
# GLOOX_INCLUDE_DIR Location of gloox headers
|
||||
# GLOOX_LIBRARIES List of libaries to use gloox
|
||||
#
|
||||
# Copyright (c) 2009 Nigmatullin Ruslan <euroelessar@gmail.com>
|
||||
#
|
||||
# Redistribution and use is allowed according to the terms of the New
|
||||
# BSD license.
|
||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||
#
|
||||
|
||||
FIND_PATH( GLOOX_INCLUDE_DIR "gloox/gloox.h" )
|
||||
FIND_LIBRARY( GLOOX_LIBRARIES gloox )
|
||||
|
||||
if( GLOOX_LIBRARIES AND GLOOX_INCLUDE_DIR )
|
||||
message( STATUS "Found gloox: ${GLOOX_LIBRARIES}" )
|
||||
set( GLOOX_FOUND 1 )
|
||||
else( GLOOX_LIBRARIES AND GLOOX_INCLUDE_DIR )
|
||||
message( STATUS "Could NOT find gloox" )
|
||||
endif( GLOOX_LIBRARIES AND GLOOX_INCLUDE_DIR )
|
@@ -30,6 +30,7 @@ ENDIF()
|
||||
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Jreen
|
||||
REQUIRED_VARS JREEN_LIBRARIES JREEN_INCLUDE_DIR)
|
||||
REQUIRED_VARS JREEN_LIBRARIES JREEN_INCLUDE_DIR
|
||||
VERSION_VAR PC_JREEN_VERSION)
|
||||
|
||||
MARK_AS_ADVANCED(JREEN_INCLUDE_DIR JREEN_LIBRARIES)
|
||||
|
@@ -1,34 +1,42 @@
|
||||
# - Try to find LibLastFm
|
||||
#
|
||||
# LIBLASTFM_FOUND - system has liblastfm
|
||||
# LIBLASTFM_INCLUDE_DIRS - the liblastfm include directories
|
||||
# LIBLASTFM_LIBRARIES - link these to use liblastfm
|
||||
#
|
||||
# (c) Dominik Schmidt <dev@dominik-schmidt.de>
|
||||
#
|
||||
# - Find LibLastFM
|
||||
# Find the liblastfm includes and the liblastfm libraries
|
||||
# This module defines
|
||||
# LIBLASTFM_INCLUDE_DIR, root lastfm include dir
|
||||
# LIBLASTFM_LIBRARY, the path to liblastfm
|
||||
# LIBLASTFM_FOUND, whether liblastfm was found
|
||||
|
||||
# Dependencies
|
||||
if(NOT QT4_FOUND)
|
||||
find_package(Qt4 REQUIRED)
|
||||
endif()
|
||||
|
||||
# Include dir
|
||||
find_path(LIBLASTFM_INCLUDE_DIR
|
||||
# Track.h doesn't exist in liblastfm-0.3.1, was called Track back then
|
||||
NAMES lastfm/Track.h
|
||||
PATHS ${KDE4_INCLUDE_DIR}
|
||||
find_path(LIBLASTFM_INCLUDE_DIR NAMES Audioscrobbler
|
||||
HINTS
|
||||
~/usr/include
|
||||
/opt/local/include
|
||||
/usr/local/include
|
||||
/usr/include
|
||||
/opt/kde4/include
|
||||
${KDE4_INCLUDE_DIR}
|
||||
PATH_SUFFIXES lastfm
|
||||
)
|
||||
|
||||
# Finally the library itself
|
||||
find_library(LIBLASTFM_LIBRARY
|
||||
NAMES lastfm
|
||||
PATHS ${KDE4_LIB_DIR}
|
||||
find_library( LIBLASTFM_LIBRARY NAMES lastfm
|
||||
PATHS
|
||||
~/usr/lib
|
||||
/opt/local/lib
|
||||
/usr/local/lib
|
||||
/usr/lib
|
||||
/usr/lib64
|
||||
/opt/kde4/lib
|
||||
${KDE4_LIB_DIR}
|
||||
)
|
||||
|
||||
set(LIBLASTFM_LIBRARIES ${LIBLASTFM_LIBRARY})
|
||||
set(LIBLASTFM_INCLUDE_DIRS ${LIBLASTFM_INCLUDE_DIR})
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(LibLastFm DEFAULT_MSG LIBLASTFM_LIBRARIES LIBLASTFM_INCLUDE_DIRS)
|
||||
if(LIBLASTFM_INCLUDE_DIR AND LIBLASTFM_LIBRARY)
|
||||
set(LIBLASTFM_FOUND TRUE)
|
||||
message(STATUS "Found liblastfm: ${LIBLASTFM_INCLUDE_DIR}, ${LIBLASTFM_LIBRARY}")
|
||||
else(LIBLASTFM_INCLUDE_DIR AND LIBLASTFM_LIBRARY)
|
||||
set(LIBLASTFM_FOUND FALSE)
|
||||
if (LIBLASTFM_FIND_REQUIRED)
|
||||
message(FATAL_ERROR "Could NOT find required package LibLastFm")
|
||||
endif(LIBLASTFM_FIND_REQUIRED)
|
||||
endif(LIBLASTFM_INCLUDE_DIR AND LIBLASTFM_LIBRARY)
|
||||
|
||||
mark_as_advanced(LIBLASTFM_LIBRARIES LIBLASTFM_INCLUDE_DIRS)
|
||||
mark_as_advanced(LIBLASTFM_INCLUDE_DIR LIBLASTFM_LIBRARY)
|
||||
|
@@ -278,6 +278,7 @@ Section "Tomahawk Player" SEC_TOMAHAWK_PLAYER
|
||||
|
||||
File "${INSTALL_PATH}\bin\libqxtweb-standalone.dll"
|
||||
File "${INSTALL_PATH}\bin\libtomahawk_portfwd.dll"
|
||||
File "${INSTALL_PATH}\bin\libtomahawk_lastfm2.dll"
|
||||
File "${INSTALL_PATH}\bin\libtomahawklib.dll"
|
||||
; plugins
|
||||
File "${INSTALL_PATH}\lib\libtomahawk_*_*.dll"
|
||||
@@ -292,6 +293,7 @@ Section "Tomahawk Player" SEC_TOMAHAWK_PLAYER
|
||||
File "${BUILD_PATH}\libtomahawklib.dll"
|
||||
File "${BUILD_PATH}\libqxtweb-standalone.dll"
|
||||
File "${BUILD_PATH}\libtomahawk_portfwd.dll"
|
||||
File "${BUILD_PATH}\libtomahawk_lastfm2.dll"
|
||||
; plugins
|
||||
File "${BUILD_PATH}\libtomahawk_*_*.dll"
|
||||
!endif
|
||||
@@ -349,7 +351,6 @@ Section "Tomahawk Player" SEC_TOMAHAWK_PLAYER
|
||||
File "${MING_BIN}\zlib1.dll"
|
||||
|
||||
File "${MING_BIN}\libechonest.dll"
|
||||
File "${MING_BIN}\liblastfm.dll"
|
||||
File "${MING_BIN}\libQTweetLib.dll"
|
||||
File "${MING_BIN}\libquazip.dll"
|
||||
|
||||
|
24
ChangeLog
@@ -1,28 +1,12 @@
|
||||
Version 0.5.0:
|
||||
* SOCKS5 proxy support improvements for resolvers and more.
|
||||
* Initial Access Control support, allowing users to define who is able to
|
||||
access and stream from their collection.
|
||||
* Priortize resolution of a track on double-click.
|
||||
* Spotify Resolver can now be easily installed on-demand from the settings.
|
||||
* You can now sync selected playlists (and updates) with Spotify.
|
||||
* Support .aiff (AIFF mimetype) files.
|
||||
* Cleaned up Diagnostics window.
|
||||
* You can tell Tomahawk to stop playback after a certain track finished.
|
||||
* Double-clicking a playlist name (in the sidebar) will start the playlist.
|
||||
* Added "Stop playback after this track" context menu items.
|
||||
* You can now import your entire Last.fm playback history into Tomahawk.
|
||||
* Fixed sorting of related artists.
|
||||
* Support for multimedia keys (Play, Pause, Next etc.) on Windows & Linux.
|
||||
* When listening privately scrobbling to Last.fm and Adium is now disabled.
|
||||
* When listening privately scrobbling to Last.fm is now disabled.
|
||||
* Added a toolbar with page back / forward buttons and the global search.
|
||||
* New grid-like view with direct playback controls.
|
||||
* You can now browse new releases (by genre).
|
||||
* Added social sharing widget, which allows you to tweet about a song.
|
||||
* Added a track page showing a song's similar tracks and statistics.
|
||||
* New grid view with direct playback controls.
|
||||
* Added a track page showing a song's lyrics and other similar tracks.
|
||||
* Separate Loved Tracks and Recently Played views per source.
|
||||
* Combine an artist's albums into a single aggregated view.
|
||||
* Added translations for Arabic, French, Bulgarian, Spanish and more.
|
||||
* Fixed XSPF auto-updating.
|
||||
* New Tomahawk logo and icon.
|
||||
|
||||
Version 0.4.2:
|
||||
* Fix ZeroConf protocol showing IP addresses instead of host names.
|
||||
|
10
README
@@ -17,7 +17,7 @@ Detailed building instructions for Ubuntu
|
||||
|
||||
Detailed building instructions for OS X
|
||||
---------------------------------------
|
||||
See: http://wiki.tomahawk-player.org/mediawiki/index.php/Building_OS_X_Application_Bundle_on_Snow_Leopard_(10.6)_and_Lion_(10.7)
|
||||
See: http://wiki.tomahawk-player.org/mediawiki/index.php/Building_OS_X_Application_Bundle_on_Snow_Leopard_(10.6)
|
||||
|
||||
Doxygen Documentation
|
||||
---------------------
|
||||
@@ -34,18 +34,18 @@ Dependencies
|
||||
TagLib 1.6.2 - http://developer.kde.org/~wheeler/taglib.html
|
||||
Boost 1.3 - http://www.boost.org/
|
||||
CLucene 0.9.23 (0.9.21 will fail) - http://clucene.sourceforge.net/download.shtml
|
||||
libechonest 1.2.1 - http://projects.kde.org/projects/playground/libs/libechonest/
|
||||
Attica 0.4.0 - ftp://ftp.kde.org/pub/kde/stable/attica/
|
||||
QuaZip 0.4.3 - http://quazip.sourceforge.net/
|
||||
libechonest 1.2.0 - http://projects.kde.org/projects/playground/libs/libechonest/
|
||||
|
||||
The following dependencies are optional, but recommended:
|
||||
|
||||
Attica 0.3.0 - ftp://ftp.kde.org/pub/kde/stable/attica/
|
||||
QuaZip 0.4.3 - http://quazip.sourceforge.net/
|
||||
Jreen 1.0.5 - http://qutim.org/jreen / https://github.com/euroelessar/jreen
|
||||
QTweetLib 0.5.0 - https://github.com/minimoog/QTweetLib
|
||||
liblastfm 1.0.1 - http://github.com/eartle/liblastfm/
|
||||
|
||||
Third party libraries that we ship with our source:
|
||||
|
||||
MiniUPnP 1.6 - http://miniupnp.free.fr/
|
||||
liblastfm 0.4.0 - http://github.com/jonocole/liblastfm/
|
||||
|
||||
Enjoy!
|
||||
|
@@ -18,7 +18,6 @@
|
||||
import os
|
||||
import re
|
||||
import subprocess
|
||||
import commands
|
||||
import sys
|
||||
|
||||
FRAMEWORK_SEARCH_PATH=[
|
||||
@@ -28,163 +27,161 @@ FRAMEWORK_SEARCH_PATH=[
|
||||
|
||||
LIBRARY_SEARCH_PATH=['/usr/local/lib', '/usr/local/Cellar/gettext/0.18.1.1/lib', '.']
|
||||
|
||||
LIBSPOTIFY_VERSION = commands.getoutput("brew ls -version libspotify | tr -s \" \" \"\\\\012\" | tail -n 1").strip()
|
||||
LIBSPOTIFY_PATH = "/usr/local/lib/libspotify.%s.dylib" % LIBSPOTIFY_VERSION
|
||||
|
||||
VLC_PLUGINS=[
|
||||
'libaccess_attachment_plugin.dylib',
|
||||
#'libaccess_avio_plugin.dylib',
|
||||
#'libaccess_fake_plugin.dylib',
|
||||
'libaccess_ftp_plugin.dylib',
|
||||
'libaccess_http_plugin.dylib',
|
||||
'libaccess_imem_plugin.dylib',
|
||||
#'libaccess_mmap_plugin.dylib',
|
||||
'libaccess_mms_plugin.dylib',
|
||||
'libaccess_realrtsp_plugin.dylib',
|
||||
'libaccess_tcp_plugin.dylib',
|
||||
'libaccess_udp_plugin.dylib',
|
||||
'libcdda_plugin.dylib',
|
||||
'libfilesystem_plugin.dylib',
|
||||
'libqtcapture_plugin.dylib',
|
||||
'librtp_plugin.dylib',
|
||||
'libzip_plugin.dylib',
|
||||
'libaccess_output_dummy_plugin.dylib',
|
||||
'libaccess_output_file_plugin.dylib',
|
||||
'libaccess_output_http_plugin.dylib',
|
||||
'libaccess_output_shout_plugin.dylib',
|
||||
'libaccess_output_udp_plugin.dylib',
|
||||
'liba52tofloat32_plugin.dylib',
|
||||
'liba52tospdif_plugin.dylib',
|
||||
'libaudio_format_plugin.dylib',
|
||||
'libaudiobargraph_a_plugin.dylib',
|
||||
'libchorus_flanger_plugin.dylib',
|
||||
'libconverter_fixed_plugin.dylib',
|
||||
'libdolby_surround_decoder_plugin.dylib',
|
||||
'libdtstofloat32_plugin.dylib',
|
||||
'libdtstospdif_plugin.dylib',
|
||||
'libequalizer_plugin.dylib',
|
||||
'libheadphone_channel_mixer_plugin.dylib',
|
||||
'libmono_plugin.dylib',
|
||||
'libmpgatofixed32_plugin.dylib',
|
||||
'libnormvol_plugin.dylib',
|
||||
'libparam_eq_plugin.dylib',
|
||||
'libscaletempo_plugin.dylib',
|
||||
'libsimple_channel_mixer_plugin.dylib',
|
||||
'libspatializer_plugin.dylib',
|
||||
'libtrivial_channel_mixer_plugin.dylib',
|
||||
'libugly_resampler_plugin.dylib',
|
||||
'libfloat32_mixer_plugin.dylib',
|
||||
#'libspdif_mixer_plugin.dylib',
|
||||
#'libtrivial_mixer_plugin.dylib',
|
||||
'libaout_file_plugin.dylib',
|
||||
'libauhal_plugin.dylib',
|
||||
'liba52_plugin.dylib',
|
||||
'libadpcm_plugin.dylib',
|
||||
'libaes3_plugin.dylib',
|
||||
'libaraw_plugin.dylib',
|
||||
'libavcodec_plugin.dylib',
|
||||
'libcc_plugin.dylib',
|
||||
'libcdg_plugin.dylib',
|
||||
'libdts_plugin.dylib',
|
||||
'libfaad_plugin.dylib',
|
||||
#'libfake_plugin.dylib',
|
||||
'libflac_plugin.dylib',
|
||||
'libfluidsynth_plugin.dylib',
|
||||
#'libinvmem_plugin.dylib',
|
||||
'liblpcm_plugin.dylib',
|
||||
'libmpeg_audio_plugin.dylib',
|
||||
'libpng_plugin.dylib',
|
||||
'librawvideo_plugin.dylib',
|
||||
'libspeex_plugin.dylib',
|
||||
'libspudec_plugin.dylib',
|
||||
'libtheora_plugin.dylib',
|
||||
'libtwolame_plugin.dylib',
|
||||
'libvorbis_plugin.dylib',
|
||||
'libgestures_plugin.dylib',
|
||||
'libhotkeys_plugin.dylib',
|
||||
'libmotion_plugin.dylib',
|
||||
'libnetsync_plugin.dylib',
|
||||
#'libsignals_plugin.dylib',
|
||||
'libaiff_plugin.dylib',
|
||||
'libasf_plugin.dylib',
|
||||
'libau_plugin.dylib',
|
||||
#'libavformat_plugin.dylib',
|
||||
'libavi_plugin.dylib',
|
||||
'libdemux_cdg_plugin.dylib',
|
||||
'libdemuxdump_plugin.dylib',
|
||||
'libdirac_plugin.dylib',
|
||||
'libes_plugin.dylib',
|
||||
'libflacsys_plugin.dylib',
|
||||
'liblive555_plugin.dylib',
|
||||
'libmkv_plugin.dylib',
|
||||
'libmod_plugin.dylib',
|
||||
'libmp4_plugin.dylib',
|
||||
'libmpc_plugin.dylib',
|
||||
'libmpgv_plugin.dylib',
|
||||
'libnsc_plugin.dylib',
|
||||
'libnsv_plugin.dylib',
|
||||
'libnuv_plugin.dylib',
|
||||
'libogg_plugin.dylib',
|
||||
'libplaylist_plugin.dylib',
|
||||
'libps_plugin.dylib',
|
||||
'libpva_plugin.dylib',
|
||||
'librawaud_plugin.dylib',
|
||||
'librawdv_plugin.dylib',
|
||||
'librawvid_plugin.dylib',
|
||||
'libreal_plugin.dylib',
|
||||
'libsmf_plugin.dylib',
|
||||
'libts_plugin.dylib',
|
||||
'libtta_plugin.dylib',
|
||||
'libty_plugin.dylib',
|
||||
'libvc1_plugin.dylib',
|
||||
'libvoc_plugin.dylib',
|
||||
'libwav_plugin.dylib',
|
||||
'libxa_plugin.dylib',
|
||||
'libfolder_plugin.dylib',
|
||||
'libtaglib_plugin.dylib',
|
||||
'libaudioscrobbler_plugin.dylib',
|
||||
'libdummy_plugin.dylib',
|
||||
'libexport_plugin.dylib',
|
||||
'libfreetype_plugin.dylib',
|
||||
'libgnutls_plugin.dylib',
|
||||
'liblogger_plugin.dylib',
|
||||
'liblua_plugin.dylib',
|
||||
'libosd_parser_plugin.dylib',
|
||||
'libquartztext_plugin.dylib',
|
||||
'libstats_plugin.dylib',
|
||||
'libvod_rtsp_plugin.dylib',
|
||||
'libxml_plugin.dylib',
|
||||
#'libxtag_plugin.dylib',
|
||||
'libi420_rgb_mmx_plugin.dylib',
|
||||
'libi420_yuy2_mmx_plugin.dylib',
|
||||
'libi422_yuy2_mmx_plugin.dylib',
|
||||
'libmemcpymmx_plugin.dylib',
|
||||
'libmemcpymmxext_plugin.dylib',
|
||||
'libmux_asf_plugin.dylib',
|
||||
'libmux_avi_plugin.dylib',
|
||||
'libmux_dummy_plugin.dylib',
|
||||
'libmux_mp4_plugin.dylib',
|
||||
'libmux_mpjpeg_plugin.dylib',
|
||||
'libmux_ogg_plugin.dylib',
|
||||
'libmux_ps_plugin.dylib',
|
||||
'libmux_ts_plugin.dylib',
|
||||
'libmux_wav_plugin.dylib',
|
||||
'libpacketizer_copy_plugin.dylib',
|
||||
'libpacketizer_dirac_plugin.dylib',
|
||||
'libpacketizer_flac_plugin.dylib',
|
||||
'libpacketizer_h264_plugin.dylib',
|
||||
'libpacketizer_mlp_plugin.dylib',
|
||||
'libpacketizer_mpeg4audio_plugin.dylib',
|
||||
'libpacketizer_mpeg4video_plugin.dylib',
|
||||
'libpacketizer_mpegvideo_plugin.dylib',
|
||||
'libpacketizer_vc1_plugin.dylib',
|
||||
'libi420_rgb_sse2_plugin.dylib',
|
||||
'libi420_yuy2_sse2_plugin.dylib',
|
||||
'libi422_yuy2_sse2_plugin.dylib',
|
||||
'libdecomp_plugin.dylib',
|
||||
'libstream_filter_rar_plugin.dylib',
|
||||
'libstream_filter_record_plugin.dylib',
|
||||
'libvisual_plugin.dylib',
|
||||
'access/libaccess_attachment_plugin.dylib',
|
||||
#'access/libaccess_avio_plugin.dylib',
|
||||
'access/libaccess_fake_plugin.dylib',
|
||||
'access/libaccess_ftp_plugin.dylib',
|
||||
'access/libaccess_http_plugin.dylib',
|
||||
'access/libaccess_imem_plugin.dylib',
|
||||
'access/libaccess_mmap_plugin.dylib',
|
||||
'access/libaccess_mms_plugin.dylib',
|
||||
'access/libaccess_realrtsp_plugin.dylib',
|
||||
'access/libaccess_tcp_plugin.dylib',
|
||||
'access/libaccess_udp_plugin.dylib',
|
||||
'access/libcdda_plugin.dylib',
|
||||
'access/libfilesystem_plugin.dylib',
|
||||
'access/libqtcapture_plugin.dylib',
|
||||
'access/librtp_plugin.dylib',
|
||||
'access/libzip_plugin.dylib',
|
||||
'access_output/libaccess_output_dummy_plugin.dylib',
|
||||
'access_output/libaccess_output_file_plugin.dylib',
|
||||
'access_output/libaccess_output_http_plugin.dylib',
|
||||
'access_output/libaccess_output_shout_plugin.dylib',
|
||||
'access_output/libaccess_output_udp_plugin.dylib',
|
||||
'audio_filter/liba52tofloat32_plugin.dylib',
|
||||
'audio_filter/liba52tospdif_plugin.dylib',
|
||||
'audio_filter/libaudio_format_plugin.dylib',
|
||||
'audio_filter/libaudiobargraph_a_plugin.dylib',
|
||||
'audio_filter/libchorus_flanger_plugin.dylib',
|
||||
'audio_filter/libconverter_fixed_plugin.dylib',
|
||||
'audio_filter/libdolby_surround_decoder_plugin.dylib',
|
||||
'audio_filter/libdtstofloat32_plugin.dylib',
|
||||
'audio_filter/libdtstospdif_plugin.dylib',
|
||||
'audio_filter/libequalizer_plugin.dylib',
|
||||
'audio_filter/libheadphone_channel_mixer_plugin.dylib',
|
||||
'audio_filter/libmono_plugin.dylib',
|
||||
'audio_filter/libmpgatofixed32_plugin.dylib',
|
||||
'audio_filter/libnormvol_plugin.dylib',
|
||||
'audio_filter/libparam_eq_plugin.dylib',
|
||||
'audio_filter/libscaletempo_plugin.dylib',
|
||||
'audio_filter/libsimple_channel_mixer_plugin.dylib',
|
||||
'audio_filter/libspatializer_plugin.dylib',
|
||||
'audio_filter/libtrivial_channel_mixer_plugin.dylib',
|
||||
'audio_filter/libugly_resampler_plugin.dylib',
|
||||
'audio_mixer/libfloat32_mixer_plugin.dylib',
|
||||
'audio_mixer/libspdif_mixer_plugin.dylib',
|
||||
'audio_mixer/libtrivial_mixer_plugin.dylib',
|
||||
'audio_output/libaout_file_plugin.dylib',
|
||||
'audio_output/libauhal_plugin.dylib',
|
||||
'codec/liba52_plugin.dylib',
|
||||
'codec/libadpcm_plugin.dylib',
|
||||
'codec/libaes3_plugin.dylib',
|
||||
'codec/libaraw_plugin.dylib',
|
||||
'codec/libavcodec_plugin.dylib',
|
||||
'codec/libcc_plugin.dylib',
|
||||
'codec/libcdg_plugin.dylib',
|
||||
'codec/libdts_plugin.dylib',
|
||||
'codec/libfaad_plugin.dylib',
|
||||
'codec/libfake_plugin.dylib',
|
||||
'codec/libflac_plugin.dylib',
|
||||
'codec/libfluidsynth_plugin.dylib',
|
||||
'codec/libinvmem_plugin.dylib',
|
||||
'codec/liblpcm_plugin.dylib',
|
||||
'codec/libmpeg_audio_plugin.dylib',
|
||||
'codec/libpng_plugin.dylib',
|
||||
'codec/librawvideo_plugin.dylib',
|
||||
'codec/libspeex_plugin.dylib',
|
||||
'codec/libspudec_plugin.dylib',
|
||||
'codec/libtheora_plugin.dylib',
|
||||
'codec/libtwolame_plugin.dylib',
|
||||
'codec/libvorbis_plugin.dylib',
|
||||
'control/libgestures_plugin.dylib',
|
||||
'control/libhotkeys_plugin.dylib',
|
||||
'control/libmotion_plugin.dylib',
|
||||
'control/libnetsync_plugin.dylib',
|
||||
'control/libsignals_plugin.dylib',
|
||||
'demux/libaiff_plugin.dylib',
|
||||
'demux/libasf_plugin.dylib',
|
||||
'demux/libau_plugin.dylib',
|
||||
#'demux/libavformat_plugin.dylib',
|
||||
'demux/libavi_plugin.dylib',
|
||||
'demux/libdemux_cdg_plugin.dylib',
|
||||
'demux/libdemuxdump_plugin.dylib',
|
||||
'demux/libdirac_plugin.dylib',
|
||||
'demux/libes_plugin.dylib',
|
||||
'demux/libflacsys_plugin.dylib',
|
||||
'demux/liblive555_plugin.dylib',
|
||||
'demux/libmkv_plugin.dylib',
|
||||
'demux/libmod_plugin.dylib',
|
||||
'demux/libmp4_plugin.dylib',
|
||||
'demux/libmpc_plugin.dylib',
|
||||
'demux/libmpgv_plugin.dylib',
|
||||
'demux/libnsc_plugin.dylib',
|
||||
'demux/libnsv_plugin.dylib',
|
||||
'demux/libnuv_plugin.dylib',
|
||||
'demux/libogg_plugin.dylib',
|
||||
'demux/libplaylist_plugin.dylib',
|
||||
'demux/libps_plugin.dylib',
|
||||
'demux/libpva_plugin.dylib',
|
||||
'demux/librawaud_plugin.dylib',
|
||||
'demux/librawdv_plugin.dylib',
|
||||
'demux/librawvid_plugin.dylib',
|
||||
'demux/libreal_plugin.dylib',
|
||||
'demux/libsmf_plugin.dylib',
|
||||
'demux/libts_plugin.dylib',
|
||||
'demux/libtta_plugin.dylib',
|
||||
'demux/libty_plugin.dylib',
|
||||
'demux/libvc1_plugin.dylib',
|
||||
'demux/libvoc_plugin.dylib',
|
||||
'demux/libwav_plugin.dylib',
|
||||
'demux/libxa_plugin.dylib',
|
||||
'meta_engine/libfolder_plugin.dylib',
|
||||
'meta_engine/libtaglib_plugin.dylib',
|
||||
'misc/libaudioscrobbler_plugin.dylib',
|
||||
'misc/libdummy_plugin.dylib',
|
||||
'misc/libexport_plugin.dylib',
|
||||
'misc/libfreetype_plugin.dylib',
|
||||
'misc/libgnutls_plugin.dylib',
|
||||
'misc/liblogger_plugin.dylib',
|
||||
'misc/liblua_plugin.dylib',
|
||||
'misc/libosd_parser_plugin.dylib',
|
||||
'misc/libquartztext_plugin.dylib',
|
||||
'misc/libstats_plugin.dylib',
|
||||
'misc/libvod_rtsp_plugin.dylib',
|
||||
'misc/libxml_plugin.dylib',
|
||||
'misc/libxtag_plugin.dylib',
|
||||
'mmx/libi420_rgb_mmx_plugin.dylib',
|
||||
'mmx/libi420_yuy2_mmx_plugin.dylib',
|
||||
'mmx/libi422_yuy2_mmx_plugin.dylib',
|
||||
'mmx/libmemcpymmx_plugin.dylib',
|
||||
'mmxext/libmemcpymmxext_plugin.dylib',
|
||||
'mux/libmux_asf_plugin.dylib',
|
||||
'mux/libmux_avi_plugin.dylib',
|
||||
'mux/libmux_dummy_plugin.dylib',
|
||||
'mux/libmux_mp4_plugin.dylib',
|
||||
'mux/libmux_mpjpeg_plugin.dylib',
|
||||
'mux/libmux_ogg_plugin.dylib',
|
||||
'mux/libmux_ps_plugin.dylib',
|
||||
'mux/libmux_ts_plugin.dylib',
|
||||
'mux/libmux_wav_plugin.dylib',
|
||||
'packetizer/libpacketizer_copy_plugin.dylib',
|
||||
'packetizer/libpacketizer_dirac_plugin.dylib',
|
||||
'packetizer/libpacketizer_flac_plugin.dylib',
|
||||
'packetizer/libpacketizer_h264_plugin.dylib',
|
||||
'packetizer/libpacketizer_mlp_plugin.dylib',
|
||||
'packetizer/libpacketizer_mpeg4audio_plugin.dylib',
|
||||
'packetizer/libpacketizer_mpeg4video_plugin.dylib',
|
||||
'packetizer/libpacketizer_mpegvideo_plugin.dylib',
|
||||
'packetizer/libpacketizer_vc1_plugin.dylib',
|
||||
'sse2/libi420_rgb_sse2_plugin.dylib',
|
||||
'sse2/libi420_yuy2_sse2_plugin.dylib',
|
||||
'sse2/libi422_yuy2_sse2_plugin.dylib',
|
||||
'stream_filter/libdecomp_plugin.dylib',
|
||||
'stream_filter/libstream_filter_rar_plugin.dylib',
|
||||
'stream_filter/libstream_filter_record_plugin.dylib',
|
||||
'visualization/libvisual_plugin.dylib',
|
||||
]
|
||||
|
||||
VLC_SEARCH_PATH=[
|
||||
@@ -206,20 +203,10 @@ TOMAHAWK_PLUGINS = [
|
||||
'libtomahawk_account_google.so',
|
||||
'libtomahawk_account_twitter.so',
|
||||
'libtomahawk_account_zeroconf.so',
|
||||
'libtomahawk_infoplugin_adium.so',
|
||||
'libtomahawk_infoplugin_charts.so',
|
||||
'libtomahawk_infoplugin_discogs.so',
|
||||
'libtomahawk_infoplugin_echonest.so',
|
||||
'libtomahawk_infoplugin_hypem.so',
|
||||
'libtomahawk_infoplugin_musicbrainz.so',
|
||||
'libtomahawk_infoplugin_musixmatch.so',
|
||||
'libtomahawk_infoplugin_newreleases.so',
|
||||
'libtomahawk_infoplugin_rovi.so',
|
||||
'libtomahawk_infoplugin_spotify.so',
|
||||
]
|
||||
|
||||
QT_PLUGINS_SEARCH_PATH=[
|
||||
'/usr/local/Cellar/qt/4.8.2/plugins',
|
||||
'/usr/local/Cellar/qt/4.7.4/plugins',
|
||||
]
|
||||
|
||||
|
||||
@@ -262,7 +249,7 @@ frameworks_dir = os.path.join(bundle_dir, 'Contents', 'Frameworks')
|
||||
commands.append(['mkdir', '-p', frameworks_dir])
|
||||
resources_dir = os.path.join(bundle_dir, 'Contents', 'Resources')
|
||||
commands.append(['mkdir', '-p', resources_dir])
|
||||
plugins_dir = os.path.join(bundle_dir, 'Contents', 'qt-plugins')
|
||||
plugins_dir = os.path.join(bundle_dir, 'Contents', 'PlugIns')
|
||||
binary = os.path.join(bundle_dir, 'Contents', 'MacOS', bundle_name)
|
||||
|
||||
fixed_libraries = []
|
||||
@@ -376,7 +363,8 @@ def FixVLCPlugin(abs_path, subdir):
|
||||
FixAllLibraries(broken_libs)
|
||||
|
||||
#print "Copying plugin....%s %s %s" % (plugins_dir, subdir, os.path.join(abs_path.split('/')[-2:]))
|
||||
new_path = os.path.join(plugins_dir, subdir, os.path.basename(abs_path))
|
||||
plugindir = abs_path.split('/')[-2]
|
||||
new_path = os.path.join(plugins_dir, subdir, plugindir, os.path.basename(abs_path))
|
||||
args = ['mkdir', '-p', os.path.dirname(new_path)]
|
||||
commands.append(args)
|
||||
args = ['ditto', '--arch=i386', '--arch=x86_64', abs_path, new_path]
|
||||
@@ -502,7 +490,7 @@ def FindVLCPlugin(name):
|
||||
FixBinary(binary)
|
||||
|
||||
for plugin in VLC_PLUGINS:
|
||||
FixVLCPlugin(FindVLCPlugin(plugin), '../plugins')
|
||||
FixVLCPlugin(FindVLCPlugin(plugin), '../Frameworks/vlc/plugins')
|
||||
|
||||
for plugin in TOMAHAWK_PLUGINS:
|
||||
FixPlugin(plugin, '../MacOS')
|
||||
@@ -512,11 +500,6 @@ try:
|
||||
except:
|
||||
print 'Failed to find tomahawk_crash_reporter'
|
||||
|
||||
try:
|
||||
FixPlugin(LIBSPOTIFY_PATH, "../Frameworks")
|
||||
except:
|
||||
print "Failed to copy libspotify from os: %s" % LIBSPOTIFY_PATH
|
||||
|
||||
for plugin in QT_PLUGINS:
|
||||
FixPlugin(FindQtPlugin(plugin), os.path.dirname(plugin))
|
||||
|
||||
|
@@ -1,2 +1,2 @@
|
||||
[Paths]
|
||||
Plugins = qt-plugins
|
||||
Plugins = PlugIns
|
||||
|
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 68 KiB |
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 260 KiB After Width: | Height: | Size: 45 KiB |
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 110 KiB |
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 6.9 KiB |
@@ -1,80 +1,304 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
version="1.1"
|
||||
id="Layer_1"
|
||||
x="0px"
|
||||
y="0px"
|
||||
width="606.2478"
|
||||
height="595.49866"
|
||||
viewBox="0 0 606.24779 595.49863"
|
||||
enable-background="new 0 0 841.89 595.28"
|
||||
xml:space="preserve"
|
||||
inkscape:version="0.48.2 r9819"
|
||||
sodipodi:docname="tomahawk-icon.svg"><metadata
|
||||
id="metadata15"><rdf:RDF><cc:Work
|
||||
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
|
||||
id="defs13" /><sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1440"
|
||||
inkscape:window-height="794"
|
||||
id="namedview11"
|
||||
showgrid="false"
|
||||
inkscape:zoom="1"
|
||||
inkscape:cx="431.12548"
|
||||
inkscape:cy="336.94553"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="Layer_1"
|
||||
inkscape:snap-page="false"
|
||||
fit-margin-top="0"
|
||||
fit-margin-left="0"
|
||||
fit-margin-right="0"
|
||||
fit-margin-bottom="0"><sodipodi:guide
|
||||
position="-3.5728101e-05,-1.501866e-05"
|
||||
orientation="0,841.89001"
|
||||
id="guide2994" /><sodipodi:guide
|
||||
position="841.88997,-1.501866e-05"
|
||||
orientation="-595.28003,0"
|
||||
id="guide2996" /><sodipodi:guide
|
||||
position="841.88997,595.28001"
|
||||
orientation="0,-841.89001"
|
||||
id="guide2998" /><sodipodi:guide
|
||||
position="-3.5728101e-05,595.28001"
|
||||
orientation="595.28003,0"
|
||||
id="guide3000" /></sodipodi:namedview>
|
||||
<g
|
||||
id="g3"
|
||||
transform="matrix(7.3080643,0,0,7.1790074,-2773.1692,-1839.0104)">
|
||||
<g
|
||||
id="g5">
|
||||
<path
|
||||
d="m 420.947,265.168 c -17.911,0 -32.477,14.565 -32.477,32.472 0,17.906 14.565,32.476 32.477,32.476 2.568,0 5.06,-0.318 7.459,-0.888 v -28.011 l -22.338,15.806 c -0.198,0.135 -0.444,0.213 -0.681,0.213 -0.184,0 -0.372,-0.039 -0.541,-0.136 -0.396,-0.202 -0.642,-0.608 -0.642,-1.043 v -37.053 c 0,-0.435 0.246,-0.845 0.642,-1.053 0.396,-0.193 0.864,-0.159 1.222,0.092 l 22.338,15.807 v -16.028 h 0.951 8.945 v 47.234 c 9.076,-5.764 15.121,-15.888 15.121,-27.417 10e-4,-17.905 -14.569,-32.471 -32.476,-32.471 z"
|
||||
id="path7"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:none" />
|
||||
<path
|
||||
d="m 420.947,256.165 c -22.874,0 -41.48,18.606 -41.48,41.475 0,22.87 18.606,41.475 41.48,41.475 22.869,0 41.476,-18.605 41.476,-41.475 0,-22.869 -18.607,-41.475 -41.476,-41.475 z m 17.356,68.892 v -47.234 h -8.945 -0.951 v 16.028 l -22.338,-15.807 c -0.357,-0.251 -0.826,-0.285 -1.222,-0.092 -0.396,0.208 -0.642,0.618 -0.642,1.053 v 37.053 c 0,0.435 0.246,0.841 0.642,1.043 0.169,0.097 0.357,0.136 0.541,0.136 0.236,0 0.482,-0.078 0.681,-0.213 l 22.338,-15.806 v 28.011 c -2.399,0.569 -4.891,0.888 -7.459,0.888 -17.911,0 -32.477,-14.57 -32.477,-32.476 0,-17.906 14.565,-32.472 32.477,-32.472 17.906,0 32.477,14.565 32.477,32.472 -0.001,11.528 -6.046,21.652 -15.122,27.416 z"
|
||||
id="path9"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#e63e30" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 15.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
width="600px" height="600px" viewBox="0 0 600 600" enable-background="new 0 0 600 600" xml:space="preserve">
|
||||
<path fill="#010101" d="M543.773,253.359c0-49.962-19.305-86.572-54.194-104.54C477.84,71.133,405.027,13.418,316.568,13.418
|
||||
c-86.917,0-159.483,56.481-172.605,132.58c-38.049,16.818-59.889,55.24-59.889,107.361c0,27.029,7.188,51.824,20.321,71.749
|
||||
c-1.816,1.565-3.444,3.282-4.77,5.239c0,0,2.582,2.359,3.689,3.373c-4.262,2.123-8.22,4.322-11.555,6.67
|
||||
c0,0,3.021,7.355,5.896,14.353c-11.991,9.688-21.312,18.92-27.553,27.51c0,0,1.611,1.789,2.011,2.225
|
||||
c-12.354,9.158-22.133,18.205-28.528,27.021c0,0,6.927,7.35,12.408,13.166c-17.824,28.76-43.348,74.85-43.348,102.988
|
||||
c0,3.278,0.346,6.315,1.093,9.053c1.764,6.443,5.752,11.438,11.229,14.059c15.255,7.312,39.646-6.362,72.589-40.434
|
||||
c-0.828,8.287-1.457,16.662-1.457,24.736c0,16.805,2.266,32.069,8.77,41.25c4.887,6.895,10.898,9.067,15.084,9.682
|
||||
c6.723,0.99,26.375,3.797,57.992-61.295c2.678,0.705,5.421,1.178,8.235,1.178c8.798,0,17.065-3.424,23.287-9.639
|
||||
c4.284-4.287,7.133-9.584,8.562-15.312c7.516-2.129,14.555-6.701,20.779-13.19c19.562,24.86,44.779,37.643,75.38,37.643
|
||||
c7.317,0,14.474-0.754,21.281-2.242c0.392-0.073,2.555-0.623,2.555-0.623l0.62-0.166c23.05-5.823,42.463-20.409,58-43.254
|
||||
c7.2,9.23,15.731,15.994,24.849,19.457c1.141,6.658,4.226,12.808,9.102,17.691c6.22,6.213,14.487,9.639,23.288,9.639
|
||||
c8.798,0,17.063-3.426,23.285-9.639c6.221-6.229,9.647-14.494,9.647-23.293c0-8.797-3.429-17.066-9.647-23.293
|
||||
c-2.988-2.988-6.478-5.297-10.248-6.924c0.275-2.947,0.611-5.849,0.611-9.009c0-10.028-1.398-20.979-4.19-31.897
|
||||
c-1.196-4.672-2.757-8.746-4.513-12.568c2.84-6.467,4.807-13.268,4.807-20.426c0-7.316-1.74-14.422-4.706-21.01
|
||||
C509.263,358.345,543.773,313.068,543.773,253.359z M451.232,150.998c-33.396-54.619-88.048-93.359-134.569-85.472
|
||||
c-49.022-7.864-102.775,30.64-135.326,85.018c-2.646,0.208-5.276,0.497-7.875,0.88c8.694-54.414,69.431-111.108,143.107-111.108
|
||||
c74.113,0,135.142,57.197,143.271,112.08C457.013,151.799,454.137,151.348,451.232,150.998z"/>
|
||||
<path fill="#010101" stroke="#FFFFFF" stroke-width="4.8437" d="M110.937,367.38c-72.03,93.07-97.843,163.349-81.865,170.996
|
||||
c15.97,7.654,74.912-46.055,139.701-143.287c45.751-68.647,60.797-94.43,45.68-95.922l20.614-43.357l-10.687-6.644l-33.91,33.371
|
||||
C179.323,272.615,166.073,296.146,110.937,367.38z"/>
|
||||
<path fill="#010101" stroke="#FFFFFF" stroke-width="4.8437" d="M140.932,379.755c-39.101,113.041-39.738,189.89-20.813,192.654
|
||||
c18.912,2.787,59.039-67.617,89.306-182.603c21.383-81.178,27.257-111.029,11.438-108l5.133-48.806l-13.207-3.354l-22.192,42.936
|
||||
C175.736,266.142,170.865,293.244,140.932,379.755z"/>
|
||||
<circle fill="none" stroke="#010101" stroke-width="4.8437" cx="410.28" cy="388.832" r="37.801"/>
|
||||
<path fill="#ED2224" stroke="#010101" stroke-width="4.8437" d="M475.237,157.792c-7.115-73.197-76.231-130.645-160.495-130.645
|
||||
c-83.402,0-152.009,56.27-160.306,128.393c-39.811,13.607-58.455,52.219-58.455,97.818c0,56.946,34.681,103.108,89.925,103.108
|
||||
c35.784,0,67.089-19.432,84.771-48.551c14.01,3.533,28.776,5.463,44.064,5.463c13.16,0,25.934-1.438,38.173-4.076
|
||||
c17.966,28.357,49.108,47.164,84.604,47.164c55.665,0,90.696-46.162,90.696-103.108
|
||||
C528.218,210.073,512.209,173.073,475.237,157.792z M314.742,274.908c-10.501,0-20.723-0.878-30.584-2.506
|
||||
c1.125-6.177,1.778-12.527,1.778-19.043c0-56.941-44.786-103.104-100.03-103.104c-4.858,0-9.597,0.478-14.271,1.169
|
||||
c8.692-54.414,69.43-111.108,143.105-111.108c74.113,0,135.144,57.197,143.27,112.08c-6.617-1.398-13.473-2.141-20.49-2.141
|
||||
c-55.675,0-100.801,46.163-100.801,103.104c0,6.852,0.687,13.536,1.931,20.013C330.872,274.364,322.888,274.908,314.742,274.908z"/>
|
||||
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="-1087.6663" y1="191.4385" x2="-992.1917" y2="191.4385" gradientTransform="matrix(-0.3782 -0.8348 1.083 -0.4907 -423.9551 -476.2263)">
|
||||
<stop offset="0" style="stop-color:#010101"/>
|
||||
<stop offset="0.2606" style="stop-color:#3E221C"/>
|
||||
<stop offset="0.7732" style="stop-color:#B03126"/>
|
||||
<stop offset="1" style="stop-color:#ED2224"/>
|
||||
</linearGradient>
|
||||
<path fill="url(#SVGID_1_)" d="M153.69,260.35c31.322-14.19,65.739-18.887,77.129,6.254c11.391,25.14-4.763,57.026-36.091,71.214
|
||||
c-31.323,14.192-65.948,5.311-77.338-19.83C106,292.849,122.366,274.543,153.69,260.35z"/>
|
||||
<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="-1275.886" y1="215.5034" x2="-1180.4114" y2="215.5034" gradientTransform="matrix(-0.9008 -0.3607 0.555 -1.386 -752.6548 131.7681)">
|
||||
<stop offset="0" style="stop-color:#B11F24"/>
|
||||
<stop offset="0.1017" style="stop-color:#B62024"/>
|
||||
<stop offset="1" style="stop-color:#ED2224"/>
|
||||
</linearGradient>
|
||||
<path fill="url(#SVGID_2_)" d="M427.738,265.165c16.043-40.085,41.342-74.985,68.475-64.122
|
||||
c27.121,10.86,36.109,52.165,20.056,92.248c-16.053,40.089-51.062,63.773-78.189,52.912
|
||||
C410.95,335.343,411.683,305.253,427.738,265.165z"/>
|
||||
<path fill="#010101" stroke="#010101" stroke-width="4.8437" d="M448.219,425.226c7.774,30.396,3.98,62.357-14.521,62.357
|
||||
c-16.301,0-34.904-17.332-42.675-47.732c-7.777-30.399,4.243-75.016,14.521-62.364C423.584,399.707,440.442,394.826,448.219,425.226
|
||||
z"/>
|
||||
<linearGradient id="SVGID_3_" gradientUnits="userSpaceOnUse" x1="-639.5422" y1="548.502" x2="-691.4051" y2="458.673" gradientTransform="matrix(0.9868 0.0515 0.0515 0.7987 840.2104 72.6462)">
|
||||
<stop offset="0" style="stop-color:#5B3E1D"/>
|
||||
<stop offset="0.1121" style="stop-color:#42301B"/>
|
||||
<stop offset="0.2377" style="stop-color:#2E2316"/>
|
||||
<stop offset="0.3753" style="stop-color:#1D1710"/>
|
||||
<stop offset="0.5292" style="stop-color:#0E0C08"/>
|
||||
<stop offset="0.7122" style="stop-color:#030302"/>
|
||||
<stop offset="1" style="stop-color:#000000"/>
|
||||
</linearGradient>
|
||||
<path fill="url(#SVGID_3_)" stroke="#010101" stroke-width="4.8437" d="M184.076,437.859c-6.111,23.875,1.745,46.508,17.54,50.549
|
||||
c15.79,4.039,33.552-12.045,39.658-35.924c6.101-23.882-9.153-57.129-24.947-61.17C200.537,387.275,190.178,413.972,184.076,437.859
|
||||
z"/>
|
||||
<path fill="#010101" stroke="#010101" stroke-width="4.8437" d="M314.837,65.525c72.757-12.333,165.505,89.311,165.505,187.528
|
||||
c0,98.213-74.307,162.833-165.707,162.833"/>
|
||||
<linearGradient id="SVGID_4_" gradientUnits="userSpaceOnUse" x1="-664.3811" y1="374.0068" x2="-500.546" y2="90.2362" gradientTransform="matrix(1 0 0 1 858.79 0.3506)">
|
||||
<stop offset="0" style="stop-color:#000000"/>
|
||||
<stop offset="1" style="stop-color:#5B3E1D"/>
|
||||
</linearGradient>
|
||||
<path fill="url(#SVGID_4_)" stroke="#010101" stroke-width="4.8437" d="M314.635,415.888c-91.402,0-165.299-64.619-165.299-162.833
|
||||
c0-98.218,88.615-199.862,165.5-187.528"/>
|
||||
<linearGradient id="SVGID_5_" gradientUnits="userSpaceOnUse" x1="-760.302" y1="-37.9087" x2="-639.3506" y2="-247.4027" gradientTransform="matrix(-0.6092 0.7802 -0.4118 -0.3216 -240.6183 671.6459)">
|
||||
<stop offset="0" style="stop-color:#8B654B"/>
|
||||
<stop offset="1" style="stop-color:#000000"/>
|
||||
</linearGradient>
|
||||
<path fill="url(#SVGID_5_)" d="M169.611,266.578c-27.578-21.539-16.863-81.354,23.935-133.604
|
||||
c40.804-52.245,93.81-72.894,126.21-59.689c26.672,10.864,14.476,85.434-26.326,137.681
|
||||
C252.63,263.215,197.193,288.112,169.611,266.578z"/>
|
||||
<circle fill="#010101" cx="214.367" cy="388.832" r="34.682"/>
|
||||
<g>
|
||||
<path fill="#F4DFED" d="M131.831,427.708c-23.973,79.734-18.741,132.268-9.011,135.459c10.854,3.564,43.561-47.223,60.839-128.324
|
||||
c12.189-57.264,11.729-83.75,0.009-81.625l3.505-31.108l-8.899-2.435l-14.271,32.445
|
||||
C152.554,347.564,150.184,366.689,131.831,427.708z"/>
|
||||
|
||||
<linearGradient id="SVGID_6_" gradientUnits="userSpaceOnUse" x1="-710.6404" y1="319.3252" x2="-710.6405" y2="562.8164" gradientTransform="matrix(1 0 0 1 858.79 0.3506)">
|
||||
<stop offset="0" style="stop-color:#571A54"/>
|
||||
<stop offset="0.2641" style="stop-color:#7C5378"/>
|
||||
<stop offset="0.528" style="stop-color:#A78AA3"/>
|
||||
<stop offset="0.7459" style="stop-color:#CDBCCB"/>
|
||||
<stop offset="0.9095" style="stop-color:#EAE1E8"/>
|
||||
<stop offset="1" style="stop-color:#F9F3F8"/>
|
||||
</linearGradient>
|
||||
<path fill="url(#SVGID_6_)" d="M146.41,479.117l-22.914,19.186l35.325-65.182l4.683-17.371c0,0,3.1-26.758-24.228,14.713
|
||||
c16.962-56.432,32.317-62.998,32.317-62.998l11.402-46.658l-4.725-1.131l-14.702,30.23c-11.429-4.588-13.859,14.521-32.392,75.483
|
||||
c-24.226,79.656-20.501,124.087-8.358,137.777L146.41,479.117z"/>
|
||||
|
||||
<linearGradient id="SVGID_7_" gradientUnits="userSpaceOnUse" x1="-789.3508" y1="444.1797" x2="-821.2424" y2="531.975" gradientTransform="matrix(0.9399 -0.3414 0.3414 0.9399 754.2939 -277.891)">
|
||||
<stop offset="0" style="stop-color:#802986"/>
|
||||
<stop offset="0.2641" style="stop-color:#9D66A2"/>
|
||||
<stop offset="0.528" style="stop-color:#BE9BC2"/>
|
||||
<stop offset="0.7459" style="stop-color:#DBC8DE"/>
|
||||
<stop offset="0.9095" style="stop-color:#F0E6F1"/>
|
||||
<stop offset="1" style="stop-color:#F9F3F8"/>
|
||||
</linearGradient>
|
||||
<path fill="url(#SVGID_7_)" d="M147.332,501.478l31.839-92.399c0,0,6.608,60.69-7.474,93.406
|
||||
c1.438-44.879-2.328-36.951-9.176-25.257C159.71,482.031,147.332,501.478,147.332,501.478z"/>
|
||||
|
||||
<linearGradient id="SVGID_8_" gradientUnits="userSpaceOnUse" x1="-764.8928" y1="411.2344" x2="-797.3259" y2="500.5203" gradientTransform="matrix(0.9399 -0.3414 0.3414 0.9399 754.2939 -277.891)">
|
||||
<stop offset="0" style="stop-color:#802986"/>
|
||||
<stop offset="0.2641" style="stop-color:#9D66A2"/>
|
||||
<stop offset="0.528" style="stop-color:#BE9BC2"/>
|
||||
<stop offset="0.7459" style="stop-color:#DBC8DE"/>
|
||||
<stop offset="0.9095" style="stop-color:#F0E6F1"/>
|
||||
<stop offset="1" style="stop-color:#F9F3F8"/>
|
||||
</linearGradient>
|
||||
<path fill="url(#SVGID_8_)" d="M156.286,463.716l38.825-93.953c0,0,2.251,62.279-11.831,94.992
|
||||
c-0.298-44.25-5.388-28.09-8.538-23.508C165.662,454.416,156.286,463.716,156.286,463.716z"/>
|
||||
|
||||
<linearGradient id="SVGID_9_" gradientUnits="userSpaceOnUse" x1="-872.7551" y1="422.8174" x2="-924.3751" y2="475.0038" gradientTransform="matrix(0.711 -0.7032 0.7032 0.711 517.3177 -556.6326)">
|
||||
<stop offset="0" style="stop-color:#571A54"/>
|
||||
<stop offset="0.2641" style="stop-color:#7C5378"/>
|
||||
<stop offset="0.528" style="stop-color:#A78AA3"/>
|
||||
<stop offset="0.7459" style="stop-color:#CDBCCB"/>
|
||||
<stop offset="0.9095" style="stop-color:#EAE1E8"/>
|
||||
<stop offset="1" style="stop-color:#F9F3F8"/>
|
||||
</linearGradient>
|
||||
<path fill="url(#SVGID_9_)" d="M180.916,431.115l9.787-73.404c0,0,18.589,43.111,16.428,71.426
|
||||
c-11.771-30.424-13.671-21.049-17.576-14.961C187.396,417.539,180.916,431.115,180.916,431.115z"/>
|
||||
<path fill="#1E3D73" d="M174.914,335.556L158.76,362.31l-23.24,76.646c0,0,1.211-8.172,1.788-15.883l-18.783,50.772
|
||||
c0,0,8.386-31.227,3.607-28.383c-4.775,2.84,4.227-21.91-23.102,13.73c5.316-18.517,20.495-39.511,33.324-54.9
|
||||
c-2.172,0.473-7.102,4.787-18.388,18.373c4.381-15.232,14.956-32.934,25.357-47.898c-1.159-2.682-5.151-3.889-21.234,5.224
|
||||
C134.366,356.718,174.914,335.556,174.914,335.556z"/>
|
||||
</g>
|
||||
<g>
|
||||
<path fill="#F4DFED" d="M94.453,401.164c-49.752,66.752-62.779,117.912-54.719,124.242c8.987,7.059,57.062-29.513,100.989-99.847
|
||||
c31.011-49.655,39.62-74.709,27.879-76.713l13.916-28.053l-7.539-5.318l-24.483,25.623
|
||||
C141.291,332.912,132.531,350.072,94.453,401.164z"/>
|
||||
<path fill="#656B84" d="M90.603,454.464l-28.088,10.205l55.456-49.201l10.331-14.729c0,0,12.047-24.097-27.796,5.559
|
||||
c35.213-47.256,51.892-48.182,51.892-48.182l26.641-39.957l-4.058-2.683l-24.133,23.4c-9.179-8.223-17.989,8.91-56.226,59.885
|
||||
c-49.96,66.601-61.634,109.635-54.889,126.646L90.603,454.464z"/>
|
||||
|
||||
<linearGradient id="SVGID_10_" gradientUnits="userSpaceOnUse" x1="-752.551" y1="484.6816" x2="-736.7991" y2="395.3488" gradientTransform="matrix(1 0 0 1 858.79 0.3506)">
|
||||
<stop offset="0" style="stop-color:#571A54"/>
|
||||
<stop offset="0.2641" style="stop-color:#7C5378"/>
|
||||
<stop offset="0.528" style="stop-color:#A78AA3"/>
|
||||
<stop offset="0.7459" style="stop-color:#CDBCCB"/>
|
||||
<stop offset="0.9095" style="stop-color:#EAE1E8"/>
|
||||
<stop offset="1" style="stop-color:#F9F3F8"/>
|
||||
</linearGradient>
|
||||
<path fill="url(#SVGID_10_)" d="M83.829,475.791l61.476-75.98c0,0-14.509,59.306-38.916,85.248
|
||||
c16.678-41.694,12.058-33.366,0-26.873C101.491,460.822,83.829,475.791,83.829,475.791z"/>
|
||||
|
||||
<linearGradient id="SVGID_11_" gradientUnits="userSpaceOnUse" x1="-727.8064" y1="453.3486" x2="-711.9149" y2="363.2233" gradientTransform="matrix(1 0 0 1 858.79 0.3506)">
|
||||
<stop offset="0" style="stop-color:#571A54"/>
|
||||
<stop offset="0.2641" style="stop-color:#7C5378"/>
|
||||
<stop offset="0.528" style="stop-color:#A78AA3"/>
|
||||
<stop offset="0.7459" style="stop-color:#CDBCCB"/>
|
||||
<stop offset="0.9095" style="stop-color:#EAE1E8"/>
|
||||
<stop offset="1" style="stop-color:#F9F3F8"/>
|
||||
</linearGradient>
|
||||
<path fill="url(#SVGID_11_)" d="M105.143,443.357l68.562-75.052c0,0-19.143,59.297-43.551,85.248
|
||||
c14.824-41.7,10.567-27.994,0-25.022C124.802,430.041,105.143,443.357,105.143,443.357z"/>
|
||||
<path fill="#656B84" d="M139.423,421.125l34.262-65.654c0,0,2.748,46.867-8.945,72.74c-0.676-32.615-3.041-28.432-11.413-20.061
|
||||
C150.5,410.974,139.423,421.125,139.423,421.125z"/>
|
||||
<path fill="#656B84" d="M166.408,329.255l-24.322,19.631l-48.011,64.111c0,0,3.931-7.273,7.104-14.322L66.185,439.99
|
||||
c0,0,18.552-26.484,13.089-25.449c-5.464,1.041,11.451-19.148-26.399,5.02c11.313-15.588,32.751-30.137,50.064-40.227
|
||||
c-2.205-0.299-8.316,2.076-23.552,10.988c9.312-12.818,25.302-25.842,40.183-36.357c-0.175-2.918-3.515-5.416-21.74-2.346
|
||||
C121.065,335.3,166.408,329.255,166.408,329.255z"/>
|
||||
</g>
|
||||
<g>
|
||||
<path fill="#D9AF82" d="M315.05,115.063c-50.514,0-83.218,15.021-109.641,64.839c-2.502,4.713-0.23,14.337-2.796,19.152
|
||||
c-13.845,26.007-37.089,48.236-37.089,71.707c0,34.335,19.1,65.637,42.505,89.296c12.185,71.646,34.7,151.595,104.339,151.595"/>
|
||||
<path fill="#010101" d="M203.271,178.766c-1.521,2.855-1.59,6.774-1.656,10.562c-0.062,3.283-0.123,6.677-1.14,8.588
|
||||
c-4.537,8.519-10.146,16.707-15.577,24.624c-11.21,16.353-21.797,31.798-21.797,48.221c0,30.307,15.166,62.38,42.666,90.412
|
||||
c12.578,73.607,36.113,150.479,106.6,150.479v-1.547c-67.084,0-89.722-78.556-101.95-150.453l-0.127-0.748l-0.54-0.549
|
||||
c-26.957-27.257-41.805-58.361-41.805-87.594c0-14.923,10.174-29.766,20.949-45.482c5.501-8.027,11.19-16.327,15.855-25.087
|
||||
c1.562-2.935,1.638-6.92,1.707-10.773c0.059-3.221,0.118-6.551,1.088-8.381c24.258-45.734,54.398-65.974,107.503-65.974v-2.422
|
||||
C259.849,112.641,228.506,131.181,203.271,178.766z"/>
|
||||
</g>
|
||||
<path fill="#8B654B" d="M312.368,511.65c72.045,0,92.163-79.949,104.338-151.595c23.405-23.657,42.514-54.959,42.514-89.296
|
||||
c0-37.004-22.588-49.51-38.609-77.154c-5.681-9.798-1.496-24.634-8.084-33.382c-26.905-35.728-53.772-45.162-97.477-45.162"/>
|
||||
<ellipse fill="#D9AF82" cx="313.792" cy="343.947" rx="21.906" ry="68.144"/>
|
||||
<path fill="#8B654B" d="M342.916,373.455c0,7.812-14.979,12.535-27.273,12.535c-12.293,0-27.81-4.736-27.81-12.549
|
||||
c3.432-3.433,15.246,4.885,27.544,4.885C334.789,378.326,342.916,312.496,342.916,373.455z"/>
|
||||
<path fill="#D9AF82" d="M335.697,435.216c0,37.637-9.81,68.832-21.91,68.832c-12.096,0-21.899-31.195-21.899-68.832
|
||||
c0-37.639,9.882-50.258,21.977-50.258C325.962,384.958,335.697,397.578,335.697,435.216z"/>
|
||||
<path opacity="0.36" fill="#8A644B" enable-background="new " d="M328.365,281.605c-1.826,24.682-14.186-7.573-34.757,20.975
|
||||
c-8.672,12.025-23.23,10.877-38.845,10.877c-39.61,0-66.544-26.031-67.859-38.869c-2.517-24.557,29.024-39.586,71.464-39.586
|
||||
C297.028,235.002,329.255,269.622,328.365,281.605z"/>
|
||||
<linearGradient id="SVGID_12_" gradientUnits="userSpaceOnUse" x1="-644.0354" y1="340.7031" x2="-568.3508" y2="340.7031" gradientTransform="matrix(1 0 0 1 858.79 0.3506)">
|
||||
<stop offset="0" style="stop-color:#D9AF82"/>
|
||||
<stop offset="0.0786" style="stop-color:#DFB791"/>
|
||||
<stop offset="0.2053" style="stop-color:#E7C1A5"/>
|
||||
<stop offset="0.345" style="stop-color:#EDC9B5"/>
|
||||
<stop offset="0.5023" style="stop-color:#F1CFC0"/>
|
||||
<stop offset="0.6917" style="stop-color:#F4D3C7"/>
|
||||
<stop offset="1" style="stop-color:#F5D4C9"/>
|
||||
</linearGradient>
|
||||
<path opacity="0.36" fill="url(#SVGID_12_)" enable-background="new " d="M272.246,361.529
|
||||
c-28.722,19.461-56.346-24.299-57.491-43.314c15.913,13.822,62.032,18.457,75.685-2.516L272.246,361.529z"/>
|
||||
<path opacity="0.36" fill="#8A644B" enable-background="new " d="M313.706,461.212c-38.167,0-61.229-13.68-61.229-31.629
|
||||
c0-6.049,15.649-24.078,37.318-49.365c5.952-3.699,7.464,10.037,14.958,4.73C331.61,392.044,328.318,461.212,313.706,461.212z"/>
|
||||
<g>
|
||||
<path fill="#8A644B" d="M260.464,472.117c8.341,23.938,32.817,36.465,52.688,36.465v-4.844
|
||||
C294.99,503.738,268.056,493.921,260.464,472.117L260.464,472.117z"/>
|
||||
</g>
|
||||
<g>
|
||||
<path fill="#8A644B" d="M180.954,271.658c0,21.359,5.388,36.679,27.101,48.222c0.587,1.121,7.021,13.387,7.021,13.387
|
||||
c8.916,16.375,19.021,34.939,19.021,54.406h4.844c0-20.699-10.416-39.84-19.612-56.725l-7.586-14.455l-0.709-0.426
|
||||
C190.51,305.4,180.954,291.289,180.954,271.658L180.954,271.658z"/>
|
||||
</g>
|
||||
<g>
|
||||
<path fill="#010101" d="M208.814,230.649l-0.104-0.97c-3.106-15.25-3.226-33.651-0.312-49.217l-4.764-0.889
|
||||
C200.613,195.722,205.583,214.815,208.814,230.649z"/>
|
||||
</g>
|
||||
<linearGradient id="SVGID_13_" gradientUnits="userSpaceOnUse" x1="-667.7327" y1="310.1709" x2="-407.218" y2="310.1709" gradientTransform="matrix(1 0 0 1 858.79 0.3506)">
|
||||
<stop offset="0" style="stop-color:#5B3E1D"/>
|
||||
<stop offset="1" style="stop-color:#010101"/>
|
||||
</linearGradient>
|
||||
<path fill="url(#SVGID_13_)" d="M423.943,199.054c-3.983-11.059-0.737-20.853-8.062-31.231
|
||||
c-19.885-28.185-51.07-56.271-108.998-52.618l5.214,140.363c0,0-122.733-25.589-121.021,15.935c0.229,5.387,40.188,2.88,63.46,4.428
|
||||
c-26.092,4.566-32.185,5.898-32.185,8.838c0,6.206,21.861,0.683,25.106,2.467c4.978,2.739-43.139,7.052-34.351,8.757
|
||||
c10.057,1.951,44.474,3.086,57.442,3.086c28.931,0,41.077-25.413,41.077-4.485c7.348,27.894,14.739,59.239,13.974,69.882
|
||||
c-1.477,20.661-19.62,20.188-19.62,20.188l5.089,24.285c-8.557,0.438-6.245-1.324-13.85-0.549c-14.429,0-32.354,13.03-32.354,16.055
|
||||
l39.989,0.434c0,0-29.081,13.771-22.977,22.931c4.765,7.143,20.316,13.377,31.093,13.424c0,0,3.271,8.549,3.271,22.352
|
||||
c0,13.812-4.035,22.564-4.035,22.564c46.171,0,67.49-49.035,80.324-118.445c6.083-32.877,20.018-58.104,36.034-71.658
|
||||
c15.742-13.319,23.008-26.64,23.008-52.07C451.577,249.847,443.574,230.354,423.943,199.054z"/>
|
||||
<path fill="#D9AF82" d="M325.395,252.416l-13.297,4.328c0,0-65.85-96.356-46.493-121.312c12.682-16.357,24.609-18.136,40.046-19.238
|
||||
c13.519-0.965,21.294,16.525,27.302,24.271C350.375,162.927,325.395,252.416,325.395,252.416z"/>
|
||||
<linearGradient id="SVGID_14_" gradientUnits="userSpaceOnUse" x1="-629.0159" y1="50.6562" x2="-540.175" y2="50.6562" gradientTransform="matrix(0.676 0.6564 -0.9247 0.9523 711.8302 511.1852)">
|
||||
<stop offset="0" style="stop-color:#FFFFFF"/>
|
||||
<stop offset="0.0769" style="stop-color:#F4E9DD"/>
|
||||
<stop offset="0.1814" style="stop-color:#EBD6BF"/>
|
||||
<stop offset="0.2951" style="stop-color:#E5C7A8"/>
|
||||
<stop offset="0.419" style="stop-color:#DFBC96"/>
|
||||
<stop offset="0.5585" style="stop-color:#DCB58B"/>
|
||||
<stop offset="0.7265" style="stop-color:#DAB084"/>
|
||||
<stop offset="1" style="stop-color:#D9AF82"/>
|
||||
</linearGradient>
|
||||
<path fill="url(#SVGID_14_)" d="M305.253,199.27c-26.745,27.542-70.168,41.961-81.281,24.357
|
||||
c-14.515-22.972-12.896-47.545,13.854-75.082c26.74-27.547,64.922-33.847,85.28-14.081
|
||||
C343.464,154.233,332.003,171.726,305.253,199.27z"/>
|
||||
<linearGradient id="SVGID_15_" gradientUnits="userSpaceOnUse" x1="-617.7107" y1="401.4551" x2="-617.7107" y2="317.8633" gradientTransform="matrix(1 0 0 1 858.79 0.3506)">
|
||||
<stop offset="0" style="stop-color:#D9AF82"/>
|
||||
<stop offset="0.1127" style="stop-color:#BD936E"/>
|
||||
<stop offset="0.2679" style="stop-color:#A57C5E"/>
|
||||
<stop offset="0.4437" style="stop-color:#966E53"/>
|
||||
<stop offset="0.6554" style="stop-color:#8D664D"/>
|
||||
<stop offset="1" style="stop-color:#8A644B"/>
|
||||
</linearGradient>
|
||||
<path fill="url(#SVGID_15_)" d="M272.246,361.529c0,46.272-35.419,42.799-45.104,36.896c0-45.752-17.229-80.211-17.229-80.211
|
||||
S249.882,354.22,272.246,361.529z"/>
|
||||
<linearGradient id="SVGID_16_" gradientUnits="userSpaceOnUse" x1="-925.8547" y1="344.666" x2="-972.7458" y2="361.7328" gradientTransform="matrix(-1 0 0 1 -562.3931 0.3506)">
|
||||
<stop offset="0" style="stop-color:#382815"/>
|
||||
<stop offset="0.4081" style="stop-color:#553E2B"/>
|
||||
<stop offset="1" style="stop-color:#8B654B"/>
|
||||
</linearGradient>
|
||||
<path fill="url(#SVGID_16_)" d="M359.338,356.349c0,46.271,21.506,44.033,31.073,44.033c7.488-45.135,35.671-81.516,35.671-81.516
|
||||
S381.703,349.044,359.338,356.349z"/>
|
||||
<path fill="none" stroke="#010101" stroke-width="4.8437" d="M173.934,294.978"/>
|
||||
<g>
|
||||
<path fill="#010101" d="M311.507,115.089c53.106,0,83.247,20.214,107.505,65.948c0.902,1.702,0.902,4.883,0.902,7.96
|
||||
c-0.005,4.146-0.005,8.432,2.029,11.419c16.157,23.757,31.934,48.809,31.934,70.969c0,32.38-12.817,62.458-37.073,86.969
|
||||
l-0.541,0.551l-0.13,0.748c-12.222,71.897-36.672,150.451-103.765,150.451v1.518c70.499,0,95.847-76.844,108.416-150.455
|
||||
c24.803-25.336,37.937-56.355,37.937-89.781c0-23.537-16.19-49.311-32.774-73.694c-1.151-1.698-1.19-5.061-1.19-8.37
|
||||
c0-0.109,0.004-0.537,0.004-0.646c0-3.567-0.041-7.221-1.471-9.91C398.053,131.18,366.71,112.64,311.51,112.64v2.449H311.507
|
||||
L311.507,115.089z"/>
|
||||
</g>
|
||||
<polygon fill="#010101" points="339.974,84.79 334.59,115.675 300.608,113.719 312.435,66.413 "/>
|
||||
<circle fill="#010101" stroke="#010101" stroke-width="4.8437" cx="452.06" cy="492.948" r="19.204"/>
|
||||
<g>
|
||||
|
||||
<linearGradient id="SVGID_17_" gradientUnits="userSpaceOnUse" x1="-749.6116" y1="335.9512" x2="-687.9983" y2="335.9512" gradientTransform="matrix(1 0 0 1 858.79 0.3506)">
|
||||
<stop offset="0" style="stop-color:#571A54"/>
|
||||
<stop offset="0.2641" style="stop-color:#7C5378"/>
|
||||
<stop offset="0.528" style="stop-color:#A78AA3"/>
|
||||
<stop offset="0.7459" style="stop-color:#CDBCCB"/>
|
||||
<stop offset="0.9095" style="stop-color:#EAE1E8"/>
|
||||
<stop offset="1" style="stop-color:#F9F3F8"/>
|
||||
</linearGradient>
|
||||
<path fill="url(#SVGID_17_)" d="M109.178,338.035c9.592-7.824,34.694,4.861,34.833,4.861l26.78-8.396
|
||||
C170.211,334.501,120.246,321.648,109.178,338.035z"/>
|
||||
</g>
|
||||
<linearGradient id="SVGID_18_" gradientUnits="userSpaceOnUse" x1="-1081.0227" y1="320.6133" x2="-1063.3801" y2="320.6133" gradientTransform="matrix(-0.0113 -0.7169 1.2476 -0.0198 -98.6661 -397.1379)">
|
||||
<stop offset="0" style="stop-color:#D9AF82"/>
|
||||
<stop offset="0.0786" style="stop-color:#DFB791"/>
|
||||
<stop offset="0.2053" style="stop-color:#E7C1A5"/>
|
||||
<stop offset="0.345" style="stop-color:#EDC9B5"/>
|
||||
<stop offset="0.5023" style="stop-color:#F1CFC0"/>
|
||||
<stop offset="0.6917" style="stop-color:#F4D3C7"/>
|
||||
<stop offset="1" style="stop-color:#F5D4C9"/>
|
||||
</linearGradient>
|
||||
<path opacity="0.36" fill="url(#SVGID_18_)" enable-background="new " d="M313.352,358.851c6.074-0.1,11.045,2.654,11.102,6.15
|
||||
c0.06,3.49-4.829,6.398-10.907,6.498c-6.076,0.1-11.045-2.658-11.105-6.154C302.388,361.853,307.269,358.947,313.352,358.851z"/>
|
||||
<path fill="#483218" d="M397.109,309.378c15.699-3.76,26.445-18.402,20.099-27.063c-38.738,19.354-75.295,11.369-85.529,9.147
|
||||
C368.014,309.492,371.117,315.595,397.109,309.378z"/>
|
||||
<path fill="#B4B4B4" d="M310.92,73.714c-38.372,0-93.116,22.758-117.549,74.944c-6.089,12.999-6.656,32.87,0.64,45.014
|
||||
c0,0,18.604-81.43,108.229-86.494"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 260 KiB After Width: | Height: | Size: 1.0 MiB |
Before Width: | Height: | Size: 260 KiB After Width: | Height: | Size: 356 KiB |
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 1.0 MiB |
Before Width: | Height: | Size: 397 B |
Before Width: | Height: | Size: 376 B |
Before Width: | Height: | Size: 5.1 KiB |
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 1.0 MiB |
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 1.0 MiB |
@@ -43,8 +43,8 @@
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<a href="http://www.tomahawk-player.org" title="Tomahawk - Powered by Playdar" id="head">
|
||||
<img alt="Tomahawk - Powered by Playdar" src="/staticdata/tomahawk_auth_logo.png" width="200" height="30">
|
||||
<a href="http://www.playdar.org/" title="Tomahawk - Powered by Playdar" id="head">
|
||||
<img alt="Tomahawk - Powered by Playdar" src="/staticdata/tomahawk_auth_logo.png" width="196" height="45"/>
|
||||
</a>
|
||||
|
||||
<div id="content">
|
||||
|
@@ -32,8 +32,8 @@
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<a href="http://www.tomahawk-player.org" title="Tomahawk - Powered by Playdar" id="head">
|
||||
<img alt="Tomahawk - Powered by Playdar" src="/staticdata/tomahawk_auth_logo.png" width="200" height="30">
|
||||
<a href="http://www.gettomahawk.com/" title="Tomahawk - Powered by Playdar" id="head">
|
||||
<img alt="Tomahawk - Powered by Playdar" src="/staticdata/tomahawk_auth_logo.png" width="196" height="45"/>
|
||||
</a>
|
||||
|
||||
<div id="content">
|
||||
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 6.8 KiB |
2165
lang/tomahawk_ar.ts
1279
lang/tomahawk_bg.ts
1235
lang/tomahawk_ca.ts
1279
lang/tomahawk_de.ts
1239
lang/tomahawk_en.ts
1235
lang/tomahawk_es.ts
1405
lang/tomahawk_fr.ts
@@ -10,6 +10,5 @@
|
||||
<file>tomahawk_es.qm</file>
|
||||
<file>tomahawk_sv.qm</file>
|
||||
<file>tomahawk_ja.qm</file>
|
||||
<file>tomahawk_ar.qm</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
1794
lang/tomahawk_ja.ts
1229
lang/tomahawk_pl.ts
1227
lang/tomahawk_ru.ts
1227
lang/tomahawk_sv.ts
1215
lang/tomahawk_tr.ts
@@ -1,48 +1,25 @@
|
||||
macro(add_tomahawk_translations language)
|
||||
list(APPEND TOMAHAWK_LANGUAGES ${ARGV})
|
||||
FILE (GLOB TS_FILES ${CMAKE_SOURCE_DIR}/lang/*.ts)
|
||||
QT4_ADD_TRANSLATION(QM_FILES ${TS_FILES})
|
||||
|
||||
set(tomahawk_i18n_qrc_content "<!DOCTYPE RCC><RCC version=\"1.0\">\n")
|
||||
## 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)
|
||||
|
||||
# tomahawk and qt language files
|
||||
set(tomahawk_i18n_qrc_content "${tomahawk_i18n_qrc_content}<qresource prefix=\"/lang\">\n")
|
||||
foreach(lang ${TOMAHAWK_LANGUAGES})
|
||||
set(tomahawk_i18n_qrc_content "${tomahawk_i18n_qrc_content}<file>tomahawk_${lang}.qm</file>\n")
|
||||
if(NOT lang STREQUAL "en" AND EXISTS ${QT_TRANSLATIONS_DIR}/qt_${lang}.qm)
|
||||
file(COPY ${QT_TRANSLATIONS_DIR}/qt_${lang}.qm DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
|
||||
set(tomahawk_i18n_qrc_content "${tomahawk_i18n_qrc_content}<file>qt_${lang}.qm</file>\n")
|
||||
endif()
|
||||
# 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}
|
||||
)
|
||||
|
||||
# build explicitly enabled languages
|
||||
list(APPEND TS_FILES "${CMAKE_SOURCE_DIR}/lang/tomahawk_${lang}.ts")
|
||||
endforeach()
|
||||
|
||||
set(tomahawk_i18n_qrc_content "${tomahawk_i18n_qrc_content}</qresource>\n")
|
||||
set(tomahawk_i18n_qrc_content "${tomahawk_i18n_qrc_content}</RCC>\n")
|
||||
|
||||
file(WRITE ${CMAKE_BINARY_DIR}/lang/tomahawk_i18n.qrc "${tomahawk_i18n_qrc_content}" )
|
||||
|
||||
QT4_ADD_TRANSLATION(QM_FILES ${TS_FILES})
|
||||
|
||||
## HACK HACK HACK - around rcc limitations to allow out of source-tree building
|
||||
SET( trans_file tomahawk_i18n )
|
||||
SET( trans_srcfile ${CMAKE_BINARY_DIR}/lang/${trans_file}.qrc)
|
||||
SET( trans_infile ${CMAKE_CURRENT_BINARY_DIR}/${trans_file}.qrc)
|
||||
SET( trans_outfile ${CMAKE_CURRENT_BINARY_DIR}/qrc_${trans_file}.cxx)
|
||||
|
||||
# Copy the QRC file to the output directory
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT ${trans_infile}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${trans_srcfile} ${trans_infile}
|
||||
MAIN_DEPENDENCY ${trans_srcfile}
|
||||
)
|
||||
|
||||
# Run the resource compiler (rcc_options should already be set)
|
||||
ADD_CUSTOM_COMMAND(
|
||||
OUTPUT ${trans_outfile}
|
||||
COMMAND ${QT_RCC_EXECUTABLE}
|
||||
ARGS ${rcc_options} -name ${trans_file} -o ${trans_outfile} ${trans_infile}
|
||||
MAIN_DEPENDENCY ${trans_infile}
|
||||
DEPENDS ${QM_FILES}
|
||||
)
|
||||
endmacro()
|
||||
# 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}
|
||||
)
|
||||
|
||||
|
@@ -141,10 +141,6 @@
|
||||
<file>data/images/process-stop.png</file>
|
||||
<file>data/icons/tomahawk-icon-128x128-grayscale.png</file>
|
||||
<file>data/images/collection.png</file>
|
||||
<file>data/misc/tomahawk_pubkey.pem</file>
|
||||
<file>data/images/track-icon-sidebar.png</file>
|
||||
<file>data/images/jump-link.png</file>
|
||||
<file>data/images/scrollbar-vertical-handle.png</file>
|
||||
<file>data/images/scrollbar-horizontal-handle.png</file>
|
||||
<file>data/misc/tomahawk_pubkey.pem</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
@@ -27,7 +27,6 @@
|
||||
#include "accounts/AccountManager.h"
|
||||
|
||||
#include "utils/TomahawkUtils.h"
|
||||
#include "utils/TomahawkUtilsGui.h"
|
||||
#include "utils/Logger.h"
|
||||
#include "utils/AnimatedSpinner.h"
|
||||
#include "utils/Closure.h"
|
||||
@@ -60,6 +59,7 @@ AccountDelegate::AccountDelegate( QObject* parent )
|
||||
, m_accountRowHeight( -1 )
|
||||
, m_model( 0 )
|
||||
{
|
||||
|
||||
m_defaultCover.load( RESPATH "images/sipplugin-online.png" );
|
||||
m_ratingStarPositive.load( RESPATH "images/starred.png" );
|
||||
m_ratingStarNegative.load( RESPATH "images/star-unstarred.png" );
|
||||
@@ -271,7 +271,7 @@ AccountDelegate::paint ( QPainter* painter, const QStyleOptionViewItem& option,
|
||||
}
|
||||
else if ( canDelete )
|
||||
{
|
||||
const QString btnText = tr( "Remove" );
|
||||
const QString btnText = tr( "Remove Account" );
|
||||
const int btnWidth = installMetrics.width( btnText ) + 2*PADDING;
|
||||
QRect btnRect;
|
||||
|
||||
@@ -281,10 +281,7 @@ AccountDelegate::paint ( QPainter* painter, const QStyleOptionViewItem& option,
|
||||
btnRect = QRect( opt.rect.right() - PADDING - btnWidth, center - ( installMetrics.height() + 4 ) / 2, btnWidth, installMetrics.height() + 2*PADDING );
|
||||
|
||||
#ifdef Q_WS_MAC
|
||||
btnRect.adjust( -4, 0, 4, 0 );
|
||||
|
||||
if ( hasConfigWrench )
|
||||
btnRect.moveTop( btnRect.top() + 2 );
|
||||
btnRect.adjust( -4, 2, 4, -2 );
|
||||
#endif
|
||||
leftEdge = btnRect.left();
|
||||
m_cachedButtonRects[ index ] = btnRect;
|
||||
@@ -389,7 +386,7 @@ AccountDelegate::paint ( QPainter* painter, const QStyleOptionViewItem& option,
|
||||
const int countW = painter->fontMetrics().width( count );
|
||||
const QRect countRect( runningEdge + 50, starsTop, countW, painter->fontMetrics().height() );
|
||||
count = painter->fontMetrics().elidedText( count, Qt::ElideRight, rightEdge - PADDING - countRect.left() );
|
||||
painter->drawText( countRect, Qt::AlignLeft, count );
|
||||
painter->drawText( countRect, Qt::AlignLeft | Qt::TextWordWrap, count );
|
||||
// runningEdge = authorRect.x();
|
||||
}
|
||||
|
||||
@@ -550,10 +547,53 @@ AccountDelegate::editorEvent( QEvent* event, QAbstractItemModel* model, const QS
|
||||
void
|
||||
AccountDelegate::drawRoundedButton( QPainter* painter, const QRect& btnRect, bool red ) const
|
||||
{
|
||||
QPainterPath btnPath;
|
||||
const int radius = 3;
|
||||
// draw top half gradient
|
||||
const int btnCenter = btnRect.bottom() - ( btnRect.height() / 2 );
|
||||
btnPath.moveTo( btnRect.left(), btnCenter );
|
||||
btnPath.lineTo( btnRect.left(), btnRect.top() + radius );
|
||||
btnPath.quadTo( QPoint( btnRect.topLeft() ), QPoint( btnRect.left() + radius, btnRect.top() ) );
|
||||
btnPath.lineTo( btnRect.right() - radius, btnRect.top() );
|
||||
btnPath.quadTo( QPoint( btnRect.topRight() ), QPoint( btnRect.right(), btnRect.top() + radius ) );
|
||||
btnPath.lineTo( btnRect.right(),btnCenter );
|
||||
btnPath.lineTo( btnRect.left(), btnCenter );
|
||||
|
||||
QLinearGradient g;
|
||||
if ( !red )
|
||||
TomahawkUtils::drawRoundedButton( painter, btnRect, QColor(54, 127, 211), QColor(43, 104, 182), QColor(34, 85, 159), QColor(35, 79, 147) );
|
||||
{
|
||||
g.setColorAt( 0, QColor(54, 127, 211) );
|
||||
g.setColorAt( 0.5, QColor(43, 104, 182) );
|
||||
}
|
||||
else
|
||||
TomahawkUtils::drawRoundedButton( painter, btnRect, QColor(206, 63, 63), QColor(170, 52, 52), QColor(150, 50, 50), QColor(130, 40, 40) );
|
||||
{
|
||||
g.setColorAt( 0, QColor(206, 63, 63) );
|
||||
g.setColorAt( 0.5, QColor(170, 52, 52) );
|
||||
}
|
||||
//painter->setPen( bg.darker() );
|
||||
painter->fillPath( btnPath, g );
|
||||
//painter->drawPath( btnPath );
|
||||
|
||||
btnPath = QPainterPath();
|
||||
btnPath.moveTo( btnRect.left(), btnCenter );
|
||||
btnPath.lineTo( btnRect.left(), btnRect.bottom() - radius );
|
||||
btnPath.quadTo( QPoint( btnRect.bottomLeft() ), QPoint( btnRect.left() + radius, btnRect.bottom() ) );
|
||||
btnPath.lineTo( btnRect.right() - radius, btnRect.bottom() );
|
||||
btnPath.quadTo( QPoint( btnRect.bottomRight() ), QPoint( btnRect.right(), btnRect.bottom() - radius ) );
|
||||
btnPath.lineTo( btnRect.right(), btnCenter );
|
||||
btnPath.lineTo( btnRect.left(), btnCenter );
|
||||
|
||||
if ( !red )
|
||||
{
|
||||
g.setColorAt( 0, QColor(34, 85, 159) );
|
||||
g.setColorAt( 0.5, QColor(35, 79, 147) );
|
||||
}
|
||||
else
|
||||
{
|
||||
g.setColorAt( 0, QColor(150, 50, 50) );
|
||||
g.setColorAt( 0.5, QColor(130, 40, 40) );
|
||||
}
|
||||
painter->fillPath( btnPath, g );
|
||||
}
|
||||
|
||||
|
||||
@@ -562,7 +602,6 @@ AccountDelegate::drawStatus( QPainter* painter, const QPointF& rightTopEdge, Acc
|
||||
{
|
||||
QPixmap p;
|
||||
QString statusText;
|
||||
|
||||
const Account::ConnectionState state = acct->connectionState();
|
||||
if ( state == Account::Connected )
|
||||
{
|
||||
@@ -686,6 +725,7 @@ void
|
||||
AccountDelegate::doneInstalling ( const QPersistentModelIndex& idx )
|
||||
{
|
||||
qDebug() << "STOP INSTALLING:" << idx.data( Qt::DisplayRole ).toString();
|
||||
Q_ASSERT( m_loadingSpinners.contains( idx ) );
|
||||
if ( !m_loadingSpinners.contains( idx ) )
|
||||
return;
|
||||
|
@@ -19,7 +19,6 @@
|
||||
#ifndef ACCOUNTDELEGATE_H
|
||||
#define ACCOUNTDELEGATE_H
|
||||
|
||||
#include "DllMacro.h"
|
||||
#include <QStyledItemDelegate>
|
||||
#include "accounts/AccountModel.h"
|
||||
|
||||
@@ -32,7 +31,7 @@ namespace Accounts
|
||||
|
||||
class Account;
|
||||
|
||||
class DLLEXPORT AccountDelegate : public QStyledItemDelegate
|
||||
class AccountDelegate : public QStyledItemDelegate
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
@@ -20,7 +20,7 @@
|
||||
|
||||
#include "accounts/Account.h"
|
||||
#include "accounts/AccountManager.h"
|
||||
#include "utils/GuiHelpers.h"
|
||||
#include "GuiHelpers.h"
|
||||
#include "AccountFactoryWrapperDelegate.h"
|
||||
#include "DelegateConfigWrapper.h"
|
||||
#include "ui_AccountFactoryWrapper.h"
|
@@ -19,8 +19,6 @@
|
||||
#ifndef ACCOUNTFACTORYWRAPPER_H
|
||||
#define ACCOUNTFACTORYWRAPPER_H
|
||||
|
||||
#include "DllMacro.h"
|
||||
|
||||
#include <QDialog>
|
||||
#include <QModelIndex>
|
||||
|
||||
@@ -35,7 +33,7 @@ class Account;
|
||||
class Ui_AccountFactoryWrapper;
|
||||
|
||||
// class AccountFactoryWrapper_
|
||||
class DLLEXPORT AccountFactoryWrapper : public QDialog
|
||||
class AccountFactoryWrapper : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
@@ -28,14 +28,13 @@
|
||||
#include "playlist/PlaylistView.h"
|
||||
#include "database/Database.h"
|
||||
#include "widgets/ImageButton.h"
|
||||
#include "utils/TomahawkUtilsGui.h"
|
||||
#include "utils/TomahawkUtils.h"
|
||||
#include "utils/Logger.h"
|
||||
#include "Album.h"
|
||||
#include "DropJob.h"
|
||||
#include "SocialWidget.h"
|
||||
#include "GlobalActionManager.h"
|
||||
#include "ViewManager.h"
|
||||
#include "Source.h"
|
||||
|
||||
using namespace Tomahawk;
|
||||
|
||||
@@ -54,10 +53,13 @@ AudioControls::AudioControls( QWidget* parent )
|
||||
QFont font( ui->artistTrackLabel->font() );
|
||||
font.setPixelSize( 12 );
|
||||
|
||||
#ifdef Q_WS_MAC
|
||||
font.setPixelSize( font.pixelSize() - 2 );
|
||||
#endif
|
||||
|
||||
ui->artistTrackLabel->setFont( font );
|
||||
ui->artistTrackLabel->setElideMode( Qt::ElideMiddle );
|
||||
ui->artistTrackLabel->setType( QueryLabel::ArtistAndTrack );
|
||||
ui->artistTrackLabel->setJumpLinkVisible( true );
|
||||
|
||||
ui->albumLabel->setFont( font );
|
||||
ui->albumLabel->setType( QueryLabel::Album );
|
||||
@@ -85,9 +87,6 @@ AudioControls::AudioControls( QWidget* parent )
|
||||
ui->socialButton->setPixmap( RESPATH "images/share.png" );
|
||||
ui->loveButton->setPixmap( RESPATH "images/not-loved.png" );
|
||||
ui->loveButton->setCheckable( true );
|
||||
|
||||
ui->socialButton->setFixedSize( QSize( 20, 20 ) );
|
||||
ui->loveButton->setFixedSize( QSize( 20, 20 ) );
|
||||
|
||||
#ifdef Q_WS_MAC
|
||||
ui->ownerLabel->setForegroundRole( QPalette::Text );
|
||||
@@ -546,6 +545,7 @@ void
|
||||
AudioControls::onTrackClicked()
|
||||
{
|
||||
ViewManager::instance()->show( m_currentTrack->toQuery() );
|
||||
// ViewManager::instance()->showCurrentTrack();
|
||||
}
|
||||
|
||||
|
||||
@@ -596,13 +596,10 @@ AudioControls::droppedTracks( QList< query_ptr > tracks )
|
||||
void
|
||||
AudioControls::onSocialButtonClicked()
|
||||
{
|
||||
if ( !m_socialWidget.isNull() )
|
||||
return;
|
||||
|
||||
m_socialWidget = new SocialWidget( m_parent );
|
||||
m_socialWidget.data()->setPosition( m_socialWidget.data()->mapFromGlobal( QCursor::pos() ) );
|
||||
m_socialWidget.data()->setQuery( m_currentTrack->toQuery() );
|
||||
m_socialWidget.data()->show();
|
||||
SocialWidget* sw = new SocialWidget( m_parent );
|
||||
sw->setPosition( QCursor::pos() );
|
||||
sw->setQuery( m_currentTrack->toQuery() );
|
||||
sw->show();
|
||||
}
|
||||
|
||||
|
||||
|
@@ -31,7 +31,6 @@
|
||||
class QDropEvent;
|
||||
class QDragEnterEvent;
|
||||
class QDragMoveEvent;
|
||||
class SocialWidget;
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
@@ -92,8 +91,6 @@ private:
|
||||
void setSocialActions();
|
||||
|
||||
Ui::AudioControls* ui;
|
||||
|
||||
QWeakPointer<SocialWidget> m_socialWidget;
|
||||
|
||||
Tomahawk::result_ptr m_currentTrack;
|
||||
Tomahawk::PlaylistModes::RepeatMode m_repeatMode;
|
||||
|
@@ -177,9 +177,6 @@
|
||||
<property name="bottomMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2" stretch="1,0,0">
|
||||
<property name="topMargin">
|
||||
@@ -188,12 +185,6 @@
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="trackLabelLayout">
|
||||
<property name="topMargin">
|
||||
@@ -202,15 +193,6 @@
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QueryLabel" name="artistTrackLabel">
|
||||
<property name="sizePolicy">
|
||||
@@ -225,6 +207,9 @@
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="cursor">
|
||||
<cursorShape>PointingHandCursor</cursorShape>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Artist</string>
|
||||
</property>
|
||||
@@ -244,6 +229,9 @@
|
||||
<height>16</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="cursor">
|
||||
<cursorShape>PointingHandCursor</cursorShape>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Album</string>
|
||||
</property>
|
||||
@@ -368,15 +356,6 @@
|
||||
<property name="leftMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="timeLabel">
|
||||
<property name="text">
|
||||
@@ -453,9 +432,6 @@
|
||||
<property name="rightMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
|
@@ -13,6 +13,8 @@ SET( QT_USE_QTNETWORK TRUE )
|
||||
SET( QT_USE_QTXML TRUE )
|
||||
SET( QT_USE_QTWEBKIT TRUE )
|
||||
|
||||
add_definitions( -DQT_SHAREDPOINTER_TRACK_POINTERS )
|
||||
|
||||
INCLUDE( ${QT_USE_FILE} )
|
||||
INCLUDE( AddAppIconMacro )
|
||||
|
||||
@@ -66,13 +68,27 @@ SET( tomahawkSourcesGui ${tomahawkSourcesGui}
|
||||
sourcetree/items/GroupItem.cpp
|
||||
sourcetree/items/HistoryItem.cpp
|
||||
|
||||
utils/GuiHelpers.cpp
|
||||
|
||||
accounts/lastfm/LastFmAccount.cpp
|
||||
accounts/lastfm/LastFmConfig.cpp
|
||||
accounts/lastfm/LastFmInfoPlugin.cpp
|
||||
|
||||
accounts/spotify/SpotifyAccount.cpp
|
||||
accounts/spotify/SpotifyAccountConfig.cpp
|
||||
accounts/spotify/SpotifyPlaylistUpdater.cpp
|
||||
|
||||
TomahawkTrayIcon.cpp
|
||||
AudioControls.cpp
|
||||
SettingsDialog.cpp
|
||||
DiagnosticsDialog.cpp
|
||||
AccountDelegate.cpp
|
||||
SettingsListDelegate.cpp
|
||||
DelegateConfigWrapper.cpp
|
||||
TomahawkWindow.cpp
|
||||
LoadXSPFDialog.cpp
|
||||
AccountFactoryWrapper.cpp
|
||||
AccountFactoryWrapperDelegate.cpp
|
||||
SocialWidget.cpp
|
||||
)
|
||||
|
||||
@@ -86,14 +102,19 @@ SET( tomahawkUI ${tomahawkUI}
|
||||
StackedSettingsDialog.ui
|
||||
ProxyDialog.ui
|
||||
|
||||
accounts/lastfm/LastFmConfig.ui
|
||||
accounts/spotify/SpotifyAccountConfig.ui
|
||||
|
||||
AudioControls.ui
|
||||
LoadXSPFDialog.ui
|
||||
AccountFactoryWrapper.ui
|
||||
SocialWidget.ui
|
||||
)
|
||||
|
||||
INCLUDE_DIRECTORIES(
|
||||
.
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_BINARY_DIR}/thirdparty/liblastfm2/src
|
||||
|
||||
audio
|
||||
database
|
||||
@@ -101,6 +122,7 @@ INCLUDE_DIRECTORIES(
|
||||
network
|
||||
sourcetree
|
||||
topbar
|
||||
utils
|
||||
libtomahawk
|
||||
mac
|
||||
|
||||
@@ -115,8 +137,6 @@ INCLUDE_DIRECTORIES(
|
||||
${LIBATTICA_INCLUDE_DIR}
|
||||
${LIBECHONEST_INCLUDE_DIR}
|
||||
${LIBECHONEST_INCLUDE_DIR}/..
|
||||
${LIBLASTFM_INCLUDE_DIRS}
|
||||
${LIBLASTFM_INCLUDE_DIRS}/..
|
||||
)
|
||||
|
||||
SET( OS_SPECIFIC_LINK_LIBRARIES "" )
|
||||
@@ -134,6 +154,11 @@ IF( APPLE )
|
||||
SET( tomahawkSources ${tomahawkSources} mac/TomahawkApp_Mac.mm mac/MacShortcutHandler.cpp )
|
||||
ENDIF( APPLE )
|
||||
|
||||
IF(GLOOX_FOUND)
|
||||
INCLUDE_DIRECTORIES( ${GLOOX_INCLUDE_DIR} )
|
||||
SET( tomahawkSources ${tomahawkSources} xmppbot/XmppBot.cpp )
|
||||
ENDIF(GLOOX_FOUND)
|
||||
|
||||
ADD_SUBDIRECTORY( accounts )
|
||||
ADD_SUBDIRECTORY( infoplugins )
|
||||
|
||||
@@ -145,9 +170,7 @@ INCLUDE(GNUInstallDirs)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Config.h.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/config.h)
|
||||
|
||||
# translations
|
||||
include( ${CMAKE_SOURCE_DIR}/lang/translations.cmake )
|
||||
add_tomahawk_translations(ar bg ca de en es fr ja pl pt_BR ru sv tr zh_CN zh_TW)
|
||||
|
||||
SET( final_src ${final_src} ${tomahawkMoc} ${tomahawkSources} ${trans_outfile})
|
||||
|
||||
@@ -182,13 +205,16 @@ MESSAGE( STATUS "OS_SPECIFIC_LINK_LIBRARIES: ${OS_SPECIFIC_LINK_LIBRARIES}" )
|
||||
|
||||
SET(LINK_LIBRARIES "")
|
||||
IF(LIBLASTFM_FOUND)
|
||||
SET( LINK_LIBRARIES ${LINK_LIBRARIES} ${LIBLASTFM_LIBRARIES} )
|
||||
SET(LINK_LIBRARIES ${LINK_LIBRARIES} tomahawk_lastfm2 )
|
||||
ENDIF(LIBLASTFM_FOUND)
|
||||
IF(GLOOX_FOUND)
|
||||
SET(LINK_LIBRARIES ${LINK_LIBRARIES} ${GLOOX_LIBRARIES} )
|
||||
ENDIF(GLOOX_FOUND)
|
||||
IF(QCA2_FOUND)
|
||||
SET( LINK_LIBRARIES ${LINK_LIBRARIES} ${QCA2_LIBRARIES} )
|
||||
SET(LINK_LIBRARIES ${LINK_LIBRARIES} ${QCA2_LIBRARIES} )
|
||||
ENDIF(QCA2_FOUND)
|
||||
IF(WITH_BREAKPAD)
|
||||
SET( LINK_LIBRARIES ${LINK_LIBRARIES} tomahawk_breakpad )
|
||||
SET(LINK_LIBRARIES ${LINK_LIBRARIES} tomahawk_breakpad)
|
||||
ENDIF()
|
||||
|
||||
TARGET_LINK_LIBRARIES( tomahawk
|
||||
|
@@ -19,10 +19,9 @@
|
||||
|
||||
#cmakedefine WITH_BREAKPAD
|
||||
#cmakedefine WITH_CRASHREPORTER
|
||||
#cmakedefine WITH_BINARY_ATTICA
|
||||
|
||||
|
||||
#cmakedefine LIBLASTFM_FOUND
|
||||
#cmakedefine GLOOX_FOUND
|
||||
#cmakedefine QCA2_FOUND
|
||||
|
||||
#endif // CONFIG_H_IN
|
||||
|
@@ -124,9 +124,12 @@ DelegateConfigWrapper::rejected()
|
||||
void
|
||||
DelegateConfigWrapper::updateSizeHint()
|
||||
{
|
||||
hide();
|
||||
setSizeGripEnabled( false );
|
||||
setMinimumSize( sizeHint() );
|
||||
setMaximumSize( sizeHint() );
|
||||
|
||||
show();
|
||||
}
|
||||
|
||||
|
@@ -26,13 +26,11 @@
|
||||
#include "network/Servent.h"
|
||||
#include "SourceList.h"
|
||||
|
||||
#include <QLabel>
|
||||
#include <QTextEdit>
|
||||
#include <QDialogButtonBox>
|
||||
#include <QPushButton>
|
||||
#include <QApplication>
|
||||
#include <QClipboard>
|
||||
#include <QDebug>
|
||||
|
||||
#include "utils/Logger.h"
|
||||
#include "sip/SipHandler.h"
|
||||
@@ -44,17 +42,14 @@ DiagnosticsDialog::DiagnosticsDialog( QWidget *parent )
|
||||
{
|
||||
ui->setupUi( this );
|
||||
|
||||
connect( ui->updateButton, SIGNAL( clicked() ), this, SLOT( updateLogView() ) );
|
||||
connect( ui->clipboardButton, SIGNAL( clicked() ), this, SLOT( copyToClipboard() ) );
|
||||
connect( ui->buttonBox, SIGNAL( rejected() ), this, SLOT( reject() ) );
|
||||
|
||||
ui->scrollAreaWidgetContents->setLayout( new QVBoxLayout() );
|
||||
|
||||
updateLogView();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
DiagnosticsDialog::updateLogView()
|
||||
void DiagnosticsDialog::updateLogView()
|
||||
{
|
||||
QString log;
|
||||
|
||||
@@ -64,11 +59,16 @@ DiagnosticsDialog::updateLogView()
|
||||
);
|
||||
|
||||
// network
|
||||
log.append( "TOMAHAWK-VERSION: " TOMAHAWK_VERSION "\n\n" );
|
||||
log.append(
|
||||
"TOMAHAWK-VERSION: " TOMAHAWK_VERSION "\n\n\n"
|
||||
);
|
||||
|
||||
// network
|
||||
log.append( "NETWORK:\n General:\n" );
|
||||
if ( Servent::instance()->visibleExternally() )
|
||||
log.append(
|
||||
"NETWORK:\n"
|
||||
" General:\n"
|
||||
);
|
||||
if( Servent::instance()->visibleExternally() )
|
||||
{
|
||||
log.append(
|
||||
QString(
|
||||
@@ -83,13 +83,17 @@ DiagnosticsDialog::updateLogView()
|
||||
}
|
||||
else
|
||||
{
|
||||
log.append( " visible: false" );
|
||||
log.append(
|
||||
QString(
|
||||
" visible: false"
|
||||
)
|
||||
);
|
||||
}
|
||||
log.append("\n\n");
|
||||
|
||||
|
||||
ui->scrollAreaWidgetContents->layout()->addWidget( new QLabel( log, this ) );
|
||||
// Peers / Accounts, TODO
|
||||
ui->scrollAreaWidgetContents->layout()->addWidget( new QLabel( "ACCOUNTS:\n", this ) );
|
||||
|
||||
log.append("ACCOUNTS:\n");
|
||||
const QList< Tomahawk::source_ptr > sources = SourceList::instance()->sources( true );
|
||||
const QList< Tomahawk::Accounts::Account* > accounts = Tomahawk::Accounts::AccountManager::instance()->accounts( Tomahawk::Accounts::SipType );
|
||||
foreach ( Tomahawk::Accounts::Account* account, accounts )
|
||||
@@ -98,104 +102,6 @@ DiagnosticsDialog::updateLogView()
|
||||
if ( !account || !account->sipPlugin() )
|
||||
continue;
|
||||
|
||||
connect( account, SIGNAL( connectionStateChanged( Tomahawk::Accounts::Account::ConnectionState ) ),
|
||||
SLOT( onAccountConnectionStateChanged( Tomahawk::Accounts::Account::ConnectionState ) ) );
|
||||
connect( account, SIGNAL( error( int, QString ) ),
|
||||
SLOT( onAccountError( int, QString ) ) );
|
||||
|
||||
connect( account->sipPlugin(), SIGNAL( peerOnline( QString ) ), SLOT( onPeerOnline( QString ) ) );
|
||||
connect( account->sipPlugin(), SIGNAL( peerOffline( QString ) ), SLOT( onPeerOffline( QString ) ) );
|
||||
connect( account->sipPlugin(), SIGNAL( sipInfoReceived( QString, SipInfo ) ), SLOT( onSipInfoReceived( QString, SipInfo ) ) );
|
||||
connect( account->sipPlugin(), SIGNAL( softwareVersionReceived( QString, QString ) ), SLOT( onSoftwareVersionReceived( QString, QString ) ) );
|
||||
|
||||
QLabel* accountInfoLabel = new QLabel( this );
|
||||
ui->scrollAreaWidgetContents->layout()->addWidget( accountInfoLabel );
|
||||
m_accountDescriptionStore.insert( account, accountInfoLabel );
|
||||
|
||||
updateAccountLabel( account );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
DiagnosticsDialog::copyToClipboard()
|
||||
{
|
||||
QString log;
|
||||
foreach ( QLabel* label, m_accountDescriptionStore.values() )
|
||||
{
|
||||
log += label->text() + "\n\n";
|
||||
}
|
||||
|
||||
QApplication::clipboard()->setText( log );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
DiagnosticsDialog::onAccountConnectionStateChanged( Tomahawk::Accounts::Account::ConnectionState /* state */ )
|
||||
{
|
||||
Tomahawk::Accounts::Account* account = qobject_cast< Tomahawk::Accounts::Account* >( sender() );
|
||||
Q_ASSERT( account );
|
||||
|
||||
updateAccountLabel( account );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
DiagnosticsDialog::onAccountError( int /* errorId */ , QString /* errorString */ )
|
||||
{
|
||||
Tomahawk::Accounts::Account* account = qobject_cast< Tomahawk::Accounts::Account* >( sender() );
|
||||
Q_ASSERT( account );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
DiagnosticsDialog::onPeerOnline( const QString& )
|
||||
{
|
||||
Tomahawk::Accounts::Account* account = qobject_cast< SipPlugin* >( sender() )->account();
|
||||
Q_ASSERT( account );
|
||||
|
||||
updateAccountLabel( account );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
DiagnosticsDialog::onPeerOffline( const QString& )
|
||||
{
|
||||
Tomahawk::Accounts::Account* account = qobject_cast< SipPlugin* >( sender() )->account();
|
||||
Q_ASSERT( account );
|
||||
|
||||
updateAccountLabel( account );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
DiagnosticsDialog::onSipInfoReceived( const QString& /* peerId */ , const SipInfo& /* info */ )
|
||||
{
|
||||
Tomahawk::Accounts::Account* account = qobject_cast< SipPlugin* >( sender() )->account();
|
||||
Q_ASSERT( account );
|
||||
|
||||
updateAccountLabel( account );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
DiagnosticsDialog::onSoftwareVersionReceived( const QString& /* peerId */ , const QString& /* versionString */ )
|
||||
{
|
||||
Tomahawk::Accounts::Account* account = qobject_cast< SipPlugin* >( sender() )->account();
|
||||
Q_ASSERT( account );
|
||||
|
||||
updateAccountLabel( account );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
DiagnosticsDialog::updateAccountLabel( Tomahawk::Accounts::Account* account )
|
||||
{
|
||||
QLabel* accountInfoLabel = m_accountDescriptionStore.value( account );
|
||||
|
||||
if ( accountInfoLabel )
|
||||
{
|
||||
QString accountInfo;
|
||||
QString stateString;
|
||||
switch( account->connectionState() )
|
||||
{
|
||||
@@ -212,7 +118,7 @@ DiagnosticsDialog::updateAccountLabel( Tomahawk::Accounts::Account* account )
|
||||
case Tomahawk::Accounts::Account::Disconnecting:
|
||||
stateString = "Disconnecting";
|
||||
}
|
||||
accountInfo.append(
|
||||
log.append(
|
||||
QString( " %2 (%1): %3 (%4)\n" )
|
||||
.arg( account->accountServiceName() )
|
||||
.arg( account->sipPlugin()->friendlyName() )
|
||||
@@ -220,43 +126,55 @@ DiagnosticsDialog::updateAccountLabel( Tomahawk::Accounts::Account* account )
|
||||
.arg( stateString )
|
||||
);
|
||||
|
||||
foreach( const QString& peerId, account->sipPlugin()->peersOnline() )
|
||||
foreach( const QString &peerId, account->sipPlugin()->peersOnline() )
|
||||
{
|
||||
/* enable this again, when we check the Source.has this peerId
|
||||
bool connected = false;
|
||||
Q_FOREACH( const Tomahawk::source_ptr &source, sources )
|
||||
{
|
||||
if( source->controlConnection() )
|
||||
{
|
||||
connected = true;
|
||||
break;
|
||||
}
|
||||
}*/
|
||||
|
||||
QString versionString = SipHandler::instance()->versionString( peerId );
|
||||
SipInfo sipInfo = SipHandler::instance()->sipInfo( peerId );
|
||||
if ( !sipInfo.isValid() )
|
||||
{
|
||||
accountInfo.append(
|
||||
if( !sipInfo.isValid() )
|
||||
log.append(
|
||||
QString(" %1: %2 %3" /*"(%4)"*/ "\n")
|
||||
.arg( peerId )
|
||||
.arg( "sipinfo invalid" )
|
||||
.arg( versionString )
|
||||
// .arg( connected ? "connected" : "not connected")
|
||||
);
|
||||
}
|
||||
else if ( sipInfo.isVisible() )
|
||||
{
|
||||
accountInfo.append(
|
||||
else if( sipInfo.isVisible() )
|
||||
log.append(
|
||||
QString(" %1: %2:%3 %4" /*" (%5)"*/ "\n")
|
||||
.arg( peerId )
|
||||
.arg( sipInfo.host().hostName() )
|
||||
.arg( sipInfo.port() )
|
||||
.arg( versionString )
|
||||
// .arg( connected ? "connected" : "not connected")
|
||||
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
accountInfo.append(
|
||||
log.append(
|
||||
QString(" %1: visible: false %2" /*" (%3)"*/ "\n")
|
||||
.arg( peerId )
|
||||
.arg( versionString )
|
||||
// .arg( connected ? "connected" : "not connected")
|
||||
|
||||
);
|
||||
}
|
||||
}
|
||||
accountInfo.append( "\n" );
|
||||
|
||||
accountInfoLabel->setText( accountInfo );
|
||||
log.append("\n");
|
||||
}
|
||||
}
|
||||
ui->logView->setPlainText(log);
|
||||
}
|
||||
|
||||
void DiagnosticsDialog::copyToClipboard()
|
||||
{
|
||||
QApplication::clipboard()->setText( ui->logView->toPlainText() );
|
||||
}
|
||||
|
||||
|
@@ -19,15 +19,7 @@
|
||||
#ifndef DIGANOSTICSDIALOG_H
|
||||
#define DIAGNOSTICSDIALOG_H
|
||||
|
||||
#include "accounts/Account.h"
|
||||
|
||||
#include <QDialog>
|
||||
#include <QMap>
|
||||
|
||||
|
||||
class QLabel;
|
||||
|
||||
class SipInfo;
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
@@ -45,19 +37,8 @@ public:
|
||||
private slots:
|
||||
void updateLogView();
|
||||
void copyToClipboard();
|
||||
|
||||
void onAccountConnectionStateChanged( Tomahawk::Accounts::Account::ConnectionState state );
|
||||
void onAccountError( int errorId, QString errorString );
|
||||
void onPeerOnline( const QString& );
|
||||
void onPeerOffline( const QString& );
|
||||
void onSipInfoReceived( const QString& peerId, const SipInfo& info );
|
||||
void onSoftwareVersionReceived( const QString& peerId, const QString& versionString );
|
||||
|
||||
void updateAccountLabel( Tomahawk::Accounts::Account* );
|
||||
private:
|
||||
|
||||
QMap< Tomahawk::Accounts::Account*, QLabel* > m_accountDescriptionStore;
|
||||
|
||||
Ui::DiagnosticsDialog* ui;
|
||||
};
|
||||
|
||||
|
@@ -26,26 +26,19 @@
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QScrollArea" name="scrollArea">
|
||||
<property name="widgetResizable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<widget class="QWidget" name="scrollAreaWidgetContents">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>708</width>
|
||||
<height>386</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<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">
|
||||
|
@@ -106,17 +106,15 @@ MusicScanner::MusicScanner( const QStringList& dirs, quint32 bs )
|
||||
, m_batchsize( bs )
|
||||
, m_dirListerThreadController( 0 )
|
||||
{
|
||||
m_ext2mime.insert( "mp3", TomahawkUtils::extensionToMimetype( "mp3" ) );
|
||||
m_ext2mime.insert( "ogg", TomahawkUtils::extensionToMimetype( "ogg" ) );
|
||||
m_ext2mime.insert( "oga", TomahawkUtils::extensionToMimetype( "oga" ) );
|
||||
m_ext2mime.insert( "mpc", TomahawkUtils::extensionToMimetype( "mpc" ) );
|
||||
m_ext2mime.insert( "wma", TomahawkUtils::extensionToMimetype( "wma" ) );
|
||||
m_ext2mime.insert( "aac", TomahawkUtils::extensionToMimetype( "aac" ) );
|
||||
m_ext2mime.insert( "m4a", TomahawkUtils::extensionToMimetype( "m4a" ) );
|
||||
m_ext2mime.insert( "mp4", TomahawkUtils::extensionToMimetype( "mp4" ) );
|
||||
m_ext2mime.insert( "mp3", TomahawkUtils::extensionToMimetype( "mp3" ) );
|
||||
m_ext2mime.insert( "ogg", TomahawkUtils::extensionToMimetype( "ogg" ) );
|
||||
m_ext2mime.insert( "oga", TomahawkUtils::extensionToMimetype( "oga" ) );
|
||||
m_ext2mime.insert( "mpc", TomahawkUtils::extensionToMimetype( "mpc" ) );
|
||||
m_ext2mime.insert( "wma", TomahawkUtils::extensionToMimetype( "wma" ) );
|
||||
m_ext2mime.insert( "aac", TomahawkUtils::extensionToMimetype( "aac" ) );
|
||||
m_ext2mime.insert( "m4a", TomahawkUtils::extensionToMimetype( "m4a" ) );
|
||||
m_ext2mime.insert( "mp4", TomahawkUtils::extensionToMimetype( "mp4" ) );
|
||||
m_ext2mime.insert( "flac", TomahawkUtils::extensionToMimetype( "flac" ) );
|
||||
m_ext2mime.insert( "aiff", TomahawkUtils::extensionToMimetype( "aiff" ) );
|
||||
m_ext2mime.insert( "aif", TomahawkUtils::extensionToMimetype( "aif" ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -201,16 +199,18 @@ MusicScanner::listerFinished()
|
||||
foreach( const QString& key, m_filemtimes.keys() )
|
||||
m_filesToDelete << m_filemtimes[ key ].keys().first();
|
||||
|
||||
tDebug( LOGINFO ) << "Scanning complete, saving to database. ( deleted" << m_filesToDelete.count() << "- scanned" << m_scanned << "- skipped" << m_skipped << ")";
|
||||
tDebug( LOGEXTRA ) << "Skipped the following files (no tags / no valid audio):";
|
||||
foreach ( const QString& s, m_skippedFiles )
|
||||
tDebug( LOGEXTRA ) << s;
|
||||
tDebug() << "Lister finished: to delete:" << m_filesToDelete;
|
||||
|
||||
if ( m_filesToDelete.length() || m_scannedfiles.length() )
|
||||
{
|
||||
commitBatch( m_scannedfiles, m_filesToDelete );
|
||||
m_scannedfiles.clear();
|
||||
m_filesToDelete.clear();
|
||||
|
||||
tDebug( LOGINFO ) << "Scanning complete, saving to database. ( scanned" << m_scanned << "skipped" << m_skipped << ")";
|
||||
tDebug( LOGEXTRA ) << "Skipped the following files (no tags / no valid audio):";
|
||||
foreach ( const QString& s, m_skippedFiles )
|
||||
tDebug( LOGEXTRA ) << s;
|
||||
}
|
||||
else
|
||||
cleanup();
|
||||
@@ -287,7 +287,7 @@ MusicScanner::scanFile( const QFileInfo& fi )
|
||||
m_filemtimes.remove( "file://" + fi.canonicalFilePath() );
|
||||
}
|
||||
|
||||
//tDebug( LOGVERBOSE ) << Q_FUNC_INFO << "Scanning file:" << fi.canonicalFilePath();
|
||||
tDebug( LOGVERBOSE ) << Q_FUNC_INFO << "Scanning file:" << fi.canonicalFilePath();
|
||||
QVariant m = readFile( fi );
|
||||
if ( m.toMap().isEmpty() )
|
||||
return;
|
||||
@@ -335,8 +335,9 @@ MusicScanner::readFile( const QFileInfo& fi )
|
||||
|
||||
int bitrate = 0;
|
||||
int duration = 0;
|
||||
|
||||
|
||||
Tag *tag = Tag::fromFile( f );
|
||||
|
||||
if ( f.audioProperties() )
|
||||
{
|
||||
TagLib::AudioProperties *properties = f.audioProperties();
|
||||
@@ -344,14 +345,10 @@ MusicScanner::readFile( const QFileInfo& fi )
|
||||
bitrate = properties->bitrate();
|
||||
}
|
||||
|
||||
QString artist, album, track;
|
||||
if ( tag )
|
||||
{
|
||||
artist = tag->artist().trimmed();
|
||||
album = tag->album().trimmed();
|
||||
track = tag->title().trimmed();
|
||||
}
|
||||
if ( !tag || artist.isEmpty() || track.isEmpty() )
|
||||
QString artist = tag->artist().trimmed();
|
||||
QString album = tag->album().trimmed();
|
||||
QString track = tag->title().trimmed();
|
||||
if ( artist.isEmpty() || track.isEmpty() )
|
||||
{
|
||||
// FIXME: do some clever filename guessing
|
||||
m_skippedFiles << fi.canonicalFilePath();
|
||||
|
117
src/PipelineStatusView.cpp
Normal file
@@ -0,0 +1,117 @@
|
||||
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
||||
*
|
||||
* Copyright 2010-2011, Christian Muehlhaeuser <muesli@tomahawk-player.org>
|
||||
* Copyright 2011, Leo Franchi <lfranchi@kde.org>
|
||||
*
|
||||
* Tomahawk is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Tomahawk is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Tomahawk. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "JobStatusView.h"
|
||||
|
||||
#include <QHeaderView>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
#include "libtomahawk/Pipeline.h"
|
||||
|
||||
#include "utils/Logger.h"
|
||||
|
||||
using namespace Tomahawk;
|
||||
|
||||
|
||||
JobStatusView::JobStatusView( AnimatedSplitter* parent )
|
||||
: AnimatedWidget( parent )
|
||||
, m_parent( parent )
|
||||
{
|
||||
setHiddenSize( QSize( 0, 0 ) );
|
||||
setLayout( new QVBoxLayout() );
|
||||
m_tree = new QTreeWidget( this );
|
||||
|
||||
layout()->setMargin( 0 );
|
||||
layout()->addWidget( m_tree );
|
||||
|
||||
QStringList headers;
|
||||
headers << tr( "Searching For" ) << tr( "Pending" );
|
||||
m_tree->setHeaderLabels( headers );
|
||||
|
||||
m_tree->setHorizontalScrollBarPolicy( Qt::ScrollBarAlwaysOff );
|
||||
m_tree->setSizePolicy( QSizePolicy::Preferred, QSizePolicy::Ignored );
|
||||
m_tree->setColumnCount( 2 );
|
||||
m_tree->setColumnWidth( 0, 200 );
|
||||
m_tree->setColumnWidth( 1, 50 );
|
||||
|
||||
m_tree->header()->setStretchLastSection( true );
|
||||
m_tree->setRootIsDecorated( false );
|
||||
|
||||
m_tree->setFrameShape( QFrame::NoFrame );
|
||||
m_tree->setAttribute( Qt::WA_MacShowFocusRect, 0 );
|
||||
|
||||
new QTreeWidgetItem( m_tree );
|
||||
|
||||
connect( Pipeline::instance(), SIGNAL( resolving( Tomahawk::query_ptr ) ), SLOT( onPipelineUpdate( Tomahawk::query_ptr ) ) );
|
||||
connect( Pipeline::instance(), SIGNAL( idle() ), SLOT( onPipelineUpdate() ) );
|
||||
|
||||
#ifndef Q_WS_WIN
|
||||
QFont f = font();
|
||||
f.setPointSize( f.pointSize() - 1 );
|
||||
setFont( f );
|
||||
#endif
|
||||
|
||||
#ifdef Q_WS_MAC
|
||||
f.setPointSize( f.pointSize() - 2 );
|
||||
setFont( f );
|
||||
#endif
|
||||
|
||||
onPipelineUpdate();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
JobStatusView::onPipelineUpdate( const query_ptr& query )
|
||||
{
|
||||
QTreeWidgetItem* ti = m_tree->invisibleRootItem()->child( 0 );
|
||||
|
||||
if ( Pipeline::instance()->activeQueryCount() && !query.isNull() )
|
||||
{
|
||||
ti->setText( 0, QString( "%1 - %2" ).arg( query->artist() ).arg( query->track() ) );
|
||||
ti->setText( 1, QString( "%1" ).arg( Pipeline::instance()->activeQueryCount() + Pipeline::instance()->pendingQueryCount() ) );
|
||||
|
||||
if ( isHidden() )
|
||||
emit showWidget();
|
||||
}
|
||||
else
|
||||
{
|
||||
ti->setText( 0, tr( "Idle" ) );
|
||||
ti->setText( 1, QString( "None" ) );
|
||||
|
||||
if ( !isHidden() )
|
||||
emit hideWidget();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
QSize
|
||||
JobStatusView::sizeHint() const
|
||||
{
|
||||
unsigned int y = 0;
|
||||
y += m_tree->header()->height();
|
||||
y += m_tree->contentsMargins().top() + m_tree->contentsMargins().bottom();
|
||||
|
||||
if ( m_tree->invisibleRootItem()->childCount() )
|
||||
{
|
||||
unsigned int rowheight = m_tree->sizeHintForRow( 0 );
|
||||
y += rowheight * m_tree->invisibleRootItem()->childCount() + 2;
|
||||
}
|
||||
|
||||
return QSize( 0, y );
|
||||
}
|
51
src/PipelineStatusView.h
Normal file
@@ -0,0 +1,51 @@
|
||||
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
||||
*
|
||||
* Copyright 2010-2011, Christian Muehlhaeuser <muesli@tomahawk-player.org>
|
||||
* Copyright 2011, Leo Franchi <lfranchi@kde.org>
|
||||
*
|
||||
* Tomahawk is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Tomahawk is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Tomahawk. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef JOBSTATUSVIEW_H
|
||||
#define JOBSTATUSVIEW_H
|
||||
|
||||
#include <QTreeWidget>
|
||||
|
||||
#include "Typedefs.h"
|
||||
#include "widgets/AnimatedSplitter.h"
|
||||
#include "Query.h"
|
||||
|
||||
class StreamConnection;
|
||||
|
||||
class JobStatusView : public AnimatedWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit JobStatusView( AnimatedSplitter* parent );
|
||||
virtual ~JobStatusView()
|
||||
{
|
||||
}
|
||||
|
||||
QSize sizeHint() const;
|
||||
|
||||
private slots:
|
||||
void onPipelineUpdate( const Tomahawk::query_ptr& query = Tomahawk::query_ptr() );
|
||||
|
||||
private:
|
||||
QTreeView* m_tree;
|
||||
AnimatedSplitter* m_parent;
|
||||
};
|
||||
|
||||
#endif // JOBSTATUSVIEW_H
|
@@ -44,8 +44,8 @@ Scrobbler::Scrobbler( QObject* parent )
|
||||
SLOT( engineTick( unsigned int ) ), Qt::QueuedConnection );
|
||||
|
||||
connect( Tomahawk::InfoSystem::InfoSystem::instance(),
|
||||
SIGNAL( info( Tomahawk::InfoSystem::InfoRequestData, QVariant ) ),
|
||||
SLOT( infoSystemInfo( Tomahawk::InfoSystem::InfoRequestData, QVariant ) ) );
|
||||
SIGNAL( info( Tomahawk::InfoSystem::InfoRequestData, QVariant ) ),
|
||||
SLOT( infoSystemInfo( Tomahawk::InfoSystem::InfoRequestData, QVariant ) ) );
|
||||
|
||||
connect( AudioEngine::instance(), SIGNAL( started( const Tomahawk::result_ptr& ) ),
|
||||
SLOT( trackStarted( const Tomahawk::result_ptr& ) ), Qt::QueuedConnection );
|
||||
@@ -72,13 +72,16 @@ void
|
||||
Scrobbler::trackStarted( const Tomahawk::result_ptr& track )
|
||||
{
|
||||
Q_ASSERT( QThread::currentThread() == thread() );
|
||||
// qDebug() << Q_FUNC_INFO;
|
||||
|
||||
if ( m_reachedScrobblePoint )
|
||||
if( m_reachedScrobblePoint )
|
||||
{
|
||||
m_reachedScrobblePoint = false;
|
||||
scrobble();
|
||||
}
|
||||
|
||||
QVariantMap playInfo;
|
||||
|
||||
Tomahawk::InfoSystem::InfoStringHash trackInfo;
|
||||
trackInfo["title"] = track->track();
|
||||
trackInfo["artist"] = track->artist()->name();
|
||||
@@ -86,7 +89,6 @@ Scrobbler::trackStarted( const Tomahawk::result_ptr& track )
|
||||
trackInfo["duration"] = QString::number( track->duration() );
|
||||
trackInfo["albumpos"] = QString::number( track->albumpos() );
|
||||
|
||||
QVariantMap playInfo;
|
||||
playInfo["trackinfo"] = QVariant::fromValue< Tomahawk::InfoSystem::InfoStringHash >( trackInfo );
|
||||
playInfo["private"] = TomahawkSettings::instance()->privateListeningMode();
|
||||
|
||||
@@ -99,9 +101,9 @@ Scrobbler::trackStarted( const Tomahawk::result_ptr& track )
|
||||
|
||||
// liblastfm forces 0-length tracks to scrobble after 4 minutes, stupid.
|
||||
if ( track->duration() == 0 )
|
||||
m_scrobblePoint = lastfm::ScrobblePoint( 30 );
|
||||
m_scrobblePoint = ScrobblePoint( 30 );
|
||||
else
|
||||
m_scrobblePoint = lastfm::ScrobblePoint( track->duration() / 2 );
|
||||
m_scrobblePoint = ScrobblePoint( track->duration() / 2 );
|
||||
}
|
||||
|
||||
|
||||
@@ -124,7 +126,7 @@ Scrobbler::trackStopped()
|
||||
{
|
||||
Q_ASSERT( QThread::currentThread() == thread() );
|
||||
|
||||
if ( m_reachedScrobblePoint )
|
||||
if( m_reachedScrobblePoint )
|
||||
{
|
||||
m_reachedScrobblePoint = false;
|
||||
scrobble();
|
||||
|
@@ -20,7 +20,7 @@
|
||||
#ifndef TOMAHAWK_SCROBBLER_H
|
||||
#define TOMAHAWK_SCROBBLER_H
|
||||
|
||||
#include "lastfm/ScrobblePoint.h"
|
||||
#include "lastfm/ScrobblePoint"
|
||||
#include "Result.h"
|
||||
#include "infosystem/InfoSystem.h"
|
||||
|
||||
@@ -51,7 +51,7 @@ private:
|
||||
void scrobble();
|
||||
|
||||
bool m_reachedScrobblePoint;
|
||||
lastfm::ScrobblePoint m_scrobblePoint;
|
||||
ScrobblePoint m_scrobblePoint;
|
||||
};
|
||||
|
||||
|
||||
|
@@ -30,19 +30,18 @@
|
||||
#include <QtGui/QSizeGrip>
|
||||
|
||||
#include "AtticaManager.h"
|
||||
#include "AclRegistry.h"
|
||||
#include "TomahawkApp.h"
|
||||
#include "TomahawkSettings.h"
|
||||
#include "accounts/DelegateConfigWrapper.h"
|
||||
#include "DelegateConfigWrapper.h"
|
||||
#include "MusicScanner.h"
|
||||
#include "Pipeline.h"
|
||||
#include "Resolver.h"
|
||||
#include "ExternalResolverGui.h"
|
||||
#include "utils/TomahawkUtilsGui.h"
|
||||
#include "utils/GuiHelpers.h"
|
||||
#include "GuiHelpers.h"
|
||||
#include "ScanManager.h"
|
||||
#include "SettingsListDelegate.h"
|
||||
#include "accounts/AccountDelegate.h"
|
||||
#include "AccountDelegate.h"
|
||||
#include "database/Database.h"
|
||||
#include "network/Servent.h"
|
||||
#include "utils/AnimatedSpinner.h"
|
||||
@@ -52,7 +51,7 @@
|
||||
#include <accounts/AccountModelFilterProxy.h>
|
||||
#include <accounts/ResolverAccount.h>
|
||||
#include "utils/Logger.h"
|
||||
#include "accounts/AccountFactoryWrapper.h"
|
||||
#include "AccountFactoryWrapper.h"
|
||||
#include "accounts/spotify/SpotifyAccount.h"
|
||||
|
||||
#include "ui_ProxyDialog.h"
|
||||
@@ -99,8 +98,6 @@ SettingsDialog::SettingsDialog( QWidget *parent )
|
||||
ui->enableProxyCheckBox->setChecked( useProxy );
|
||||
ui->proxyButton->setEnabled( useProxy );
|
||||
|
||||
ui->aclEntryClearButton->setEnabled( TomahawkSettings::instance()->aclEntries().size() > 0 );
|
||||
connect( ui->aclEntryClearButton, SIGNAL( clicked( bool ) ), this, SLOT( aclEntryClearButtonClicked() ) );
|
||||
|
||||
createIcons();
|
||||
#ifdef Q_WS_X11
|
||||
@@ -500,24 +497,6 @@ SettingsDialog::installFromFile()
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
SettingsDialog::aclEntryClearButtonClicked()
|
||||
{
|
||||
QMessageBox::StandardButton button = QMessageBox::question(
|
||||
ui->stackedWidget,
|
||||
tr( "Delete all Access Control entries?" ),
|
||||
tr( "Do you really want to delete all Access Control entries? You will be asked for a decision again for each peer that you connect to." ),
|
||||
QMessageBox::Ok | QMessageBox::Cancel,
|
||||
QMessageBox::Ok
|
||||
);
|
||||
if ( button == QMessageBox::Ok )
|
||||
{
|
||||
ACLRegistry::instance()->wipeEntries();
|
||||
ui->aclEntryClearButton->setEnabled( false );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
SettingsDialog::scrollTo( const QModelIndex& idx )
|
||||
{
|
||||
|
@@ -97,8 +97,6 @@ private slots:
|
||||
void changePage( QListWidgetItem*, QListWidgetItem* );
|
||||
void serventReady();
|
||||
|
||||
void aclEntryClearButtonClicked();
|
||||
|
||||
void requiresRestart();
|
||||
|
||||
private:
|
||||
|
@@ -30,7 +30,7 @@
|
||||
#define CORNER_ROUNDNESS 8.0
|
||||
#define FADING_DURATION 500
|
||||
#define FONT_SIZE 16
|
||||
#define OPACITY 0.85
|
||||
#define OPACITY 0.70
|
||||
|
||||
|
||||
SocialWidget::SocialWidget( QWidget* parent )
|
||||
@@ -54,24 +54,18 @@ SocialWidget::SocialWidget( QWidget* parent )
|
||||
setFont( f );
|
||||
#endif
|
||||
|
||||
ui->charsLeftLabel->setForegroundRole( QPalette::BrightText );
|
||||
|
||||
ui->buttonBox->button( QDialogButtonBox::Ok )->setText( tr( "Tweet" ) );
|
||||
|
||||
ui->charsLeftLabel->setForegroundRole( QPalette::HighlightedText );
|
||||
|
||||
m_parent->installEventFilter( this );
|
||||
|
||||
connect( ui->buttonBox, SIGNAL( accepted() ), SLOT( accept() ) );
|
||||
connect( ui->buttonBox, SIGNAL( rejected() ), SLOT( close() ) );
|
||||
connect( ui->buttonBox, SIGNAL( rejected() ), SLOT( deleteLater() ) );
|
||||
connect( ui->textEdit, SIGNAL( textChanged() ), SLOT( onChanged() ) );
|
||||
connect( ui->facebookButton, SIGNAL( clicked( bool ) ), SLOT( onChanged() ) );
|
||||
connect( ui->twitterButton, SIGNAL( clicked( bool ) ), SLOT( onChanged() ) );
|
||||
connect( GlobalActionManager::instance(), SIGNAL( shortLinkReady( QUrl, QUrl, QVariant ) ), SLOT( onShortLinkReady( QUrl, QUrl, QVariant ) ) );
|
||||
|
||||
onChanged();
|
||||
|
||||
ui->twitterButton->setChecked( true );
|
||||
ui->twitterButton->setVisible( false );
|
||||
ui->facebookButton->setVisible( false );
|
||||
}
|
||||
|
||||
|
||||
@@ -89,7 +83,6 @@ SocialWidget::setOpacity( qreal opacity )
|
||||
if ( m_opacity == 0.00 && !isHidden() )
|
||||
{
|
||||
QWidget::hide();
|
||||
emit hidden();
|
||||
}
|
||||
else if ( m_opacity > 0.00 && isHidden() )
|
||||
{
|
||||
@@ -204,9 +197,9 @@ SocialWidget::onShortLinkReady( const QUrl& longUrl, const QUrl& shortUrl, const
|
||||
Q_UNUSED( callbackObj );
|
||||
|
||||
if ( m_query->album().isEmpty() )
|
||||
ui->textEdit->setText( tr( "Listening to \"%1\" by %2. %3" ).arg( m_query->track() ).arg( m_query->artist() ).arg( shortUrl.toString() ) );
|
||||
ui->textEdit->setText( tr( "Listening to \"%1\" by %2 and loving it! %3" ).arg( m_query->track() ).arg( m_query->artist() ).arg( shortUrl.toString() ) );
|
||||
else
|
||||
ui->textEdit->setText( tr( "Listening to \"%1\" by %2 on \"%3\". %4" ).arg( m_query->track() ).arg( m_query->artist() ).arg( m_query->album() ).arg( shortUrl.toString() ) );
|
||||
ui->textEdit->setText( tr( "Listening to \"%1\" by %2 on \"%3\" and loving it! %4" ).arg( m_query->track() ).arg( m_query->artist() ).arg( m_query->album() ).arg( shortUrl.toString() ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -236,29 +229,7 @@ void
|
||||
SocialWidget::accept()
|
||||
{
|
||||
tDebug() << "Sharing social link!";
|
||||
|
||||
QVariantMap shareInfo;
|
||||
Tomahawk::InfoSystem::InfoStringHash trackInfo;
|
||||
|
||||
trackInfo["title"] = m_query->track();
|
||||
trackInfo["artist"] = m_query->artist();
|
||||
trackInfo["album"] = m_query->album();
|
||||
|
||||
shareInfo["trackinfo"] = QVariant::fromValue< Tomahawk::InfoSystem::InfoStringHash >( trackInfo );
|
||||
shareInfo["message"] = ui->textEdit->toPlainText();
|
||||
shareInfo["accountlist"] = QStringList( "all" );
|
||||
|
||||
Tomahawk::InfoSystem::InfoPushData pushData( uuid(), Tomahawk::InfoSystem::InfoShareTrack, shareInfo, Tomahawk::InfoSystem::PushNoFlag );
|
||||
Tomahawk::InfoSystem::InfoSystem::instance()->pushInfo( pushData );
|
||||
|
||||
deleteLater();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
SocialWidget::close()
|
||||
{
|
||||
QWidget::hide();
|
||||
deleteLater();
|
||||
}
|
||||
|
||||
|
@@ -50,9 +50,6 @@ public:
|
||||
|
||||
bool shown() const;
|
||||
|
||||
signals:
|
||||
void hidden();
|
||||
|
||||
public slots:
|
||||
void show( int timeoutSecs = 0 );
|
||||
void hide();
|
||||
@@ -68,7 +65,6 @@ private slots:
|
||||
void onShortLinkReady( const QUrl& longUrl, const QUrl& shortUrl, const QVariant& callbackObj );
|
||||
|
||||
void onGeometryUpdate();
|
||||
void close();
|
||||
|
||||
private:
|
||||
unsigned int charsAvailable() const;
|
||||
|
@@ -418,30 +418,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="aclEntryClearLayout">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="aclEntryClearButton">
|
||||
<property name="text">
|
||||
<string>Clear All Access Control Entries</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
@@ -29,7 +29,6 @@
|
||||
#include <QtNetwork/QNetworkReply>
|
||||
#include <QtCore/QFile>
|
||||
#include <QtCore/QFileInfo>
|
||||
#include <QTranslator>
|
||||
|
||||
#include "Artist.h"
|
||||
#include "Album.h"
|
||||
@@ -84,6 +83,11 @@
|
||||
#include <TomahawkSettingsGui.h>
|
||||
#endif
|
||||
|
||||
// should go to a plugin actually
|
||||
#ifdef GLOOX_FOUND
|
||||
#include "xmppbot/XmppBot.h"
|
||||
#endif
|
||||
|
||||
#ifdef Q_WS_MAC
|
||||
#include "mac/MacShortcutHandler.h"
|
||||
|
||||
@@ -121,9 +125,6 @@ using namespace Tomahawk;
|
||||
|
||||
TomahawkApp::TomahawkApp( int& argc, char *argv[] )
|
||||
: TOMAHAWK_APPLICATION( argc, argv )
|
||||
#ifndef ENABLE_HEADLESS
|
||||
, m_mainwindow( 0 )
|
||||
#endif
|
||||
, m_headless( false )
|
||||
, m_loaded( false )
|
||||
{
|
||||
@@ -133,43 +134,6 @@ TomahawkApp::TomahawkApp( int& argc, char *argv[] )
|
||||
setApplicationVersion( QLatin1String( TOMAHAWK_VERSION ) );
|
||||
|
||||
registerMetaTypes();
|
||||
installTranslator();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
TomahawkApp::installTranslator()
|
||||
{
|
||||
QString locale = QLocale::system().name();
|
||||
if ( locale == "C" )
|
||||
locale = "en";
|
||||
|
||||
// Tomahawk translations
|
||||
QTranslator* translator = new QTranslator( this );
|
||||
if ( translator->load( QString( ":/lang/tomahawk_" ) + locale ) )
|
||||
{
|
||||
tDebug() << "Translation: Tomahawk: Using system locale:" << locale;
|
||||
}
|
||||
else
|
||||
{
|
||||
tDebug() << "Translation: Tomahawk: Using default locale, system locale one not found:" << locale;
|
||||
translator->load( QString( ":/lang/tomahawk_en" ) );
|
||||
}
|
||||
|
||||
TOMAHAWK_APPLICATION::installTranslator( translator );
|
||||
|
||||
// Qt translations
|
||||
translator = new QTranslator( this );
|
||||
if ( translator->load( QString( ":/lang/qt_" ) + locale ) )
|
||||
{
|
||||
tDebug() << "Translation: Qt: Using system locale:" << locale;
|
||||
}
|
||||
else
|
||||
{
|
||||
tDebug() << "Translation: Qt: Using default locale, system locale one not found:" << locale;
|
||||
}
|
||||
|
||||
TOMAHAWK_APPLICATION::installTranslator( translator );
|
||||
}
|
||||
|
||||
|
||||
@@ -191,6 +155,7 @@ TomahawkApp::init()
|
||||
#ifdef ENABLE_HEADLESS
|
||||
m_headless = true;
|
||||
#else
|
||||
m_mainwindow = 0;
|
||||
m_headless = arguments().contains( "--headless" );
|
||||
setWindowIcon( QIcon( RESPATH "icons/tomahawk-icon-128x128.png" ) );
|
||||
setQuitOnLastWindowClosed( false );
|
||||
@@ -200,8 +165,6 @@ TomahawkApp::init()
|
||||
QFontMetrics fm( f );
|
||||
TomahawkUtils::setHeaderHeight( fm.height() + 8 );
|
||||
#endif
|
||||
|
||||
TomahawkUtils::setHeadless( m_headless );
|
||||
|
||||
TomahawkSettings* s = TomahawkSettings::instance();
|
||||
|
||||
@@ -346,9 +309,9 @@ TomahawkApp::init()
|
||||
connect( r, SIGNAL( finished() ), this, SLOT( spotifyApiCheckFinished() ) );
|
||||
#endif
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
#ifdef Q_WS_MAC
|
||||
// Make sure to do this after main window is inited
|
||||
Tomahawk::enableFullscreen( m_mainwindow );
|
||||
Tomahawk::enableFullscreen();
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -362,8 +325,7 @@ TomahawkApp::~TomahawkApp()
|
||||
if ( !m_connector.isNull() )
|
||||
delete m_connector.data();
|
||||
|
||||
if ( Pipeline::instance() )
|
||||
Pipeline::instance()->stop();
|
||||
Pipeline::instance()->stop();
|
||||
|
||||
if ( !m_servent.isNull() )
|
||||
delete m_servent.data();
|
||||
@@ -464,7 +426,6 @@ TomahawkApp::registerMetaTypes()
|
||||
qRegisterMetaType<Tomahawk::ModelMode>("Tomahawk::ModelMode");
|
||||
|
||||
// Extra definition for namespaced-versions of signals/slots required
|
||||
qRegisterMetaType< Tomahawk::Resolver* >("Tomahawk::Resolver*");
|
||||
qRegisterMetaType< Tomahawk::source_ptr >("Tomahawk::source_ptr");
|
||||
qRegisterMetaType< Tomahawk::collection_ptr >("Tomahawk::collection_ptr");
|
||||
qRegisterMetaType< Tomahawk::result_ptr >("Tomahawk::result_ptr");
|
||||
@@ -632,6 +593,10 @@ TomahawkApp::initSIP()
|
||||
//FIXME: jabber autoconnect is really more, now that there is sip -- should be renamed and/or split out of jabber-specific settings
|
||||
if ( !arguments().contains( "--nosip" ) )
|
||||
{
|
||||
#ifdef GLOOX_FOUND
|
||||
m_xmppBot = QWeakPointer<XMPPBot>( new XMPPBot( this ) );
|
||||
#endif
|
||||
|
||||
tDebug( LOGINFO ) << "Connecting SIP classes";
|
||||
Accounts::AccountManager::instance()->initSIP();
|
||||
}
|
||||
|
@@ -64,7 +64,7 @@ namespace Tomahawk
|
||||
}
|
||||
|
||||
#ifdef LIBLASTFM_FOUND
|
||||
#include <lastfm/NetworkAccessManager.h>
|
||||
#include <lastfm/NetworkAccessManager>
|
||||
#include "Scrobbler.h"
|
||||
#endif
|
||||
|
||||
@@ -98,7 +98,7 @@ public:
|
||||
virtual bool loadUrl( const QString& url );
|
||||
|
||||
bool isTomahawkLoaded() const { return m_loaded; }
|
||||
|
||||
|
||||
signals:
|
||||
void tomahawkLoaded();
|
||||
|
||||
@@ -115,7 +115,6 @@ private slots:
|
||||
void accountManagerReady();
|
||||
|
||||
private:
|
||||
void installTranslator();
|
||||
void registerMetaTypes();
|
||||
|
||||
void printHelp();
|
||||
|
@@ -40,14 +40,8 @@ TomahawkTrayIcon::TomahawkTrayIcon( QObject* parent )
|
||||
, m_currentAnimationFrame( 0 )
|
||||
, m_showWindowAction( 0 )
|
||||
, m_stopContinueAfterTrackAction( 0 )
|
||||
, m_loveTrackAction( 0 )
|
||||
{
|
||||
#ifdef Q_WS_MAC
|
||||
QIcon icon( RESPATH "icons/tomahawk-icon-128x128-grayscale.png" );
|
||||
#else
|
||||
QIcon icon( RESPATH "icons/tomahawk-icon-128x128.png" );
|
||||
#endif
|
||||
|
||||
setIcon( icon );
|
||||
|
||||
refreshToolTip();
|
||||
@@ -55,14 +49,12 @@ TomahawkTrayIcon::TomahawkTrayIcon( QObject* parent )
|
||||
m_contextMenu = new QMenu();
|
||||
setContextMenu( m_contextMenu );
|
||||
|
||||
m_loveTrackAction = new QAction( this );
|
||||
m_stopContinueAfterTrackAction = new QAction( this );
|
||||
onStopContinueAfterTrackChanged();
|
||||
|
||||
ActionCollection *ac = ActionCollection::instance();
|
||||
m_contextMenu->addAction( ac->getAction( "playPause" ) );
|
||||
m_contextMenu->addAction( ac->getAction( "stop" ) );
|
||||
m_contextMenu->addSeparator();
|
||||
m_contextMenu->addAction( m_loveTrackAction );
|
||||
m_contextMenu->addAction( m_stopContinueAfterTrackAction );
|
||||
m_contextMenu->addSeparator();
|
||||
m_contextMenu->addAction( ac->getAction( "previousTrack" ) );
|
||||
@@ -70,6 +62,8 @@ TomahawkTrayIcon::TomahawkTrayIcon( QObject* parent )
|
||||
m_contextMenu->addSeparator();
|
||||
m_contextMenu->addAction( ActionCollection::instance()->getAction( "togglePrivacy" ) );
|
||||
|
||||
connect( m_stopContinueAfterTrackAction, SIGNAL( triggered() ), SLOT( stopContinueAfterTrackActionTriggered() ) );
|
||||
|
||||
#ifdef Q_WS_MAC
|
||||
// On mac you can close the windows while leaving the app open. We then need a way to show the main window again
|
||||
m_contextMenu->addSeparator();
|
||||
@@ -83,9 +77,6 @@ TomahawkTrayIcon::TomahawkTrayIcon( QObject* parent )
|
||||
m_contextMenu->addSeparator();
|
||||
m_contextMenu->addAction( ac->getAction( "quit" ) );
|
||||
|
||||
connect( m_loveTrackAction, SIGNAL( triggered() ), SLOT( loveTrackTriggered() ) );
|
||||
connect( m_stopContinueAfterTrackAction, SIGNAL( triggered() ), SLOT( stopContinueAfterTrackActionTriggered() ) );
|
||||
|
||||
connect( AudioEngine::instance(), SIGNAL( loading( Tomahawk::result_ptr ) ), SLOT( setResult( Tomahawk::result_ptr ) ) );
|
||||
connect( AudioEngine::instance(), SIGNAL( started( Tomahawk::result_ptr ) ), SLOT( onPlay() ) );
|
||||
connect( AudioEngine::instance(), SIGNAL( resumed() ), SLOT( onResume() ) );
|
||||
@@ -96,7 +87,6 @@ TomahawkTrayIcon::TomahawkTrayIcon( QObject* parent )
|
||||
connect( &m_animationTimer, SIGNAL( timeout() ), SLOT( onAnimationTimer() ) );
|
||||
connect( this, SIGNAL( activated( QSystemTrayIcon::ActivationReason ) ), SLOT( onActivated( QSystemTrayIcon::ActivationReason ) ) );
|
||||
|
||||
onStop();
|
||||
show();
|
||||
}
|
||||
|
||||
@@ -156,29 +146,8 @@ TomahawkTrayIcon::menuAboutToShow()
|
||||
void
|
||||
TomahawkTrayIcon::setResult( const Tomahawk::result_ptr& result )
|
||||
{
|
||||
if ( m_currentTrack )
|
||||
{
|
||||
disconnect( m_currentTrack->toQuery().data(), SIGNAL( socialActionsLoaded() ), this, SLOT( onSocialActionsLoaded() ) );
|
||||
}
|
||||
|
||||
m_currentTrack = result;
|
||||
refreshToolTip();
|
||||
|
||||
if ( result )
|
||||
connect( result->toQuery().data(), SIGNAL( socialActionsLoaded() ), SLOT( onSocialActionsLoaded() ), Qt::UniqueConnection );
|
||||
|
||||
onSocialActionsLoaded();
|
||||
onStopContinueAfterTrackChanged();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
TomahawkTrayIcon::onStopContinueAfterTrackChanged()
|
||||
{
|
||||
if ( m_currentTrack && m_currentTrack->toQuery()->equals( AudioEngine::instance()->stopAfterTrack() ) )
|
||||
m_stopContinueAfterTrackAction->setText( tr( "&Continue Playback after current Track" ) );
|
||||
else
|
||||
m_stopContinueAfterTrackAction->setText( tr( "&Stop Playback after current Track" ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -266,20 +235,16 @@ TomahawkTrayIcon::onPause()
|
||||
void
|
||||
TomahawkTrayIcon::onPlay()
|
||||
{
|
||||
m_loveTrackAction->setEnabled( true );
|
||||
m_stopContinueAfterTrackAction->setEnabled( true );
|
||||
|
||||
onResume();
|
||||
onStopContinueAfterTrackChanged();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
TomahawkTrayIcon::onStop()
|
||||
{
|
||||
m_loveTrackAction->setEnabled( false );
|
||||
m_stopContinueAfterTrackAction->setEnabled( false );
|
||||
|
||||
setResult( Tomahawk::result_ptr() );
|
||||
onPause();
|
||||
}
|
||||
|
||||
@@ -292,41 +257,26 @@ TomahawkTrayIcon::onResume()
|
||||
|
||||
|
||||
void
|
||||
TomahawkTrayIcon::loveTrackTriggered()
|
||||
TomahawkTrayIcon::onStopContinueAfterTrackChanged()
|
||||
{
|
||||
if ( !m_currentTrack )
|
||||
return;
|
||||
|
||||
m_currentTrack->toQuery()->setLoved( !m_currentTrack->toQuery()->loved() );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
TomahawkTrayIcon::stopContinueAfterTrackActionTriggered()
|
||||
{
|
||||
if ( !m_currentTrack )
|
||||
return;
|
||||
|
||||
if ( !m_currentTrack->toQuery()->equals( AudioEngine::instance()->stopAfterTrack() ) )
|
||||
AudioEngine::instance()->setStopAfterTrack( m_currentTrack->toQuery() );
|
||||
else
|
||||
AudioEngine::instance()->setStopAfterTrack( Tomahawk::query_ptr() );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
TomahawkTrayIcon::onSocialActionsLoaded()
|
||||
{
|
||||
m_loveTrackAction->setText( tr( "&Love" ) );
|
||||
m_loveTrackAction->setIcon( QIcon( RESPATH "images/loved.png" ) );
|
||||
|
||||
if ( !m_currentTrack )
|
||||
return;
|
||||
|
||||
if ( m_currentTrack->toQuery()->loved() )
|
||||
if ( !AudioEngine::instance()->currentTrack().isNull() )
|
||||
{
|
||||
m_loveTrackAction->setText( tr( "Un-&Love" ) );
|
||||
m_loveTrackAction->setIcon( QIcon( RESPATH "images/not-loved.png" ) );
|
||||
if ( AudioEngine::instance()->currentTrack()->toQuery()->equals( AudioEngine::instance()->stopAfterTrack() ) )
|
||||
m_stopContinueAfterTrackAction->setText( tr( "&Continue Playback after current Track" ) );
|
||||
else
|
||||
m_stopContinueAfterTrackAction->setText( tr( "&Stop Playback after current Track" ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void TomahawkTrayIcon::stopContinueAfterTrackActionTriggered()
|
||||
{
|
||||
if ( !AudioEngine::instance()->currentTrack().isNull() )
|
||||
{
|
||||
if ( !AudioEngine::instance()->currentTrack()->toQuery()->equals( AudioEngine::instance()->stopAfterTrack() ) )
|
||||
AudioEngine::instance()->setStopAfterTrack( AudioEngine::instance()->currentTrack()->toQuery() );
|
||||
else
|
||||
AudioEngine::instance()->setStopAfterTrack( Tomahawk::query_ptr() );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -352,3 +302,4 @@ TomahawkTrayIcon::event( QEvent* e )
|
||||
|
||||
return QSystemTrayIcon::event( e );
|
||||
}
|
||||
|
||||
|
@@ -49,13 +49,10 @@ private slots:
|
||||
void onStop();
|
||||
void onResume();
|
||||
|
||||
void onSocialActionsLoaded();
|
||||
void onStopContinueAfterTrackChanged();
|
||||
void stopContinueAfterTrackActionTriggered();
|
||||
void loveTrackTriggered();
|
||||
|
||||
void menuAboutToShow();
|
||||
|
||||
private:
|
||||
void refreshToolTip();
|
||||
~TomahawkTrayIcon();
|
||||
@@ -70,7 +67,6 @@ private:
|
||||
|
||||
QAction* m_showWindowAction;
|
||||
QAction* m_stopContinueAfterTrackAction;
|
||||
QAction* m_loveTrackAction;
|
||||
};
|
||||
|
||||
#endif // TOMAHAWK_TRAYICON_H
|
||||
|
@@ -23,7 +23,6 @@
|
||||
|
||||
#include <QAction>
|
||||
#include <QCloseEvent>
|
||||
#include <QDesktopServices>
|
||||
#include <QShowEvent>
|
||||
#include <QHideEvent>
|
||||
#include <QInputDialog>
|
||||
@@ -36,12 +35,14 @@
|
||||
#include <QTimer>
|
||||
#include <QToolBar>
|
||||
|
||||
#include "Playlist.h"
|
||||
#include "Query.h"
|
||||
#include "Artist.h"
|
||||
#include "ViewManager.h"
|
||||
#include "accounts/AccountManager.h"
|
||||
#include "sourcetree/SourceTreeView.h"
|
||||
#include "network/Servent.h"
|
||||
#include "utils/TomahawkUtilsGui.h"
|
||||
#include "utils/ProxyStyle.h"
|
||||
#include "utils/WidgetDragFilter.h"
|
||||
#include "widgets/AnimatedSplitter.h"
|
||||
#include "widgets/NewPlaylistWidget.h"
|
||||
#include "widgets/SearchWidget.h"
|
||||
@@ -51,31 +52,27 @@
|
||||
#include "playlist/PlaylistModel.h"
|
||||
#include "playlist/PlaylistView.h"
|
||||
#include "playlist/QueueView.h"
|
||||
#include "jobview/JobStatusView.h"
|
||||
#include "jobview/JobStatusModel.h"
|
||||
#include "jobview/ErrorStatusMessage.h"
|
||||
#include "jobview/JobStatusModel.h"
|
||||
|
||||
#include "Playlist.h"
|
||||
#include "Query.h"
|
||||
#include "Artist.h"
|
||||
#include "ViewManager.h"
|
||||
#include "ActionCollection.h"
|
||||
#include "AudioControls.h"
|
||||
#include "SettingsDialog.h"
|
||||
#include "DiagnosticsDialog.h"
|
||||
#include "TomahawkSettings.h"
|
||||
#include "SourceList.h"
|
||||
#include "jobview/JobStatusView.h"
|
||||
#include "jobview/JobStatusModel.h"
|
||||
#include "jobview/ErrorStatusMessage.h"
|
||||
#include "TomahawkTrayIcon.h"
|
||||
#include "ScanManager.h"
|
||||
#include "TomahawkApp.h"
|
||||
#include "LoadXSPFDialog.h"
|
||||
|
||||
#ifdef Q_WS_WIN
|
||||
#include <qtsparkle/Updater>
|
||||
#endif
|
||||
|
||||
#include "utils/Logger.h"
|
||||
#include "jobview/JobStatusModel.h"
|
||||
#include "LoadXSPFDialog.h"
|
||||
#include <ActionCollection.h>
|
||||
|
||||
using namespace Tomahawk;
|
||||
using namespace Accounts;
|
||||
@@ -121,8 +118,6 @@ TomahawkWindow::TomahawkWindow( QWidget* parent )
|
||||
|
||||
// set initial state
|
||||
onAccountDisconnected();
|
||||
audioStopped();
|
||||
|
||||
vm->setQueue( m_queueView );
|
||||
vm->showWelcomePage();
|
||||
}
|
||||
@@ -161,12 +156,11 @@ TomahawkWindow::loadSettings()
|
||||
restoreState( s->mainWindowState() );
|
||||
if ( !s->mainWindowSplitterState().isEmpty() )
|
||||
ui->splitter->restoreState( s->mainWindowSplitterState() );
|
||||
|
||||
// Always set stretch factor. If user hasn't manually set splitter sizes,
|
||||
// this will ensure a sane default on all startups. If the user has, the manual
|
||||
// size will override the default stretching
|
||||
ui->splitter->setStretchFactor( 0, 0 );
|
||||
ui->splitter->setStretchFactor( 1, 1 );
|
||||
else
|
||||
{
|
||||
ui->splitter->setStretchFactor( 0, 0 );
|
||||
ui->splitter->setStretchFactor( 1, 1 );
|
||||
}
|
||||
|
||||
#ifdef QT_MAC_USE_COCOA
|
||||
if ( workaround )
|
||||
@@ -197,7 +191,7 @@ TomahawkWindow::applyPlatformTweaks()
|
||||
if ( !QString( qApp->style()->metaObject()->className() ).toLower().contains( "qtcurve" ) )
|
||||
qApp->setStyle( new ProxyStyle() );
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
#ifdef Q_WS_MAC
|
||||
setUnifiedTitleAndToolBarOnMac( true );
|
||||
delete ui->hline1;
|
||||
delete ui->hline2;
|
||||
@@ -217,12 +211,7 @@ TomahawkWindow::setupToolBar()
|
||||
toolbar->setFloatable( false );
|
||||
toolbar->setIconSize( QSize( 22, 22 ) );
|
||||
toolbar->setToolButtonStyle( Qt::ToolButtonIconOnly );
|
||||
toolbar->setStyleSheet( "border-bottom: 0px" );
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
toolbar->installEventFilter( new WidgetDragFilter( toolbar ) );
|
||||
#endif
|
||||
|
||||
|
||||
m_backAction = toolbar->addAction( QIcon( RESPATH "images/back.png" ), tr( "Back" ), ViewManager::instance(), SLOT( historyBack() ) );
|
||||
m_backAction->setToolTip( tr( "Go back one page" ) );
|
||||
m_forwardAction = toolbar->addAction( QIcon( RESPATH "images/forward.png" ), tr( "Forward" ), ViewManager::instance(), SLOT( historyForward() ) );
|
||||
@@ -262,6 +251,10 @@ TomahawkWindow::setupSideBar()
|
||||
jobsView->setModel( m_jobsModel );
|
||||
|
||||
m_queueView = new QueueView( m_sidebar );
|
||||
m_queueModel = new PlaylistModel( m_queueView );
|
||||
m_queueModel->setStyle( PlaylistModel::Short );
|
||||
m_queueView->queue()->setPlaylistModel( m_queueModel );
|
||||
m_queueView->queue()->playlistModel()->setReadOnly( false );
|
||||
AudioEngine::instance()->setQueue( m_queueView->queue()->proxyModel()->playlistInterface() );
|
||||
|
||||
m_sidebar->addWidget( m_sourcetree );
|
||||
@@ -278,7 +271,7 @@ TomahawkWindow::setupSideBar()
|
||||
sidebarWidget->layout()->setContentsMargins( 0, 0, 0, 0 );
|
||||
sidebarWidget->layout()->setMargin( 0 );
|
||||
|
||||
#ifndef Q_OS_MAC
|
||||
#ifndef Q_WS_MAC
|
||||
sidebarWidget->layout()->setSpacing( 0 );
|
||||
#endif
|
||||
|
||||
@@ -293,11 +286,11 @@ TomahawkWindow::setupSideBar()
|
||||
void
|
||||
TomahawkWindow::setupUpdateCheck()
|
||||
{
|
||||
#ifndef Q_OS_MAC
|
||||
#ifndef Q_WS_MAC
|
||||
ui->menu_Help->insertSeparator( ui->actionAboutTomahawk );
|
||||
#endif
|
||||
|
||||
#if defined( Q_OS_MAC ) && defined( HAVE_SPARKLE )
|
||||
#if defined( Q_WS_MAC ) && defined( HAVE_SPARKLE )
|
||||
QAction* checkForUpdates = ui->menu_Help->addAction( tr( "Check For Updates..." ) );
|
||||
checkForUpdates->setMenuRole( QAction::ApplicationSpecificRole );
|
||||
connect( checkForUpdates, SIGNAL( triggered( bool ) ), SLOT( checkForUpdates() ) );
|
||||
@@ -335,14 +328,13 @@ TomahawkWindow::setupSignals()
|
||||
connect( AudioEngine::instance(), SIGNAL( loading( const Tomahawk::result_ptr& ) ), SLOT( onPlaybackLoading( const Tomahawk::result_ptr& ) ) );
|
||||
connect( AudioEngine::instance(), SIGNAL( started( Tomahawk::result_ptr ) ), SLOT( audioStarted() ) );
|
||||
connect( AudioEngine::instance(), SIGNAL( resumed()), SLOT( audioStarted() ) );
|
||||
connect( AudioEngine::instance(), SIGNAL( paused() ), SLOT( audioPaused() ) );
|
||||
connect( AudioEngine::instance(), SIGNAL( paused() ), SLOT( audioStopped() ) );
|
||||
connect( AudioEngine::instance(), SIGNAL( stopped() ), SLOT( audioStopped() ) );
|
||||
|
||||
// <Menu Items>
|
||||
// connect( ui->actionAddPeerManually, SIGNAL( triggered() ), SLOT( addPeerManually() ) );
|
||||
connect( ui->actionPreferences, SIGNAL( triggered() ), SLOT( showSettingsDialog() ) );
|
||||
connect( ui->actionDiagnostics, SIGNAL( triggered() ), SLOT( showDiagnosticsDialog() ) );
|
||||
connect( ui->actionLegalInfo, SIGNAL( triggered() ), SLOT( legalInfo() ) );
|
||||
connect( ui->actionToggleConnect, SIGNAL( triggered() ), AccountManager::instance(), SLOT( toggleAccountsConnected() ) );
|
||||
connect( ui->actionUpdateCollection, SIGNAL( triggered() ), SLOT( updateCollectionManually() ) );
|
||||
connect( ui->actionRescanCollection, SIGNAL( triggered() ), SLOT( rescanCollectionManually() ) );
|
||||
@@ -357,7 +349,7 @@ TomahawkWindow::setupSignals()
|
||||
connect( ui->actionNext, SIGNAL( triggered() ), AudioEngine::instance(), SLOT( next() ) );
|
||||
connect( ui->actionPrevious, SIGNAL( triggered() ), AudioEngine::instance(), SLOT( previous() ) );
|
||||
|
||||
#if defined( Q_OS_MAC )
|
||||
#if defined( Q_WS_MAC )
|
||||
connect( ui->actionMinimize, SIGNAL( triggered() ), SLOT( minimize() ) );
|
||||
connect( ui->actionZoom, SIGNAL( triggered() ), SLOT( maximize() ) );
|
||||
#else
|
||||
@@ -406,7 +398,7 @@ TomahawkWindow::changeEvent( QEvent* e )
|
||||
void
|
||||
TomahawkWindow::closeEvent( QCloseEvent* e )
|
||||
{
|
||||
#ifndef Q_OS_MAC
|
||||
#ifndef Q_WS_MAC
|
||||
if ( e->spontaneous() && QSystemTrayIcon::isSystemTrayAvailable() )
|
||||
{
|
||||
hide();
|
||||
@@ -426,7 +418,7 @@ TomahawkWindow::showEvent( QShowEvent* e )
|
||||
{
|
||||
QMainWindow::showEvent( e );
|
||||
|
||||
#if defined( Q_OS_MAC )
|
||||
#if defined( Q_WS_MAC )
|
||||
ui->actionMinimize->setDisabled( false );
|
||||
ui->actionZoom->setDisabled( false );
|
||||
#endif
|
||||
@@ -438,7 +430,7 @@ TomahawkWindow::hideEvent( QHideEvent* e )
|
||||
{
|
||||
QMainWindow::hideEvent( e );
|
||||
|
||||
#if defined( Q_OS_MAC )
|
||||
#if defined( Q_WS_MAC )
|
||||
ui->actionMinimize->setDisabled( true );
|
||||
ui->actionZoom->setDisabled( true );
|
||||
#endif
|
||||
@@ -449,7 +441,7 @@ void
|
||||
TomahawkWindow::keyPressEvent( QKeyEvent* e )
|
||||
{
|
||||
bool accept = true;
|
||||
#if ! defined ( Q_OS_MAC )
|
||||
#if ! defined ( Q_WS_MAC )
|
||||
#define KEY_PRESSED Q_FUNC_INFO << "Multimedia Key Pressed:"
|
||||
switch( e->key() )
|
||||
{
|
||||
@@ -514,21 +506,13 @@ TomahawkWindow::showSettingsDialog()
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
TomahawkWindow::showDiagnosticsDialog()
|
||||
void TomahawkWindow::showDiagnosticsDialog()
|
||||
{
|
||||
DiagnosticsDialog win;
|
||||
win.exec();
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
TomahawkWindow::legalInfo()
|
||||
{
|
||||
QDesktopServices::openUrl( QUrl( "http://www.tomahawk-player.org/legal.html" ) );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
TomahawkWindow::updateCollectionManually()
|
||||
{
|
||||
@@ -605,25 +589,11 @@ TomahawkWindow::showOfflineSources()
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
TomahawkWindow::fullScreenEntered()
|
||||
{
|
||||
statusBar()->setSizeGripEnabled( false );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
TomahawkWindow::fullScreenExited()
|
||||
{
|
||||
statusBar()->setSizeGripEnabled( true );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
TomahawkWindow::loadSpiff()
|
||||
{
|
||||
LoadXSPFDialog* diag = new LoadXSPFDialog( this, Qt::Sheet );
|
||||
#ifdef Q_OS_MAC
|
||||
#ifdef Q_WS_MAC
|
||||
connect( diag, SIGNAL( finished( int ) ), this, SLOT( loadXspfFinished( int ) ) );
|
||||
diag->show();
|
||||
#else
|
||||
@@ -709,18 +679,18 @@ TomahawkWindow::onAudioEngineError( AudioEngine::AudioErrorCode /* error */ )
|
||||
void
|
||||
TomahawkWindow::createAutomaticPlaylist( QString playlistName )
|
||||
{
|
||||
if ( playlistName.isEmpty() )
|
||||
QString name = playlistName;
|
||||
|
||||
if ( name.isEmpty() )
|
||||
return;
|
||||
|
||||
source_ptr author = SourceList::instance()->getLocal();
|
||||
QString id = uuid();
|
||||
QString info = ""; // FIXME
|
||||
QString creator = "someone"; // FIXME
|
||||
|
||||
dynplaylist_ptr playlist = DynamicPlaylist::create( author, id, playlistName, info, creator, Static, false );
|
||||
dynplaylist_ptr playlist = DynamicPlaylist::create( author, id, name, info, creator, Static, false );
|
||||
playlist->setMode( Static );
|
||||
playlist->createNewRevision( uuid(), playlist->currentrevision(), playlist->type(), playlist->generator()->controls(), playlist->entries() );
|
||||
|
||||
ViewManager::instance()->show( playlist );
|
||||
}
|
||||
|
||||
@@ -728,36 +698,18 @@ TomahawkWindow::createAutomaticPlaylist( QString playlistName )
|
||||
void
|
||||
TomahawkWindow::createStation()
|
||||
{
|
||||
QString title = tr( "Station" );
|
||||
bool ok;
|
||||
QString playlistName = QInputDialog( this, Qt::Sheet ).getText( this, tr( "Create New Station" ), tr( "Name:" ), QLineEdit::Normal, title, &ok );
|
||||
if ( !ok )
|
||||
QString name = QInputDialog::getText( this, tr( "Create New Station" ), tr( "Name:" ), QLineEdit::Normal, tr( "New Station" ), &ok );
|
||||
if ( !ok || name.isEmpty() )
|
||||
return;
|
||||
|
||||
if ( playlistName.isEmpty() || playlistName == title )
|
||||
{
|
||||
QList< dynplaylist_ptr > pls = SourceList::instance()->getLocal()->collection()->stations();
|
||||
QStringList titles;
|
||||
foreach ( const playlist_ptr& pl, pls )
|
||||
titles << pl->title();
|
||||
|
||||
playlistName = title;
|
||||
int i = 2;
|
||||
while ( titles.contains( playlistName ) )
|
||||
{
|
||||
playlistName = QString( "%1 (%2)" ).arg( title ).arg( i++ );
|
||||
}
|
||||
}
|
||||
|
||||
source_ptr author = SourceList::instance()->getLocal();
|
||||
QString id = uuid();
|
||||
QString info = ""; // FIXME
|
||||
QString creator = "someone"; // FIXME
|
||||
|
||||
dynplaylist_ptr playlist = DynamicPlaylist::create( author, id, playlistName, info, creator, OnDemand, false );
|
||||
dynplaylist_ptr playlist = DynamicPlaylist::create( author, id, name, info, creator, OnDemand, false );
|
||||
playlist->setMode( OnDemand );
|
||||
playlist->createNewRevision( uuid(), playlist->currentrevision(), playlist->type(), playlist->generator()->controls() );
|
||||
|
||||
ViewManager::instance()->show( playlist );
|
||||
}
|
||||
|
||||
@@ -766,12 +718,11 @@ void
|
||||
TomahawkWindow::createPlaylist()
|
||||
{
|
||||
PlaylistTypeSelectorDlg* playlistSelectorDlg = new PlaylistTypeSelectorDlg( TomahawkApp::instance()->mainWindow(), Qt::Sheet );
|
||||
|
||||
#ifndef Q_OS_MAC
|
||||
#ifndef Q_WS_MAC
|
||||
playlistSelectorDlg->setModal( true );
|
||||
#endif
|
||||
connect( playlistSelectorDlg, SIGNAL( finished( int ) ), this, SLOT( playlistCreateDialogFinished( int ) ) );
|
||||
|
||||
connect( playlistSelectorDlg, SIGNAL( finished( int ) ), SLOT( playlistCreateDialogFinished( int ) ) );
|
||||
playlistSelectorDlg->show();
|
||||
}
|
||||
|
||||
@@ -783,50 +734,17 @@ TomahawkWindow::playlistCreateDialogFinished( int ret )
|
||||
Q_ASSERT( playlistSelectorDlg );
|
||||
|
||||
QString playlistName = playlistSelectorDlg->playlistName();
|
||||
if ( playlistName.isEmpty() )
|
||||
playlistName = tr( "New Playlist" );
|
||||
|
||||
if ( !playlistSelectorDlg->playlistTypeIsAuto() && ret )
|
||||
{
|
||||
if ( playlistName.isEmpty() )
|
||||
{
|
||||
QList< playlist_ptr > pls = SourceList::instance()->getLocal()->collection()->playlists();
|
||||
QStringList titles;
|
||||
foreach ( const playlist_ptr& pl, pls )
|
||||
titles << pl->title();
|
||||
|
||||
QString title = tr( "Playlist" );
|
||||
playlistName = title;
|
||||
int i = 2;
|
||||
while ( titles.contains( playlistName ) )
|
||||
{
|
||||
playlistName = QString( "%1 (%2)" ).arg( title ).arg( i++ );
|
||||
}
|
||||
}
|
||||
if ( !playlistSelectorDlg->playlistTypeIsAuto() && ret ) {
|
||||
|
||||
playlist_ptr playlist = Tomahawk::Playlist::create( SourceList::instance()->getLocal(), uuid(), playlistName, "", "", false, QList< query_ptr>() );
|
||||
ViewManager::instance()->show( playlist );
|
||||
}
|
||||
else if ( playlistSelectorDlg->playlistTypeIsAuto() && ret )
|
||||
{
|
||||
} else if ( playlistSelectorDlg->playlistTypeIsAuto() && ret ) {
|
||||
// create Auto Playlist
|
||||
if ( playlistName.isEmpty() )
|
||||
{
|
||||
QList< dynplaylist_ptr > pls = SourceList::instance()->getLocal()->collection()->autoPlaylists();
|
||||
QStringList titles;
|
||||
foreach ( const dynplaylist_ptr& pl, pls )
|
||||
titles << pl->title();
|
||||
|
||||
QString title = tr( "Automatic Playlist" );
|
||||
playlistName = title;
|
||||
int i = 2;
|
||||
while ( titles.contains( playlistName ) )
|
||||
{
|
||||
playlistName = QString( "%1 (%2)" ).arg( title ).arg( i++ );
|
||||
}
|
||||
}
|
||||
|
||||
createAutomaticPlaylist( playlistName );
|
||||
}
|
||||
|
||||
playlistSelectorDlg->deleteLater();
|
||||
}
|
||||
|
||||
@@ -835,27 +753,21 @@ void
|
||||
TomahawkWindow::audioStarted()
|
||||
{
|
||||
m_audioRetryCounter = 0;
|
||||
|
||||
ui->actionPlay->setText( tr( "Pause" ) );
|
||||
ActionCollection::instance()->getAction( "stop" )->setEnabled( true );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
TomahawkWindow::audioPaused()
|
||||
{
|
||||
ui->actionPlay->setText( tr( "Play" ) );
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
TomahawkWindow::audioStopped()
|
||||
{
|
||||
audioPaused();
|
||||
ActionCollection::instance()->getAction( "stop" )->setEnabled( false );
|
||||
ui->actionPlay->setText( tr( "Play" ) );
|
||||
|
||||
m_currentTrack = result_ptr();
|
||||
setWindowTitle( m_windowTitle );
|
||||
tDebug() << Q_FUNC_INFO << AudioEngine::instance()->isStopped();
|
||||
if ( AudioEngine::instance()->isStopped() )
|
||||
{
|
||||
m_currentTrack = result_ptr();
|
||||
setWindowTitle( m_windowTitle );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -935,13 +847,8 @@ TomahawkWindow::showAboutTomahawk()
|
||||
.arg( TomahawkUtils::appFriendlyVersion() );
|
||||
#endif
|
||||
|
||||
const QString copyright( tr( "Copyright 2010 - 2012" ) );
|
||||
const QString thanksto( tr( "Thanks to:" ) );
|
||||
|
||||
desc = QString( "%1<br/>Christian Muehlhaeuser <muesli@tomahawk-player.org><br/><br/>"
|
||||
"%2 Leo Franchi, Jeff Mitchell, Dominik Schmidt, Jason Herskowitz, Alejandro Wainzinger, Hugo Lindström, Syd Lawrence, Michael Zanetti, Harald Sitter, Steve Robertson" )
|
||||
.arg( copyright )
|
||||
.arg( thanksto );
|
||||
desc = tr( "Copyright 2010 - 2012<br/>Christian Muehlhaeuser <muesli@tomahawk-player.org><br/><br/>"
|
||||
"Thanks to: Leo Franchi, Jeff Mitchell, Dominik Schmidt, Jason Herskowitz, Alejandro Wainzinger, Hugo Lindström, Michael Zanetti, Harald Sitter and Steve Robertson" );
|
||||
|
||||
QMessageBox::about( this, tr( "About Tomahawk" ), head + desc );
|
||||
}
|
||||
@@ -950,7 +857,7 @@ TomahawkWindow::showAboutTomahawk()
|
||||
void
|
||||
TomahawkWindow::checkForUpdates()
|
||||
{
|
||||
#ifdef Q_OS_MAC
|
||||
#ifdef Q_WS_MAC
|
||||
Tomahawk::checkForUpdates();
|
||||
#endif
|
||||
}
|
||||
|
@@ -82,16 +82,12 @@ public slots:
|
||||
void loadSpiff();
|
||||
void showSettingsDialog();
|
||||
void showDiagnosticsDialog();
|
||||
void legalInfo();
|
||||
void updateCollectionManually();
|
||||
void rescanCollectionManually();
|
||||
void pluginMenuAdded(QMenu*);
|
||||
void pluginMenuRemoved(QMenu*);
|
||||
void showOfflineSources();
|
||||
|
||||
void fullScreenEntered();
|
||||
void fullScreenExited();
|
||||
|
||||
private slots:
|
||||
void onAccountAdded( Tomahawk::Accounts::Account* account );
|
||||
void onAccountConnected();
|
||||
@@ -111,7 +107,6 @@ private slots:
|
||||
void onPlaybackLoading( const Tomahawk::result_ptr& result );
|
||||
|
||||
void audioStarted();
|
||||
void audioPaused();
|
||||
void audioStopped();
|
||||
|
||||
void showAboutTomahawk();
|
||||
@@ -149,6 +144,7 @@ private:
|
||||
SourceTreeView* m_sourcetree;
|
||||
QPushButton* m_statusButton;
|
||||
QPushButton* m_queueButton;
|
||||
PlaylistModel* m_queueModel;
|
||||
QueueView* m_queueView;
|
||||
AnimatedSplitter* m_sidebar;
|
||||
JobStatusModel* m_jobsModel;
|
||||
|
@@ -115,7 +115,6 @@
|
||||
</property>
|
||||
<addaction name="actionDiagnostics"/>
|
||||
<addaction name="actionAboutTomahawk"/>
|
||||
<addaction name="actionLegalInfo"/>
|
||||
</widget>
|
||||
<addaction name="menuApp"/>
|
||||
<addaction name="menuNetwork"/>
|
||||
@@ -218,14 +217,6 @@
|
||||
<string>Meta+Ctrl+Z</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionLegalInfo">
|
||||
<property name="text">
|
||||
<string>&Legal Info...</string>
|
||||
</property>
|
||||
<property name="menuRole">
|
||||
<enum>QAction::ApplicationSpecificRole</enum>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionDiagnostics">
|
||||
<property name="text">
|
||||
<string>Diagnostics...</string>
|
||||
|
@@ -75,6 +75,7 @@ LastFmAccount::LastFmAccount( const QString& accountId )
|
||||
{
|
||||
infoPlugin().data()->moveToThread( Tomahawk::InfoSystem::InfoSystem::instance()->workerThread().data() );
|
||||
Tomahawk::InfoSystem::InfoSystem::instance()->addInfoPlugin( infoPlugin() );
|
||||
QMetaObject::invokeMethod( infoPlugin().data(), "init", Qt::QueuedConnection );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -288,7 +289,7 @@ LastFmAccount::hookupResolver()
|
||||
|
||||
const AtticaManager::Resolver data = AtticaManager::instance()->resolverData( res.id() );
|
||||
|
||||
m_resolver = QWeakPointer< ExternalResolverGui >( qobject_cast< ExternalResolverGui* >( Pipeline::instance()->addScriptResolver( data.scriptPath ) ) );
|
||||
m_resolver = QWeakPointer< ExternalResolverGui >( qobject_cast< ExternalResolverGui* >( Pipeline::instance()->addScriptResolver( data.scriptPath, enabled() ) ) );
|
||||
connect( m_resolver.data(), SIGNAL( changed() ), this, SLOT( resolverChanged() ) );
|
||||
}
|
||||
|
@@ -21,7 +21,6 @@
|
||||
|
||||
#include "accounts/Account.h"
|
||||
#include "AtticaManager.h"
|
||||
#include "DllMacro.h"
|
||||
|
||||
#include <attica/content.h>
|
||||
|
||||
@@ -38,7 +37,7 @@ namespace Accounts {
|
||||
|
||||
class LastFmConfig;
|
||||
|
||||
class DLLEXPORT LastFmAccountFactory : public AccountFactory
|
||||
class LastFmAccountFactory : public AccountFactory
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
@@ -58,11 +57,11 @@ private:
|
||||
};
|
||||
|
||||
/**
|
||||
* Last.Fm account is special. It is both an attica resolver *and* a InfoPlugin. We always want the infoplugin,
|
||||
* 3.Last.Fm account is special. It is both an attica resolver *and* a InfoPlugin. We always want the infoplugin,
|
||||
* but the user can install the attica resolver on-demand. So we take care of both there.
|
||||
*
|
||||
*/
|
||||
class DLLEXPORT LastFmAccount : public CustomAtticaAccount
|
||||
class LastFmAccount : public CustomAtticaAccount
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
@@ -25,8 +25,8 @@
|
||||
#include "utils/TomahawkUtils.h"
|
||||
#include "utils/Logger.h"
|
||||
#include "lastfm/ws.h"
|
||||
#include "lastfm/User.h"
|
||||
#include "lastfm/XmlQuery.h"
|
||||
#include "lastfm/User"
|
||||
#include "lastfm/XmlQuery"
|
||||
|
||||
using namespace Tomahawk::Accounts;
|
||||
|
||||
@@ -119,8 +119,6 @@ LastFmConfig::loadHistory()
|
||||
m_ui->importHistory->setEnabled( false );
|
||||
m_ui->progressBar->show();
|
||||
|
||||
emit sizeHintChanged();
|
||||
|
||||
QNetworkReply* reply = lastfm::User( m_ui->username->text().toLower() ).getRecentTracks( 200, m_page );
|
||||
connect( reply, SIGNAL( finished() ), SLOT( onHistoryLoaded() ) );
|
||||
}
|
||||
@@ -129,14 +127,13 @@ LastFmConfig::loadHistory()
|
||||
void
|
||||
LastFmConfig::onHistoryLoaded()
|
||||
{
|
||||
uint total = 0;
|
||||
int total = 0;
|
||||
bool finished = false;
|
||||
QNetworkReply* reply = qobject_cast< QNetworkReply* >( sender() );
|
||||
|
||||
try
|
||||
{
|
||||
lastfm::XmlQuery lfm;
|
||||
lfm.parse( reply->readAll() );
|
||||
lastfm::XmlQuery lfm = reply->readAll();
|
||||
|
||||
foreach ( lastfm::XmlQuery e, lfm.children( "track" ) )
|
||||
{
|
||||
@@ -152,8 +149,8 @@ LastFmConfig::onHistoryLoaded()
|
||||
{
|
||||
lastfm::XmlQuery stats = lfm.children( "recenttracks" ).first();
|
||||
|
||||
uint page = stats.attribute( "page" ).toUInt();
|
||||
total = stats.attribute( "totalPages" ).toUInt();
|
||||
int page = stats.attribute( "page" ).toInt();
|
||||
total = stats.attribute( "totalPages" ).toInt();
|
||||
|
||||
m_ui->progressBar->setMaximum( total );
|
||||
m_ui->progressBar->setValue( page );
|
||||
@@ -171,7 +168,7 @@ LastFmConfig::onHistoryLoaded()
|
||||
}
|
||||
catch( lastfm::ws::ParseError e )
|
||||
{
|
||||
tDebug() << "XmlQuery error:" << e.message();
|
||||
tDebug() << "XmlQuery error:" << e.what();
|
||||
finished = true;
|
||||
}
|
||||
|
||||
@@ -201,8 +198,7 @@ LastFmConfig::onLastFmFinished()
|
||||
}
|
||||
if( authJob->error() == QNetworkReply::NoError )
|
||||
{
|
||||
lastfm::XmlQuery lfm;
|
||||
lfm.parse( authJob->readAll() );
|
||||
lastfm::XmlQuery lfm = lastfm::XmlQuery( authJob->readAll() );
|
||||
|
||||
if( lfm.children( "error" ).size() > 0 )
|
||||
{
|
@@ -49,9 +49,6 @@ private slots:
|
||||
void loadHistory();
|
||||
void onHistoryLoaded();
|
||||
|
||||
signals:
|
||||
void sizeHintChanged();
|
||||
|
||||
private:
|
||||
LastFmAccount* m_account;
|
||||
Ui_LastFmConfig* m_ui;
|
@@ -34,7 +34,7 @@
|
||||
#include "TomahawkSettings.h"
|
||||
|
||||
#include <lastfm/ws.h>
|
||||
#include <lastfm/XmlQuery.h>
|
||||
#include <lastfm/XmlQuery>
|
||||
|
||||
#include <qjson/parser.h>
|
||||
|
||||
@@ -212,11 +212,6 @@ LastFmInfoPlugin::scrobble()
|
||||
return;
|
||||
|
||||
tLog() << Q_FUNC_INFO << "Scrobbling now:" << m_track.toString();
|
||||
|
||||
// FIXME: workaround for the duration-less dilandau (and others) tracks
|
||||
if ( m_track.duration() == 0 )
|
||||
m_track.setDuration( 31 );
|
||||
|
||||
m_scrobbler->cache( m_track );
|
||||
m_scrobbler->submit();
|
||||
}
|
||||
@@ -596,13 +591,10 @@ LastFmInfoPlugin::similarArtistsReturned()
|
||||
|
||||
emit info( requestData, returnedData );
|
||||
|
||||
if ( !sortedArtists.isEmpty() )
|
||||
{
|
||||
Tomahawk::InfoSystem::InfoStringHash origData = requestData.input.value< Tomahawk::InfoSystem::InfoStringHash>();
|
||||
Tomahawk::InfoSystem::InfoStringHash criteria;
|
||||
criteria["artist"] = origData["artist"];
|
||||
emit updateCache( criteria, 2419200000, requestData.type, returnedData );
|
||||
}
|
||||
Tomahawk::InfoSystem::InfoStringHash origData = requestData.input.value< Tomahawk::InfoSystem::InfoStringHash>();
|
||||
Tomahawk::InfoSystem::InfoStringHash criteria;
|
||||
criteria["artist"] = origData["artist"];
|
||||
emit updateCache( criteria, 2419200000, requestData.type, returnedData );
|
||||
}
|
||||
|
||||
|
||||
@@ -641,20 +633,15 @@ LastFmInfoPlugin::similarTracksReturned()
|
||||
returnedData["artists"] = sortedArtists;
|
||||
returnedData["score"] = sortedScores;
|
||||
|
||||
qDebug() << "Returning data, tracks:" << sortedTracks << "artists:" << sortedArtists << "scors:" << sortedScores;
|
||||
|
||||
Tomahawk::InfoSystem::InfoRequestData requestData = reply->property( "requestData" ).value< Tomahawk::InfoSystem::InfoRequestData >();
|
||||
|
||||
emit info( requestData, returnedData );
|
||||
|
||||
if ( !sortedTracks.isEmpty() )
|
||||
{
|
||||
Tomahawk::InfoSystem::InfoStringHash origData = requestData.input.value< Tomahawk::InfoSystem::InfoStringHash>();
|
||||
Tomahawk::InfoSystem::InfoStringHash criteria;
|
||||
criteria["artist"] = origData["artist"];
|
||||
criteria["track"] = origData["track"];
|
||||
emit updateCache( criteria, 2419200000, requestData.type, returnedData );
|
||||
}
|
||||
Tomahawk::InfoSystem::InfoStringHash origData = requestData.input.value< Tomahawk::InfoSystem::InfoStringHash>();
|
||||
Tomahawk::InfoSystem::InfoStringHash criteria;
|
||||
criteria["artist"] = origData["artist"];
|
||||
criteria["track"] = origData["track"];
|
||||
emit updateCache( criteria, 2419200000, requestData.type, returnedData );
|
||||
}
|
||||
|
||||
|
||||
@@ -879,8 +866,7 @@ LastFmInfoPlugin::onAuthenticated()
|
||||
|
||||
if ( authJob->error() == QNetworkReply::NoError )
|
||||
{
|
||||
lastfm::XmlQuery lfm;
|
||||
lfm.parse( authJob->readAll() );
|
||||
lastfm::XmlQuery lfm = lastfm::XmlQuery( authJob->readAll() );
|
||||
|
||||
if ( lfm.children( "error" ).size() > 0 )
|
||||
{
|
||||
@@ -942,8 +928,7 @@ LastFmInfoPlugin::parseTrackList( QNetworkReply* reply )
|
||||
QList<lastfm::Track> tracks;
|
||||
try
|
||||
{
|
||||
lastfm::XmlQuery lfm;
|
||||
lfm.parse( reply->readAll() );
|
||||
lastfm::XmlQuery lfm = reply->readAll();
|
||||
foreach ( lastfm::XmlQuery xq, lfm.children( "track" ) )
|
||||
{
|
||||
tracks.append( lastfm::Track( xq ) );
|
||||
@@ -951,7 +936,7 @@ LastFmInfoPlugin::parseTrackList( QNetworkReply* reply )
|
||||
}
|
||||
catch ( lastfm::ws::ParseError& e )
|
||||
{
|
||||
qWarning() << e.message();
|
||||
qWarning() << e.what();
|
||||
}
|
||||
|
||||
return tracks;
|
@@ -22,11 +22,10 @@
|
||||
|
||||
#include "infosystem/InfoSystem.h"
|
||||
#include "infosystem/InfoSystemWorker.h"
|
||||
#include "DllMacro.h"
|
||||
|
||||
#include <lastfm/Track.h>
|
||||
#include <lastfm/Audioscrobbler.h>
|
||||
#include <lastfm/ScrobblePoint.h>
|
||||
#include <lastfm/Track>
|
||||
#include <lastfm/Audioscrobbler>
|
||||
#include <lastfm/ScrobblePoint>
|
||||
|
||||
#include <QObject>
|
||||
|
||||
@@ -43,7 +42,7 @@ namespace Accounts
|
||||
namespace InfoSystem
|
||||
{
|
||||
|
||||
class DLLEXPORT LastFmInfoPlugin : public InfoPlugin
|
||||
class LastFmInfoPlugin : public InfoPlugin
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@@ -52,6 +51,7 @@ public:
|
||||
virtual ~LastFmInfoPlugin();
|
||||
|
||||
public slots:
|
||||
void init();
|
||||
void settingsChanged();
|
||||
|
||||
void onAuthenticated();
|
||||
@@ -63,7 +63,6 @@ public slots:
|
||||
void similarTracksReturned();
|
||||
|
||||
protected slots:
|
||||
virtual void init();
|
||||
virtual void getInfo( Tomahawk::InfoSystem::InfoRequestData requestData );
|
||||
virtual void notInCacheSlot( Tomahawk::InfoSystem::InfoStringHash criteria, Tomahawk::InfoSystem::InfoRequestData requestData );
|
||||
|
@@ -88,12 +88,6 @@ SpotifyAccount::SpotifyAccount( const QString& accountId )
|
||||
SpotifyAccount::~SpotifyAccount()
|
||||
{
|
||||
clearUser();
|
||||
|
||||
if ( m_spotifyResolver.isNull() )
|
||||
return;
|
||||
|
||||
Pipeline::instance()->removeScriptResolver( m_spotifyResolver.data()->filePath() );
|
||||
delete m_spotifyResolver.data();
|
||||
}
|
||||
|
||||
|
||||
@@ -165,7 +159,7 @@ SpotifyAccount::hookupResolver()
|
||||
}
|
||||
|
||||
qDebug() << "Starting spotify resolver with path:" << path;
|
||||
m_spotifyResolver = QWeakPointer< ScriptResolver >( qobject_cast< ScriptResolver* >( Pipeline::instance()->addScriptResolver( path ) ) );
|
||||
m_spotifyResolver = QWeakPointer< ScriptResolver >( qobject_cast< ScriptResolver* >( Pipeline::instance()->addScriptResolver( path, enabled() ) ) );
|
||||
|
||||
connect( m_spotifyResolver.data(), SIGNAL( changed() ), this, SLOT( resolverChanged() ) );
|
||||
connect( m_spotifyResolver.data(), SIGNAL( customMessage( QString,QVariantMap ) ), this, SLOT( resolverMessage( QString, QVariantMap ) ) );
|
||||
@@ -192,9 +186,6 @@ SpotifyAccount::checkForResolver()
|
||||
#elif defined(Q_OS_WIN)
|
||||
QDir appDataDir = TomahawkUtils::appDataDir();
|
||||
return appDataDir.exists( QString( "atticaresolvers/%1/spotify_tomahawkresolver.exe" ).arg( s_resolverId ) );
|
||||
#elif defined(Q_OS_LINUX)
|
||||
QDir appDataDir = TomahawkUtils::appDataDir();
|
||||
return appDataDir.exists( QString( "atticaresolvers/%1/spotify_tomahawkresolver" ).arg( s_resolverId ) );
|
||||
#endif
|
||||
|
||||
return false;
|
||||
@@ -291,11 +282,7 @@ SpotifyAccount::resolverInstalled(const QString& resolverId)
|
||||
{
|
||||
// We requested this install, so we want to launch it
|
||||
hookupResolver();
|
||||
|
||||
if ( enabled() )
|
||||
authenticate();
|
||||
else
|
||||
AccountManager::instance()->enableAccount( this );
|
||||
AccountManager::instance()->enableAccount( this );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -323,7 +310,6 @@ SpotifyAccount::setManualResolverPath( const QString &resolverPath )
|
||||
if ( !m_spotifyResolver.isNull() )
|
||||
{
|
||||
// replace
|
||||
AccountManager::instance()->disableAccount( this );
|
||||
NewClosure( m_spotifyResolver.data(), SIGNAL( destroyed() ), this, SLOT( hookupAfterDeletion( bool ) ), true );
|
||||
m_spotifyResolver.data()->deleteLater();
|
||||
}
|
||||
@@ -352,16 +338,13 @@ SpotifyAccount::aboutToShow( QAction* action, const playlist_ptr& playlist )
|
||||
|
||||
// If it's not being synced, allow the option to sync
|
||||
bool found = false;
|
||||
bool manuallyDisabled = false;
|
||||
QList<PlaylistUpdaterInterface*> updaters = playlist->updaters();
|
||||
foreach ( PlaylistUpdaterInterface* updater, updaters )
|
||||
{
|
||||
if ( SpotifyPlaylistUpdater* spotifyUpdater = qobject_cast< SpotifyPlaylistUpdater* >( updater ) )
|
||||
{
|
||||
found = true;
|
||||
if ( !spotifyUpdater->sync() )
|
||||
manuallyDisabled = true;
|
||||
|
||||
if ( spotifyUpdater->sync() )
|
||||
found = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -369,10 +352,6 @@ SpotifyAccount::aboutToShow( QAction* action, const playlist_ptr& playlist )
|
||||
{
|
||||
action->setText( tr( "Sync with Spotify" ) );
|
||||
}
|
||||
else if ( manuallyDisabled )
|
||||
{
|
||||
action->setText( tr( "Re-enable syncing with Spotify" ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
action->setText( tr( "Stop syncing with Spotify" ) );
|
||||
@@ -685,7 +664,7 @@ SpotifyAccount::icon() const
|
||||
QWidget*
|
||||
SpotifyAccount::configurationWidget()
|
||||
{
|
||||
if ( m_spotifyResolver.isNull() || !m_spotifyResolver.data()->running() )
|
||||
if ( m_spotifyResolver.isNull() )
|
||||
return 0;
|
||||
|
||||
if ( m_configWidget.isNull() )
|
||||
@@ -826,8 +805,7 @@ SpotifyAccount::startPlaylistSyncWithPlaylist( const QString& msgType, const QVa
|
||||
*/
|
||||
if ( m_updaters.contains( id ) )
|
||||
{
|
||||
//Q_ASSERT( m_updaters[ id ]->sync() == false ); /// Should have been unchecked/off before, but might not be if the user
|
||||
// changed spotify resolver meanwhile, so allow it for now
|
||||
Q_ASSERT( m_updaters[ id ]->sync() == false ); /// Should have been unchecked/off before
|
||||
m_updaters[ id ]->setSync( true );
|
||||
// m_updaters[ id ]->
|
||||
// TODO
|
@@ -26,7 +26,6 @@
|
||||
#include "Playlist.h"
|
||||
#include "utils/TomahawkUtils.h"
|
||||
#include "utils/SmartPointerList.h"
|
||||
#include "DllMacro.h"
|
||||
|
||||
class QAction;
|
||||
class SpotifyPlaylistUpdater;
|
||||
@@ -52,7 +51,7 @@ struct SpotifyPlaylistInfo {
|
||||
};
|
||||
|
||||
|
||||
class DLLEXPORT SpotifyAccountFactory : public AccountFactory
|
||||
class SpotifyAccountFactory : public AccountFactory
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
@@ -70,7 +69,7 @@ public:
|
||||
|
||||
};
|
||||
|
||||
class DLLEXPORT SpotifyAccount : public CustomAtticaAccount
|
||||
class SpotifyAccount : public CustomAtticaAccount
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
@@ -160,6 +159,6 @@ private:
|
||||
}
|
||||
}
|
||||
|
||||
Q_DECLARE_METATYPE( Tomahawk::Accounts::SpotifyPlaylistInfo* )
|
||||
Q_DECLARE_METATYPE( Tomahawk::Accounts::SpotifyPlaylistInfo* );
|
||||
|
||||
#endif // SpotifyAccount_H
|
@@ -21,7 +21,6 @@
|
||||
|
||||
#include "playlist/PlaylistUpdaterInterface.h"
|
||||
#include "utils/Closure.h"
|
||||
#include "DllMacro.h"
|
||||
|
||||
#include <QQueue>
|
||||
#include <QVariant>
|
||||
@@ -32,7 +31,7 @@ namespace Accounts {
|
||||
}
|
||||
}
|
||||
|
||||
class DLLEXPORT SpotifyPlaylistUpdater : public Tomahawk::PlaylistUpdaterInterface
|
||||
class SpotifyPlaylistUpdater : public Tomahawk::PlaylistUpdaterInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
@@ -107,7 +106,7 @@ private:
|
||||
};
|
||||
|
||||
|
||||
class DLLEXPORT SpotifyUpdaterFactory : public Tomahawk::PlaylistUpdaterFactory
|
||||
class SpotifyUpdaterFactory : public Tomahawk::PlaylistUpdaterFactory
|
||||
{
|
||||
public:
|
||||
SpotifyUpdaterFactory() {}
|
@@ -130,6 +130,7 @@ TwitterAccount::authenticateSlot()
|
||||
{
|
||||
infoPlugin().data()->moveToThread( Tomahawk::InfoSystem::InfoSystem::instance()->workerThread().data() );
|
||||
Tomahawk::InfoSystem::InfoSystem::instance()->addInfoPlugin( infoPlugin() );
|
||||
QMetaObject::invokeMethod( infoPlugin().data(), "init", Qt::QueuedConnection );
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -24,7 +24,6 @@
|
||||
#include "TomahawkSettings.h"
|
||||
#include "utils/TomahawkUtils.h"
|
||||
#include "database/Database.h"
|
||||
#include "database/DatabaseImpl.h"
|
||||
#include "Source.h"
|
||||
|
||||
#include "TomahawkOAuthTwitter.h"
|
||||
@@ -242,7 +241,7 @@ TwitterConfigWidget::postGotTomahawkStatusAuthVerifyReply( const QTweetUser &use
|
||||
connect( statUpdate, SIGNAL( postedStatus(const QTweetStatus &) ), SLOT( postGotTomahawkStatusUpdateReply(const QTweetStatus &) ) );
|
||||
connect( statUpdate, SIGNAL( error(QTweetNetBase::ErrorCode, const QString&) ), SLOT( postGotTomahawkStatusUpdateError(QTweetNetBase::ErrorCode, const QString &) ) );
|
||||
QString uuid = QUuid::createUuid();
|
||||
QString message = QString( "Got Tomahawk? {" ) + Database::instance()->impl()->dbid() + QString( "} (" ) + uuid.mid( 1, 8 ) + QString( ")" ) + QString( " http://gettomahawk.com" );
|
||||
QString message = QString( "Got Tomahawk? {" ) + Database::instance()->dbid() + QString( "} (" ) + uuid.mid( 1, 8 ) + QString( ")" ) + QString( " http://gettomahawk.com" );
|
||||
if ( m_postGTtype == "@Mention" )
|
||||
{
|
||||
QString user = m_ui->twitterUserTweetLineEdit->text();
|
||||
@@ -258,7 +257,7 @@ TwitterConfigWidget::postGotTomahawkStatusAuthVerifyReply( const QTweetUser &use
|
||||
connect( statUpdate, SIGNAL( parsedDirectMessage(const QTweetDMStatus &)), SLOT( postGotTomahawkDirectMessageReply(const QTweetDMStatus &) ) );
|
||||
connect( statUpdate, SIGNAL( error(QTweetNetBase::ErrorCode, const QString&) ), SLOT( postGotTomahawkStatusUpdateError(QTweetNetBase::ErrorCode, const QString &) ) );
|
||||
QString uuid = QUuid::createUuid();
|
||||
QString message = QString( "Got Tomahawk? {" ) + Database::instance()->impl()->dbid() + QString( "} (" ) + uuid.mid( 1, 8 ) + QString( ")" ) + QString( " http://gettomahawk.com" );
|
||||
QString message = QString( "Got Tomahawk? {" ) + Database::instance()->dbid() + QString( "} (" ) + uuid.mid( 1, 8 ) + QString( ")" ) + QString( " http://gettomahawk.com" );
|
||||
QString user = m_ui->twitterUserTweetLineEdit->text();
|
||||
if ( user.startsWith( "@" ) )
|
||||
user.remove( 0, 1 );
|
||||
|
@@ -76,15 +76,15 @@ TwitterInfoPlugin::~TwitterInfoPlugin()
|
||||
bool
|
||||
TwitterInfoPlugin::refreshTwitterAuth()
|
||||
{
|
||||
tDebug() << Q_FUNC_INFO << "begin" << this;
|
||||
if ( !m_twitterAuth.isNull() )
|
||||
tDebug() << Q_FUNC_INFO << " begin" << this;
|
||||
if( !m_twitterAuth.isNull() )
|
||||
delete m_twitterAuth.data();
|
||||
|
||||
Q_ASSERT( TomahawkUtils::nam() != 0 );
|
||||
tDebug() << Q_FUNC_INFO << "with nam" << TomahawkUtils::nam() << this;
|
||||
tDebug() << Q_FUNC_INFO << " with nam " << TomahawkUtils::nam() << this;
|
||||
m_twitterAuth = QWeakPointer< TomahawkOAuthTwitter >( new TomahawkOAuthTwitter( TomahawkUtils::nam(), this ) );
|
||||
|
||||
if ( m_twitterAuth.isNull() )
|
||||
if( m_twitterAuth.isNull() )
|
||||
return false;
|
||||
|
||||
m_twitterAuth.data()->setOAuthToken( m_account->credentials()[ "oauthtoken" ].toString().toLatin1() );
|
||||
@@ -138,8 +138,7 @@ TwitterInfoPlugin::pushInfo( Tomahawk::InfoSystem::InfoPushData pushData )
|
||||
return;
|
||||
}
|
||||
|
||||
const QStringList accountList = map[ "accountlist" ].toStringList();
|
||||
if ( !accountList.contains( "all" ) && !accountList.contains( m_account->accountId() ) )
|
||||
if ( !map[ "accountlist" ].toStringList().contains( m_account->accountId() ) )
|
||||
{
|
||||
tLog( LOGVERBOSE ) << Q_FUNC_INFO << "Our account not in the list, not tweeting out";
|
||||
return;
|
||||
@@ -169,7 +168,7 @@ TwitterInfoPlugin::pushInfo( Tomahawk::InfoSystem::InfoPushData pushData )
|
||||
QTweetStatusUpdate *statUpdate = new QTweetStatusUpdate( m_twitterAuth.data(), this );
|
||||
connect( statUpdate, SIGNAL( postedStatus(const QTweetStatus &) ), SLOT( postLovedStatusUpdateReply(const QTweetStatus &) ) );
|
||||
connect( statUpdate, SIGNAL( error(QTweetNetBase::ErrorCode, const QString&) ), SLOT( postLovedStatusUpdateError(QTweetNetBase::ErrorCode, const QString &) ) );
|
||||
tDebug() << Q_FUNC_INFO << "Posting message:" << msg;
|
||||
tDebug() << Q_FUNC_INFO << "Posting message: " << msg;
|
||||
statUpdate->post( msg );
|
||||
}
|
||||
|
||||
|
@@ -44,6 +44,7 @@ namespace Tomahawk {
|
||||
virtual ~TwitterInfoPlugin();
|
||||
|
||||
public slots:
|
||||
void init();
|
||||
void notInCacheSlot( const Tomahawk::InfoSystem::InfoStringHash criteria, Tomahawk::InfoSystem::InfoRequestData requestData )
|
||||
{
|
||||
Q_UNUSED( criteria );
|
||||
@@ -51,7 +52,6 @@ namespace Tomahawk {
|
||||
}
|
||||
|
||||
protected slots:
|
||||
void init();
|
||||
void pushInfo( Tomahawk::InfoSystem::InfoPushData pushData );
|
||||
void getInfo( Tomahawk::InfoSystem::InfoRequestData requestData )
|
||||
{
|
||||
|
@@ -36,7 +36,6 @@
|
||||
#include <utils/TomahawkUtils.h>
|
||||
#include <TomahawkSettings.h>
|
||||
#include <database/Database.h>
|
||||
#include <database/DatabaseImpl.h>
|
||||
#include <network/Servent.h>
|
||||
#include "Source.h"
|
||||
|
||||
@@ -64,10 +63,10 @@ TwitterSipPlugin::TwitterSipPlugin( Tomahawk::Accounts::Account* account )
|
||||
|
||||
m_configuration = account->configuration();
|
||||
qDebug() << "SIP configuration:" << m_configuration << m_configuration[ "cachedpeers" ];
|
||||
if ( Database::instance()->impl()->dbid() != m_account->configuration()[ "saveddbid" ].toString() )
|
||||
if ( Database::instance()->dbid() != m_account->configuration()[ "saveddbid" ].toString() )
|
||||
{
|
||||
m_configuration[ "cachedpeers" ] = QVariantHash();
|
||||
m_configuration[ "saveddbid" ] = Database::instance()->impl()->dbid();
|
||||
m_configuration[ "saveddbid" ] = Database::instance()->dbid();
|
||||
syncConfig();
|
||||
}
|
||||
|
||||
@@ -138,8 +137,8 @@ TwitterSipPlugin::disconnectPlugin()
|
||||
m_checkTimer.stop();
|
||||
m_connectTimer.stop();
|
||||
m_dmPollTimer.stop();
|
||||
if( !m_friendsTimeline.isNull() )
|
||||
delete m_friendsTimeline.data();
|
||||
if( !m_homeTimeline.isNull() )
|
||||
delete m_homeTimeline.data();
|
||||
if( !m_mentions.isNull() )
|
||||
delete m_mentions.data();
|
||||
if( !m_directMessages.isNull() )
|
||||
@@ -168,12 +167,12 @@ TwitterSipPlugin::accountAuthenticated( const QWeakPointer< TomahawkOAuthTwitter
|
||||
|
||||
m_cachedTwitterAuth = twitterAuth;
|
||||
|
||||
m_friendsTimeline = QWeakPointer<QTweetFriendsTimeline>( new QTweetFriendsTimeline( m_cachedTwitterAuth.data(), this ) );
|
||||
m_homeTimeline = QWeakPointer<QTweetHomeTimeline>( new QTweetHomeTimeline( m_cachedTwitterAuth.data(), this ) );
|
||||
m_mentions = QWeakPointer<QTweetMentions>( new QTweetMentions( m_cachedTwitterAuth.data(), this ) );
|
||||
m_directMessages = QWeakPointer<QTweetDirectMessages>( new QTweetDirectMessages( m_cachedTwitterAuth.data(), this ) );
|
||||
m_directMessageNew = QWeakPointer<QTweetDirectMessageNew>( new QTweetDirectMessageNew( m_cachedTwitterAuth.data(), this ) );
|
||||
m_directMessageDestroy = QWeakPointer<QTweetDirectMessageDestroy>( new QTweetDirectMessageDestroy( m_cachedTwitterAuth.data(), this ) );
|
||||
connect( m_friendsTimeline.data(), SIGNAL( parsedStatuses(const QList< QTweetStatus > &) ), SLOT( friendsTimelineStatuses(const QList<QTweetStatus> &) ) );
|
||||
connect( m_homeTimeline.data(), SIGNAL( parsedStatuses(const QList< QTweetStatus > &) ), SLOT( friendsTimelineStatuses(const QList<QTweetStatus> &) ) );
|
||||
connect( m_mentions.data(), SIGNAL( parsedStatuses(const QList< QTweetStatus > &) ), SLOT( mentionsStatuses(const QList<QTweetStatus> &) ) );
|
||||
connect( m_directMessages.data(), SIGNAL( parsedDirectMessages(const QList<QTweetDMStatus> &)), SLOT( directMessages(const QList<QTweetDMStatus> &) ) );
|
||||
connect( m_directMessageNew.data(), SIGNAL( parsedDirectMessage(const QTweetDMStatus &)), SLOT( directMessagePosted(const QTweetDMStatus &) ) );
|
||||
@@ -204,8 +203,8 @@ TwitterSipPlugin::checkTimerFired()
|
||||
|
||||
qDebug() << "TwitterSipPlugin looking at friends timeline since id " << m_cachedFriendsSinceId;
|
||||
|
||||
if ( !m_friendsTimeline.isNull() )
|
||||
m_friendsTimeline.data()->fetch( m_cachedFriendsSinceId, 0, 800 );
|
||||
if ( !m_homeTimeline.isNull() )
|
||||
m_homeTimeline.data()->fetch( m_cachedFriendsSinceId, 0, 800 );
|
||||
|
||||
if ( m_cachedMentionsSinceId == 0 )
|
||||
m_cachedMentionsSinceId = m_configuration[ "cachedmentionssinceid" ].toLongLong();
|
||||
@@ -227,7 +226,7 @@ TwitterSipPlugin::registerOffers( const QStringList &peerList )
|
||||
{
|
||||
QVariantHash peerData = m_cachedPeers[screenName].toHash();
|
||||
|
||||
if ( peerData.contains( "onod" ) && peerData["onod"] != Database::instance()->impl()->dbid() )
|
||||
if ( peerData.contains( "onod" ) && peerData["onod"] != Database::instance()->dbid() )
|
||||
{
|
||||
m_cachedPeers.remove( screenName );
|
||||
m_configuration[ "cachedpeers" ] = m_cachedPeers;
|
||||
@@ -314,7 +313,7 @@ TwitterSipPlugin::parseGotTomahawk( const QRegExp ®ex, const QString &screenN
|
||||
else
|
||||
qDebug() << "TwitterSipPlugin parsed node " << node << " out of the tweet";
|
||||
|
||||
if ( node == Database::instance()->impl()->dbid() )
|
||||
if ( node == Database::instance()->dbid() )
|
||||
{
|
||||
qDebug() << "My dbid found; ignoring";
|
||||
return;
|
||||
@@ -490,7 +489,7 @@ TwitterSipPlugin::directMessages( const QList< QTweetDMStatus > &messages )
|
||||
|
||||
QMetaObject::invokeMethod( this, "registerOffer", Q_ARG( QString, status.senderScreenName() ), Q_ARG( QVariantHash, peerData ) );
|
||||
|
||||
if ( Database::instance()->impl()->dbid().startsWith( splitNode[1] ) )
|
||||
if ( Database::instance()->dbid().startsWith( splitNode[1] ) )
|
||||
{
|
||||
qDebug() << "TwitterSipPlugin found message destined for this node; destroying it";
|
||||
if ( !m_directMessageDestroy.isNull() )
|
||||
@@ -534,12 +533,12 @@ TwitterSipPlugin::registerOffer( const QString &screenName, const QVariantHash &
|
||||
|
||||
if ( !_peerData.contains( "okey" ) ||
|
||||
!_peerData.contains( "onod" ) ||
|
||||
( _peerData.contains( "onod" ) && _peerData["onod"] != Database::instance()->impl()->dbid() ) )
|
||||
( _peerData.contains( "onod" ) && _peerData["onod"] != Database::instance()->dbid() ) )
|
||||
{
|
||||
QString okey = QUuid::createUuid().toString().split( '-' ).last();
|
||||
okey.chop( 1 );
|
||||
_peerData["okey"] = QVariant::fromValue< QString >( okey );
|
||||
_peerData["onod"] = QVariant::fromValue< QString >( Database::instance()->impl()->dbid() );
|
||||
_peerData["onod"] = QVariant::fromValue< QString >( Database::instance()->dbid() );
|
||||
peersChanged = true;
|
||||
needToAddToCache = true;
|
||||
needToSend = true;
|
||||
@@ -594,7 +593,7 @@ TwitterSipPlugin::sendOffer( const QString &screenName, const QVariantHash &peer
|
||||
qDebug() << Q_FUNC_INFO;
|
||||
QString offerString = QString( "TOMAHAWKPEER:Host=%1:Port=%2:Node=%3*%4:PKey=%5" ).arg( peerData["ohst"].toString() )
|
||||
.arg( peerData["oprt"].toString() )
|
||||
.arg( Database::instance()->impl()->dbid() )
|
||||
.arg( Database::instance()->dbid() )
|
||||
.arg( peerData["node"].toString().left( 8 ) )
|
||||
.arg( peerData["okey"].toString() );
|
||||
qDebug() << "TwitterSipPlugin sending message to " << screenName << ": " << offerString;
|
||||
|
@@ -27,10 +27,10 @@
|
||||
|
||||
#include <QTweetLib/qtweetuser.h>
|
||||
#include <QTweetLib/qtweetnetbase.h>
|
||||
#include <QTweetLib/qtweetfriendstimeline.h>
|
||||
#include <QTweetLib/qtweetdirectmessages.h>
|
||||
#include <QTweetLib/qtweetdirectmessagenew.h>
|
||||
#include <QTweetLib/qtweetdirectmessagedestroy.h>
|
||||
#include <QTweetLib/qtweethometimeline.h>
|
||||
#include <QTweetLib/qtweetmentions.h>
|
||||
#include <QTweetLib/qtweetdmstatus.h>
|
||||
|
||||
@@ -104,7 +104,7 @@ private:
|
||||
|
||||
QWeakPointer< TomahawkOAuthTwitter > m_cachedTwitterAuth;
|
||||
|
||||
QWeakPointer< QTweetFriendsTimeline > m_friendsTimeline;
|
||||
QWeakPointer< QTweetHomeTimeline > m_homeTimeline;
|
||||
QWeakPointer< QTweetMentions > m_mentions;
|
||||
QWeakPointer< QTweetDirectMessages > m_directMessages;
|
||||
QWeakPointer< QTweetDirectMessageNew > m_directMessageNew;
|
||||
|