Catched a few more cases where MUtils::Sound::play_sound() was called directly instead of using PLAY_SOUND_OPTIONAL macro.
This commit is contained in:
parent
1563ed5c69
commit
7179ad161e
@ -35,7 +35,7 @@
|
|||||||
#define VER_LAMEXP_MINOR_LO 9
|
#define VER_LAMEXP_MINOR_LO 9
|
||||||
#define VER_LAMEXP_TYPE Alpha
|
#define VER_LAMEXP_TYPE Alpha
|
||||||
#define VER_LAMEXP_PATCH 1
|
#define VER_LAMEXP_PATCH 1
|
||||||
#define VER_LAMEXP_BUILD 2242
|
#define VER_LAMEXP_BUILD 2244
|
||||||
#define VER_LAMEXP_CONFG 2188
|
#define VER_LAMEXP_CONFG 2188
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -62,6 +62,7 @@
|
|||||||
//Helper macros
|
//Helper macros
|
||||||
#define LINK(URL) QString("<a href=\"%1\">%2</a>").arg(URL).arg(QString(URL).replace("-", "−"))
|
#define LINK(URL) QString("<a href=\"%1\">%2</a>").arg(URL).arg(QString(URL).replace("-", "−"))
|
||||||
#define TRIM_RIGHT(STR) do { while(STR.endsWith(QChar(' ')) || STR.endsWith(QChar('\t')) || STR.endsWith(QChar('\r')) || STR.endsWith(QChar('\n'))) STR.chop(1); } while(0)
|
#define TRIM_RIGHT(STR) do { while(STR.endsWith(QChar(' ')) || STR.endsWith(QChar('\t')) || STR.endsWith(QChar('\r')) || STR.endsWith(QChar('\n'))) STR.chop(1); } while(0)
|
||||||
|
#define PLAY_SOUND_OPTIONAL(NAME, ASYNC) do { if(m_settings->soundsEnabled()) MUtils::Sound::play_sound((NAME), (ASYNC)); } while(0)
|
||||||
#define MAKE_TRANSPARENT(WIDGET) do { QPalette _p = (WIDGET)->palette(); _p.setColor(QPalette::Background, Qt::transparent); (WIDGET)->setPalette(_p); } while(0)
|
#define MAKE_TRANSPARENT(WIDGET) do { QPalette _p = (WIDGET)->palette(); _p.setColor(QPalette::Background, Qt::transparent); (WIDGET)->setPalette(_p); } while(0)
|
||||||
|
|
||||||
//Constants
|
//Constants
|
||||||
@ -260,7 +261,7 @@ int AboutDialog::exec()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MUtils::Sound::play_sound("ghost", true);
|
PLAY_SOUND_OPTIONAL("ghost", true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -332,7 +333,7 @@ void AboutDialog::tabChanged(int index, const bool silent)
|
|||||||
//Play tick sound
|
//Play tick sound
|
||||||
if(m_settings->soundsEnabled() && (!silent))
|
if(m_settings->soundsEnabled() && (!silent))
|
||||||
{
|
{
|
||||||
MUtils::Sound::play_sound("tick", true);
|
PLAY_SOUND_OPTIONAL("tick", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Scroll to the top
|
//Scroll to the top
|
||||||
@ -513,7 +514,7 @@ bool AboutDialog::eventFilter(QObject *obj, QEvent *event)
|
|||||||
{
|
{
|
||||||
if((!m_disque.isNull()) && (obj == m_disque.data()) && (event->type() == QEvent::MouseButtonPress))
|
if((!m_disque.isNull()) && (obj == m_disque.data()) && (event->type() == QEvent::MouseButtonPress))
|
||||||
{
|
{
|
||||||
MUtils::Sound::play_sound("chicken", true);
|
PLAY_SOUND_OPTIONAL("chicken", true);
|
||||||
if (!m_cartoon[0])
|
if (!m_cartoon[0])
|
||||||
{
|
{
|
||||||
QPixmap cartoon(":/images/Cartoon.png");
|
QPixmap cartoon(":/images/Cartoon.png");
|
||||||
|
@ -1469,7 +1469,7 @@ void MainWindow::windowShown(void)
|
|||||||
{
|
{
|
||||||
m_settings->licenseAccepted(1);
|
m_settings->licenseAccepted(1);
|
||||||
m_settings->syncNow();
|
m_settings->syncNow();
|
||||||
MUtils::Sound::play_sound("woohoo", false);
|
PLAY_SOUND_OPTIONAL("woohoo", false);
|
||||||
if (lamexp_version_demo())
|
if (lamexp_version_demo())
|
||||||
{
|
{
|
||||||
showAnnounceBox();
|
showAnnounceBox();
|
||||||
@ -1492,7 +1492,7 @@ void MainWindow::windowShown(void)
|
|||||||
if(m_settings->licenseAccepted() <= 0)
|
if(m_settings->licenseAccepted() <= 0)
|
||||||
{
|
{
|
||||||
QApplication::processEvents();
|
QApplication::processEvents();
|
||||||
MUtils::Sound::play_sound("whammy", false);
|
PLAY_SOUND_OPTIONAL("whammy", false);
|
||||||
QMessageBox::critical(this, tr("License Declined"), tr("You have declined the license. Consequently the application will exit now!"), tr("Goodbye!"));
|
QMessageBox::critical(this, tr("License Declined"), tr("You have declined the license. Consequently the application will exit now!"), tr("Goodbye!"));
|
||||||
QFileInfo uninstallerInfo = QFileInfo(QString("%1/Uninstall.exe").arg(QApplication::applicationDirPath()));
|
QFileInfo uninstallerInfo = QFileInfo(QString("%1/Uninstall.exe").arg(QApplication::applicationDirPath()));
|
||||||
if(uninstallerInfo.exists())
|
if(uninstallerInfo.exists())
|
||||||
@ -1514,7 +1514,7 @@ void MainWindow::windowShown(void)
|
|||||||
if(MUtils::OS::current_date() >= lamexp_version_expires())
|
if(MUtils::OS::current_date() >= lamexp_version_expires())
|
||||||
{
|
{
|
||||||
qWarning("Binary has expired !!!");
|
qWarning("Binary has expired !!!");
|
||||||
MUtils::Sound::play_sound("whammy", false);
|
PLAY_SOUND_OPTIONAL("whammy", false);
|
||||||
if(QMessageBox::warning(this, tr("LameXP - Expired"), NOBREAK(QString("%1<br>%2").arg(tr("This demo (pre-release) version of LameXP has expired at %1.").arg(lamexp_version_expires().toString(Qt::ISODate)), tr("LameXP is free software and release versions won't expire."))), tr("Check for Updates"), tr("Exit Program")) == 0)
|
if(QMessageBox::warning(this, tr("LameXP - Expired"), NOBREAK(QString("%1<br>%2").arg(tr("This demo (pre-release) version of LameXP has expired at %1.").arg(lamexp_version_expires().toString(Qt::ISODate)), tr("LameXP is free software and release versions won't expire."))), tr("Check for Updates"), tr("Exit Program")) == 0)
|
||||||
{
|
{
|
||||||
checkForUpdates();
|
checkForUpdates();
|
||||||
@ -1557,7 +1557,7 @@ void MainWindow::windowShown(void)
|
|||||||
return;
|
return;
|
||||||
default:
|
default:
|
||||||
QEventLoop loop; QTimer::singleShot(7000, &loop, SLOT(quit()));
|
QEventLoop loop; QTimer::singleShot(7000, &loop, SLOT(quit()));
|
||||||
MUtils::Sound::play_sound("waiting", true);
|
PLAY_SOUND_OPTIONAL("waiting", true);
|
||||||
showBanner(tr("Skipping update check this time, please be patient..."), &loop);
|
showBanner(tr("Skipping update check this time, please be patient..."), &loop);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user