diff --git a/etc/NSIS/setup.nsi b/etc/NSIS/setup.nsi
index 18ce7aa4..fb17e664 100644
--- a/etc/NSIS/setup.nsi
+++ b/etc/NSIS/setup.nsi
@@ -677,7 +677,7 @@ FunctionEnd
Function RunAppFunction
!insertmacro GetExecutableName $R0
!insertmacro UAC_AsUser_ExecShell "explore" "$INSTDIR" "" "" SW_SHOWNORMAL
- !insertmacro UAC_AsUser_ExecShell "open" "$INSTDIR\$R0" "" "$INSTDIR" SW_SHOWNORMAL
+ !insertmacro UAC_AsUser_ExecShell "open" "$INSTDIR\$R0" "--first-run" "$INSTDIR" SW_SHOWNORMAL
FunctionEnd
Function ShowReadmeFunction
diff --git a/etc/Translation/Blank.ts b/etc/Translation/Blank.ts
index 26412c6e..f7c2a2f5 100644
--- a/etc/Translation/Blank.ts
+++ b/etc/Translation/Blank.ts
@@ -1342,9 +1342,9 @@
-
-
-
+
+
+
@@ -1385,13 +1385,13 @@
-
+
-
+
@@ -1472,7 +1472,7 @@
-
+
@@ -1572,567 +1572,569 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
-
+
+
-
+
-
+
-
+
-
-
-
-
+
+
+
+
+
+
-
-
+
+
-
+
-
+
-
-
-
+
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
-
+
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
-
+
-
+
-
+
-
+
-
-
+
+
-
+
-
+
-
-
-
+
+
+
-
+
-
+
-
+
-
-
-
+
+
+
-
+
-
+
-
+
-
-
+
+
-
-
+
+
-
-
-
+
+
+
-
+
-
+
-
+
-
+
-
-
+
+
-
+
-
+
-
+
-
-
+
+
-
-
+
+
-
-
+
+
-
+
-
+
-
+
-
+
-
-
-
-
+
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/src/Config.h b/src/Config.h
index 73968c32..25d35f9b 100644
--- a/src/Config.h
+++ b/src/Config.h
@@ -30,7 +30,7 @@
#define VER_LAMEXP_MINOR_LO 3
#define VER_LAMEXP_TYPE Beta
#define VER_LAMEXP_PATCH 2
-#define VER_LAMEXP_BUILD 689
+#define VER_LAMEXP_BUILD 690
///////////////////////////////////////////////////////////////////////////////
// Tools versions
diff --git a/src/Dialog_MainWindow.cpp b/src/Dialog_MainWindow.cpp
index 9da4ead9..2b909229 100644
--- a/src/Dialog_MainWindow.cpp
+++ b/src/Dialog_MainWindow.cpp
@@ -898,12 +898,19 @@ void MainWindow::windowShown(void)
{
QStringList arguments = QApplication::arguments();
+ //First run?
+ bool firstRun = false;
+ for(int i = 0; i < arguments.count(); i++)
+ {
+ if(!arguments[i].compare("--first-run", Qt::CaseInsensitive)) firstRun = true;
+ }
+
//Check license
- if(m_settings->licenseAccepted() <= 0)
+ if((m_settings->licenseAccepted() <= 0) || firstRun)
{
int iAccepted = -1;
- if(m_settings->licenseAccepted() == 0)
+ if((m_settings->licenseAccepted() == 0) || firstRun)
{
AboutDialog *about = new AboutDialog(m_settings, this, true);
iAccepted = about->exec();
@@ -926,7 +933,7 @@ void MainWindow::windowShown(void)
PlaySound(MAKEINTRESOURCE(IDR_WAVE_WOOHOO), GetModuleHandle(NULL), SND_RESOURCE | SND_SYNC);
m_settings->licenseAccepted(1);
- showAnnounceBox(); /*Do NOT forget to remove this for the final release!*/
+ if(lamexp_version_demo()) showAnnounceBox();
}
//Check for expiration
@@ -979,7 +986,7 @@ void MainWindow::windowShown(void)
else if(m_settings->autoUpdateEnabled())
{
QDate lastUpdateCheck = QDate::fromString(m_settings->autoUpdateLastCheck(), Qt::ISODate);
- if(!lastUpdateCheck.isValid() || QDate::currentDate() >= lastUpdateCheck.addDays(14))
+ if(!firstRun && (!lastUpdateCheck.isValid() || QDate::currentDate() >= lastUpdateCheck.addDays(14)))
{
if(QMessageBox::information(this, tr("Update Reminder"), QString("%1").arg(lastUpdateCheck.isValid() ? tr("Your last update check was more than 14 days ago. Check for updates now?") : tr("Your did not check for LameXP updates yet. Check for updates now?")).replace("-", "−"), tr("Check for Updates"), tr("Postpone")) == 0)
{
@@ -1084,15 +1091,19 @@ void MainWindow::showAnnounceBox(void)
announceText.append("If you are willing to translate LameXP to your language or to complete an existing translation, please refer to:
");
announceText.append("" + LINK("http://mulder.brhack.net/public/doc/lamexp_translate.html") + "
");
- QMessageBox *announceBox = new QMessageBox(QMessageBox::Warning, "We want you!", announceText, QMessageBox::Discard, this);
+ QMessageBox *announceBox = new QMessageBox(QMessageBox::Warning, "We want you!", announceText, QMessageBox::NoButton, this);
announceBox->setWindowFlags(Qt::Window | Qt::WindowTitleHint | Qt::CustomizeWindowHint);
announceBox->setIconPixmap(QIcon(":/images/Announcement.png").pixmap(64,79));
- announceBox->button(QMessageBox::Discard)->hide();
-
+ QPushButton *button1 = announceBox->addButton(tr("Discard"), QMessageBox::AcceptRole);
+ QPushButton *button2 = announceBox->addButton(tr("Discard"), QMessageBox::NoRole);
+ button1->setVisible(false);
+ button2->setEnabled(false);
+
QTimer *announceTimer = new QTimer(this);
announceTimer->setSingleShot(true);
announceTimer->setInterval(8000);
- connect(announceTimer, SIGNAL(timeout()), announceBox->button(QMessageBox::Discard), SLOT(show()));
+ connect(announceTimer, SIGNAL(timeout()), button1, SLOT(show()));
+ connect(announceTimer, SIGNAL(timeout()), button2, SLOT(hide()));
announceTimer->start();
announceBox->exec();