Refactored a few constants.

This commit is contained in:
LoRd_MuldeR 2011-02-28 01:28:27 +01:00
parent d2a2954188
commit 63d6708fc1
6 changed files with 19 additions and 6 deletions

View File

@ -25,7 +25,7 @@
#define VER_LAMEXP_MAJOR 4
#define VER_LAMEXP_MINOR_HI 0
#define VER_LAMEXP_MINOR_LO 1
#define VER_LAMEXP_BUILD 341
#define VER_LAMEXP_BUILD 342
#define VER_LAMEXP_SUFFIX Beta-3
/*

View File

@ -79,7 +79,7 @@ AboutDialog::AboutDialog(SettingsModel *settings, QWidget *parent, bool firstSta
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().sprintf("<b>Version %d.%02d %s, Build %d [%s]</b><br><br>", lamexp_version_major(), lamexp_version_minor(), lamexp_version_release(), lamexp_version_build(), lamexp_version_date().toString(Qt::ISODate).toLatin1().constData());
aboutText += QString("<nobr>%1</nobr><br>").arg(tr("Please visit %1 for news and updates!").arg(LINK("http://forum.doom9.org/showthread.php?t=157726")));
aboutText += QString("<nobr>%1</nobr><br>").arg(tr("Please visit %1 for news and updates!").arg(LINK(lamexp_website_url())));
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>";

View File

@ -1505,7 +1505,7 @@ void MainWindow::clearMetaButtonClicked(void)
*/
void MainWindow::visitHomepageActionActivated(void)
{
QDesktopServices::openUrl(QUrl("http://mulder.dummwiedeutsch.de/"));
QDesktopServices::openUrl(QUrl(lamexp_website_url()));
}
/*

View File

@ -58,6 +58,14 @@
////////////////////////////////////////////////////////////
//Maximum number of parallel instances
#define MAX_INSTANCES 16
//Maximum number of CPU cores for auto-detection
#define MAX_CPU_COUNT 4
////////////////////////////////////////////////////////////
#define CHANGE_BACKGROUND_COLOR(WIDGET, COLOR) \
{ \
QPalette palette = WIDGET->palette(); \
@ -232,7 +240,7 @@ bool ProcessingDialog::eventFilter(QObject *obj, QEvent *event)
}
else if(event->type() == QEvent::MouseButtonPress)
{
QUrl url("http://mulder.dummwiedeutsch.de/");
QUrl url(lamexp_website_url());
QDesktopServices::openUrl(url);
}
}
@ -267,11 +275,11 @@ void ProcessingDialog::initEncoding(void)
WinSevenTaskbar::setTaskbarProgress(this, 0, m_pendingJobs.count());
WinSevenTaskbar::setOverlayIcon(this, &QIcon(":/icons/control_play_blue.png"));
int maximumInstances = max(min(m_settings->maximumInstances(), 16), 0);
int maximumInstances = max(min(m_settings->maximumInstances(), MAX_INSTANCES), 0);
if(maximumInstances < 1)
{
lamexp_cpu_t cpuFeatures = lamexp_detect_cpu_features();
maximumInstances = max(min(cpuFeatures.count, 4), 1);
maximumInstances = max(min(cpuFeatures.count, MAX_CPU_COUNT), 1);
}
int parallelThreadCount = max(min(maximumInstances, m_pendingJobs.count()), 1);

View File

@ -127,6 +127,9 @@ static const char *g_lamexp_version_raw_date = __DATE__;
#endif
#endif
//Official web-site URL
static const char *g_lamexp_website_url = "http://mulder.dummwiedeutsch.de/";
//Tool versions (expected)
static const unsigned int g_lamexp_toolver_neroaac = VER_LAMEXP_TOOL_NEROAAC;
@ -192,6 +195,7 @@ unsigned int lamexp_version_build(void) { return g_lamexp_version.ver_build; }
const char *lamexp_version_release(void) { return g_lamexp_version.ver_release_name; }
const char *lamexp_version_compiler(void) {return g_lamexp_version_compiler; }
unsigned int lamexp_toolver_neroaac(void) { return g_lamexp_toolver_neroaac; }
const char *lamexp_website_url(void) { return g_lamexp_website_url; }
bool lamexp_version_demo(void)
{

View File

@ -76,6 +76,7 @@ bool lamexp_version_demo(void);
const char *lamexp_version_compiler(void);
QDate lamexp_version_expires(void);
unsigned int lamexp_toolver_neroaac(void);
const char *lamexp_website_url(void);
//Public functions
void lamexp_init_console(int argc, char* argv[]);