diff -r 4218782d8ca0 -r 5bb48450b978 QTfrontend/ui/widget/qpushbuttonwithsound.cpp --- a/QTfrontend/ui/widget/qpushbuttonwithsound.cpp Tue Jan 17 23:42:30 2012 +0100 +++ b/QTfrontend/ui/widget/qpushbuttonwithsound.cpp Wed Jan 18 01:07:07 2012 +0100 @@ -1,11 +1,11 @@ -#include "qpushbuttonwithsound.h" #include -#include #include -#include -#include -#include -#include + +#include "qpushbuttonwithsound.h" +#include "HWDataManager.h" +#include "SDLInteraction.h" +#include "hwform.h" +#include "gameuiconfig.h" QPushButtonWithSound::QPushButtonWithSound(QWidget *parent) : QPushButton(parent), @@ -21,14 +21,6 @@ HWDataManager & dataMgr = HWDataManager::instance(); - QString soundsDir = QString("Sounds/"); - - QStringList list = dataMgr.entryList( - soundsDir, - QDir::Files, - QStringList() << - "shotgunreload.ogg" - ); - if(!list.empty()) - SDLInteraction::instance().playSoundFile(dataMgr.findFileForRead(soundsDir + "/" + list[0])); + if (this->isEnabled()) + SDLInteraction::instance().playSoundFile(dataMgr.findFileForRead("Sounds/roperelease.ogg")); }