mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-18 23:09:42 +01:00
some fixes
This commit is contained in:
parent
cdf13725d1
commit
e9c478be75
@ -1,6 +1,6 @@
|
||||
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
||||
*
|
||||
* Copyright 2013 , Patrick von Reth <vonreth@kde.org>
|
||||
* Copyright 2013-2014, Patrick von Reth <vonreth@kde.org>
|
||||
* Copyright 2010-2011, Christian Muehlhaeuser <muesli@tomahawk-player.org>
|
||||
* Copyright 2010-2012, Jeff Mitchell <jeff@tomahawk-player.org>
|
||||
*
|
||||
@ -59,14 +59,16 @@ SnoreNotifyPlugin::SnoreNotifyPlugin()
|
||||
}
|
||||
else
|
||||
{
|
||||
m_snore->setPrimaryNotificationBackend( backend );
|
||||
if(!m_snore->setPrimaryNotificationBackend( backend ))
|
||||
{
|
||||
tDebug( LOGVERBOSE ) << Q_FUNC_INFO << "Ivalid or unavailible Snore backend: " << backend << " availible backens: " << m_snore->notificationBackends();
|
||||
m_snore->setPrimaryNotificationBackend();
|
||||
}
|
||||
}
|
||||
|
||||
tDebug( LOGVERBOSE ) << Q_FUNC_INFO << m_snore->primaryNotificationBackend();
|
||||
|
||||
m_application = new Snore::Application( qApp->applicationName(), m_defaultIcon );
|
||||
m_snore->addApplication( m_application );
|
||||
m_snore->applicationIsInitialized( m_application );
|
||||
|
||||
addAlert( InfoNotifyUser, tr( "Notify User" ) );
|
||||
addAlert( InfoNowPlaying, tr( "Now Playing" ) );
|
||||
@ -74,6 +76,9 @@ SnoreNotifyPlugin::SnoreNotifyPlugin()
|
||||
addAlert( InfoNowStopped, tr( "Playback Stopped" ) );
|
||||
addAlert( InfoInboxReceived, tr( "You received a Song recomondation" ) );
|
||||
|
||||
m_snore->addApplication( m_application );
|
||||
m_snore->applicationIsInitialized( m_application );
|
||||
|
||||
connect( m_snore, SIGNAL( actionInvoked( Snore::Notification ) ), this, SLOT( slotActionInvoked( Snore::Notification ) ) );
|
||||
}
|
||||
|
||||
@ -81,13 +86,14 @@ SnoreNotifyPlugin::SnoreNotifyPlugin()
|
||||
SnoreNotifyPlugin::~SnoreNotifyPlugin()
|
||||
{
|
||||
tDebug( LOGVERBOSE ) << Q_FUNC_INFO;
|
||||
m_snore->deleteLater();
|
||||
m_application->deleteLater();
|
||||
|
||||
m_snore->removeApplication(m_application->name());
|
||||
foreach( Snore::Alert* alert, m_alerts )
|
||||
{
|
||||
alert->deleteLater();
|
||||
}
|
||||
m_snore->deleteLater();
|
||||
m_application->deleteLater();
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
|
||||
*
|
||||
* Copyright 2013 , Patrick von Reth <vonreth@kde.org>
|
||||
* Copyright 2013-2014, Patrick von Reth <vonreth@kde.org>
|
||||
* Copyright 2010-2011, Christian Muehlhaeuser <muesli@tomahawk-player.org>
|
||||
* Copyright 2010-2011, Jeff Mitchell <jeff@tomahawk-player.org>
|
||||
*
|
||||
@ -26,8 +26,6 @@
|
||||
#include "infosystem/InfoSystem.h"
|
||||
#include <snore/core/snore.h>
|
||||
|
||||
class QDBusPendingCallWatcher;
|
||||
|
||||
namespace Tomahawk
|
||||
{
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user