Added some more "special" application icons.
This commit is contained in:
parent
dce362c997
commit
8fc1a567c9
@ -2854,17 +2854,17 @@
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/Global.cpp" line="789"/>
|
||||
<location filename="../../src/Global.cpp" line="843"/>
|
||||
<source>Executable '%1' requires Qt v%2, but found Qt v%3.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/Global.cpp" line="794"/>
|
||||
<location filename="../../src/Global.cpp" line="848"/>
|
||||
<source>Executable '%1' was built for Qt '%2', but found Qt '%3'.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/Global.cpp" line="803"/>
|
||||
<location filename="../../src/Global.cpp" line="857"/>
|
||||
<source>Executable '%1' requires Windows 2000 or later.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -2854,17 +2854,17 @@
|
||||
<translation type="unfinished">Plik wykonywalny '%1' nie działa w trybie kompatybilności z Windows.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/Global.cpp" line="789"/>
|
||||
<location filename="../../src/Global.cpp" line="843"/>
|
||||
<source>Executable '%1' requires Qt v%2, but found Qt v%3.</source>
|
||||
<translation type="unfinished">Plik wykonywalny '%1' wymaga Qt v%2, znaleziono jednak Qt v%3.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/Global.cpp" line="794"/>
|
||||
<location filename="../../src/Global.cpp" line="848"/>
|
||||
<source>Executable '%1' was built for Qt '%2', but found Qt '%3'.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../src/Global.cpp" line="803"/>
|
||||
<location filename="../../src/Global.cpp" line="857"/>
|
||||
<source>Executable '%1' requires Windows 2000 or later.</source>
|
||||
<translation type="unfinished">Plik wykonywalny '%1' wymaga do uruchomienia Windows 2000 lub nowszego.</translation>
|
||||
</message>
|
||||
|
@ -156,7 +156,7 @@
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="../res/Icons.qrc">:/MainIcon.png</pixmap>
|
||||
<pixmap resource="../res/Icons.qrc">:/MainIcon1.png</pixmap>
|
||||
</property>
|
||||
<property name="scaledContents">
|
||||
<bool>true</bool>
|
||||
|
@ -2,8 +2,11 @@
|
||||
<RCC version="1.0">
|
||||
<qresource>
|
||||
<file>MainIcon.ico</file>
|
||||
<file>MainIcon.png</file>
|
||||
<file>MainIcon1.png</file>
|
||||
<file>MainIcon2.png</file>
|
||||
<file>MainIcon3.png</file>
|
||||
<file>MainIcon4.png</file>
|
||||
<file>MainIcon5.png</file>
|
||||
<file>icons/add.png</file>
|
||||
<file>icons/accept.png</file>
|
||||
<file>icons/application_view_list.png</file>
|
||||
|
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 54 KiB |
BIN
res/MainIcon3.png
Normal file
BIN
res/MainIcon3.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 56 KiB |
BIN
res/MainIcon4.png
Normal file
BIN
res/MainIcon4.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 21 KiB |
BIN
res/MainIcon5.png
Normal file
BIN
res/MainIcon5.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 24 KiB |
@ -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 840
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Tool versions (minimum expected versions!)
|
||||
|
@ -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))
|
||||
{
|
||||
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"));
|
||||
|
Loading…
Reference in New Issue
Block a user