#define VER_LAMEXP_MINOR_LO 9
#define VER_LAMEXP_TYPE Alpha
#define VER_LAMEXP_PATCH 1
-#define VER_LAMEXP_BUILD 2242
+#define VER_LAMEXP_BUILD 2244
#define VER_LAMEXP_CONFG 2188
///////////////////////////////////////////////////////////////////////////////
//Helper macros
#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 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)
//Constants
}
else
{
- MUtils::Sound::play_sound("ghost", true);
+ PLAY_SOUND_OPTIONAL("ghost", true);
}
}
//Play tick sound
if(m_settings->soundsEnabled() && (!silent))
{
- MUtils::Sound::play_sound("tick", true);
+ PLAY_SOUND_OPTIONAL("tick", true);
}
//Scroll to the top
{
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])
{
QPixmap cartoon(":/images/Cartoon.png");
{
m_settings->licenseAccepted(1);
m_settings->syncNow();
- MUtils::Sound::play_sound("woohoo", false);
+ PLAY_SOUND_OPTIONAL("woohoo", false);
if (lamexp_version_demo())
{
showAnnounceBox();
if(m_settings->licenseAccepted() <= 0)
{
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!"));
QFileInfo uninstallerInfo = QFileInfo(QString("%1/Uninstall.exe").arg(QApplication::applicationDirPath()));
if(uninstallerInfo.exists())
if(MUtils::OS::current_date() >= lamexp_version_expires())
{
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)
{
checkForUpdates();
return;
default:
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);
break;
}