OSDN Git Service

Updated "About" dialog: Display expiration date, if demo (pre-release) version.
authorlordmulder <mulder2@gmx.de>
Fri, 8 Apr 2011 02:24:05 +0000 (04:24 +0200)
committerlordmulder <mulder2@gmx.de>
Fri, 8 Apr 2011 02:24:05 +0000 (04:24 +0200)
src/Config.h
src/Dialog_About.cpp

index 54dc81e..1080c9f 100644 (file)
@@ -25,7 +25,7 @@
 #define VER_LAMEXP_MAJOR                               4
 #define VER_LAMEXP_MINOR_HI                            0
 #define VER_LAMEXP_MINOR_LO                            2
-#define VER_LAMEXP_BUILD                               424
+#define VER_LAMEXP_BUILD                               425
 #define VER_LAMEXP_SUFFIX                              Alpha-1
 
 /*
index c477a96..1338870 100644 (file)
@@ -91,10 +91,15 @@ AboutDialog::AboutDialog(SettingsModel *settings, QWidget *parent, bool firstSta
        QString aboutText;
 
        aboutText += QString("<h2>%1</h2>").arg(tr("LameXP &minus; Audio Encoder Front-end"));
-       aboutText += QString("<b>Copyright (C) 2004-%1 LoRd_MuldeR &lt;MuldeR2@GMX.de&gt;. Some rights reserved.</b><br>").arg(max(lamexp_version_date().year(),QDate::currentDate().year()));
+       aboutText += QString("<b>Copyright (C) 2004-%1 LoRd_MuldeR &lt;MuldeR2@GMX.de&gt;. Some rights reserved.</b><br>").arg(max(lamexp_version_date().year(), QDate::currentDate().year()));
        aboutText += QString("<b>%1</b><br><br>").arg(versionStr);
        aboutText += QString("<nobr>%1</nobr><br>").arg(tr("Please visit %1 for news and updates!").arg(LINK(lamexp_website_url())));
-       aboutText += lamexp_version_demo() ? QString("<nobr><font color=\"darkred\">%1</font></nobr><br>").arg(tr("Note: This demo (pre-release) version of LameXP will expire at %1.").arg(lamexp_version_expires().toString(Qt::ISODate))) : QString();
+       
+       if(lamexp_version_demo())
+       {
+               aboutText += QString("<hr><nobr><font color=\"crimson\">%1</font></nobr>").arg(tr("Note: This demo (pre-release) version of LameXP will expire at %1. Still %2 days left.").arg(lamexp_version_expires().toString(Qt::ISODate), QString::number(QDate::currentDate().daysTo(lamexp_version_expires()))));
+       }
+       
        aboutText += "<hr><br>";
        aboutText += "<nobr><tt>This program is free software; you can redistribute it and/or<br>";
        aboutText += "modify it under the terms of the GNU General Public License<br>";
@@ -112,7 +117,7 @@ AboutDialog::AboutDialog(SettingsModel *settings, QWidget *parent, bool firstSta
        aboutText += QString("<td><font color=\"darkred\">%1</font></td>").arg(tr("Note: LameXP is free software. Do <b>not</b> pay money to obtain or use LameXP! If some third-party website tries to make you pay for downloading LameXP, you should <b>not</b> respond to the offer !!!"));
        aboutText += "</tr></table><hr><br>";
        aboutText += QString("%1<br>").arg(tr("Special thanks go out to \"John33\" from %1 for his continuous support.").arg(LINK("http://www.rarewares.org/")));
-       
+
        setText(aboutText);
        setIconPixmap(dynamic_cast<QApplication*>(QApplication::instance())->windowIcon().pixmap(QSize(64,64)));
        setWindowTitle(tr("About LameXP"));