From e06f58eb29a3f648909062e1bf19004fda905456 Mon Sep 17 00:00:00 2001
From: Christian Muehlhaeuser <muesli@gmail.com>
Date: Mon, 28 May 2012 19:00:29 +0200
Subject: [PATCH] * Properly init StopAfterPlayback action.

---
 src/TomahawkTrayIcon.cpp | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/TomahawkTrayIcon.cpp b/src/TomahawkTrayIcon.cpp
index 6c4b40efe..6c75a8552 100644
--- a/src/TomahawkTrayIcon.cpp
+++ b/src/TomahawkTrayIcon.cpp
@@ -92,6 +92,7 @@ TomahawkTrayIcon::TomahawkTrayIcon( QObject* parent )
     connect( &m_animationTimer, SIGNAL( timeout() ), SLOT( onAnimationTimer() ) );
     connect( this, SIGNAL( activated( QSystemTrayIcon::ActivationReason ) ), SLOT( onActivated( QSystemTrayIcon::ActivationReason ) ) );
 
+    onStop();
     show();
 }
 
@@ -241,6 +242,7 @@ void
 TomahawkTrayIcon::onPlay()
 {
     m_stopContinueAfterTrackAction->setEnabled( true );
+
     onResume();
     onStopContinueAfterTrackChanged();
 }
@@ -250,6 +252,7 @@ void
 TomahawkTrayIcon::onStop()
 {
     m_stopContinueAfterTrackAction->setEnabled( false );
+
     onPause();
 }
 
@@ -264,12 +267,12 @@ TomahawkTrayIcon::onResume()
 void
 TomahawkTrayIcon::onStopContinueAfterTrackChanged()
 {
+    m_stopContinueAfterTrackAction->setText( tr( "&Stop Playback after current Track" ) );
+
     if ( !AudioEngine::instance()->currentTrack().isNull() )
     {
         if ( AudioEngine::instance()->currentTrack()->toQuery()->equals( AudioEngine::instance()->stopAfterTrack() ) )
             m_stopContinueAfterTrackAction->setText( tr( "&Continue Playback after current Track" ) );
-        else
-            m_stopContinueAfterTrackAction->setText( tr( "&Stop Playback after current Track" ) );
     }
 }