diff --git a/LameXP_VS2010.vcxproj b/LameXP_VS2010.vcxproj index b5ad6f79..be142f2d 100644 --- a/LameXP_VS2010.vcxproj +++ b/LameXP_VS2010.vcxproj @@ -973,6 +973,7 @@ del "$(TargetDir)imageformats\q???d4.dll" "$(QTDIR)\bin\rcc.exe" -o "$(SolutionDir)tmp\QRC_%(Filename).cpp" -name "%(Filename)" "%(FullPath)" $(SolutionDir)tmp\QRC_%(Filename).cpp;%(Outputs) + Designer RCC "$(SolutionDir)tmp\QRC_%(Filename).cpp" diff --git a/etc/Translation/Blank.ts b/etc/Translation/Blank.ts index 1f6a3051..e0e3ea02 100644 --- a/etc/Translation/Blank.ts +++ b/etc/Translation/Blank.ts @@ -2854,17 +2854,17 @@ - + Executable '%1' requires Qt v%2, but found Qt v%3. - + Executable '%1' was built for Qt '%2', but found Qt '%3'. - + Executable '%1' requires Windows 2000 or later. diff --git a/etc/Translation/LameXP_PL.ts b/etc/Translation/LameXP_PL.ts index 81209870..2bb87c85 100644 --- a/etc/Translation/LameXP_PL.ts +++ b/etc/Translation/LameXP_PL.ts @@ -2854,17 +2854,17 @@ Plik wykonywalny '%1' nie działa w trybie kompatybilności z Windows. - + Executable '%1' requires Qt v%2, but found Qt v%3. Plik wykonywalny '%1' wymaga Qt v%2, znaleziono jednak Qt v%3. - + Executable '%1' was built for Qt '%2', but found Qt '%3'. - + Executable '%1' requires Windows 2000 or later. Plik wykonywalny '%1' wymaga do uruchomienia Windows 2000 lub nowszego. diff --git a/gui/ProcessingDialog.ui b/gui/ProcessingDialog.ui index 15410d67..5a4d57df 100644 --- a/gui/ProcessingDialog.ui +++ b/gui/ProcessingDialog.ui @@ -156,7 +156,7 @@ - :/MainIcon.png + :/MainIcon1.png true diff --git a/res/Icons.qrc b/res/Icons.qrc index b3d07a77..65bb4dc0 100644 --- a/res/Icons.qrc +++ b/res/Icons.qrc @@ -2,8 +2,11 @@ MainIcon.ico - MainIcon.png + MainIcon1.png MainIcon2.png + MainIcon3.png + MainIcon4.png + MainIcon5.png icons/add.png icons/accept.png icons/application_view_list.png diff --git a/res/MainIcon.png b/res/MainIcon1.png similarity index 100% rename from res/MainIcon.png rename to res/MainIcon1.png diff --git a/res/MainIcon3.png b/res/MainIcon3.png new file mode 100644 index 00000000..cc6cab69 Binary files /dev/null and b/res/MainIcon3.png differ diff --git a/res/MainIcon4.png b/res/MainIcon4.png new file mode 100644 index 00000000..b26fee73 Binary files /dev/null and b/res/MainIcon4.png differ diff --git a/res/MainIcon5.png b/res/MainIcon5.png new file mode 100644 index 00000000..6ae3cda1 Binary files /dev/null and b/res/MainIcon5.png differ diff --git a/src/Config.h b/src/Config.h index 528d6d82..a9a60ceb 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 837 +#define VER_LAMEXP_BUILD 842 /////////////////////////////////////////////////////////////////////////////// // Tool versions (minimum expected versions!) diff --git a/src/Dialog_Processing.cpp b/src/Dialog_Processing.cpp index 21ae2493..c28fffb2 100644 --- a/src/Dialog_Processing.cpp +++ b/src/Dialog_Processing.cpp @@ -113,6 +113,9 @@ ProcessingDialog::ProcessingDialog(FileListModel *fileListModel, AudioFileModel setupUi(this); setWindowFlags(windowFlags() ^ Qt::WindowContextHelpButtonHint); + //Update header icon + label_headerIcon->setPixmap(QApplication::windowIcon().pixmap(label_headerIcon->pixmap()->size())); + //Setup version info label_versionInfo->setText(QString().sprintf("v%d.%02d %s (Build %d)", lamexp_version_major(), lamexp_version_minor(), lamexp_version_release(), lamexp_version_build())); label_versionInfo->installEventFilter(this); diff --git a/src/Global.cpp b/src/Global.cpp index be5c8c04..45665fcd 100644 --- a/src/Global.cpp +++ b/src/Global.cpp @@ -706,6 +706,60 @@ static bool lamexp_check_compatibility_mode(const char *exportName, const char * return true; } +/* + * Computus according to H. Lichtenberg + */ +static bool lamexp_computus(const QDate &date) +{ + int X = date.year(); + int A = X % 19; + int K = X / 100; + int M = 15 + (3*K + 3) / 4 - (8*K + 13) / 25; + int D = (19*A + M) % 30; + int S = 2 - (3*K + 3) / 4; + int R = D / 29 + (D / 28 - D / 29) * (A / 11); + int OG = 21 + D - R; + int SZ = 7 - (X + X / 4 + S) % 7; + int OE = 7 - (OG - SZ) % 7; + int OS = (OG + OE); + + if(OS > 31) + { + return (date.month() == 4) && (date.day() == (OS - 31)); + } + else + { + return (date.month() == 3) && (date.day() == OS); + } +} + +/* + * 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))) + { + return QIcon(":/MainIcon5.png"); + } + else if(((date.month() == 10) && (date.day() == 31)) || ((date.month() == 11) && (date.day() == 1) && (time.hour() < 7))) + { + return QIcon(":/MainIcon4.png"); + } + else if(lamexp_computus(date)) + { + return QIcon(":/MainIcon3.png"); + } + else if((date.month() == 12) && (date.day() >= 24) && (date.day() <= 26)) + { + return QIcon(":/MainIcon2.png"); + } + else + { + return QIcon(":/MainIcon1.png"); + } +} + /* * Check for process elevation */ @@ -840,14 +894,20 @@ bool lamexp_init_qt(int argc, char* argv[]) ntdll.unload(); } + for(int test = 2000; test < 2031; test++) + { + lamexp_computus(QDate(test, 1, 1)); + } + //Create Qt application instance and setup version info QDate date = QDate::currentDate(); + QTime time = QTime::currentTime(); QApplication *application = new QApplication(argc, argv); application->setApplicationName("LameXP - Audio Encoder Front-End"); application->setApplicationVersion(QString().sprintf("%d.%02d.%04d", lamexp_version_major(), lamexp_version_minor(), lamexp_version_build())); application->setOrganizationName("LoRd_MuldeR"); application->setOrganizationDomain("mulder.at.gg"); - application->setWindowIcon((date.month() == 12 && date.day() >= 24 && date.day() <= 26) ? QIcon(":/MainIcon2.png") : QIcon(":/MainIcon.png")); + application->setWindowIcon(lamexp_init_icon(date, time)); //Set text Codec for locale QTextCodec::setCodecForLocale(QTextCodec::codecForName("UTF-8"));