# HG changeset patch # User sheepluva # Date 1335335028 -7200 # Node ID 9562ace1514116364dd3c3218460a6fc3b1a4d26 # Parent ee000959d645b8dae1312a13fd25bef6ba53976a nemo said I was boring for removing the "hello" randomizer on room join. That was actually an accident, fixed by this commit. Now find an actual reason to call me boring (there are many to choose from :P) nemo! diff -r ee000959d645 -r 9562ace15141 QTfrontend/ui/widget/chatwidget.cpp --- a/QTfrontend/ui/widget/chatwidget.cpp Tue Apr 24 17:16:18 2012 -0400 +++ b/QTfrontend/ui/widget/chatwidget.cpp Wed Apr 25 08:23:48 2012 +0200 @@ -250,14 +250,18 @@ if(gameSettings->value("frontend/sound", true).toBool()) { - if (notify) - m_helloSound = HWDataManager::instance().findFileForRead( - "Sounds/voices/Classic/Hello.ogg"); + QStringList vpList = + QStringList() << "Classic" << "Default" << "Mobster" << "Russian"; + + foreach (QString vp, vpList) + { + m_helloSounds.append(HWDataManager::instance().findFileForRead( + QString("Sounds/voices/%1/Hello.ogg").arg(vp))); + } m_hilightSound = HWDataManager::instance().findFileForRead( "Sounds/beep.ogg"); - //m_hilightSound = m_helloSound;//"Sounds/beep.ogg"; } mainLayout.setSpacing(1); @@ -643,7 +647,8 @@ if(notifyNick && notify && gameSettings->value("frontend/sound", true).toBool()) { - SDLInteraction::instance().playSoundFile(m_helloSound); + SDLInteraction::instance().playSoundFile( + m_helloSounds.at(rand() % m_helloSounds.size())); } } diff -r ee000959d645 -r 9562ace15141 QTfrontend/ui/widget/chatwidget.h --- a/QTfrontend/ui/widget/chatwidget.h Tue Apr 24 17:16:18 2012 -0400 +++ b/QTfrontend/ui/widget/chatwidget.h Wed Apr 25 08:23:48 2012 +0200 @@ -136,7 +136,7 @@ QAction * acIgnore; QAction * acFriend; QSettings * gameSettings; - QString m_helloSound; + QStringList m_helloSounds; QString m_hilightSound; QString m_userNick; QString m_clickedNick;