summaryrefslogtreecommitdiffstats
path: root/kopete/plugins/nowlistening
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2014-03-29 00:54:51 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2014-03-29 00:54:51 +0900
commit0486034738b850c210b1389a8c3ae51a6b9fad23 (patch)
treeb1e3a4dbf9673b5e0031e8225e88f5dd490585a5 /kopete/plugins/nowlistening
parent4bd7620e88d450995b78c201f9e7d9181f62ea6a (diff)
downloadtdenetwork-0486034738b850c210b1389a8c3ae51a6b9fad23.tar.gz
tdenetwork-0486034738b850c210b1389a8c3ae51a6b9fad23.zip
Removed MSN support across Kopete by removing the MSN protocol and the netmeeting plugin.
This resolves bug 1547.
Diffstat (limited to 'kopete/plugins/nowlistening')
-rw-r--r--kopete/plugins/nowlistening/nowlisteningplugin.cpp108
1 files changed, 30 insertions, 78 deletions
diff --git a/kopete/plugins/nowlistening/nowlisteningplugin.cpp b/kopete/plugins/nowlistening/nowlisteningplugin.cpp
index 6fcc21cd..31284446 100644
--- a/kopete/plugins/nowlistening/nowlisteningplugin.cpp
+++ b/kopete/plugins/nowlistening/nowlisteningplugin.cpp
@@ -258,84 +258,36 @@ void NowListeningPlugin::slotAdvertCurrentMusic()
TQPtrList<Kopete::Account> accountsList = Kopete::AccountManager::self()->accounts();
for( Kopete::Account* a = accountsList.first(); a; a = accountsList.next() )
{
- /*
- NOTE:
- MSN status message(personal message) use a special tag to advert the current music playing.
- So, we don't send the all formatted string, send a special string seperated by ";".
-
- Also, do not use MSN hack in appending mode.
- */
- if( a->protocol()->pluginId() == "MSNProtocol" && !NowListeningConfig::self()->appendStatusAdvertising() )
- {
- TQString track, artist, album, mediaList;
- bool isPlaying=false;
-
- if( NowListeningConfig::self()->useSpecifiedMediaPlayer() && d->m_currentMediaPlayer )
- {
- if( d->m_currentMediaPlayer->playing() )
- {
- track = d->m_currentMediaPlayer->track();
- artist = d->m_currentMediaPlayer->artist();
- album = d->m_currentMediaPlayer->album();
- mediaList = track + ";" + artist + ";" + album;
- isPlaying = true;
- }
- }
- else
- {
- for ( NLMediaPlayer* i = d->m_mediaPlayerList.first(); i; i = d->m_mediaPlayerList.next() )
- {
- if( i->playing() )
- {
- track = i->track();
- artist = i->artist();
- album = i->album();
- mediaList = track + ";" + artist + ";" + album;
- isPlaying = true;
- }
- }
- }
-
- // KDE4 TODO: Use the new status message framework, and remove this "hack".
- if( isPlaying )
- {
- advert = TQString("[Music]%1").arg(mediaList);
- }
-
- }
- else
- {
- if( NowListeningConfig::self()->appendStatusAdvertising() )
- {
- // Check for the now listening message in parenthesis,
- // include the header to not override other messages in parenthesis.
- TQRegExp statusSong( TQString(" \\(%1.*\\)$").arg( NowListeningConfig::header()) );
-
- // HACK: Don't keep appending the now listened song. Replace it in the status message.
- advert = a->myself()->property( Kopete::Global::Properties::self()->awayMessage() ).value().toString();
- // Remove the braces when they are no listened song.
- TQString mediaAdvert = mediaPlayerAdvert(false);
- if(!mediaAdvert.isEmpty())
- {
- if(statusSong.search(advert) != -1)
- {
- advert = advert.replace(statusSong, TQString(" (%1)").arg(mediaPlayerAdvert(false)) );
- }
- else
- {
- advert += TQString(" (%1)").arg( mediaPlayerAdvert(false) );
- }
- }
- else
- {
- advert = advert.replace(statusSong, "");
- }
- }
- else
- {
- advert = mediaPlayerAdvert(false); // newTrackPlaying has done the update.
- }
- }
+ if( NowListeningConfig::self()->appendStatusAdvertising() )
+ {
+ // Check for the now listening message in parenthesis,
+ // include the header to not override other messages in parenthesis.
+ TQRegExp statusSong( TQString(" \\(%1.*\\)$").arg( NowListeningConfig::header()) );
+
+ // HACK: Don't keep appending the now listened song. Replace it in the status message.
+ advert = a->myself()->property( Kopete::Global::Properties::self()->awayMessage() ).value().toString();
+ // Remove the braces when they are no listened song.
+ TQString mediaAdvert = mediaPlayerAdvert(false);
+ if(!mediaAdvert.isEmpty())
+ {
+ if(statusSong.search(advert) != -1)
+ {
+ advert = advert.replace(statusSong, TQString(" (%1)").arg(mediaPlayerAdvert(false)) );
+ }
+ else
+ {
+ advert += TQString(" (%1)").arg( mediaPlayerAdvert(false) );
+ }
+ }
+ else
+ {
+ advert = advert.replace(statusSong, "");
+ }
+ }
+ else
+ {
+ advert = mediaPlayerAdvert(false); // newTrackPlaying has done the update.
+ }
a->setOnlineStatus(a->myself()->onlineStatus(), advert);
}