mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-18 23:09:42 +01:00
style fixes
This commit is contained in:
parent
3f1a5e1c3b
commit
501a72d79b
@ -72,20 +72,20 @@ SnoreNotifyPlugin::SnoreNotifyPlugin()
|
||||
m_snore = new Snore::SnoreCore();
|
||||
m_snore->loadPlugins( Snore::PluginContainer::BACKEND );
|
||||
QString backend = qgetenv( "SNORE_BACKEND" ).constData();
|
||||
backend.isEmpty()?m_snore->setPrimaryNotificationBackend():m_snore->setPrimaryNotificationBackend(backend);
|
||||
backend.isEmpty()?m_snore->setPrimaryNotificationBackend():m_snore->setPrimaryNotificationBackend( backend );
|
||||
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);
|
||||
m_snore->addApplication( m_application );
|
||||
m_snore->applicationIsInitialized( m_application );
|
||||
|
||||
addAlert( InfoNotifyUser,tr("Notify User") );
|
||||
addAlert( InfoNowPlaying,tr("Now Playing") );
|
||||
addAlert( InfoTrackUnresolved, tr("Unresolved track") );
|
||||
addAlert( InfoNowStopped, tr("Playback Stopped") );
|
||||
addAlert( InfoInboxReceived, tr("You recived a Song recomondation") );
|
||||
addAlert( InfoNotifyUser, tr( "Notify User" ) );
|
||||
addAlert( InfoNowPlaying, tr( "Now Playing" ) );
|
||||
addAlert( InfoTrackUnresolved, tr( "Unresolved track" ) );
|
||||
addAlert( InfoNowStopped, tr( "Playback Stopped" ) );
|
||||
addAlert( InfoInboxReceived, tr( "You recived a Song recomondation" ) );
|
||||
|
||||
connect(m_snore,SIGNAL(actionInvoked(Snore::Notification)),this,SLOT(slotActionInvoked(Snore::Notification)));
|
||||
connect( m_snore, SIGNAL( actionInvoked( Snore::Notification ) ), this, SLOT( slotActionInvoked( Snore::Notification ) ) );
|
||||
|
||||
|
||||
}
|
||||
@ -97,7 +97,7 @@ SnoreNotifyPlugin::~SnoreNotifyPlugin()
|
||||
m_snore->deleteLater();
|
||||
m_application->deleteLater();
|
||||
|
||||
foreach(Snore::Alert *alert,m_alerts)
|
||||
foreach( Snore::Alert* alert, m_alerts )
|
||||
{
|
||||
alert->deleteLater();
|
||||
}
|
||||
@ -154,9 +154,9 @@ SnoreNotifyPlugin::notifyUser( Tomahawk::InfoSystem::InfoType type, const QStrin
|
||||
{
|
||||
icon = m_defaultIcon;
|
||||
}
|
||||
Snore::Alert *alert = m_alerts[type];
|
||||
Snore::Alert* alert = m_alerts[ type ];
|
||||
Snore::Notification n( qApp->applicationName(), alert->name(), alert->title(), messageText, icon );
|
||||
m_snore->broadcastNotification(n);
|
||||
m_snore->broadcastNotification( n );
|
||||
tDebug( LOGVERBOSE ) << Q_FUNC_INFO << "showing notification:" << messageText;
|
||||
|
||||
}
|
||||
@ -164,7 +164,7 @@ SnoreNotifyPlugin::notifyUser( Tomahawk::InfoSystem::InfoType type, const QStrin
|
||||
void
|
||||
SnoreNotifyPlugin::addAlert( Tomahawk::InfoSystem::InfoType type, const QString &title )
|
||||
{
|
||||
Snore::Alert *alert = new Snore::Alert( title, title, m_defaultIcon );
|
||||
Snore::Alert* alert = new Snore::Alert( title, title, m_defaultIcon );
|
||||
m_application->addAlert( alert );
|
||||
m_alerts[ type ] = alert;
|
||||
}
|
||||
|
@ -65,15 +65,15 @@ protected slots:
|
||||
void slotActionInvoked(Snore::Notification n);
|
||||
|
||||
private:
|
||||
void notifyUser(InfoType type, const QString &messageText, Snore::Icon icon = Snore::Icon());
|
||||
void addAlert(Tomahawk::InfoSystem::InfoType type,const QString &title);
|
||||
void notifyUser( InfoType type, const QString &messageText, Snore::Icon icon = Snore::Icon() );
|
||||
void addAlert( Tomahawk::InfoSystem::InfoType type, const QString &title );
|
||||
Snore::SnoreCore *m_snore;
|
||||
Snore::Application *m_application;
|
||||
Snore::Icon m_defaultIcon;
|
||||
QHash<Tomahawk::InfoSystem::InfoType,Snore::Alert*> m_alerts;
|
||||
QHash< Tomahawk::InfoSystem::InfoType, Snore::Alert* > m_alerts;
|
||||
|
||||
void nowPlaying(const QVariant &input);
|
||||
void inboxReceived(const QVariant &input);
|
||||
void nowPlaying( const QVariant &input );
|
||||
void inboxReceived( const QVariant &input );
|
||||
};
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user