mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-07 14:46:33 +02:00
Merge remote-tracking branch 'origin/master' into accounts
Conflicts: src/accounts/xmpp/sip/xmppsip.cpp
This commit is contained in:
@@ -72,7 +72,7 @@ IF( NOT BUILD_GUI )
|
|||||||
MESSAGE( STATUS "Building Tomahawk ${TOMAHAWK_VERSION} in HEADLESS mode ***" )
|
MESSAGE( STATUS "Building Tomahawk ${TOMAHAWK_VERSION} in HEADLESS mode ***" )
|
||||||
ELSE()
|
ELSE()
|
||||||
MESSAGE( STATUS "Building Tomahawk ${TOMAHAWK_VERSION} full GUI version ***" )
|
MESSAGE( STATUS "Building Tomahawk ${TOMAHAWK_VERSION} full GUI version ***" )
|
||||||
LIST(APPEND NEEDED_QT4_COMPONENTS "QtGui" "QtWebkit" )
|
LIST(APPEND NEEDED_QT4_COMPONENTS "QtGui" "QtWebkit" "QtUiTools" )
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
IF( BUILD_GUI AND UNIX AND NOT APPLE )
|
IF( BUILD_GUI AND UNIX AND NOT APPLE )
|
||||||
@@ -80,7 +80,7 @@ IF( BUILD_GUI AND UNIX AND NOT APPLE )
|
|||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
macro_optional_find_package(Qt4 4.7.0 COMPONENTS ${NEEDED_QT4_COMPONENTS} )
|
macro_optional_find_package(Qt4 4.7.0 COMPONENTS ${NEEDED_QT4_COMPONENTS} )
|
||||||
macro_log_feature(QT4_FOUND "Qt" "A cross-platform application and UI framework" "http://qt.nokia.com" TRUE "" "If you see this, although libqt4-devel is installed, check whether \n the qtwebkit-devel package is installed as well")
|
macro_log_feature(QT4_FOUND "Qt" "A cross-platform application and UI framework" "http://qt.nokia.com" TRUE "" "If you see this, although libqt4-devel is installed, check whether the \n qtwebkit-devel package and whatever contains QtUiTools is installed too")
|
||||||
|
|
||||||
macro_optional_find_package(Phonon 4.5.0)
|
macro_optional_find_package(Phonon 4.5.0)
|
||||||
macro_log_feature(PHONON_FOUND "Phonon" "The Phonon multimedia library" "http://phonon.kde.org" TRUE "" "")
|
macro_log_feature(PHONON_FOUND "Phonon" "The Phonon multimedia library" "http://phonon.kde.org" TRUE "" "")
|
||||||
|
@@ -56,7 +56,7 @@ ELSE()
|
|||||||
include(FindLibraryWithDebug)
|
include(FindLibraryWithDebug)
|
||||||
include(FindPackageHandleStandardArgs)
|
include(FindPackageHandleStandardArgs)
|
||||||
|
|
||||||
find_path(TAGLIB_CFLAGS
|
find_path(TAGLIB_INCLUDES
|
||||||
NAMES
|
NAMES
|
||||||
tag.h
|
tag.h
|
||||||
PATH_SUFFIXES taglib
|
PATH_SUFFIXES taglib
|
||||||
|
@@ -17,10 +17,6 @@ SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
|||||||
|
|
||||||
|
|
||||||
# libs with broken find modules
|
# libs with broken find modules
|
||||||
SET(TAGLIB_FOUND true)
|
|
||||||
SET(TAGLIB_LIBRARIES ${CMAKE_FIND_ROOT_PATH}/lib/libtag.dll.a)
|
|
||||||
SET(TAGLIB_INCLUDES ${CMAKE_FIND_ROOT_PATH}/include/taglib)
|
|
||||||
|
|
||||||
SET(QT_PLUGINS_DIR ${CMAKE_FIND_ROOT_PATH}/lib/qt4/plugins/)
|
SET(QT_PLUGINS_DIR ${CMAKE_FIND_ROOT_PATH}/lib/qt4/plugins/)
|
||||||
SET(QT_QTUITOOLS_LIBRARY_RELEASE ${CMAKE_FIND_ROOT_PATH}/lib/libQtUiTools.a)
|
SET(QT_QTUITOOLS_LIBRARY_RELEASE ${CMAKE_FIND_ROOT_PATH}/lib/libQtUiTools.a)
|
||||||
SET(QT_QTUITOOLS_LIBRARY_DEBUG ${CMAKE_FIND_ROOT_PATH}/lib/libQtUiToolsd.a)
|
SET(QT_QTUITOOLS_LIBRARY_DEBUG ${CMAKE_FIND_ROOT_PATH}/lib/libQtUiToolsd.a)
|
||||||
|
@@ -4,5 +4,6 @@
|
|||||||
<file>tomahawk_de.qm</file>
|
<file>tomahawk_de.qm</file>
|
||||||
<file>tomahawk_sv.qm</file>
|
<file>tomahawk_sv.qm</file>
|
||||||
<file>tomahawk_es.qm</file>
|
<file>tomahawk_es.qm</file>
|
||||||
|
<file>tomahawk_pt_BR.qm</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
3246
lang/tomahawk_pt_BR.ts
Normal file
3246
lang/tomahawk_pt_BR.ts
Normal file
File diff suppressed because it is too large
Load Diff
@@ -37,19 +37,19 @@
|
|||||||
#include <qjson/parser.h>
|
#include <qjson/parser.h>
|
||||||
#include <qjson/serializer.h>
|
#include <qjson/serializer.h>
|
||||||
|
|
||||||
#include <QtPlugin>
|
#include <QtCore/QtPlugin>
|
||||||
#include <QStringList>
|
#include <QtCore/QStringList>
|
||||||
#include <QDateTime>
|
#include <QtCore/QDateTime>
|
||||||
#include <QTimer>
|
#include <QtCore/QTimer>
|
||||||
|
|
||||||
#include <utils/tomahawkutils.h>
|
#include <utils/tomahawkutils.h>
|
||||||
#include <utils/logger.h>
|
#include <utils/logger.h>
|
||||||
#include <accounts/AccountManager.h>
|
#include <accounts/AccountManager.h>
|
||||||
|
|
||||||
#ifndef ENABLE_HEADLESS
|
#ifndef ENABLE_HEADLESS
|
||||||
#include <QInputDialog>
|
#include <QtGui/QInputDialog>
|
||||||
#include <QLineEdit>
|
#include <QtGui/QLineEdit>
|
||||||
#include <QMessageBox>
|
#include <QtGui/QMessageBox>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <utils/tomahawkutilsgui.h>
|
#include <utils/tomahawkutilsgui.h>
|
||||||
@@ -348,7 +348,7 @@ XmppSipPlugin::errorMessage( Jreen::Client::DisconnectReason reason )
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
XmppSipPlugin::sendMsg(const QString& to, const QString& msg)
|
JabberPlugin::sendMsg( const QString& to, const QString& msg )
|
||||||
{
|
{
|
||||||
qDebug() << Q_FUNC_INFO << to << msg;
|
qDebug() << Q_FUNC_INFO << to << msg;
|
||||||
|
|
||||||
@@ -373,7 +373,7 @@ XmppSipPlugin::sendMsg(const QString& to, const QString& msg)
|
|||||||
TomahawkXmppMessage *sipMessage;
|
TomahawkXmppMessage *sipMessage;
|
||||||
if(m["visible"].toBool())
|
if(m["visible"].toBool())
|
||||||
{
|
{
|
||||||
sipMessage = new TomahawkXmppMessage(m["ip"].toString(),
|
sipMessage = new TomahawkSipMessage( m["ip"].toString(),
|
||||||
m["port"].toInt(),
|
m["port"].toInt(),
|
||||||
m["uniqname"].toString(),
|
m["uniqname"].toString(),
|
||||||
m["key"].toString()
|
m["key"].toString()
|
||||||
@@ -387,14 +387,14 @@ XmppSipPlugin::sendMsg(const QString& to, const QString& msg)
|
|||||||
qDebug() << "Send sip messsage to " << to;
|
qDebug() << "Send sip messsage to " << to;
|
||||||
Jreen::IQ iq( Jreen::IQ::Set, to );
|
Jreen::IQ iq( Jreen::IQ::Set, to );
|
||||||
iq.addExtension( sipMessage );
|
iq.addExtension( sipMessage );
|
||||||
Jreen::IQReply *reply = m_client->send(iq);
|
Jreen::IQReply *reply = m_client->send( iq );
|
||||||
reply->setData(SipMessageSent);
|
reply->setData( SipMessageSent );
|
||||||
connect(reply, SIGNAL(received(Jreen::IQ)), SLOT(onNewIq(Jreen::IQ)));
|
connect( reply, SIGNAL( received( Jreen::IQ ) ), SLOT( onNewIq( Jreen::IQ ) ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
XmppSipPlugin::broadcastMsg(const QString& msg)
|
JabberPlugin::broadcastMsg( const QString& msg )
|
||||||
{
|
{
|
||||||
qDebug() << Q_FUNC_INFO;
|
qDebug() << Q_FUNC_INFO;
|
||||||
|
|
||||||
@@ -409,7 +409,7 @@ XmppSipPlugin::broadcastMsg(const QString& msg)
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
XmppSipPlugin::addContact(const QString& jid, const QString& msg)
|
JabberPlugin::addContact( const QString& jid, const QString& msg )
|
||||||
{
|
{
|
||||||
// Add contact to the Tomahawk group on the roster
|
// Add contact to the Tomahawk group on the roster
|
||||||
|
|
||||||
@@ -572,7 +572,8 @@ void XmppSipPlugin::removeMenuHelper()
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void XmppSipPlugin::onNewMessage(const Jreen::Message& message)
|
|
||||||
|
void JabberPlugin::onNewMessage( const Jreen::Message& message )
|
||||||
{
|
{
|
||||||
if ( m_state != Account::Connected )
|
if ( m_state != Account::Connected )
|
||||||
return;
|
return;
|
||||||
@@ -644,9 +645,9 @@ void XmppSipPlugin::onPresenceReceived( const Jreen::RosterItem::Ptr &item, cons
|
|||||||
Jreen::IQ featuresIq( Jreen::IQ::Get, jid );
|
Jreen::IQ featuresIq( Jreen::IQ::Get, jid );
|
||||||
featuresIq.addExtension( new Jreen::Disco::Info( node ) );
|
featuresIq.addExtension( new Jreen::Disco::Info( node ) );
|
||||||
|
|
||||||
Jreen::IQReply *reply = m_client->send(featuresIq);
|
Jreen::IQReply *reply = m_client->send( featuresIq );
|
||||||
reply->setData(RequestDisco);
|
reply->setData( RequestDisco );
|
||||||
connect(reply, SIGNAL(received(Jreen::IQ)), SLOT(onNewIq(Jreen::IQ)));
|
connect( reply, SIGNAL( received( Jreen::IQ ) ), SLOT( onNewIq( Jreen::IQ ) ) );
|
||||||
}
|
}
|
||||||
else if( !caps )
|
else if( !caps )
|
||||||
{
|
{
|
||||||
@@ -656,7 +657,8 @@ void XmppSipPlugin::onPresenceReceived( const Jreen::RosterItem::Ptr &item, cons
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void XmppSipPlugin::onSubscriptionReceived(const Jreen::RosterItem::Ptr& item, const Jreen::Presence& presence)
|
|
||||||
|
void JabberPlugin::onSubscriptionReceived( const Jreen::RosterItem::Ptr& item, const Jreen::Presence& presence )
|
||||||
{
|
{
|
||||||
if ( m_state != Account::Connected )
|
if ( m_state != Account::Connected )
|
||||||
return;
|
return;
|
||||||
@@ -718,9 +720,9 @@ XmppSipPlugin::onSubscriptionRequestConfirmed( int result )
|
|||||||
QList< QMessageBox* > confirmBoxes = m_subscriptionConfirmBoxes.values();
|
QList< QMessageBox* > confirmBoxes = m_subscriptionConfirmBoxes.values();
|
||||||
Jreen::JID jid;
|
Jreen::JID jid;
|
||||||
|
|
||||||
foreach( QMessageBox* currentBox, confirmBoxes )
|
foreach ( QMessageBox* currentBox, confirmBoxes )
|
||||||
{
|
{
|
||||||
if( currentBox == sender() )
|
if ( currentBox == sender() )
|
||||||
{
|
{
|
||||||
jid = m_subscriptionConfirmBoxes.key( currentBox );
|
jid = m_subscriptionConfirmBoxes.key( currentBox );
|
||||||
}
|
}
|
||||||
@@ -730,7 +732,7 @@ XmppSipPlugin::onSubscriptionRequestConfirmed( int result )
|
|||||||
m_subscriptionConfirmBoxes.remove( jid );
|
m_subscriptionConfirmBoxes.remove( jid );
|
||||||
sender()->deleteLater();
|
sender()->deleteLater();
|
||||||
|
|
||||||
QMessageBox::StandardButton allowSubscription = static_cast<QMessageBox::StandardButton>( result );
|
QMessageBox::StandardButton allowSubscription = static_cast< QMessageBox::StandardButton >( result );
|
||||||
|
|
||||||
if ( allowSubscription == QMessageBox::Yes )
|
if ( allowSubscription == QMessageBox::Yes )
|
||||||
{
|
{
|
||||||
@@ -746,19 +748,20 @@ XmppSipPlugin::onSubscriptionRequestConfirmed( int result )
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void XmppSipPlugin::onNewIq(const Jreen::IQ& iq)
|
|
||||||
|
void JabberPlugin::onNewIq( const Jreen::IQ& iq )
|
||||||
{
|
{
|
||||||
if ( m_state != Account::Connected )
|
if ( m_state != Account::Connected )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Jreen::IQReply *reply = qobject_cast<Jreen::IQReply*>(sender());
|
Jreen::IQReply *reply = qobject_cast< Jreen::IQReply* >( sender() );
|
||||||
int context = reply ? reply->data().toInt() : NoContext;
|
int context = reply ? reply->data().toInt() : NoContext;
|
||||||
|
|
||||||
if( context == RequestDisco )
|
if ( context == RequestDisco )
|
||||||
{
|
{
|
||||||
// qDebug() << Q_FUNC_INFO << "Received disco IQ...";
|
// qDebug() << Q_FUNC_INFO << "Received disco IQ...";
|
||||||
Jreen::Disco::Info *discoInfo = iq.payload<Jreen::Disco::Info>().data();
|
Jreen::Disco::Info *discoInfo = iq.payload< Jreen::Disco::Info >().data();
|
||||||
if(!discoInfo)
|
if ( !discoInfo )
|
||||||
return;
|
return;
|
||||||
iq.accept();
|
iq.accept();
|
||||||
|
|
||||||
@@ -766,7 +769,7 @@ void XmppSipPlugin::onNewIq(const Jreen::IQ& iq)
|
|||||||
|
|
||||||
Jreen::DataForm::Ptr form = discoInfo->form();
|
Jreen::DataForm::Ptr form = discoInfo->form();
|
||||||
|
|
||||||
if(discoInfo->features().contains( TOMAHAWK_FEATURE ))
|
if ( discoInfo->features().contains( TOMAHAWK_FEATURE ) )
|
||||||
{
|
{
|
||||||
qDebug() << Q_FUNC_INFO << jid.full() << "Running tomahawk/feature enabled: yes";
|
qDebug() << Q_FUNC_INFO << jid.full() << "Running tomahawk/feature enabled: yes";
|
||||||
|
|
||||||
@@ -774,17 +777,17 @@ void XmppSipPlugin::onNewIq(const Jreen::IQ& iq)
|
|||||||
handlePeerStatus( jid, Jreen::Presence::Available );
|
handlePeerStatus( jid, Jreen::Presence::Available );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(context == RequestVersion)
|
else if ( context == RequestVersion)
|
||||||
{
|
{
|
||||||
Jreen::SoftwareVersion::Ptr softwareVersion = iq.payload<Jreen::SoftwareVersion>();
|
Jreen::SoftwareVersion::Ptr softwareVersion = iq.payload<Jreen::SoftwareVersion>();
|
||||||
if( softwareVersion )
|
if ( softwareVersion )
|
||||||
{
|
{
|
||||||
QString versionString = QString("%1 %2 %3").arg( softwareVersion->name(), softwareVersion->os(), softwareVersion->version() );
|
QString versionString = QString("%1 %2 %3").arg( softwareVersion->name(), softwareVersion->os(), softwareVersion->version() );
|
||||||
qDebug() << Q_FUNC_INFO << "Received software version for " << iq.from().full() << ":" << versionString;
|
qDebug() << Q_FUNC_INFO << "Received software version for " << iq.from().full() << ":" << versionString;
|
||||||
emit softwareVersionReceived( iq.from().full(), versionString );
|
emit softwareVersionReceived( iq.from().full(), versionString );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(context == RequestedDisco)
|
else if ( context == RequestedDisco )
|
||||||
{
|
{
|
||||||
qDebug() << "Sent IQ(Set), what should be happening here?";
|
qDebug() << "Sent IQ(Set), what should be happening here?";
|
||||||
}
|
}
|
||||||
@@ -798,7 +801,7 @@ void XmppSipPlugin::onNewIq(const Jreen::IQ& iq)
|
|||||||
}*/
|
}*/
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
TomahawkXmppMessage::Ptr sipMessage = iq.payload<TomahawkXmppMessage>();
|
TomahawkSipMessage::Ptr sipMessage = iq.payload< TomahawkSipMessage >();
|
||||||
if(sipMessage)
|
if(sipMessage)
|
||||||
{
|
{
|
||||||
iq.accept();
|
iq.accept();
|
||||||
@@ -827,9 +830,10 @@ void XmppSipPlugin::onNewIq(const Jreen::IQ& iq)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool XmppSipPlugin::presenceMeansOnline(Jreen::Presence::Type p)
|
|
||||||
|
bool JabberPlugin::presenceMeansOnline( Jreen::Presence::Type p )
|
||||||
{
|
{
|
||||||
switch(p)
|
switch( p )
|
||||||
{
|
{
|
||||||
case Jreen::Presence::Invalid:
|
case Jreen::Presence::Invalid:
|
||||||
case Jreen::Presence::Unavailable:
|
case Jreen::Presence::Unavailable:
|
||||||
@@ -841,7 +845,8 @@ bool XmppSipPlugin::presenceMeansOnline(Jreen::Presence::Type p)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void XmppSipPlugin::handlePeerStatus(const Jreen::JID& jid, Jreen::Presence::Type presenceType)
|
|
||||||
|
void JabberPlugin::handlePeerStatus( const Jreen::JID& jid, Jreen::Presence::Type presenceType )
|
||||||
{
|
{
|
||||||
QString fulljid = jid.full();
|
QString fulljid = jid.full();
|
||||||
|
|
||||||
@@ -860,7 +865,7 @@ void XmppSipPlugin::handlePeerStatus(const Jreen::JID& jid, Jreen::Presence::Typ
|
|||||||
}
|
}
|
||||||
|
|
||||||
// "coming online" event
|
// "coming online" event
|
||||||
if( presenceMeansOnline( presenceType ) &&
|
if ( presenceMeansOnline( presenceType ) &&
|
||||||
( !m_peers.contains( jid ) ||
|
( !m_peers.contains( jid ) ||
|
||||||
!presenceMeansOnline( m_peers.value( jid ) )
|
!presenceMeansOnline( m_peers.value( jid ) )
|
||||||
)
|
)
|
||||||
@@ -872,16 +877,16 @@ void XmppSipPlugin::handlePeerStatus(const Jreen::JID& jid, Jreen::Presence::Typ
|
|||||||
emit peerOnline( fulljid );
|
emit peerOnline( fulljid );
|
||||||
|
|
||||||
#ifndef ENABLE_HEADLESS
|
#ifndef ENABLE_HEADLESS
|
||||||
if(!m_avatarManager->avatar(jid.bare()).isNull())
|
if ( !m_avatarManager->avatar( jid.bare() ).isNull() )
|
||||||
onNewAvatar( jid.bare() );
|
onNewAvatar( jid.bare() );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// request software version
|
// request software version
|
||||||
Jreen::IQ versionIq( Jreen::IQ::Get, jid );
|
Jreen::IQ versionIq( Jreen::IQ::Get, jid );
|
||||||
versionIq.addExtension( new Jreen::SoftwareVersion() );
|
versionIq.addExtension( new Jreen::SoftwareVersion() );
|
||||||
Jreen::IQReply *reply = m_client->send(versionIq);
|
Jreen::IQReply *reply = m_client->send( versionIq );
|
||||||
reply->setData(RequestVersion);
|
reply->setData( RequestVersion );
|
||||||
connect(reply, SIGNAL(received(Jreen::IQ)), SLOT(onNewIq(Jreen::IQ)));
|
connect( reply, SIGNAL( received( Jreen::IQ ) ), SLOT( onNewIq( Jreen::IQ ) ) );
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -890,18 +895,19 @@ void XmppSipPlugin::handlePeerStatus(const Jreen::JID& jid, Jreen::Presence::Typ
|
|||||||
m_peers[ jid ] = presenceType;
|
m_peers[ jid ] = presenceType;
|
||||||
}
|
}
|
||||||
|
|
||||||
void XmppSipPlugin::onNewAvatar(const QString& jid)
|
|
||||||
|
void JabberPlugin::onNewAvatar( const QString& jid )
|
||||||
{
|
{
|
||||||
#ifndef ENABLE_HEADLESS
|
#ifndef ENABLE_HEADLESS
|
||||||
// qDebug() << Q_FUNC_INFO << jid;
|
// qDebug() << Q_FUNC_INFO << jid;
|
||||||
if ( m_state != Account::Connected )
|
if ( m_state != Account::Connected )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Q_ASSERT(!m_avatarManager->avatar( jid ).isNull());
|
Q_ASSERT( !m_avatarManager->avatar( jid ).isNull() );
|
||||||
|
|
||||||
// find peers for the jid
|
// find peers for the jid
|
||||||
QList<Jreen::JID> peers = m_peers.keys();
|
QList< Jreen::JID > peers = m_peers.keys();
|
||||||
foreach(const Jreen::JID &peer, peers)
|
foreach ( const Jreen::JID &peer, peers )
|
||||||
{
|
{
|
||||||
if( peer.bare() == jid )
|
if( peer.bare() == jid )
|
||||||
{
|
{
|
||||||
@@ -909,7 +915,7 @@ void XmppSipPlugin::onNewAvatar(const QString& jid)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( jid == m_client->jid().bare() )
|
if ( jid == m_client->jid().bare() )
|
||||||
// own avatar
|
// own avatar
|
||||||
emit avatarReceived ( m_avatarManager->avatar( jid ) );
|
emit avatarReceived ( m_avatarManager->avatar( jid ) );
|
||||||
else
|
else
|
||||||
|
@@ -43,7 +43,7 @@
|
|||||||
#include <jreen/mucroom.h>
|
#include <jreen/mucroom.h>
|
||||||
|
|
||||||
#ifndef ENABLE_HEADLESS
|
#ifndef ENABLE_HEADLESS
|
||||||
#include <QMessageBox>
|
#include <QtGui/QMessageBox>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define TOMAHAWK_FEATURE QLatin1String( "tomahawk:sip:v1" )
|
#define TOMAHAWK_FEATURE QLatin1String( "tomahawk:sip:v1" )
|
||||||
@@ -92,7 +92,7 @@ protected:
|
|||||||
private slots:
|
private slots:
|
||||||
void showXmlConsole();
|
void showXmlConsole();
|
||||||
void onConnect();
|
void onConnect();
|
||||||
void onDisconnect(Jreen::Client::DisconnectReason reason);
|
void onDisconnect( Jreen::Client::DisconnectReason reason );
|
||||||
|
|
||||||
void onPresenceReceived( const Jreen::RosterItem::Ptr &item, const Jreen::Presence& presence );
|
void onPresenceReceived( const Jreen::RosterItem::Ptr &item, const Jreen::Presence& presence );
|
||||||
void onSubscriptionReceived( const Jreen::RosterItem::Ptr &item, const Jreen::Presence& presence );
|
void onSubscriptionReceived( const Jreen::RosterItem::Ptr &item, const Jreen::Presence& presence );
|
||||||
|
@@ -53,7 +53,10 @@ signals:
|
|||||||
public slots:
|
public slots:
|
||||||
void resolved( QHostInfo i )
|
void resolved( QHostInfo i )
|
||||||
{
|
{
|
||||||
|
if ( i.hostName().length() )
|
||||||
emit tomahawkHostFound( ip, port, i.hostName(), nid );
|
emit tomahawkHostFound( ip, port, i.hostName(), nid );
|
||||||
|
else
|
||||||
|
emit tomahawkHostFound( ip, port, "Unknown", nid );
|
||||||
this->deleteLater();
|
this->deleteLater();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -123,16 +123,7 @@ ControlConnection::setup()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString friendlyName;
|
QString friendlyName = name();
|
||||||
if ( Servent::isIPWhitelisted( m_sock->peerAddress() ) )
|
|
||||||
{
|
|
||||||
// FIXME TODO blocking DNS lookup if LAN, slow/fails on windows?
|
|
||||||
QHostInfo i = QHostInfo::fromName( m_sock->peerAddress().toString() );
|
|
||||||
if( i.hostName().length() )
|
|
||||||
friendlyName = i.hostName();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
friendlyName = name();
|
|
||||||
|
|
||||||
tDebug() << "Detected name:" << name() << friendlyName << m_sock->peerAddress();
|
tDebug() << "Detected name:" << name() << friendlyName << m_sock->peerAddress();
|
||||||
|
|
||||||
|
@@ -695,6 +695,8 @@ Servent::claimOffer( ControlConnection* cc, const QString &nodeid, const QString
|
|||||||
bool
|
bool
|
||||||
Servent::checkACL( const Connection* conn, const QString &nodeid, bool showDialog ) const
|
Servent::checkACL( const Connection* conn, const QString &nodeid, bool showDialog ) const
|
||||||
{
|
{
|
||||||
|
Q_UNUSED( conn );
|
||||||
|
Q_UNUSED( showDialog );
|
||||||
tDebug( LOGVERBOSE ) << "Checking ACLs";
|
tDebug( LOGVERBOSE ) << "Checking ACLs";
|
||||||
|
|
||||||
ACLSystem* aclSystem = ACLSystem::instance();
|
ACLSystem* aclSystem = ACLSystem::instance();
|
||||||
|
@@ -26,6 +26,7 @@ PlaylistInterface::PlaylistInterface ()
|
|||||||
: QObject()
|
: QObject()
|
||||||
, m_latchMode( StayOnSong )
|
, m_latchMode( StayOnSong )
|
||||||
{
|
{
|
||||||
|
m_id = uuid();
|
||||||
qRegisterMetaType<Tomahawk::PlaylistInterface::RepeatMode>( "Tomahawk::PlaylistInterface::RepeatMode" );
|
qRegisterMetaType<Tomahawk::PlaylistInterface::RepeatMode>( "Tomahawk::PlaylistInterface::RepeatMode" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -44,6 +44,8 @@ public:
|
|||||||
explicit PlaylistInterface();
|
explicit PlaylistInterface();
|
||||||
virtual ~PlaylistInterface();
|
virtual ~PlaylistInterface();
|
||||||
|
|
||||||
|
const QString id() { return m_id; }
|
||||||
|
|
||||||
virtual QList< Tomahawk::query_ptr > tracks() = 0;
|
virtual QList< Tomahawk::query_ptr > tracks() = 0;
|
||||||
|
|
||||||
virtual int unfilteredTrackCount() const = 0;
|
virtual int unfilteredTrackCount() const = 0;
|
||||||
@@ -98,6 +100,7 @@ protected:
|
|||||||
private:
|
private:
|
||||||
Q_DISABLE_COPY( PlaylistInterface )
|
Q_DISABLE_COPY( PlaylistInterface )
|
||||||
|
|
||||||
|
QString m_id;
|
||||||
QString m_filter;
|
QString m_filter;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -250,7 +250,7 @@ ScriptResolver::handleMsg( const QByteArray& msg )
|
|||||||
rp->setSize( m.value( "size" ).toUInt() );
|
rp->setSize( m.value( "size" ).toUInt() );
|
||||||
rp->setRID( uuid() );
|
rp->setRID( uuid() );
|
||||||
rp->setFriendlySource( m_name );
|
rp->setFriendlySource( m_name );
|
||||||
rp->setYear( m.value( "year ").toUInt() );
|
rp->setYear( m.value( "year").toUInt() );
|
||||||
rp->setDiscNumber( m.value( "discnumber" ).toUInt() );
|
rp->setDiscNumber( m.value( "discnumber" ).toUInt() );
|
||||||
|
|
||||||
rp->setMimetype( m.value( "mimetype" ).toString() );
|
rp->setMimetype( m.value( "mimetype" ).toString() );
|
||||||
|
@@ -159,6 +159,8 @@ Result::toVariant() const
|
|||||||
m.insert( "score", score() );
|
m.insert( "score", score() );
|
||||||
m.insert( "sid", id() );
|
m.insert( "sid", id() );
|
||||||
m.insert( "discnumber", discnumber() );
|
m.insert( "discnumber", discnumber() );
|
||||||
|
|
||||||
|
if ( !composer().isNull() )
|
||||||
m.insert( "composer", composer()->name() );
|
m.insert( "composer", composer()->name() );
|
||||||
|
|
||||||
return m;
|
return m;
|
||||||
|
@@ -158,6 +158,9 @@ AlbumInfoWidget::onLoadingFinished()
|
|||||||
bool
|
bool
|
||||||
AlbumInfoWidget::isBeingPlayed() const
|
AlbumInfoWidget::isBeingPlayed() const
|
||||||
{
|
{
|
||||||
|
//tDebug() << Q_FUNC_INFO << "audioengine playlistInterface = " << AudioEngine::instance()->currentTrackPlaylist()->id();
|
||||||
|
//tDebug() << Q_FUNC_INFO << "albumsView playlistInterface = " << ui->albumsView->playlistInterface()->id();
|
||||||
|
//tDebug() << Q_FUNC_INFO << "tracksView playlistInterface = " << ui->tracksView->playlistInterface()->id();
|
||||||
if ( ui->albumsView->playlistInterface() == AudioEngine::instance()->currentTrackPlaylist() )
|
if ( ui->albumsView->playlistInterface() == AudioEngine::instance()->currentTrackPlaylist() )
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
@@ -323,8 +323,9 @@ SourceTreeView::copyPlaylistLink()
|
|||||||
PlaylistItem* item = itemFromIndex< PlaylistItem >( m_contextMenuIndex );
|
PlaylistItem* item = itemFromIndex< PlaylistItem >( m_contextMenuIndex );
|
||||||
playlist_ptr playlist = item->playlist();
|
playlist_ptr playlist = item->playlist();
|
||||||
|
|
||||||
|
QString suggestedFilename = TomahawkSettings::instance()->playlistDefaultPath() + "/" + playlist->title();
|
||||||
QString filename = QFileDialog::getSaveFileName( TomahawkUtils::tomahawkWindow(), tr( "Save XSPF" ),
|
QString filename = QFileDialog::getSaveFileName( TomahawkUtils::tomahawkWindow(), tr( "Save XSPF" ),
|
||||||
TomahawkSettings::instance()->playlistDefaultPath(), tr( "Playlists (*.xspf)" ) );
|
suggestedFilename, tr( "Playlists (*.xspf)" ) );
|
||||||
if ( !filename.isEmpty() )
|
if ( !filename.isEmpty() )
|
||||||
{
|
{
|
||||||
QFileInfo playlistAbsoluteFilePath = filename;
|
QFileInfo playlistAbsoluteFilePath = filename;
|
||||||
|
@@ -730,7 +730,7 @@ void
|
|||||||
TomahawkWindow::showAboutTomahawk()
|
TomahawkWindow::showAboutTomahawk()
|
||||||
{
|
{
|
||||||
QMessageBox::about( this, tr( "About Tomahawk" ),
|
QMessageBox::about( this, tr( "About Tomahawk" ),
|
||||||
tr( "<h2><b>Tomahawk %1<br/>(%2)</h2>Copyright 2010, 2011<br/>Christian Muehlhaeuser <muesli@tomahawk-player.org><br/><br/>"
|
tr( "<h2><b>Tomahawk %1<br/>(%2)</h2>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" )
|
"Thanks to: Leo Franchi, Jeff Mitchell, Dominik Schmidt, Jason Herskowitz, Alejandro Wainzinger, Hugo Lindström, Michael Zanetti, Harald Sitter and Steve Robertson" )
|
||||||
.arg( TomahawkUtils::appFriendlyVersion() )
|
.arg( TomahawkUtils::appFriendlyVersion() )
|
||||||
.arg( qApp->applicationVersion() ) );
|
.arg( qApp->applicationVersion() ) );
|
||||||
|
Reference in New Issue
Block a user