diff --git a/res/Icons.qrc b/res/Icons.qrc
index 65bb4dc0..3a7614f7 100644
--- a/res/Icons.qrc
+++ b/res/Icons.qrc
@@ -7,6 +7,7 @@
MainIcon3.png
MainIcon4.png
MainIcon5.png
+ MainIcon6.png
icons/add.png
icons/accept.png
icons/application_view_list.png
diff --git a/res/MainIcon2.png b/res/MainIcon2.png
index f5c9bbff..cc6cab69 100644
Binary files a/res/MainIcon2.png and b/res/MainIcon2.png differ
diff --git a/res/MainIcon3.png b/res/MainIcon3.png
index cc6cab69..f5c9bbff 100644
Binary files a/res/MainIcon3.png and b/res/MainIcon3.png differ
diff --git a/res/MainIcon6.png b/res/MainIcon6.png
new file mode 100644
index 00000000..bfeab8b8
Binary files /dev/null and b/res/MainIcon6.png differ
diff --git a/src/Config.h b/src/Config.h
index a9a60ceb..dc03962b 100644
--- a/src/Config.h
+++ b/src/Config.h
@@ -30,7 +30,7 @@
#define VER_LAMEXP_MINOR_LO 4
#define VER_LAMEXP_TYPE Alpha
#define VER_LAMEXP_PATCH 12
-#define VER_LAMEXP_BUILD 842
+#define VER_LAMEXP_BUILD 844
///////////////////////////////////////////////////////////////////////////////
// Tool versions (minimum expected versions!)
diff --git a/src/Global.cpp b/src/Global.cpp
index 45665fcd..76f71458 100644
--- a/src/Global.cpp
+++ b/src/Global.cpp
@@ -733,24 +733,49 @@ static bool lamexp_computus(const QDate &date)
}
}
+/*
+ * Check for Thanksgiving
+ */
+static bool lamexp_thanksgiving(const QDate &date)
+{
+ int day = 0;
+
+ switch(QDate(date.year(), 11, 1).dayOfWeek())
+ {
+ case 1: day = 25; break;
+ case 2: day = 24; break;
+ case 3: day = 23; break;
+ case 4: day = 22; break;
+ case 5: day = 28; break;
+ case 6: day = 27; break;
+ case 7: day = 26; break;
+ }
+
+ return (date.month() == 11) && (date.day() == day);
+}
+
/*
* Initialize app icon
*/
static QIcon lamexp_init_icon(const QDate &date, const QTime &time)
{
- if(((date.month() == 1) && (date.day() == 1)) || ((date.month() == 12) && (date.day() == 31) && (time.hour() > 20)))
+ if(lamexp_thanksgiving(date))
+ {
+ return QIcon(":/MainIcon6.png");
+ }
+ else if(((date.month() == 12) && (date.day() == 31) && (time.hour() >= 20)) || ((date.month() == 1) && (date.day() == 1) && (time.hour() <= 19)))
{
return QIcon(":/MainIcon5.png");
}
- else if(((date.month() == 10) && (date.day() == 31)) || ((date.month() == 11) && (date.day() == 1) && (time.hour() < 7)))
+ else if(((date.month() == 10) && (date.day() == 31) && (time.hour() >= 12)) || ((date.month() == 11) && (date.day() == 1) && (time.hour() <= 11)))
{
return QIcon(":/MainIcon4.png");
}
- else if(lamexp_computus(date))
+ else if((date.month() == 12) && (date.day() >= 24) && (date.day() <= 26))
{
return QIcon(":/MainIcon3.png");
}
- else if((date.month() == 12) && (date.day() >= 24) && (date.day() <= 26))
+ else if(lamexp_computus(date))
{
return QIcon(":/MainIcon2.png");
}
diff --git a/src/Main.cpp b/src/Main.cpp
index c7c4fd86..36273666 100644
--- a/src/Main.cpp
+++ b/src/Main.cpp
@@ -88,6 +88,10 @@ static int lamexp_main(int argc, char* argv[])
//Check for expiration
if(lamexp_version_demo())
{
+ if(QDate::currentDate().addDays(1) < lamexp_version_date())
+ {
+ qFatal("System's date (%s) is before LameXP build date (%s). Huh?", QDate::currentDate().toString(Qt::ISODate).toLatin1().constData(), lamexp_version_date().toString(Qt::ISODate).toLatin1().constData());
+ }
qWarning(QString("Note: This demo (pre-release) version of LameXP will expire at %1.\n").arg(lamexp_version_expires().toString(Qt::ISODate)).toLatin1().constData());
}