void StopMenu::slotActivated( int index ) { Playlist* pl = Playlist::instance(); const int mode = pl->stopAfterMode(); switch( index ) { case NOW: Amarok::actionCollection()->action( "stop" )->activate(); if( mode == Playlist::StopAfterCurrent || mode == Playlist::StopAfterQueue ) pl->setStopAfterMode( Playlist::DoNotStop ); break; case AFTER_TRACK: pl->setStopAfterMode( mode == Playlist::StopAfterCurrent ? Playlist::DoNotStop : Playlist::StopAfterCurrent ); break; case AFTER_QUEUE: pl->setStopAfterMode( mode == Playlist::StopAfterQueue ? Playlist::DoNotStop : Playlist::StopAfterQueue ); break; } }