diff --git a/CMakeModules/AddTomahawkPlugin.cmake b/CMakeModules/AddTomahawkPlugin.cmake index d4a8ee4b1..a30310b44 100644 --- a/CMakeModules/AddTomahawkPlugin.cmake +++ b/CMakeModules/AddTomahawkPlugin.cmake @@ -76,6 +76,12 @@ macro(add_tomahawk_plugin) add_definitions(${QT_DEFINITIONS}) set_target_properties(${target} PROPERTIES AUTOMOC TRUE COMPILE_DEFINITIONS ${PLUGIN_EXPORT_MACRO}) if(PLUGIN_COMPILE_DEFINITIONS) + # Dear CMake, i hate you! Sincerely, domme + # At least in CMake 2.8.8, you CANNOT set more than one COMPILE_DEFINITIONS value + # only takes the first one if called multiple times or bails out with wrong number of arguments + # when passing in a list, thus i redefine the export macro here in hope it won't mess up other targets + add_definitions( "-D${PLUGIN_EXPORT_MACRO}" ) + set_target_properties(${target} PROPERTIES COMPILE_DEFINITIONS ${PLUGIN_COMPILE_DEFINITIONS}) endif() diff --git a/lang/tomahawk_bg.ts b/lang/tomahawk_bg.ts index e09f67dcc..a75fc6bdb 100644 --- a/lang/tomahawk_bg.ts +++ b/lang/tomahawk_bg.ts @@ -422,39 +422,49 @@ connect and stream from you? Tomahawk Crash Reporter Автоматично докладване на грешки на Tomahawk - + - <p><b>Sorry!</b>&nbsp;Tomahawk crashed. Information about the crash is now being sent to Tomahawk HQ so that we can fix the bug.</p> - <p><b>Извинявай</b>&nbsp;Tomahawk спря да работи. Информация относно проблемът се изпраща към нашата централа, за да можем да го отстраним.</p> + <html><head/><body><p><span style=" font-weight:600;">Sorry!</span> Tomahawk crashed. Please tell us about it! Tomahawk has created an error report for you that can help improve the stability in the future. You can now send the this report directly to the Tomahawk developers.</p></body></html> + - + + Send this report + + + + + Don't send + + + + Abort Откажи - + You can disable sending crash reports in the configuration dialog. Можете да спрете изпращането на информация относно проблеми в панелът с настройки. - + Uploaded %L1 of %L2 KB. Качени %L1 от %В2 КБ. - - + + Close Затвори - + Sent! <b>Many thanks</b>. Изпращането приключи. <b>Благодарим ви за отзивчивостта!</b>. - + Failed to send crash info. Изпращането на краш-данни е неуспешно. @@ -1539,7 +1549,7 @@ connect and stream from you? Send reports after Tomahawk crashed - Изпрати сервизна информация след счупването на програмата. + Изпрати сервизна информация след забиване. @@ -2441,22 +2451,22 @@ Try tweaking the filters for a new set of songs to play. Tomahawk::InfoSystem::ChartsPlugin - + Top Overall Най-известни - + Artists Артисти - + Albums Албуми - + Tracks Песни @@ -3695,107 +3705,107 @@ Lyrics for "%1" by %2: XmppSipPlugin - + User Interaction Действие от потребителя - + Host is unknown Непознат адрес - + Item not found Обектът не е открит - + Authorization Error Грешка при даване на достъп - + Remote Stream Error Грешка в стриймът от отдалечената машина - + Remote Connection failed Отдалечената връзка е неуспешна - + Internal Server Error Вътрешна грешка на сървъра - + System shutdown Изключване на системата - + Conflict Конфликт - + Unknown Неизвестно - + No Compression Support Няма поддръжка на компресия - + No Encryption Support Няма поддръжка на криптиране - + No Authorization Support Няма поддръжка на удостоверяване - + No Supported Feature Неподдържана функция - + Add Friend Добави приятел - + Enter Xmpp ID: Въведи Xmpp ID: - + Add Friend... Добави приятел... - + XML Console... XML Конзола... - + I'm sorry -- I'm just an automatic presence used by Tomahawk Player (http://gettomahawk.com). If you are getting this message, the person you are trying to reach is probably not signed on, so please try again later! Извинявай.. Аз съм режимът за автоматични отговори изпълзван от Tomahawk. ( http://gettomahawk.com ) Щом получаваш това съобщение, този с който се опитваш да се свържеш вероятно не е на линия. Моля, опитай отново по-късно. - + Authorize User Оправомощяване на потребител - + Do you want to grant <b>%1</b> access to your Collection? Искате ли да позволите на <b>%1</b> достъп до вашата колекция? diff --git a/lang/tomahawk_ca.ts b/lang/tomahawk_ca.ts index 88a246fa7..23a21ff30 100644 --- a/lang/tomahawk_ca.ts +++ b/lang/tomahawk_ca.ts @@ -415,39 +415,49 @@ connect and stream from you? Tomahawk Crash Reporter Enviament de Fallades de Tomahawk - + - <p><b>Sorry!</b>&nbsp;Tomahawk crashed. Information about the crash is now being sent to Tomahawk HQ so that we can fix the bug.</p> - <p>Tomahak ha fallat. La informació sobre la fallada s'està enviant a Tomahawk HQ per poder-ho solucionar.</p> + <html><head/><body><p><span style=" font-weight:600;">Sorry!</span> Tomahawk crashed. Please tell us about it! Tomahawk has created an error report for you that can help improve the stability in the future. You can now send the this report directly to the Tomahawk developers.</p></body></html> + - + + Send this report + + + + + Don't send + + + + Abort Interromp - + You can disable sending crash reports in the configuration dialog. Podeu deshabilitar l'enviament d'informació sobre les fallades des del diàleg de configuració. - + Uploaded %L1 of %L2 KB. %L1 de %L2 KB carregats. - - + + Close Tanca - + Sent! <b>Many thanks</b>. Enviat! <b>Moltes gràcies</b>. - + Failed to send crash info. S'ha produït un error en enviar la informació sobre la fallada. @@ -2432,22 +2442,22 @@ Intenteu ajustar els filtres per reproduir noves cançons. Tomahawk::InfoSystem::ChartsPlugin - + Top Overall Top General - + Artists Artistes - + Albums Àlbums - + Tracks Cançons @@ -3683,107 +3693,107 @@ Lletres de la cancó "%1" de %2: XmppSipPlugin - + User Interaction Interacció d'usuari - + Host is unknown El nom de l'ordinador és desconegut - + Item not found No s'ha trobat l'element - + Authorization Error Error d'autorització - + Remote Stream Error Error de flux remot - + Remote Connection failed Ha fallat la connexió remota - + Internal Server Error Error del servidor intern - + System shutdown Sistema apagat - + Conflict Conflicte - + Unknown Desconegut - + No Compression Support Compressió no suportada - + No Encryption Support Encriptació no suportada - + No Authorization Support Autorització no suportada - + No Supported Feature Característica no suportada - + Add Friend Afegeix un Amic - + Enter Xmpp ID: Introduiu la ID XMPP: - + Add Friend... Afegeix un Amic... - + XML Console... Consola XML... - + I'm sorry -- I'm just an automatic presence used by Tomahawk Player (http://gettomahawk.com). If you are getting this message, the person you are trying to reach is probably not signed on, so please try again later! Sóc una presència automàtica emprada pel Reproductor Tomahawk. (http://gettomahawk.com. Si rebeu aquest missatge, la persona amb qui intenteu contactar probablement no està en línia, intenteu-ho més tard! - + Authorize User Autorització d'Usuari - + Do you want to grant <b>%1</b> access to your Collection? Voleu permetre que <b>%1</b> accedeixi a la vostra Col·lecció? diff --git a/lang/tomahawk_de.ts b/lang/tomahawk_de.ts index 4d41a0493..5c5cf4498 100644 --- a/lang/tomahawk_de.ts +++ b/lang/tomahawk_de.ts @@ -415,39 +415,49 @@ connect and stream from you? Tomahawk Crash Reporter Tomahawk Fehlermelder - + - <p><b>Sorry!</b>&nbsp;Tomahawk crashed. Information about the crash is now being sent to Tomahawk HQ so that we can fix the bug.</p> - <p><b>Das tut uns leid!</b> Tomahawk ist abgestürzt! Informationen darüber werden nun in die Tomahawk-Einsatzzentrale weitergeleitet, so dass der Fehler behoben werden kann.</p> + <html><head/><body><p><span style=" font-weight:600;">Sorry!</span> Tomahawk crashed. Please tell us about it! Tomahawk has created an error report for you that can help improve the stability in the future. You can now send the this report directly to the Tomahawk developers.</p></body></html> + - + + Send this report + + + + + Don't send + + + + Abort Abbrechen - + You can disable sending crash reports in the configuration dialog. Du kannst das Übermitteln der Fehlerberichte in den Einstellungen abschalten. - + Uploaded %L1 of %L2 KB. %L1 von %L2 hochgeladen. - - + + Close Schließen - + Sent! <b>Many thanks</b>. Gesendet! <b>Vielen Dank!</b> - + Failed to send crash info. Übertragung des Fehlerberichts fehlgeschlagen. @@ -2427,22 +2437,22 @@ Versuch die Filter anzupassen für neue Lieder. Tomahawk::InfoSystem::ChartsPlugin - + Top Overall Top Allgemein - + Artists Künstler - + Albums Alben - + Tracks Stücke @@ -3672,107 +3682,107 @@ Lyrics for "%1" by %2: XmppSipPlugin - + User Interaction Nutzer Interaktion - + Host is unknown Host ist unbekannt - + Item not found Eintrag nicht gefunden - + Authorization Error Authentifizierungs Fehler - + Remote Stream Error - + Remote Connection failed - + Internal Server Error Interner Server Fehler - + System shutdown - + Conflict Konflikt - + Unknown Unbekannt - + No Compression Support Keine Kompressions Option - + No Encryption Support Keine Verschluesselungs Option - + No Authorization Support Keine Authorisierungs Option - + No Supported Feature Keine unterstuetzte Faehigkeit - + Add Friend Freund hinzufügen... - + Enter Xmpp ID: XMPP-Benutzer: - + Add Friend... Freund hinzufügen... - + XML Console... XML-Konsole... - + I'm sorry -- I'm just an automatic presence used by Tomahawk Player (http://gettomahawk.com). If you are getting this message, the person you are trying to reach is probably not signed on, so please try again later! - + Authorize User Authorisiere Nutzer - + Do you want to grant <b>%1</b> access to your Collection? Willst du <b>%1</b> Zugriff auf deine Sammlung gewähren? diff --git a/lang/tomahawk_en.ts b/lang/tomahawk_en.ts index 1e4061bbf..1fbb204cb 100644 --- a/lang/tomahawk_en.ts +++ b/lang/tomahawk_en.ts @@ -416,39 +416,49 @@ connect and stream from you? Tomahawk Crash Reporter Tomahawk Crash Reporter - + - <p><b>Sorry!</b>&nbsp;Tomahawk crashed. Information about the crash is now being sent to Tomahawk HQ so that we can fix the bug.</p> - <p><b>Sorry!</b>&nbsp;Tomahawk crashed. Information about the crash is now being sent to Tomahawk HQ so that we can fix the bug.</p> + <html><head/><body><p><span style=" font-weight:600;">Sorry!</span> Tomahawk crashed. Please tell us about it! Tomahawk has created an error report for you that can help improve the stability in the future. You can now send the this report directly to the Tomahawk developers.</p></body></html> + <html><head/><body><p><span style=" font-weight:600;">Sorry!</span> Tomahawk crashed. Please tell us about it! Tomahawk has created an error report for you that can help improve the stability in the future. You can now send the this report directly to the Tomahawk developers.</p></body></html> - + + Send this report + Send this report + + + + Don't send + Don't send + + + Abort Abort - + You can disable sending crash reports in the configuration dialog. You can disable sending crash reports in the configuration dialog. - + Uploaded %L1 of %L2 KB. Uploaded %L1 of %L2 KB. - - + + Close Close - + Sent! <b>Many thanks</b>. Sent! <b>Many thanks</b>. - + Failed to send crash info. Failed to send crash info. @@ -2433,22 +2443,22 @@ Try tweaking the filters for a new set of songs to play. Tomahawk::InfoSystem::ChartsPlugin - + Top Overall Top Overall - + Artists Artists - + Albums Albums - + Tracks Tracks @@ -3688,107 +3698,107 @@ Lyrics for "%1" by %2: XmppSipPlugin - + User Interaction User Interaction - + Host is unknown Host is unknown - + Item not found Item not found - + Authorization Error Authorization Error - + Remote Stream Error Remote Stream Error - + Remote Connection failed Remote Connection failed - + Internal Server Error Internal Server Error - + System shutdown System shutdown - + Conflict Conflict - + Unknown Unknown - + No Compression Support No Compression Support - + No Encryption Support No Encryption Support - + No Authorization Support No Authorization Support - + No Supported Feature No Supported Feature - + Add Friend Add Friend - + Enter Xmpp ID: Enter Xmpp ID: - + Add Friend... Add Friend... - + XML Console... XML Console... - + I'm sorry -- I'm just an automatic presence used by Tomahawk Player (http://gettomahawk.com). If you are getting this message, the person you are trying to reach is probably not signed on, so please try again later! I'm sorry -- I'm just an automatic presence used by Tomahawk Player (http://gettomahawk.com). If you are getting this message, the person you are trying to reach is probably not signed on, so please try again later! - + Authorize User Authorize User - + Do you want to grant <b>%1</b> access to your Collection? Do you want to grant <b>%1</b> access to your Collection? diff --git a/lang/tomahawk_es.ts b/lang/tomahawk_es.ts index 21102a204..02f8282a1 100644 --- a/lang/tomahawk_es.ts +++ b/lang/tomahawk_es.ts @@ -415,39 +415,49 @@ connect and stream from you? Tomahawk Crash Reporter Reportador de fallos de Tomahawk - + - <p><b>Sorry!</b>&nbsp;Tomahawk crashed. Information about the crash is now being sent to Tomahawk HQ so that we can fix the bug.</p> - <p><b>¡Ups!</b>&nbsp;Tomahawk ha fallado. La información acerca del fallo se enviará a Tomahawk HQ para que podamos solucionar el error.</p> + <html><head/><body><p><span style=" font-weight:600;">Sorry!</span> Tomahawk crashed. Please tell us about it! Tomahawk has created an error report for you that can help improve the stability in the future. You can now send the this report directly to the Tomahawk developers.</p></body></html> + - + + Send this report + + + + + Don't send + + + + Abort Abortar - + You can disable sending crash reports in the configuration dialog. Puede desactivar el envío de informes de error en el diálogo de configuración. - + Uploaded %L1 of %L2 KB. Subidos %L1 of %L2 KBs. - - + + Close Cerrar - + Sent! <b>Many thanks</b>. ¡Enviado!<b>Muchas gracias</b>. - + Failed to send crash info. Error al enviar la información del fallo. @@ -2431,22 +2441,22 @@ Intente ajustar los filtros para reproducir nuevas canciones. Tomahawk::InfoSystem::ChartsPlugin - + Top Overall Top total - + Artists Artistas - + Albums Álbumes - + Tracks Pistas @@ -3685,107 +3695,107 @@ Letras de "%1" por %2: XmppSipPlugin - + User Interaction Interacción de usuario - + Host is unknown Máquina desconocida - + Item not found Elemento no encontrado - + Authorization Error Error de Autorización - + Remote Stream Error Error de Stream Remoto - + Remote Connection failed Fallo en la Conexión Remota - + Internal Server Error Error de Servidor Interno - + System shutdown Sistema apagado - + Conflict Conflicto - + Unknown Desconocido - + No Compression Support Compresión no sportada - + No Encryption Support Encriptación no soportada - + No Authorization Support Autorización no soportada - + No Supported Feature Característica no soportada - + Add Friend Añadir Amigo - + Enter Xmpp ID: Introducir ID XMPP: - + Add Friend... Añadir Amigo... - + XML Console... Consola XML... - + I'm sorry -- I'm just an automatic presence used by Tomahawk Player (http://gettomahawk.com). If you are getting this message, the person you are trying to reach is probably not signed on, so please try again later! Lo siento -- soy una presencia automática usada por el Reproductor Tomahawk (http://gettomahawk.com). Si recibe este mensaje, la persona con quién intenta contactar no esté contectada probablemente. Inténtelo más tarde! - + Authorize User Autorizar Usuario - + Do you want to grant <b>%1</b> access to your Collection? ¿Quiere permitir que <b>%1</b> acceda a su Colección? diff --git a/lang/tomahawk_fr.ts b/lang/tomahawk_fr.ts index 237ad49bc..326bd56db 100644 --- a/lang/tomahawk_fr.ts +++ b/lang/tomahawk_fr.ts @@ -416,39 +416,49 @@ se connecter et streamer depuis chez vous ? Tomahawk Crash Reporter Tomahawk Crash Reporter - + - <p><b>Sorry!</b>&nbsp;Tomahawk crashed. Information about the crash is now being sent to Tomahawk HQ so that we can fix the bug.</p> - <p><b>Désolé !</b>&nbsp;Tomahawk a planté. Les informations du plantage sont maintenant envoyés au siège de Tomahawk pour que nous puissions corriger le bug.</p> + <html><head/><body><p><span style=" font-weight:600;">Sorry!</span> Tomahawk crashed. Please tell us about it! Tomahawk has created an error report for you that can help improve the stability in the future. You can now send the this report directly to the Tomahawk developers.</p></body></html> + - + + Send this report + + + + + Don't send + + + + Abort Abandonner - + You can disable sending crash reports in the configuration dialog. Vous pouvez désactiver l'envoi des rapports de plantage dans la boite de dialogue de configuration. - + Uploaded %L1 of %L2 KB. Chargement %L1 de %L2 ko. - - + + Close Fermer - + Sent! <b>Many thanks</b>. Envoyé ! <b>Merci beaucoup</b>. - + Failed to send crash info. Échec de l'envoi des informations de plantage @@ -2433,22 +2443,22 @@ Essayez de changer les filtres pour avoir de nouveaux morceaux à jouer. Tomahawk::InfoSystem::ChartsPlugin - + Top Overall Top global - + Artists Artistes - + Albums Albums - + Tracks Pistes @@ -3688,107 +3698,107 @@ Paroles de "%1" par %2 : XmppSipPlugin - + User Interaction Interaction utilisateur - + Host is unknown L'hôte est inconnu - + Item not found Objet non trouvé - + Authorization Error Erreur d'autorisation - + Remote Stream Error Erreur de lecture à distance - + Remote Connection failed Erreur de connexion à distance - + Internal Server Error Erreur interne du serveur - + System shutdown Arrêt du système - + Conflict Conflit - + Unknown Ajouter un &ami... - + No Compression Support Pas de support de la compression - + No Encryption Support Pas de support du chiffrement - + No Authorization Support Pas de support de l'authorization - + No Supported Feature Fonctionnalité non supportée - + Add Friend Ajouter un ami - + Enter Xmpp ID: Entrer l'ID XMPP - + Add Friend... Ajouter un ami... - + XML Console... Console XML... - + I'm sorry -- I'm just an automatic presence used by Tomahawk Player (http://gettomahawk.com). If you are getting this message, the person you are trying to reach is probably not signed on, so please try again later! Désolé -- Je suis une présence automatique utilisé par le lecteur Tomahawk (http://gettomahawk.com). Si vous lisez ce message, la personne que vous essayez de joindre n'est probablement pas connecter, donc essayez plus tard ! Merci ! - + Authorize User Autoriser l'utilisateur - + Do you want to grant <b>%1</b> access to your Collection? Voulez vous donner accès à votre collection à %1 ? diff --git a/lang/tomahawk_ja.ts b/lang/tomahawk_ja.ts index 444ac3334..dba2f29cf 100644 --- a/lang/tomahawk_ja.ts +++ b/lang/tomahawk_ja.ts @@ -415,39 +415,49 @@ connect and stream from you? Tomahawk Crash Reporter - + - <p><b>Sorry!</b>&nbsp;Tomahawk crashed. Information about the crash is now being sent to Tomahawk HQ so that we can fix the bug.</p> + <html><head/><body><p><span style=" font-weight:600;">Sorry!</span> Tomahawk crashed. Please tell us about it! Tomahawk has created an error report for you that can help improve the stability in the future. You can now send the this report directly to the Tomahawk developers.</p></body></html> - + + Send this report + + + + + Don't send + + + + Abort アボート - + You can disable sending crash reports in the configuration dialog. - + Uploaded %L1 of %L2 KB. - - + + Close 閉じる - + Sent! <b>Many thanks</b>. - + Failed to send crash info. @@ -2423,22 +2433,22 @@ Try tweaking the filters for a new set of songs to play. Tomahawk::InfoSystem::ChartsPlugin - + Top Overall - + Artists - + Albums - + Tracks @@ -3662,107 +3672,107 @@ Lyrics for "%1" by %2: XmppSipPlugin - + User Interaction - + Host is unknown - + Item not found - + Authorization Error - + Remote Stream Error - + Remote Connection failed - + Internal Server Error - + System shutdown - + Conflict - + Unknown - + No Compression Support - + No Encryption Support - + No Authorization Support - + No Supported Feature - + Add Friend - + Enter Xmpp ID: - + Add Friend... - + XML Console... - + I'm sorry -- I'm just an automatic presence used by Tomahawk Player (http://gettomahawk.com). If you are getting this message, the person you are trying to reach is probably not signed on, so please try again later! - + Authorize User - + Do you want to grant <b>%1</b> access to your Collection? diff --git a/lang/tomahawk_pl.ts b/lang/tomahawk_pl.ts index 4c0f3a02e..e960b4449 100644 --- a/lang/tomahawk_pl.ts +++ b/lang/tomahawk_pl.ts @@ -415,39 +415,49 @@ connect and stream from you? Tomahawk Crash Reporter Agent zgłaszania awarii Tomahawka - + - <p><b>Sorry!</b>&nbsp;Tomahawk crashed. Information about the crash is now being sent to Tomahawk HQ so that we can fix the bug.</p> - <p><b>Przepraszamy!</b>&nbsp;Tomahawk uległ awarii. Abyśmy mogli poprawić błędy, informacja o incydencie zostanie wysłana do kwatery głównej programu.</p> + <html><head/><body><p><span style=" font-weight:600;">Sorry!</span> Tomahawk crashed. Please tell us about it! Tomahawk has created an error report for you that can help improve the stability in the future. You can now send the this report directly to the Tomahawk developers.</p></body></html> + - + + Send this report + + + + + Don't send + + + + Abort Przerwij - + You can disable sending crash reports in the configuration dialog. Możesz wyłączyć zgłaszanie awarii w ustawieniach. - + Uploaded %L1 of %L2 KB. Wysłano %L1 z %L2 KB. - - + + Close Zamknij - + Sent! <b>Many thanks</b>. Wysłano! <b>Wielkie dzięki</b>. - + Failed to send crash info. Nie udało sie wysłać informacji o awarii. @@ -2427,22 +2437,22 @@ Try tweaking the filters for a new set of songs to play. Tomahawk::InfoSystem::ChartsPlugin - + Top Overall Top Wszechczasów - + Artists Artyści - + Albums Albumy - + Tracks Utwory @@ -3678,107 +3688,107 @@ Tekst dla "%1" wykonawcy %2: XmppSipPlugin - + User Interaction - + Host is unknown Nieznany Host - + Item not found - + Authorization Error - + Remote Stream Error - + Remote Connection failed Połączenie sieciowe się nie powiodło - + Internal Server Error Wewnętrzny błąd serwera - + System shutdown Wyłączenie systemu - + Conflict Konflikt - + Unknown Nieznany - + No Compression Support Brak obsługi kompresji - + No Encryption Support Brak obsługi szyfrowania - + No Authorization Support Brak obsługi autoryzacji - + No Supported Feature Brak obsługi danej funkcji - + Add Friend Dodaj Znajomego - + Enter Xmpp ID: - + Add Friend... Dodaj Znajomego... - + XML Console... Konsola XML... - + I'm sorry -- I'm just an automatic presence used by Tomahawk Player (http://gettomahawk.com). If you are getting this message, the person you are trying to reach is probably not signed on, so please try again later! - + Authorize User Autoryzuj Użytkownika - + Do you want to grant <b>%1</b> access to your Collection? Czy chcesz udzielić dostępu do swojej kolekcji <b>%1</b>? diff --git a/lang/tomahawk_pt_BR.ts b/lang/tomahawk_pt_BR.ts index d0158a8f1..7c5130f56 100644 --- a/lang/tomahawk_pt_BR.ts +++ b/lang/tomahawk_pt_BR.ts @@ -415,39 +415,49 @@ connect and stream from you? Tomahawk Crash Reporter Informante de falha do Tomahawk - + - <p><b>Sorry!</b>&nbsp;Tomahawk crashed. Information about the crash is now being sent to Tomahawk HQ so that we can fix the bug.</p> - <p><b>Desculpe!</b>&nbsp;O Tomahawk travou. As informações sobre o travamento estão sendo enviadas para o quartel general do Tomahawk para que possamos solucionar esse problema.</p> + <html><head/><body><p><span style=" font-weight:600;">Sorry!</span> Tomahawk crashed. Please tell us about it! Tomahawk has created an error report for you that can help improve the stability in the future. You can now send the this report directly to the Tomahawk developers.</p></body></html> + - + + Send this report + + + + + Don't send + + + + Abort Cancelar - + You can disable sending crash reports in the configuration dialog. - + Uploaded %L1 of %L2 KB. Enviado %L1 de %L2 KB. - - + + Close Fechar - + Sent! <b>Many thanks</b>. Enviado! <b>Muito obrigado</b>. - + Failed to send crash info. Falha ao enviar as informações de travamento. @@ -2426,22 +2436,22 @@ Try tweaking the filters for a new set of songs to play. Tomahawk::InfoSystem::ChartsPlugin - + Top Overall Classificação geral - + Artists Artistas - + Albums Álbuns - + Tracks Faixas @@ -3678,107 +3688,107 @@ Letras de "%1" por %2: XmppSipPlugin - + User Interaction - + Host is unknown - + Item not found Item não encontrado - + Authorization Error - + Remote Stream Error - + Remote Connection failed Conexão Remota falhou - + Internal Server Error - + System shutdown - + Conflict - + Unknown Desconhecido - + No Compression Support - + No Encryption Support - + No Authorization Support - + No Supported Feature - + Add Friend Adicionar Amigo - + Enter Xmpp ID: - + Add Friend... Adicionar Amigo... - + XML Console... - + I'm sorry -- I'm just an automatic presence used by Tomahawk Player (http://gettomahawk.com). If you are getting this message, the person you are trying to reach is probably not signed on, so please try again later! - + Authorize User Autorizar Usuário - + Do you want to grant <b>%1</b> access to your Collection? diff --git a/lang/tomahawk_ru.ts b/lang/tomahawk_ru.ts index 884259151..fb610565e 100644 --- a/lang/tomahawk_ru.ts +++ b/lang/tomahawk_ru.ts @@ -416,39 +416,49 @@ connect and stream from you? Tomahawk Crash Reporter Отчет о ошибках - + - <p><b>Sorry!</b>&nbsp;Tomahawk crashed. Information about the crash is now being sent to Tomahawk HQ so that we can fix the bug.</p> - <p><b>Упс!</b>&nbsp;Произошла ошибка. Информация о ошибке сейчас отправляется разработчикам, чтобы они могли её исправить. Извиняемся :)</p> + <html><head/><body><p><span style=" font-weight:600;">Sorry!</span> Tomahawk crashed. Please tell us about it! Tomahawk has created an error report for you that can help improve the stability in the future. You can now send the this report directly to the Tomahawk developers.</p></body></html> + - + + Send this report + + + + + Don't send + + + + Abort Отменить - + You can disable sending crash reports in the configuration dialog. Вы можете отключить отправку отчетов об ошибках в диалоге настройки. - + Uploaded %L1 of %L2 KB. Загружено %L1 из %L2 KB. - - + + Close Закрыть - + Sent! <b>Many thanks</b>. Отправлен! <b>Большое спасибо!!!</b>. - + Failed to send crash info. Невозможно отправить отчет о ошибке. @@ -2428,22 +2438,22 @@ Try tweaking the filters for a new set of songs to play. Tomahawk::InfoSystem::ChartsPlugin - + Top Overall - + Artists Исполнители - + Albums Альбомы - + Tracks Песни @@ -3677,107 +3687,107 @@ Lyrics for "%1" by %2: XmppSipPlugin - + User Interaction Взаимодействие с пользователем - + Host is unknown Неизвестный хост - + Item not found Песня не найдена - + Authorization Error Ошибка авторизации - + Remote Stream Error Удаленный поток ошибок - + Remote Connection failed Ошибка подключения - + Internal Server Error Внутренняя ошибка сервера - + System shutdown Выключение системы - + Conflict Конфликт - + Unknown Неизвестный - + No Compression Support Нет поддержки сжатия - + No Encryption Support Нет поддержки шифрования - + No Authorization Support Нет поддержки авторизации - + No Supported Feature Не поддерживаемые функции - + Add Friend Добавить друга - + Enter Xmpp ID: Введите XMPP ID: - + Add Friend... Добавить друга... - + XML Console... XML Console... - + I'm sorry -- I'm just an automatic presence used by Tomahawk Player (http://gettomahawk.com). If you are getting this message, the person you are trying to reach is probably not signed on, so please try again later! - + Authorize User Авторизация пользователя - + Do you want to grant <b>%1</b> access to your Collection? diff --git a/lang/tomahawk_sv.ts b/lang/tomahawk_sv.ts index 444066b48..a796d5dfa 100644 --- a/lang/tomahawk_sv.ts +++ b/lang/tomahawk_sv.ts @@ -415,39 +415,49 @@ connect and stream from you? Tomahawk Crash Reporter Tomahawk kraschrapport - + - <p><b>Sorry!</b>&nbsp;Tomahawk crashed. Information about the crash is now being sent to Tomahawk HQ so that we can fix the bug.</p> - <p><b>Oj!</b>&nbsp; Tomahawk kraschade. Information om denna krasch skickas nu till Tomahawk HQ så att vi kan lösa problemet.</p> + <html><head/><body><p><span style=" font-weight:600;">Sorry!</span> Tomahawk crashed. Please tell us about it! Tomahawk has created an error report for you that can help improve the stability in the future. You can now send the this report directly to the Tomahawk developers.</p></body></html> + - + + Send this report + + + + + Don't send + + + + Abort Avbryt - + You can disable sending crash reports in the configuration dialog. Du kan välja att inte skicka kraschrapporter i konfigurationsdialogen. - + Uploaded %L1 of %L2 KB. Laddade upp %L1 av %L2 KB. - - + + Close Stäng - + Sent! <b>Many thanks</b>. Skickat! <b>Tack så mycket</b>. - + Failed to send crash info. Misslyckades skicka kraschrapport. @@ -2422,22 +2432,22 @@ Try tweaking the filters for a new set of songs to play. Tomahawk::InfoSystem::ChartsPlugin - + Top Overall - + Artists Artister - + Albums Album - + Tracks Spår @@ -3661,107 +3671,107 @@ Lyrics for "%1" by %2: XmppSipPlugin - + User Interaction - + Host is unknown - + Item not found - + Authorization Error - + Remote Stream Error - + Remote Connection failed - + Internal Server Error - + System shutdown - + Conflict - + Unknown - + No Compression Support - + No Encryption Support - + No Authorization Support - + No Supported Feature - + Add Friend - + Enter Xmpp ID: - + Add Friend... - + XML Console... - + I'm sorry -- I'm just an automatic presence used by Tomahawk Player (http://gettomahawk.com). If you are getting this message, the person you are trying to reach is probably not signed on, so please try again later! - + Authorize User - + Do you want to grant <b>%1</b> access to your Collection? diff --git a/lang/tomahawk_tr.ts b/lang/tomahawk_tr.ts index 246959b4f..ae59a5c96 100644 --- a/lang/tomahawk_tr.ts +++ b/lang/tomahawk_tr.ts @@ -415,39 +415,49 @@ connect and stream from you? Tomahawk Crash Reporter Tomahawk Çökme Raporcusu - + - <p><b>Sorry!</b>&nbsp;Tomahawk crashed. Information about the crash is now being sent to Tomahawk HQ so that we can fix the bug.</p> - <p><b>Üzgünüm!</b>&nbsp; Tomahawk çöktü. Hatayı çözmebilmemiz için çökme ile ilgili bilgi şu anda Tomahawk Merkezine gönderiliyor.<p> + <html><head/><body><p><span style=" font-weight:600;">Sorry!</span> Tomahawk crashed. Please tell us about it! Tomahawk has created an error report for you that can help improve the stability in the future. You can now send the this report directly to the Tomahawk developers.</p></body></html> + - + + Send this report + + + + + Don't send + + + + Abort Vazgeç - + You can disable sending crash reports in the configuration dialog. Çökme raporu göndermeyi yapılandırma iletişim kutusundan devre dışı bırakabilirsiz. - + Uploaded %L1 of %L2 KB. %L2 içinden %L1 KB karşıya yüklendin. - - + + Close Kapat. - + Sent! <b>Many thanks</b>. Gönderildi! <b>Çok teşekkürler.</b>. - + Failed to send crash info. Çökme bilgisi gönderimi başarısız. @@ -2421,22 +2431,22 @@ Try tweaking the filters for a new set of songs to play. Tomahawk::InfoSystem::ChartsPlugin - + Top Overall - + Artists - + Albums - + Tracks @@ -3660,107 +3670,107 @@ Lyrics for "%1" by %2: XmppSipPlugin - + User Interaction - + Host is unknown - + Item not found - + Authorization Error - + Remote Stream Error - + Remote Connection failed - + Internal Server Error - + System shutdown - + Conflict - + Unknown - + No Compression Support - + No Encryption Support - + No Authorization Support - + No Supported Feature - + Add Friend - + Enter Xmpp ID: - + Add Friend... - + XML Console... - + I'm sorry -- I'm just an automatic presence used by Tomahawk Player (http://gettomahawk.com). If you are getting this message, the person you are trying to reach is probably not signed on, so please try again later! - + Authorize User - + Do you want to grant <b>%1</b> access to your Collection? diff --git a/lang/tomahawk_zh_CN.ts b/lang/tomahawk_zh_CN.ts index b47289b4f..a38972dfe 100644 --- a/lang/tomahawk_zh_CN.ts +++ b/lang/tomahawk_zh_CN.ts @@ -415,39 +415,49 @@ connect and stream from you? Tomahawk Crash Reporter Tomahawk 崩溃报告 - + - <p><b>Sorry!</b>&nbsp;Tomahawk crashed. Information about the crash is now being sent to Tomahawk HQ so that we can fix the bug.</p> - <p><b>抱歉!</b>&nbsp;Tomahawk 出错了。相关信息正被上传到 Tomahawk HQ 以便我们修复此错误。</p> + <html><head/><body><p><span style=" font-weight:600;">Sorry!</span> Tomahawk crashed. Please tell us about it! Tomahawk has created an error report for you that can help improve the stability in the future. You can now send the this report directly to the Tomahawk developers.</p></body></html> + - + + Send this report + + + + + Don't send + + + + Abort 中止 - + You can disable sending crash reports in the configuration dialog. 你可以在设置中禁用发送崩溃报告 - + Uploaded %L1 of %L2 KB. 已发送 %L2 KB 中的 %L1 - - + + Close 关闭 - + Sent! <b>Many thanks</b>. 已发送!<b>非常感谢</b>。 - + Failed to send crash info. 发送崩溃信息失败。 @@ -2421,22 +2431,22 @@ Try tweaking the filters for a new set of songs to play. Tomahawk::InfoSystem::ChartsPlugin - + Top Overall - + Artists - + Albums - + Tracks @@ -3660,107 +3670,107 @@ Lyrics for "%1" by %2: XmppSipPlugin - + User Interaction - + Host is unknown - + Item not found - + Authorization Error - + Remote Stream Error - + Remote Connection failed - + Internal Server Error - + System shutdown - + Conflict - + Unknown - + No Compression Support - + No Encryption Support - + No Authorization Support - + No Supported Feature - + Add Friend - + Enter Xmpp ID: - + Add Friend... - + XML Console... - + I'm sorry -- I'm just an automatic presence used by Tomahawk Player (http://gettomahawk.com). If you are getting this message, the person you are trying to reach is probably not signed on, so please try again later! - + Authorize User - + Do you want to grant <b>%1</b> access to your Collection? diff --git a/lang/tomahawk_zh_TW.ts b/lang/tomahawk_zh_TW.ts index 623dc4802..9432eaeae 100644 --- a/lang/tomahawk_zh_TW.ts +++ b/lang/tomahawk_zh_TW.ts @@ -415,39 +415,49 @@ connect and stream from you? Tomahawk Crash Reporter Tomahawk 崩潰報告 - + - <p><b>Sorry!</b>&nbsp;Tomahawk crashed. Information about the crash is now being sent to Tomahawk HQ so that we can fix the bug.</p> + <html><head/><body><p><span style=" font-weight:600;">Sorry!</span> Tomahawk crashed. Please tell us about it! Tomahawk has created an error report for you that can help improve the stability in the future. You can now send the this report directly to the Tomahawk developers.</p></body></html> - + + Send this report + + + + + Don't send + + + + Abort 中止 - + You can disable sending crash reports in the configuration dialog. 在配置對話框中,您可以禁用發送崩潰報告。 - + Uploaded %L1 of %L2 KB. - - + + Close 關閉 - + Sent! <b>Many thanks</b>. - + Failed to send crash info. 無法發送故障信息。 @@ -2421,22 +2431,22 @@ Try tweaking the filters for a new set of songs to play. Tomahawk::InfoSystem::ChartsPlugin - + Top Overall - + Artists 演出者 - + Albums 專輯 - + Tracks 曲目 @@ -3661,107 +3671,107 @@ Lyrics for "%1" by %2: XmppSipPlugin - + User Interaction 使用者互動 - + Host is unknown 主機是未知 - + Item not found - + Authorization Error 授權錯誤 - + Remote Stream Error 遠端串流錯誤 - + Remote Connection failed 遠端連線失敗 - + Internal Server Error 內部服務器錯誤 - + System shutdown 系統關閉 - + Conflict 衝突 - + Unknown 未知 - + No Compression Support 沒有壓縮支持 - + No Encryption Support 沒有加密支持 - + No Authorization Support 沒有授權支持 - + No Supported Feature 沒有支持的功能 - + Add Friend 加為好友 - + Enter Xmpp ID: 輸入XMPP識別碼: - + Add Friend... 加為好友... - + XML Console... XML的控制台... - + I'm sorry -- I'm just an automatic presence used by Tomahawk Player (http://gettomahawk.com). If you are getting this message, the person you are trying to reach is probably not signed on, so please try again later! - + Authorize User 授權用戶 - + Do you want to grant <b>%1</b> access to your Collection? diff --git a/src/TomahawkWindow.cpp b/src/TomahawkWindow.cpp index 1948c4b77..7f420e65b 100644 --- a/src/TomahawkWindow.cpp +++ b/src/TomahawkWindow.cpp @@ -139,7 +139,7 @@ TomahawkWindow::loadSettings() // http://lists.qt.nokia.com/pipermail/qt-interest/2009-August/011491.html // for the 'fix' #ifdef QT_MAC_USE_COCOA - bool workaround = !isVisible(); + bool workaround = isVisible(); if ( workaround ) { // make "invisible" diff --git a/src/breakpad/CrashReporter/CrashReporter.cpp b/src/breakpad/CrashReporter/CrashReporter.cpp index ede0aa2b5..42b6a4927 100644 --- a/src/breakpad/CrashReporter/CrashReporter.cpp +++ b/src/breakpad/CrashReporter/CrashReporter.cpp @@ -36,7 +36,6 @@ CrashReporter::CrashReporter( const QStringList& args ) setWindowIcon( QIcon( RESPATH "icons/tomahawk-icon-128x128.png" ) ); ui.setupUi( this ); - ui.logoLabel->setPixmap( QPixmap( RESPATH "icons/tomahawk-icon-128x128.png" ).scaled( QSize( 55, 55 ), Qt::KeepAspectRatio, Qt::SmoothTransformation ) ); ui.progressBar->setRange( 0, 100 ); ui.progressBar->setValue( 0 ); @@ -51,20 +50,11 @@ CrashReporter::CrashReporter( const QStringList& args ) ui.progressLabel->setIndent( 3 ); #else ui.vboxLayout->setSpacing( 16 ); + ui.hboxLayout1->setSpacing( 16 ); ui.progressBar->setTextVisible( false ); ui.progressLabel->setIndent( 1 ); ui.bottomLabel->setDisabled( true ); ui.bottomLabel->setIndent( 1 ); - - // adjust the spacer since we adjusted the spacing above - for ( int x = 0; x < ui.vboxLayout->count(); ++x ) - { - if ( QSpacerItem* spacer = ui.vboxLayout->itemAt( x )->spacerItem() ) - { - spacer->changeSize( 6, 2, QSizePolicy::Minimum, QSizePolicy::Fixed ); - break; - } - } #endif //Q_WS_MAC m_http = new QHttp( "oops.tomahawk-player.org", 80, this ); @@ -78,7 +68,18 @@ CrashReporter::CrashReporter( const QStringList& args ) setFixedSize( sizeHint() ); - QTimer::singleShot( 0, this, SLOT( send() ) ); + //hide until "send report" has been clicked + ui.progressBar->setVisible( false ); + ui.button->setVisible( false ); + ui.progressLabel->setVisible( false ); + connect( ui.sendButton, SIGNAL( clicked() ), SLOT( onSendButton() )); + + +} + +CrashReporter::~CrashReporter() +{ + delete m_http; } @@ -184,3 +185,14 @@ CrashReporter::onFail( int error, const QString& errorString ) ui.progressLabel->setText( tr( "Failed to send crash info." ) ); qDebug() << "Error:" << error << errorString; } + +void +CrashReporter::onSendButton() +{ + ui.progressBar->setVisible( true ); + ui.button->setVisible( true ); + ui.progressLabel->setVisible( true ); + ui.sendButton->setEnabled( false ); + ui.dontSendButton->setEnabled( false ); + QTimer::singleShot( 0, this, SLOT( send() ) ); +} diff --git a/src/breakpad/CrashReporter/CrashReporter.h b/src/breakpad/CrashReporter/CrashReporter.h index bb526a1a6..e6ee32c2f 100644 --- a/src/breakpad/CrashReporter/CrashReporter.h +++ b/src/breakpad/CrashReporter/CrashReporter.h @@ -31,6 +31,7 @@ class CrashReporter : public QDialog public: CrashReporter( const QStringList& argv ); + ~CrashReporter( ); private: Ui::CrashReporter ui; @@ -47,6 +48,7 @@ private slots: void onDone(); void onProgress( int done, int total ); void onFail( int error, const QString& errorString ); + void onSendButton(); }; #endif // CRASHREPORTER_H diff --git a/src/breakpad/CrashReporter/CrashReporter.ui b/src/breakpad/CrashReporter/CrashReporter.ui index 91e98b16b..10d1d406f 100644 --- a/src/breakpad/CrashReporter/CrashReporter.ui +++ b/src/breakpad/CrashReporter/CrashReporter.ui @@ -10,7 +10,7 @@ 0 0 438 - 196 + 246 @@ -33,7 +33,7 @@ 9 - + 12 @@ -77,7 +77,7 @@ - <p><b>Sorry!</b>&nbsp;Tomahawk crashed. Information about the crash is now being sent to Tomahawk HQ so that we can fix the bug.</p> + <html><head/><body><p><span style=" font-weight:600;">Sorry!</span> Tomahawk crashed. Please tell us about it! Tomahawk has created an error report for you that can help improve the stability in the future. You can now send the this report directly to the Tomahawk developers.</p></body></html> Qt::RichText @@ -106,23 +106,41 @@ - - - Qt::Vertical + + + -1 - - QSizePolicy::Fixed - - - - 20 - 16 - - - + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Send this report + + + + + + + Don't send + + + + - + 0 @@ -210,8 +228,8 @@ accept() - 424 - 154 + 426 + 203 247 @@ -219,5 +237,21 @@ + + dontSendButton + clicked() + CrashReporter + reject() + + + 380 + 117 + + + 218 + 122 + + + diff --git a/src/infoplugins/CMakeLists.txt b/src/infoplugins/CMakeLists.txt index 0e515fae8..eadafe5a1 100644 --- a/src/infoplugins/CMakeLists.txt +++ b/src/infoplugins/CMakeLists.txt @@ -3,3 +3,7 @@ add_subdirectory( generic ) if(UNIX AND NOT APPLE) add_subdirectory( linux ) endif() + +if(APPLE) + add_subdirectory( mac ) +endif() diff --git a/src/infoplugins/generic/CMakeLists.txt b/src/infoplugins/generic/CMakeLists.txt index 15a700ab3..7473744f1 100644 --- a/src/infoplugins/generic/CMakeLists.txt +++ b/src/infoplugins/generic/CMakeLists.txt @@ -1,25 +1,21 @@ +include_directories(${LIBECHONEST_INCLUDE_DIR}) list(APPEND simple_plugins + Echonest Charts NewReleases - spotify - hypem + Spotify + Hypem MusixMatch - musicbrainz + MusicBrainz Rovi ) foreach(simple_plugin ${simple_plugins}) - add_tomahawk_plugin(${simple_plugin} + STRING(TOLOWER "${simple_plugin}" dir) + add_tomahawk_plugin(${dir} TYPE infoplugin EXPORT_MACRO INFOPLUGINDLLEXPORT_PRO - SOURCES "${simple_plugin}Plugin.cpp" + SOURCES "${dir}/${simple_plugin}Plugin.cpp" ) endforeach() - -include_directories(${LIBECHONEST_INCLUDE_DIR}) -add_tomahawk_plugin(echonest - TYPE infoplugin EXPORT_MACRO INFOPLUGINDLLEXPORT_PRO - SOURCES EchonestPlugin.cpp -) - diff --git a/src/infoplugins/generic/charts/CMakeLists.txt b/src/infoplugins/generic/charts/CMakeLists.txt new file mode 100644 index 000000000..36f52e154 --- /dev/null +++ b/src/infoplugins/generic/charts/CMakeLists.txt @@ -0,0 +1,43 @@ +project( tomahawk ) + +include( ${QT_USE_FILE} ) +add_definitions( ${QT_DEFINITIONS} ) +add_definitions( -DQT_PLUGIN ) +add_definitions( -DQT_SHARED ) +add_definitions( -DINFOPLUGINDLLEXPORT_PRO ) + +set( chartsInfoPluginSources + ChartsPlugin.cpp +) + +set( chartsInfoPluginHeaders + ChartsPlugin.h +) + +include_directories( + ${QT_INCLUDE_DIR} +) + +qt4_wrap_cpp( chartsInfoPluginMoc ${chartsInfoPluginHeaders} ) +add_library( tomahawk_infoplugin_charts SHARED ${chartsInfoPluginSources} ${chartsInfoPluginMoc} ${RC_SRCS} ) + +IF( WIN32 ) +SET( OS_SPECIFIC_LINK_LIBRARIES + ${OS_SPECIFIC_LINK_LIBRARIES} + "winmm.dll" + "iphlpapi.a" +) +ENDIF( WIN32 ) + +target_link_libraries( tomahawk_infoplugin_charts + ${TOMAHAWK_LIBRARIES} + ${QT_LIBRARIES} + ${OS_SPECIFIC_LINK_LIBRARIES} +) + +IF( APPLE ) +# SET( CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS} "-undefined dynamic_lookup" ) +ENDIF( APPLE ) + +install( TARGETS tomahawk_infoplugin_charts DESTINATION ${CMAKE_INSTALL_LIBDIR} ) + diff --git a/src/infoplugins/generic/ChartsPlugin.cpp b/src/infoplugins/generic/charts/ChartsPlugin.cpp similarity index 98% rename from src/infoplugins/generic/ChartsPlugin.cpp rename to src/infoplugins/generic/charts/ChartsPlugin.cpp index 3eac27215..52b02624d 100644 --- a/src/infoplugins/generic/ChartsPlugin.cpp +++ b/src/infoplugins/generic/charts/ChartsPlugin.cpp @@ -21,13 +21,14 @@ #include "ChartsPlugin.h" -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "Album.h" -#include "ChartsPlugin_Data_p.h" +#include "CountryUtils.h" #include "Typedefs.h" #include "audio/AudioEngine.h" #include "TomahawkSettings.h" @@ -40,8 +41,11 @@ #include #include -using namespace Tomahawk::InfoSystem; +namespace Tomahawk +{ +namespace InfoSystem +{ ChartsPlugin::ChartsPlugin() : InfoPlugin() @@ -631,3 +635,9 @@ ChartsPlugin::chartReturned() tDebug( LOGVERBOSE ) << Q_FUNC_INFO << "Network error in fetching chart:" << reply->url().toString(); } + +} + +} + +Q_EXPORT_PLUGIN2( Tomahawk::InfoSystem::InfoPlugin, Tomahawk::InfoSystem::ChartsPlugin ) \ No newline at end of file diff --git a/src/infoplugins/generic/ChartsPlugin.h b/src/infoplugins/generic/charts/ChartsPlugin.h similarity index 94% rename from src/infoplugins/generic/ChartsPlugin.h rename to src/infoplugins/generic/charts/ChartsPlugin.h index 31cb1c696..d521bb19a 100644 --- a/src/infoplugins/generic/ChartsPlugin.h +++ b/src/infoplugins/generic/charts/ChartsPlugin.h @@ -20,10 +20,11 @@ #ifndef ChartsPlugin_H #define ChartsPlugin_H +#include "infoplugins/InfoPluginDllMacro.h" #include "infosystem/InfoSystem.h" #include "infosystem/InfoSystemWorker.h" -#include -#include +#include +#include class QNetworkReply; @@ -33,9 +34,10 @@ namespace Tomahawk namespace InfoSystem { -class ChartsPlugin : public InfoPlugin +class INFOPLUGINDLLEXPORT ChartsPlugin : public InfoPlugin { Q_OBJECT + Q_INTERFACES( Tomahawk::InfoSystem::InfoPlugin ) public: ChartsPlugin(); diff --git a/src/infoplugins/generic/EchonestPlugin.cpp b/src/infoplugins/generic/echonest/EchonestPlugin.cpp similarity index 100% rename from src/infoplugins/generic/EchonestPlugin.cpp rename to src/infoplugins/generic/echonest/EchonestPlugin.cpp diff --git a/src/infoplugins/generic/EchonestPlugin.h b/src/infoplugins/generic/echonest/EchonestPlugin.h similarity index 100% rename from src/infoplugins/generic/EchonestPlugin.h rename to src/infoplugins/generic/echonest/EchonestPlugin.h diff --git a/src/infoplugins/generic/hypem/CMakeLists.txt b/src/infoplugins/generic/hypem/CMakeLists.txt new file mode 100644 index 000000000..074399881 --- /dev/null +++ b/src/infoplugins/generic/hypem/CMakeLists.txt @@ -0,0 +1,43 @@ +project( tomahawk ) + +include( ${QT_USE_FILE} ) +add_definitions( ${QT_DEFINITIONS} ) +add_definitions( -DQT_PLUGIN ) +add_definitions( -DQT_SHARED ) +add_definitions( -DINFOPLUGINDLLEXPORT_PRO ) + +set( hypemInfoPluginSources + HypemPlugin.cpp +) + +set( hypemInfoPluginHeaders + HypemPlugin.h +) + +include_directories( + ${QT_INCLUDE_DIR} +) + +qt4_wrap_cpp( hypemInfoPluginMoc ${hypemInfoPluginHeaders} ) +add_library( tomahawk_infoplugin_hypem SHARED ${hypemInfoPluginSources} ${hypemInfoPluginMoc} ${RC_SRCS} ) + +IF( WIN32 ) +SET( OS_SPECIFIC_LINK_LIBRARIES + ${OS_SPECIFIC_LINK_LIBRARIES} + "winmm.dll" + "iphlpapi.a" +) +ENDIF( WIN32 ) + +target_link_libraries( tomahawk_infoplugin_hypem + ${TOMAHAWK_LIBRARIES} + ${QT_LIBRARIES} + ${OS_SPECIFIC_LINK_LIBRARIES} +) + +IF( APPLE ) +# SET( CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS} "-undefined dynamic_lookup" ) +ENDIF( APPLE ) + +install( TARGETS tomahawk_infoplugin_hypem DESTINATION ${CMAKE_INSTALL_LIBDIR} ) + diff --git a/src/infoplugins/generic/hypemPlugin.cpp b/src/infoplugins/generic/hypem/HypemPlugin.cpp similarity index 93% rename from src/infoplugins/generic/hypemPlugin.cpp rename to src/infoplugins/generic/hypem/HypemPlugin.cpp index 074da3595..2624d4baa 100644 --- a/src/infoplugins/generic/hypemPlugin.cpp +++ b/src/infoplugins/generic/hypem/HypemPlugin.cpp @@ -17,13 +17,14 @@ * along with Tomahawk. If not, see . */ -#include "hypemPlugin.h" +#include "HypemPlugin.h" #include #include #include #include #include +#include #include "Album.h" #include "Typedefs.h" @@ -36,10 +37,14 @@ #include #include -using namespace Tomahawk::InfoSystem; +namespace Tomahawk +{ + +namespace InfoSystem +{ -hypemPlugin::hypemPlugin() +HypemPlugin::HypemPlugin() : InfoPlugin() , m_chartsFetchJobs( 0 ) { @@ -95,14 +100,14 @@ hypemPlugin::hypemPlugin() -hypemPlugin::~hypemPlugin() +HypemPlugin::~HypemPlugin() { qDebug() << Q_FUNC_INFO; } void -hypemPlugin::dataError( Tomahawk::InfoSystem::InfoRequestData requestData ) +HypemPlugin::dataError( Tomahawk::InfoSystem::InfoRequestData requestData ) { emit info( requestData, QVariant() ); return; @@ -110,7 +115,7 @@ hypemPlugin::dataError( Tomahawk::InfoSystem::InfoRequestData requestData ) void -hypemPlugin::getInfo( Tomahawk::InfoSystem::InfoRequestData requestData ) +HypemPlugin::getInfo( Tomahawk::InfoSystem::InfoRequestData requestData ) { qDebug() << Q_FUNC_INFO << requestData.caller; qDebug() << Q_FUNC_INFO << requestData.customData; @@ -140,7 +145,7 @@ hypemPlugin::getInfo( Tomahawk::InfoSystem::InfoRequestData requestData ) } void -hypemPlugin::fetchChart( Tomahawk::InfoSystem::InfoRequestData requestData ) +HypemPlugin::fetchChart( Tomahawk::InfoSystem::InfoRequestData requestData ) { if ( !requestData.input.canConvert< Tomahawk::InfoSystem::InfoStringHash >() ) @@ -168,7 +173,7 @@ hypemPlugin::fetchChart( Tomahawk::InfoSystem::InfoRequestData requestData ) } void -hypemPlugin::fetchChartCapabilities( Tomahawk::InfoSystem::InfoRequestData requestData ) +HypemPlugin::fetchChartCapabilities( Tomahawk::InfoSystem::InfoRequestData requestData ) { if ( !requestData.input.canConvert< Tomahawk::InfoSystem::InfoStringHash >() ) { @@ -181,7 +186,7 @@ hypemPlugin::fetchChartCapabilities( Tomahawk::InfoSystem::InfoRequestData reque } void -hypemPlugin::notInCacheSlot( QHash criteria, Tomahawk::InfoSystem::InfoRequestData requestData ) +HypemPlugin::notInCacheSlot( QHash criteria, Tomahawk::InfoSystem::InfoRequestData requestData ) { switch ( requestData.type ) { @@ -225,9 +230,9 @@ hypemPlugin::notInCacheSlot( QHash criteria, Tomahawk::InfoSys void -hypemPlugin::chartTypes() +HypemPlugin::chartTypes() { - /// Get possible chart type for specifichypemPlugin: InfoChart types returned chart source + /// Get possible chart type for specificHypemPlugin: InfoChart types returned chart source tDebug() << Q_FUNC_INFO << "Got hypem types"; QVariantMap charts; @@ -295,13 +300,13 @@ hypemPlugin::chartTypes() m_allChartsMap.insert( "Hype Machine", QVariant::fromValue( charts ) ); - qDebug() << "hypemPlugin:Chartstype: " << m_allChartsMap; + qDebug() << "HypemPlugin:Chartstype: " << m_allChartsMap; } void -hypemPlugin::chartReturned() +HypemPlugin::chartReturned() { /// Chart request returned something! Woho @@ -387,3 +392,9 @@ hypemPlugin::chartReturned() qDebug() << "Network error in fetching chart:" << reply->url().toString(); } + +} + +} + +Q_EXPORT_PLUGIN2( Tomahawk::InfoSystem::InfoPlugin, Tomahawk::InfoSystem::HypemPlugin ) \ No newline at end of file diff --git a/src/infoplugins/generic/hypemPlugin.h b/src/infoplugins/generic/hypem/HypemPlugin.h similarity index 85% rename from src/infoplugins/generic/hypemPlugin.h rename to src/infoplugins/generic/hypem/HypemPlugin.h index f0b9867ab..1848bd99e 100644 --- a/src/infoplugins/generic/hypemPlugin.h +++ b/src/infoplugins/generic/hypem/HypemPlugin.h @@ -17,9 +17,10 @@ * along with Tomahawk. If not, see . */ -#ifndef hypemPlugin_H -#define hypemPlugin_H +#ifndef HYPEMPLUGIN_H +#define HYPEMPLUGIN_H +#include "infoplugins/InfoPluginDllMacro.h" #include "infosystem/InfoSystem.h" #include "infosystem/InfoSystemWorker.h" #include @@ -33,13 +34,14 @@ namespace Tomahawk namespace InfoSystem { -class hypemPlugin : public InfoPlugin +class INFOPLUGINDLLEXPORT HypemPlugin : public InfoPlugin { Q_OBJECT + Q_INTERFACES( Tomahawk::InfoSystem::InfoPlugin ) public: - hypemPlugin(); - virtual ~hypemPlugin(); + HypemPlugin(); + virtual ~HypemPlugin(); enum ChartType { None = 0x00, @@ -48,8 +50,8 @@ public: Artist = 0x04 }; - void setChartType( ChartType type ) { m_chartType = type; } - ChartType chartType() const { return m_chartType; } + void setChartType( ChartType type ) { m_chartType = type; } + ChartType chartType() const { return m_chartType; } public slots: void chartReturned(); @@ -91,4 +93,4 @@ private: } -#endif // hypemPlugin_H +#endif // HYPEMPLUGIN_H diff --git a/src/infoplugins/generic/musicbrainzPlugin.cpp b/src/infoplugins/generic/musicbrainz/MusicBrainzPlugin.cpp similarity index 99% rename from src/infoplugins/generic/musicbrainzPlugin.cpp rename to src/infoplugins/generic/musicbrainz/MusicBrainzPlugin.cpp index a01b43930..b6604dd5e 100644 --- a/src/infoplugins/generic/musicbrainzPlugin.cpp +++ b/src/infoplugins/generic/musicbrainz/MusicBrainzPlugin.cpp @@ -17,7 +17,7 @@ * along with Tomahawk. If not, see . */ -#include "musicbrainzPlugin.h" +#include "MusicBrainzPlugin.h" #include #include diff --git a/src/infoplugins/generic/musicbrainzPlugin.h b/src/infoplugins/generic/musicbrainz/MusicBrainzPlugin.h similarity index 100% rename from src/infoplugins/generic/musicbrainzPlugin.h rename to src/infoplugins/generic/musicbrainz/MusicBrainzPlugin.h diff --git a/src/infoplugins/generic/MusixMatchPlugin.cpp b/src/infoplugins/generic/musixmatch/MusixMatchPlugin.cpp similarity index 100% rename from src/infoplugins/generic/MusixMatchPlugin.cpp rename to src/infoplugins/generic/musixmatch/MusixMatchPlugin.cpp diff --git a/src/infoplugins/generic/MusixMatchPlugin.h b/src/infoplugins/generic/musixmatch/MusixMatchPlugin.h similarity index 100% rename from src/infoplugins/generic/MusixMatchPlugin.h rename to src/infoplugins/generic/musixmatch/MusixMatchPlugin.h diff --git a/src/infoplugins/generic/NewReleasesPlugin.cpp b/src/infoplugins/generic/newreleases/NewReleasesPlugin.cpp similarity index 99% rename from src/infoplugins/generic/NewReleasesPlugin.cpp rename to src/infoplugins/generic/newreleases/NewReleasesPlugin.cpp index 9781a2118..591ad3f05 100644 --- a/src/infoplugins/generic/NewReleasesPlugin.cpp +++ b/src/infoplugins/generic/newreleases/NewReleasesPlugin.cpp @@ -6,7 +6,7 @@ #include #include "Album.h" -#include "ChartsPlugin_Data_p.h" +#include "CountryUtils.h" #include "Typedefs.h" #include "audio/AudioEngine.h" #include "TomahawkSettings.h" diff --git a/src/infoplugins/generic/NewReleasesPlugin.h b/src/infoplugins/generic/newreleases/NewReleasesPlugin.h similarity index 100% rename from src/infoplugins/generic/NewReleasesPlugin.h rename to src/infoplugins/generic/newreleases/NewReleasesPlugin.h diff --git a/src/infoplugins/generic/RoviPlugin.cpp b/src/infoplugins/generic/rovi/RoviPlugin.cpp similarity index 100% rename from src/infoplugins/generic/RoviPlugin.cpp rename to src/infoplugins/generic/rovi/RoviPlugin.cpp diff --git a/src/infoplugins/generic/RoviPlugin.h b/src/infoplugins/generic/rovi/RoviPlugin.h similarity index 100% rename from src/infoplugins/generic/RoviPlugin.h rename to src/infoplugins/generic/rovi/RoviPlugin.h diff --git a/src/infoplugins/generic/spotifyPlugin.cpp b/src/infoplugins/generic/spotify/SpotifyPlugin.cpp similarity index 99% rename from src/infoplugins/generic/spotifyPlugin.cpp rename to src/infoplugins/generic/spotify/SpotifyPlugin.cpp index e38ee5a9c..cb2ee61a6 100644 --- a/src/infoplugins/generic/spotifyPlugin.cpp +++ b/src/infoplugins/generic/spotify/SpotifyPlugin.cpp @@ -17,7 +17,7 @@ * along with Tomahawk. If not, see . */ -#include "spotifyPlugin.h" +#include "SpotifyPlugin.h" #include #include @@ -31,7 +31,7 @@ #include "TomahawkSettings.h" #include "utils/TomahawkUtils.h" #include "utils/Logger.h" -#include "ChartsPlugin_Data_p.h" +#include "CountryUtils.h" #define SPOTIFY_API_URL "http://spotikea.tomahawk-player.org/" #include diff --git a/src/infoplugins/generic/spotifyPlugin.h b/src/infoplugins/generic/spotify/SpotifyPlugin.h similarity index 100% rename from src/infoplugins/generic/spotifyPlugin.h rename to src/infoplugins/generic/spotify/SpotifyPlugin.h diff --git a/src/infoplugins/linux/CMakeLists.txt b/src/infoplugins/linux/CMakeLists.txt new file mode 100644 index 000000000..237b5038e --- /dev/null +++ b/src/infoplugins/linux/CMakeLists.txt @@ -0,0 +1,25 @@ +IF(BUILD_GUI AND X11_FOUND) + INCLUDE_DIRECTORIES( ${THIRDPARTY_DIR}/libqnetwm ) + SET(fdo_srcs + fdonotify/FdoNotifyPlugin.cpp + fdonotify/ImageConverter.cpp + ${THIRDPARTY_DIR}/libqnetwm/libqnetwm/netwm.cpp + ) + SET(FDO_LINK_LIBRARIES ${LINK_LIBRARIES} ${X11_LIBRARIES}) + + add_tomahawk_plugin(fdonotify + TYPE infoplugin EXPORT_MACRO INFOPLUGINDLLEXPORT_PRO + SOURCES "${fdo_srcs}" LINK_LIBRARIES "${FDO_LINK_LIBRARIES}" + ) +ENDIF() + +SET(mpris_srcs + mpris/MprisPluginRootAdaptor.cpp + mpris/MprisPluginPlayerAdaptor.cpp + mpris/MprisPlugin.cpp + ) + +add_tomahawk_plugin(mpris + TYPE infoplugin EXPORT_MACRO INFOPLUGINDLLEXPORT_PRO + SOURCES "${mpris_srcs}" + ) diff --git a/src/infoplugins/linux/FdoNotifyPlugin.cpp b/src/infoplugins/linux/fdonotify/FdoNotifyPlugin.cpp similarity index 96% rename from src/infoplugins/linux/FdoNotifyPlugin.cpp rename to src/infoplugins/linux/fdonotify/FdoNotifyPlugin.cpp index 113d7e7b6..44be76c35 100644 --- a/src/infoplugins/linux/FdoNotifyPlugin.cpp +++ b/src/infoplugins/linux/fdonotify/FdoNotifyPlugin.cpp @@ -44,10 +44,15 @@ #include #include #include +#include #include "utils/Logger.h" -using namespace Tomahawk::InfoSystem; +namespace Tomahawk +{ + +namespace InfoSystem +{ FdoNotifyPlugin::FdoNotifyPlugin() : InfoPlugin() @@ -162,3 +167,9 @@ FdoNotifyPlugin::nowPlaying( const QVariant &input ) if ( list.count() > 0 ) m_nowPlayingId = list.at( 0 ).toInt(); } + +} //ns InfoSystem + +} //ns Tomahawk + +Q_EXPORT_PLUGIN2( Tomahawk::InfoSystem::InfoPlugin, Tomahawk::InfoSystem::FdoNotifyPlugin ) diff --git a/src/infoplugins/linux/FdoNotifyPlugin.h b/src/infoplugins/linux/fdonotify/FdoNotifyPlugin.h similarity index 91% rename from src/infoplugins/linux/FdoNotifyPlugin.h rename to src/infoplugins/linux/fdonotify/FdoNotifyPlugin.h index 2679d7373..fc56e6267 100644 --- a/src/infoplugins/linux/FdoNotifyPlugin.h +++ b/src/infoplugins/linux/fdonotify/FdoNotifyPlugin.h @@ -20,6 +20,7 @@ #ifndef FDONOTIFYPLUGIN_H #define FDONOTIFYPLUGIN_H +#include "infoplugins/InfoPluginDllMacro.h" #include "infosystem/InfoSystem.h" namespace Tomahawk @@ -28,9 +29,10 @@ namespace Tomahawk namespace InfoSystem { -class FdoNotifyPlugin : public InfoPlugin +class INFOPLUGINDLLEXPORT FdoNotifyPlugin : public InfoPlugin { Q_OBJECT + Q_INTERFACES( Tomahawk::InfoSystem::InfoPlugin ) public: FdoNotifyPlugin(); diff --git a/src/infoplugins/linux/ImageConverter.cpp b/src/infoplugins/linux/fdonotify/ImageConverter.cpp similarity index 100% rename from src/infoplugins/linux/ImageConverter.cpp rename to src/infoplugins/linux/fdonotify/ImageConverter.cpp diff --git a/src/infoplugins/linux/ImageConverter.h b/src/infoplugins/linux/fdonotify/ImageConverter.h similarity index 100% rename from src/infoplugins/linux/ImageConverter.h rename to src/infoplugins/linux/fdonotify/ImageConverter.h diff --git a/src/infoplugins/linux/MprisPlugin.cpp b/src/infoplugins/linux/mpris/MprisPlugin.cpp similarity index 95% rename from src/infoplugins/linux/MprisPlugin.cpp rename to src/infoplugins/linux/mpris/MprisPlugin.cpp index 542ce34c9..f72d19dad 100644 --- a/src/infoplugins/linux/MprisPlugin.cpp +++ b/src/infoplugins/linux/mpris/MprisPlugin.cpp @@ -20,6 +20,7 @@ #include #include #include +#include #include "audio/AudioEngine.h" #include "infosystem/InfoSystemWorker.h" @@ -35,7 +36,11 @@ #include "MprisPluginRootAdaptor.h" #include "MprisPluginPlayerAdaptor.h" -using namespace Tomahawk::InfoSystem; +namespace Tomahawk +{ + +namespace InfoSystem +{ static QString s_mpInfoIdentifier = QString( "MPRISPLUGIN" ); @@ -254,8 +259,8 @@ MprisPlugin::metadata() const Tomahawk::result_ptr track = AudioEngine::instance()->currentTrack(); if ( track ) { - metadataMap.insert( "mpris:trackid", QString( "/track/" ) + track->id().replace( "-", "" ) ); - metadataMap.insert( "mpris:length", track->duration() ); + metadataMap.insert( "mpris:trackid", QVariant::fromValue(QDBusObjectPath(QString( "/track/" ) + track->id().replace( "-", "" ))) ); + metadataMap.insert( "mpris:length", static_cast(track->duration()) * 1000000 ); metadataMap.insert( "xesam:album", track->album()->name() ); metadataMap.insert( "xesam:artist", QStringList( track->artist()->name() ) ); metadataMap.insert( "xesam:title", track->track() ); @@ -332,14 +337,14 @@ MprisPlugin::setShuffle( bool value ) double MprisPlugin::volume() const { - return AudioEngine::instance()->volume(); + return static_cast(AudioEngine::instance()->volume()) / 100.0; } void MprisPlugin::setVolume( double value ) { - AudioEngine::instance()->setVolume( value ); + AudioEngine::instance()->setVolume( value * 100 ); } @@ -583,3 +588,8 @@ MprisPlugin::notifyPropertyChanged( const QString& interface, const QString& pro QDBusConnection::sessionBus().send(signal); } +} //ns InfoSystem + +} //ns Tomahawk + +Q_EXPORT_PLUGIN2( Tomahawk::InfoSystem::InfoPlugin, Tomahawk::InfoSystem::MprisPlugin ) diff --git a/src/infoplugins/linux/MprisPlugin.h b/src/infoplugins/linux/mpris/MprisPlugin.h similarity index 96% rename from src/infoplugins/linux/MprisPlugin.h rename to src/infoplugins/linux/mpris/MprisPlugin.h index e6b1fa573..9e4d54e04 100644 --- a/src/infoplugins/linux/MprisPlugin.h +++ b/src/infoplugins/linux/mpris/MprisPlugin.h @@ -22,6 +22,7 @@ #include "audio/AudioEngine.h" #include "infosystem/InfoSystem.h" +#include "infoplugins/InfoPluginDllMacro.h" #include #include @@ -33,9 +34,10 @@ namespace Tomahawk namespace InfoSystem { -class MprisPlugin : public InfoPlugin +class INFOPLUGINDLLEXPORT MprisPlugin : public InfoPlugin { Q_OBJECT + Q_INTERFACES( Tomahawk::InfoSystem::InfoPlugin ) public: MprisPlugin(); diff --git a/src/infoplugins/linux/MprisPluginPlayerAdaptor.cpp b/src/infoplugins/linux/mpris/MprisPluginPlayerAdaptor.cpp similarity index 100% rename from src/infoplugins/linux/MprisPluginPlayerAdaptor.cpp rename to src/infoplugins/linux/mpris/MprisPluginPlayerAdaptor.cpp diff --git a/src/infoplugins/linux/MprisPluginPlayerAdaptor.h b/src/infoplugins/linux/mpris/MprisPluginPlayerAdaptor.h similarity index 100% rename from src/infoplugins/linux/MprisPluginPlayerAdaptor.h rename to src/infoplugins/linux/mpris/MprisPluginPlayerAdaptor.h diff --git a/src/infoplugins/linux/MprisPluginPlayerAdaptor.xml b/src/infoplugins/linux/mpris/MprisPluginPlayerAdaptor.xml similarity index 100% rename from src/infoplugins/linux/MprisPluginPlayerAdaptor.xml rename to src/infoplugins/linux/mpris/MprisPluginPlayerAdaptor.xml diff --git a/src/infoplugins/linux/MprisPluginRootAdaptor.cpp b/src/infoplugins/linux/mpris/MprisPluginRootAdaptor.cpp similarity index 100% rename from src/infoplugins/linux/MprisPluginRootAdaptor.cpp rename to src/infoplugins/linux/mpris/MprisPluginRootAdaptor.cpp diff --git a/src/infoplugins/linux/MprisPluginRootAdaptor.h b/src/infoplugins/linux/mpris/MprisPluginRootAdaptor.h similarity index 100% rename from src/infoplugins/linux/MprisPluginRootAdaptor.h rename to src/infoplugins/linux/mpris/MprisPluginRootAdaptor.h diff --git a/src/infoplugins/linux/MprisPluginRootAdaptor.xml b/src/infoplugins/linux/mpris/MprisPluginRootAdaptor.xml similarity index 100% rename from src/infoplugins/linux/MprisPluginRootAdaptor.xml rename to src/infoplugins/linux/mpris/MprisPluginRootAdaptor.xml diff --git a/src/infoplugins/mac/CMakeLists.txt b/src/infoplugins/mac/CMakeLists.txt new file mode 100644 index 000000000..8f75a22a9 --- /dev/null +++ b/src/infoplugins/mac/CMakeLists.txt @@ -0,0 +1,11 @@ +set(adium_srcs + adium/AdiumPlugin.cpp + adium/Adium.mm +) + + +add_tomahawk_plugin(adium + TYPE infoplugin EXPORT_MACRO INFOPLUGINDLLEXPORT_PRO + SOURCES "${adium_srcs}" +) + diff --git a/src/libtomahawk/infosystem/infoplugins/mac/Adium.h b/src/infoplugins/mac/adium/Adium.h similarity index 100% rename from src/libtomahawk/infosystem/infoplugins/mac/Adium.h rename to src/infoplugins/mac/adium/Adium.h diff --git a/src/libtomahawk/infosystem/infoplugins/mac/Adium.mm b/src/infoplugins/mac/adium/Adium.mm similarity index 100% rename from src/libtomahawk/infosystem/infoplugins/mac/Adium.mm rename to src/infoplugins/mac/adium/Adium.mm diff --git a/src/libtomahawk/infosystem/infoplugins/mac/AdiumPlugin.cpp b/src/infoplugins/mac/adium/AdiumPlugin.cpp similarity index 96% rename from src/libtomahawk/infosystem/infoplugins/mac/AdiumPlugin.cpp rename to src/infoplugins/mac/adium/AdiumPlugin.cpp index 0a50d1be2..920d4c188 100644 --- a/src/libtomahawk/infosystem/infoplugins/mac/AdiumPlugin.cpp +++ b/src/infoplugins/mac/adium/AdiumPlugin.cpp @@ -19,6 +19,7 @@ #include +#include #include #include "infosystem/InfoSystemWorker.h" @@ -46,7 +47,11 @@ static void setStatus(const QString &status) script( scriptstr ); } -using namespace Tomahawk::InfoSystem; +namespace Tomahawk +{ + +namespace InfoSystem +{ AdiumPlugin::AdiumPlugin() : InfoPlugin() @@ -148,7 +153,7 @@ AdiumPlugin::audioStarted( const Tomahawk::InfoSystem::PushInfoPair pushInfoPair return; InfoStringHash hash = map[ "trackinfo" ].value< Tomahawk::InfoSystem::InfoStringHash >(); - + if ( !hash.contains( "title" ) || !hash.contains( "artist" ) ) return; @@ -161,7 +166,7 @@ AdiumPlugin::audioStarted( const Tomahawk::InfoSystem::PushInfoPair pushInfoPair QUrl shortUrl = m_currentLongUrl; if ( pushInfoPair.first.contains( "shortUrl" ) ) shortUrl = pushInfoPair.first[ "shortUrl" ].toUrl(); - + QString nowPlaying = ""; nowPlaying.append( m_currentArtist ); nowPlaying.append(" - "); @@ -208,3 +213,8 @@ AdiumPlugin::audioResumed( const Tomahawk::InfoSystem::PushInfoPair pushInfoPair audioStarted( pushInfoPair ); } +} //ns InfoSystem + +} //ns Tomahawk + +Q_EXPORT_PLUGIN2( Tomahawk::InfoSystem::InfoPlugin, Tomahawk::InfoSystem::AdiumPlugin ) diff --git a/src/libtomahawk/infosystem/infoplugins/mac/AdiumPlugin.h b/src/infoplugins/mac/adium/AdiumPlugin.h similarity index 93% rename from src/libtomahawk/infosystem/infoplugins/mac/AdiumPlugin.h rename to src/infoplugins/mac/adium/AdiumPlugin.h index 38d3aa149..a05b0863b 100644 --- a/src/libtomahawk/infosystem/infoplugins/mac/AdiumPlugin.h +++ b/src/infoplugins/mac/adium/AdiumPlugin.h @@ -20,6 +20,7 @@ #ifndef ADIUMPLUGIN_H #define ADIUMPLUGIN_H +#include "infoplugins/InfoPluginDllMacro.h" #include "infosystem/InfoSystem.h" #include @@ -33,9 +34,10 @@ namespace Tomahawk { namespace InfoSystem { -class AdiumPlugin : public InfoPlugin +class INFOPLUGINDLLEXPORT AdiumPlugin : public InfoPlugin { Q_OBJECT + Q_INTERFACES( Tomahawk::InfoSystem::InfoPlugin ) public: AdiumPlugin(); @@ -46,7 +48,7 @@ protected slots: { Q_UNUSED( requestData ); } - + virtual void pushInfo( Tomahawk::InfoSystem::InfoPushData pushData ); public slots: diff --git a/src/libtomahawk/CMakeLists.txt b/src/libtomahawk/CMakeLists.txt index c93662b0e..bf6d9f624 100644 --- a/src/libtomahawk/CMakeLists.txt +++ b/src/libtomahawk/CMakeLists.txt @@ -369,8 +369,6 @@ IF( APPLE ) MARK_AS_ADVANCED( COREAUDIO_LIBRARY COREFOUNDATION_LIBRARY FOUNDATION_LIBRARY SCRIPTINGBRIDGE_LIBRARY ) SET( libSources ${libSources} - infosystem/infoplugins/mac/Adium.mm - infosystem/infoplugins/mac/AdiumPlugin.cpp utils/TomahawkUtils_Mac.mm thirdparty/Qocoa/qsearchfield_mac.mm ) diff --git a/src/infoplugins/generic/ChartsPlugin_Data_p.h b/src/libtomahawk/CountryUtils.h similarity index 100% rename from src/infoplugins/generic/ChartsPlugin_Data_p.h rename to src/libtomahawk/CountryUtils.h diff --git a/src/libtomahawk/infosystem/InfoSystemWorker.cpp b/src/libtomahawk/infosystem/InfoSystemWorker.cpp index 63538c291..59dedf9cf 100644 --- a/src/libtomahawk/infosystem/InfoSystemWorker.cpp +++ b/src/libtomahawk/infosystem/InfoSystemWorker.cpp @@ -22,32 +22,17 @@ #include #include #include +#include +#include #include "config.h" #include "HeadlessCheck.h" #include "InfoSystemWorker.h" #include "InfoSystemCache.h" -#include "infoplugins/generic/EchonestPlugin.h" -#include "infoplugins/generic/MusixMatchPlugin.h" -#include "infoplugins/generic/ChartsPlugin.h" -#include "infoplugins/generic/NewReleasesPlugin.h" -#include "infoplugins/generic/spotifyPlugin.h" -#include "infoplugins/generic/musicbrainzPlugin.h" -#include "infoplugins/generic/hypemPlugin.h" #include "GlobalActionManager.h" #include "utils/TomahawkUtils.h" #include "utils/Logger.h" -#ifdef Q_WS_MAC -#include "infoplugins/mac/AdiumPlugin.h" -#endif -#ifdef Q_WS_X11 -#include "infoplugins/linux/FdoNotifyPlugin.h" -#include "infoplugins/linux/MprisPlugin.h" -#endif - -#include "infoplugins/generic/RoviPlugin.h" - namespace Tomahawk { @@ -86,10 +71,6 @@ InfoSystemWorker::init( Tomahawk::InfoSystem::InfoSystemCache* cache ) m_cache = cache; loadInfoPlugins( findInfoPlugins() ); - -#ifdef Q_WS_MAC - addInfoPlugin( InfoPluginPtr( new AdiumPlugin() ) ); -#endif } diff --git a/src/libtomahawk/playlist/AlbumView.cpp b/src/libtomahawk/playlist/AlbumView.cpp index 8db466435..0d7ee312b 100644 --- a/src/libtomahawk/playlist/AlbumView.cpp +++ b/src/libtomahawk/playlist/AlbumView.cpp @@ -190,7 +190,7 @@ AlbumView::resizeEvent( QResizeEvent* event ) int itemWidth = 160; QSize itemSize = m_proxyModel->data( QModelIndex(), Qt::SizeHintRole ).toSize(); - int itemsPerRow = qFloor( rectWidth / itemWidth ); + int itemsPerRow = qMax( 1, qFloor( rectWidth / itemWidth ) ); // int rightSpacing = rectWidth - ( itemsPerRow * ( itemSize.width() + 16 ) ); // int newSpacing = 16 + floor( rightSpacing / ( itemsPerRow + 1 ) ); diff --git a/src/libtomahawk/widgets/infowidgets/TrackInfoWidget.cpp b/src/libtomahawk/widgets/infowidgets/TrackInfoWidget.cpp index 0e79b788a..32809600e 100644 --- a/src/libtomahawk/widgets/infowidgets/TrackInfoWidget.cpp +++ b/src/libtomahawk/widgets/infowidgets/TrackInfoWidget.cpp @@ -40,7 +40,7 @@ TrackInfoWidget::TrackInfoWidget( const Tomahawk::query_ptr& query, QWidget* par layout()->setSpacing( 0 ); ui->headerWidget->setStyleSheet( "QWidget#headerWidget { background-image: url(" RESPATH "images/playlist-header-tiled.png); }" ); - ui->tracksWidget->setStyleSheet( "background-color: #323435;" ); + ui->tracksWidget->setStyleSheet( "QWidget#tracksWidget{background-color: #323435;}" ); ui->statsLabel->setStyleSheet( "QLabel { background-image:url(); border: 2px solid #dddddd; background-color: #faf9f9; border-radius: 4px; padding: 12px; }" ); QFont f = font();