# HG changeset patch # User sheepluva # Date 1358442750 -3600 # Node ID 0b357c57e01c55b119d3b524e87264de96771448 # Parent 26f0d7ab5adf0865c84843307e650cf968bff3de small cleanup of helloSounds; note: physfs:// prefix will break sound paths since playSoundFile uses physfs for finding files already diff -r 26f0d7ab5adf -r 0b357c57e01c QTfrontend/ui/widget/chatwidget.cpp --- a/QTfrontend/ui/widget/chatwidget.cpp Thu Jan 17 11:16:03 2013 +0400 +++ b/QTfrontend/ui/widget/chatwidget.cpp Thu Jan 17 18:12:30 2013 +0100 @@ -187,18 +187,15 @@ m_isAdmin = false; m_autoKickEnabled = false; - { - QStringList vpList = - QStringList() << "Classic" << "Default" << "Mobster" << "Russian"; + QStringList vpList = + QStringList() << "Classic" << "Default" << "Mobster" << "Russian"; - foreach (QString vp, vpList) - { - m_helloSounds.append(QString("physfs://Sounds/voices/%1/Hello.ogg").arg(vp)); - } + foreach (const QString & vp, vpList) + { + m_helloSounds.append(QString("/Sounds/voices/%1/Hello.ogg").arg(vp)); + } - m_hilightSound = "physfs://Sounds/beep.ogg"; - - } + m_hilightSound = "/Sounds/beep.ogg"; mainLayout.setSpacing(1); mainLayout.setMargin(1); @@ -500,7 +497,7 @@ emit nickCountUpdate(chatNicks->model()->rowCount()); - if(notifyNick && notify && gameSettings->value("frontend/sound", true).toBool()) + if (notifyNick && notify && (m_helloSounds.size() > 0)) { SDLInteraction::instance().playSoundFile( m_helloSounds.at(rand() % m_helloSounds.size()));