1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-09 15:47:38 +02:00

Style album message

This commit is contained in:
Uwe L. Korn
2013-02-24 12:44:01 +01:00
parent 73e00e26c4
commit 689d97d689

View File

@@ -176,13 +176,15 @@ FdoNotifyPlugin::nowPlaying( const QVariant &input )
// If the window manager supports notification styling then use it.
const char* messageTemplate = "\"%1\" by %2%3.";
const char* albumMessageTemplate = "on \"%1\"";
if ( m_wmSupportsBodyMarkup ) {
messageTemplate = "%1<br /><i>by</i> %2%3.";
albumMessageTemplate = "<br /><i>on</i> %1";
}
QString messageText = tr( messageTemplate )
.arg( hash[ "title" ] )
.arg( hash[ "artist" ] )
.arg( hash[ "album" ].isEmpty() ? QString() : QString( " %1" ).arg( tr( "on \"%1\"" ).arg( hash[ "album" ] ) ) );
.arg( hash[ "album" ].isEmpty() ? QString() : QString( " %1" ).arg( tr( albumMessageTemplate ).arg( hash[ "album" ] ) ) );
tDebug( LOGVERBOSE ) << Q_FUNC_INFO << "sending message" << messageText;