QTfrontend/ui/widget/chatwidget.cpp
changeset 14871 0f39f8efbd2e
parent 13910 6c8d4e140f27
child 15254 ebb86ed1b785
equal deleted inserted replaced
14870:ce98c37826a7 14871:0f39f8efbd2e
   519     emit nickCountUpdate(chatNicks->model()->rowCount());
   519     emit nickCountUpdate(chatNicks->model()->rowCount());
   520 
   520 
   521     if (!isIgnored)
   521     if (!isIgnored)
   522         printChatString(nick, QString("*** ") + tr("%1 has joined").arg(linkedNick(nick)), "Join", false);
   522         printChatString(nick, QString("*** ") + tr("%1 has joined").arg(linkedNick(nick)), "Join", false);
   523 
   523 
   524     if (notifyNick && notify && (m_helloSounds.size() > 0))
   524     if (notifyNick && notify)
   525     {
   525     {
   526         SDLInteraction::instance().playSoundFile(
   526         if (m_helloSounds.size() > 0)
       
   527         {
       
   528             SDLInteraction::instance().playSoundFile(
   527                             m_helloSounds.at(rand() % m_helloSounds.size()));
   529                             m_helloSounds.at(rand() % m_helloSounds.size()));
       
   530         }        
       
   531 
       
   532         if (!isInGame())
       
   533         {
       
   534             HWApplication::alert(this, 2000);
       
   535         }
   528     }
   536     }
   529 }
   537 }
   530 
   538 
   531 void HWChatWidget::nickRemoved(const QString& nick)
   539 void HWChatWidget::nickRemoved(const QString& nick)
   532 {
   540 {