Added an option to check for "Beta" (pre-release) updates in "Final" releases. Disabled by default, not available in "Beta" versions (Beta versions always check for Beta updates).

This commit is contained in:
LoRd_MuldeR 2011-05-03 14:28:06 +02:00
parent fe33e70247
commit 5ce0c7b82e
23 changed files with 417 additions and 133 deletions

View File

@ -24,7 +24,7 @@ a:visited { color: #0000EE; }
<li>Updated Qt runtime libraries to v4.7.3
<li>Updated LAME encoder to v3.99.1.0 (2011-04-15), compiled with ICL 12.0.3 and MSVC 10.0 (<a href="http://lame.cvs.sourceforge.net/viewvc/lame/lame/doc/html/history.html?revision=1.127" target="_blank">details</a>)
<li>Updated mpg123 decoder to v1.13.3 (2011-04-21), compiled with GCC 4.6.0
<li>Updated MediaInfo to v0.7.44 (2011-04-19), compiled with ICL 12.0.3 and MSVC 10.0
<li>Updated MediaInfo to v0.7.45 Beta (2011-05-02), compiled with ICL 12.0.3 and MSVC 10.0
<li>Updated language files (big thank-you to all contributors !!!)
<li>Fixed placement of the Dropbox when the Taskbar is located on the top or on the left side
</ul><br>

View File

@ -788,6 +788,10 @@
<source>Open Folder Recursively...</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Check for Beta Updates</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Adding file(s), please wait...</source>
<translation type="unfinished"></translation>
@ -1228,6 +1232,30 @@
<source>The WMA Decoder notifications have been re-enabled.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Beta Updates</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Do you really want LameXP to check for Beta (pre-release) updates?</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>LameXP will check for Beta (pre-release) updates from now on.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Check Now</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Discard</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>LameXP will &lt;i&gt;not&lt;/i&gt; check for Beta (pre-release) updates from now on.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Shell Integration</source>
<translation type="unfinished"></translation>

View File

@ -1245,6 +1245,34 @@
<source>Add Folder</source>
<translation>Verzeichnis hinzufügen</translation>
</message>
<message>
<source>Check for Beta Updates</source>
<translation>Nach Beta-Updates suchen</translation>
</message>
<message>
<source>Beta Updates</source>
<translation>Beta Updates</translation>
</message>
<message>
<source>Do you really want LameXP to check for Beta (pre-release) updates?</source>
<translation>Möchten Sie wirklich, dass LameXP nach Beta (Entwickler) Updates sucht?</translation>
</message>
<message>
<source>LameXP will check for Beta (pre-release) updates from now on.</source>
<translation>LameXP wird fortan nach Beta (Entwickler) Updates suchen.</translation>
</message>
<message>
<source>Check Now</source>
<translation>Jetzt suchen</translation>
</message>
<message>
<source>Discard</source>
<translation>Schließen</translation>
</message>
<message>
<source>LameXP will &lt;i&gt;not&lt;/i&gt; check for Beta (pre-release) updates from now on.</source>
<translation>LameXP wird fortan &lt;i&gt;nicht&lt;/i&gt; nach Beta (Entwickler) Updates suchen.</translation>
</message>
</context>
<context>
<name>MetaInfo</name>

View File

@ -1244,6 +1244,34 @@
<source>Add Folder</source>
<translation>Añadir carpeta</translation>
</message>
<message>
<source>Check for Beta Updates</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Beta Updates</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Do you really want LameXP to check for Beta (pre-release) updates?</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>LameXP will check for Beta (pre-release) updates from now on.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Check Now</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Discard</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>LameXP will &lt;i&gt;not&lt;/i&gt; check for Beta (pre-release) updates from now on.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>MetaInfo</name>

View File

@ -1254,6 +1254,34 @@ Ouvrir le dossier récursivement...</translation>
<source>Add Folder</source>
<translation>Ajouter un dossier</translation>
</message>
<message>
<source>Check for Beta Updates</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Beta Updates</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Do you really want LameXP to check for Beta (pre-release) updates?</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>LameXP will check for Beta (pre-release) updates from now on.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Check Now</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Discard</source>
<translation type="unfinished">Abandonner</translation>
</message>
<message>
<source>LameXP will &lt;i&gt;not&lt;/i&gt; check for Beta (pre-release) updates from now on.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>MetaInfo</name>

View File

@ -1245,6 +1245,34 @@
<source>Add Folder</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Check for Beta Updates</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Beta Updates</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Do you really want LameXP to check for Beta (pre-release) updates?</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>LameXP will check for Beta (pre-release) updates from now on.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Check Now</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Discard</source>
<translation type="unfinished">Annulla</translation>
</message>
<message>
<source>LameXP will &lt;i&gt;not&lt;/i&gt; check for Beta (pre-release) updates from now on.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>MetaInfo</name>

View File

@ -1244,6 +1244,34 @@
<source>The LameXP shell integration has been re-enabled.</source>
<translation type="unfinished">LameXP .</translation>
</message>
<message>
<source>Check for Beta Updates</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Beta Updates</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Do you really want LameXP to check for Beta (pre-release) updates?</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>LameXP will check for Beta (pre-release) updates from now on.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Check Now</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Discard</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>LameXP will &lt;i&gt;not&lt;/i&gt; check for Beta (pre-release) updates from now on.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>MetaInfo</name>

View File

@ -1246,6 +1246,34 @@
<source>Help &amp;&amp; Support</source>
<translation type="unfinished">Помощиь и поддержка</translation>
</message>
<message>
<source>Check for Beta Updates</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Beta Updates</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Do you really want LameXP to check for Beta (pre-release) updates?</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>LameXP will check for Beta (pre-release) updates from now on.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Check Now</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Discard</source>
<translation type="unfinished">Отменить</translation>
</message>
<message>
<source>LameXP will &lt;i&gt;not&lt;/i&gt; check for Beta (pre-release) updates from now on.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>MetaInfo</name>

View File

@ -1244,6 +1244,34 @@
<source>Cannot write to the selected directory. Please choose another directory!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Check for Beta Updates</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Beta Updates</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Do you really want LameXP to check for Beta (pre-release) updates?</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>LameXP will check for Beta (pre-release) updates from now on.</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Check Now</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Discard</source>
<translation type="unfinished">Відмінити</translation>
</message>
<message>
<source>LameXP will &lt;i&gt;not&lt;/i&gt; check for Beta (pre-release) updates from now on.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>MetaInfo</name>

View File

@ -2793,6 +2793,8 @@
<addaction name="actionDisableWmaDecoderNotifications"/>
<addaction name="actionDisableNeroAacNotifications"/>
<addaction name="actionDisableShellIntegration"/>
<addaction name="separator"/>
<addaction name="actionCheckForBetaUpdates"/>
</widget>
<addaction name="menuConfiguration"/>
<addaction name="actionInstallWMADecoder"/>
@ -3085,6 +3087,14 @@
<string>Open Folder Recursively...</string>
</property>
</action>
<action name="actionCheckForBetaUpdates">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>Check for Beta Updates</string>
</property>
</action>
</widget>
<resources>
<include location="../res/Icons.qrc"/>
@ -3153,6 +3163,7 @@
<include location="../res/Icons.qrc"/>
<include location="../res/Icons.qrc"/>
<include location="../res/Icons.qrc"/>
<include location="../res/Icons.qrc"/>
</resources>
<connections>
<connection>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -29,8 +29,8 @@
#define VER_LAMEXP_MINOR_HI 0
#define VER_LAMEXP_MINOR_LO 2
#define VER_LAMEXP_TYPE Alpha
#define VER_LAMEXP_PATCH 8
#define VER_LAMEXP_BUILD 474
#define VER_LAMEXP_PATCH 10
#define VER_LAMEXP_BUILD 476
///////////////////////////////////////////////////////////////////////////////
// Tools versions

View File

@ -319,6 +319,8 @@ MainWindow::MainWindow(FileListModel *fileListModel, AudioFileModel *metaInfo, S
actionDisableWmaDecoderNotifications->setChecked(!m_settings->wmaDecoderNotificationsEnabled());
actionDisableShellIntegration->setChecked(!m_settings->shellIntegrationEnabled());
actionDisableShellIntegration->setDisabled(lamexp_portable_mode() && actionDisableShellIntegration->isChecked());
actionCheckForBetaUpdates->setChecked(m_settings->autoUpdateCheckBeta() || lamexp_version_demo());
actionCheckForBetaUpdates->setEnabled(!lamexp_version_demo());
connect(actionDisableUpdateReminder, SIGNAL(triggered(bool)), this, SLOT(disableUpdateReminderActionTriggered(bool)));
connect(actionDisableSounds, SIGNAL(triggered(bool)), this, SLOT(disableSoundsActionTriggered(bool)));
connect(actionInstallWMADecoder, SIGNAL(triggered(bool)), this, SLOT(installWMADecoderActionTriggered(bool)));
@ -326,6 +328,7 @@ MainWindow::MainWindow(FileListModel *fileListModel, AudioFileModel *metaInfo, S
connect(actionDisableWmaDecoderNotifications, SIGNAL(triggered(bool)), this, SLOT(disableWmaDecoderNotificationsActionTriggered(bool)));
connect(actionDisableShellIntegration, SIGNAL(triggered(bool)), this, SLOT(disableShellIntegrationActionTriggered(bool)));
connect(actionShowDropBoxWidget, SIGNAL(triggered(bool)), this, SLOT(showDropBoxWidgetActionTriggered(bool)));
connect(actionCheckForBetaUpdates, SIGNAL(triggered(bool)), this, SLOT(checkForBetaUpdatesActionTriggered(bool)));
//Activate help menu actions
actionVisitHomepage->setData(QString::fromLatin1(lamexp_website_url()));
@ -2474,6 +2477,45 @@ void MainWindow::showDropBoxWidgetActionTriggered(bool checked)
FLASH_WINDOW(m_dropBox);
}
/*
* Check for beta (pre-release) updates
*/
void MainWindow::checkForBetaUpdatesActionTriggered(bool checked)
{
bool checkUpdatesNow = false;
if(checked)
{
if(0 == QMessageBox::question(this, tr("Beta Updates"), tr("Do you really want LameXP to check for Beta (pre-release) updates?"), tr("Yes"), tr("No"), QString(), 1))
{
if(0 == QMessageBox::information(this, tr("Beta Updates"), tr("LameXP will check for Beta (pre-release) updates from now on."), tr("Check Now"), tr("Discard")))
{
checkUpdatesNow = true;
}
m_settings->autoUpdateCheckBeta(true);
}
else
{
m_settings->autoUpdateCheckBeta(false);
}
}
else
{
QMessageBox::information(this, tr("Beta Updates"), tr("LameXP will <i>not</i> check for Beta (pre-release) updates from now on."));
m_settings->autoUpdateCheckBeta(false);
}
actionCheckForBetaUpdates->setChecked(m_settings->autoUpdateCheckBeta());
if(checkUpdatesNow)
{
if(checkForUpdates())
{
QApplication::quit();
}
}
}
/*
* Disable shell integration action
*/

View File

@ -117,6 +117,7 @@ private slots:
void disableNeroAacNotificationsActionTriggered(bool checked);
void disableWmaDecoderNotificationsActionTriggered(bool checked);
void showDropBoxWidgetActionTriggered(bool checked);
void checkForBetaUpdatesActionTriggered(bool checked);
void disableShellIntegrationActionTriggered(bool);
protected:

View File

@ -123,6 +123,7 @@ UpdateDialog::UpdateDialog(SettingsModel *settings, QWidget *parent)
m_updateInfo(NULL),
m_settings(settings),
m_logFile(new QStringList()),
m_betaUpdates(settings ? (settings->autoUpdateCheckBeta() || lamexp_version_demo()) : lamexp_version_demo()),
m_success(false),
m_updateReadyToInstall(false)
{
@ -409,10 +410,10 @@ bool UpdateDialog::tryUpdateMirror(UpdateInfo *updateInfo, const QString &url)
QString outFileSignature = QString("%1/%2.sig").arg(lamexp_temp_folder2(), randPart);
m_logFile->append(QStringList() << "" << "Downloading update info:");
bool ok1 = getFile(QString("%1%2").arg(url, mirror_url_postfix[lamexp_version_demo() ? 1 : 0]), outFileVersionInfo);
bool ok1 = getFile(QString("%1%2").arg(url, mirror_url_postfix[m_betaUpdates ? 1 : 0]), outFileVersionInfo);
m_logFile->append(QStringList() << "" << "Downloading signature:");
bool ok2 = getFile(QString("%1%2.sig").arg(url, mirror_url_postfix[lamexp_version_demo() ? 1 : 0]), outFileSignature);
bool ok2 = getFile(QString("%1%2.sig").arg(url, mirror_url_postfix[m_betaUpdates ? 1 : 0]), outFileSignature);
if(ok1 && ok2)
{

View File

@ -53,6 +53,8 @@ protected:
void closeEvent(QCloseEvent *event);
void keyPressEvent(QKeyEvent *e);
const bool m_betaUpdates;
private:
bool tryUpdateMirror(UpdateInfo *updateInfo, const QString &url);
bool getFile(const QString &url, const QString &outFile);

View File

@ -38,27 +38,27 @@
//Macros
////////////////////////////////////////////////////////////
#define MAKE_OPTION1(OPT,DEF) \
#define LAMEXP_MAKE_OPTION_I(OPT,DEF) \
int SettingsModel::OPT(void) { return m_settings->value(g_settingsId_##OPT, DEF).toInt(); } \
void SettingsModel::OPT(int value) { m_settings->setValue(g_settingsId_##OPT, value); } \
int SettingsModel::OPT##Default(void) { return DEF; }
#define MAKE_OPTION2(OPT,DEF) \
#define LAMEXP_MAKE_OPTION_S(OPT,DEF) \
QString SettingsModel::OPT(void) { return m_settings->value(g_settingsId_##OPT, DEF).toString().trimmed(); } \
void SettingsModel::OPT(const QString &value) { m_settings->setValue(g_settingsId_##OPT, value); } \
QString SettingsModel::OPT##Default(void) { return DEF; }
#define MAKE_OPTION3(OPT,DEF) \
#define LAMEXP_MAKE_OPTION_B(OPT,DEF) \
bool SettingsModel::OPT(void) { return m_settings->value(g_settingsId_##OPT, DEF).toBool(); } \
void SettingsModel::OPT(bool value) { m_settings->setValue(g_settingsId_##OPT, value); } \
bool SettingsModel::OPT##Default(void) { return DEF; }
#define MAKE_OPTION4(OPT,DEF) \
#define LAMEXP_MAKE_OPTION_U(OPT,DEF) \
unsigned int SettingsModel::OPT(void) { return m_settings->value(g_settingsId_##OPT, DEF).toUInt(); } \
void SettingsModel::OPT(unsigned int value) { m_settings->setValue(g_settingsId_##OPT, value); } \
unsigned int SettingsModel::OPT##Default(void) { return DEF; }
#define MAKE_ID(DEC,STR) static const char *g_settingsId_##DEC = STR
#define LAMEXP_MAKE_ID(DEC,STR) static const char *g_settingsId_##DEC = STR
#define REMOVE_GROUP(OBJ,ID) OBJ->beginGroup(ID); OBJ->remove(""); OBJ->endGroup();
////////////////////////////////////////////////////////////
@ -66,45 +66,46 @@ unsigned int SettingsModel::OPT##Default(void) { return DEF; }
////////////////////////////////////////////////////////////
//Setting ID's
MAKE_ID(versionNumber, "VersionNumber");
MAKE_ID(licenseAccepted, "LicenseAccepted");
MAKE_ID(interfaceStyle, "InterfaceStyle");
MAKE_ID(compressionEncoder, "Compression/Encoder");
MAKE_ID(compressionRCMode, "Compression/RCMode");
MAKE_ID(compressionBitrate, "Compression/Bitrate");
MAKE_ID(outputDir, "OutputDirectory/SelectedPath");
MAKE_ID(outputToSourceDir, "OutputDirectory/OutputToSourceFolder");
MAKE_ID(prependRelativeSourcePath, "OutputDirectory/PrependRelativeSourcePath");
MAKE_ID(writeMetaTags, "Flags/WriteMetaTags");
MAKE_ID(createPlaylist, "Flags/AutoCreatePlaylist");
MAKE_ID(autoUpdateLastCheck, "AutoUpdate/LastCheck");
MAKE_ID(autoUpdateEnabled, "AutoUpdate/Enabled");
MAKE_ID(soundsEnabled, "Flags/EnableSounds");
MAKE_ID(neroAacNotificationsEnabled, "Flags/EnableNeroAacNotifications");
MAKE_ID(wmaDecoderNotificationsEnabled, "Flags/EnableWmaDecoderNotifications");
MAKE_ID(dropBoxWidgetEnabled, "Flags/EnableDropBoxWidget");
MAKE_ID(shellIntegrationEnabled, "Flags/EnableShellIntegration");
MAKE_ID(currentLanguage, "Localization/Language");
MAKE_ID(lameAlgoQuality, "AdvancedOptions/LAME/AlgorithmQuality");
MAKE_ID(lameChannelMode, "AdvancedOptions/LAME/ChannelMode");
MAKE_ID(bitrateManagementEnabled, "AdvancedOptions/BitrateManagement/Enabled");
MAKE_ID(bitrateManagementMinRate, "AdvancedOptions/BitrateManagement/MinRate");
MAKE_ID(bitrateManagementMaxRate, "AdvancedOptions/BitrateManagement/MaxRate");
MAKE_ID(samplingRate, "AdvancedOptions/Common/Resampling");
MAKE_ID(neroAACEnable2Pass, "AdvancedOptions/NeroAAC/Enable2Pass");
MAKE_ID(neroAACProfile, "AdvancedOptions/NeroAAC/ForceProfile");
MAKE_ID(normalizationFilterEnabled, "AdvancedOptions/VolumeNormalization/Enabled");
MAKE_ID(normalizationFilterMaxVolume, "AdvancedOptions/VolumeNormalization/MaxVolume");
MAKE_ID(toneAdjustBass, "AdvancedOptions/ToneAdjustment/Bass");
MAKE_ID(toneAdjustTreble, "AdvancedOptions/ToneAdjustment/Treble");
MAKE_ID(customParametersLAME, "AdvancedOptions/CustomParameters/LAME");
MAKE_ID(customParametersOggEnc, "AdvancedOptions/CustomParameters/OggEnc");
MAKE_ID(customParametersNeroAAC, "AdvancedOptions/CustomParameters/NeroAAC");
MAKE_ID(customParametersFLAC, "AdvancedOptions/CustomParameters/FLAC");
MAKE_ID(metaInfoPosition, "MetaInformation/PlaylistPosition");
MAKE_ID(maximumInstances, "AdvancedOptions/Threading/MaximumInstances");
MAKE_ID(customTempPath, "AdvancedOptions/TempDirectory/CustomPath");
MAKE_ID(customTempPathEnabled, "AdvancedOptions/TempDirectory/UseCustomPath");
LAMEXP_MAKE_ID(versionNumber, "VersionNumber");
LAMEXP_MAKE_ID(licenseAccepted, "LicenseAccepted");
LAMEXP_MAKE_ID(interfaceStyle, "InterfaceStyle");
LAMEXP_MAKE_ID(compressionEncoder, "Compression/Encoder");
LAMEXP_MAKE_ID(compressionRCMode, "Compression/RCMode");
LAMEXP_MAKE_ID(compressionBitrate, "Compression/Bitrate");
LAMEXP_MAKE_ID(outputDir, "OutputDirectory/SelectedPath");
LAMEXP_MAKE_ID(outputToSourceDir, "OutputDirectory/OutputToSourceFolder");
LAMEXP_MAKE_ID(prependRelativeSourcePath, "OutputDirectory/PrependRelativeSourcePath");
LAMEXP_MAKE_ID(writeMetaTags, "Flags/WriteMetaTags");
LAMEXP_MAKE_ID(createPlaylist, "Flags/AutoCreatePlaylist");
LAMEXP_MAKE_ID(autoUpdateLastCheck, "AutoUpdate/LastCheck");
LAMEXP_MAKE_ID(autoUpdateEnabled, "AutoUpdate/Enabled");
LAMEXP_MAKE_ID(autoUpdateCheckBeta, "AutoUpdate/CheckForBetaVersions");
LAMEXP_MAKE_ID(soundsEnabled, "Flags/EnableSounds");
LAMEXP_MAKE_ID(neroAacNotificationsEnabled, "Flags/EnableNeroAacNotifications");
LAMEXP_MAKE_ID(wmaDecoderNotificationsEnabled, "Flags/EnableWmaDecoderNotifications");
LAMEXP_MAKE_ID(dropBoxWidgetEnabled, "Flags/EnableDropBoxWidget");
LAMEXP_MAKE_ID(shellIntegrationEnabled, "Flags/EnableShellIntegration");
LAMEXP_MAKE_ID(currentLanguage, "Localization/Language");
LAMEXP_MAKE_ID(lameAlgoQuality, "AdvancedOptions/LAME/AlgorithmQuality");
LAMEXP_MAKE_ID(lameChannelMode, "AdvancedOptions/LAME/ChannelMode");
LAMEXP_MAKE_ID(bitrateManagementEnabled, "AdvancedOptions/BitrateManagement/Enabled");
LAMEXP_MAKE_ID(bitrateManagementMinRate, "AdvancedOptions/BitrateManagement/MinRate");
LAMEXP_MAKE_ID(bitrateManagementMaxRate, "AdvancedOptions/BitrateManagement/MaxRate");
LAMEXP_MAKE_ID(samplingRate, "AdvancedOptions/Common/Resampling");
LAMEXP_MAKE_ID(neroAACEnable2Pass, "AdvancedOptions/NeroAAC/Enable2Pass");
LAMEXP_MAKE_ID(neroAACProfile, "AdvancedOptions/NeroAAC/ForceProfile");
LAMEXP_MAKE_ID(normalizationFilterEnabled, "AdvancedOptions/VolumeNormalization/Enabled");
LAMEXP_MAKE_ID(normalizationFilterMaxVolume, "AdvancedOptions/VolumeNormalization/MaxVolume");
LAMEXP_MAKE_ID(toneAdjustBass, "AdvancedOptions/ToneAdjustment/Bass");
LAMEXP_MAKE_ID(toneAdjustTreble, "AdvancedOptions/ToneAdjustment/Treble");
LAMEXP_MAKE_ID(customParametersLAME, "AdvancedOptions/CustomParameters/LAME");
LAMEXP_MAKE_ID(customParametersOggEnc, "AdvancedOptions/CustomParameters/OggEnc");
LAMEXP_MAKE_ID(customParametersNeroAAC, "AdvancedOptions/CustomParameters/NeroAAC");
LAMEXP_MAKE_ID(customParametersFLAC, "AdvancedOptions/CustomParameters/FLAC");
LAMEXP_MAKE_ID(metaInfoPosition, "MetaInformation/PlaylistPosition");
LAMEXP_MAKE_ID(maximumInstances, "AdvancedOptions/Threading/MaximumInstances");
LAMEXP_MAKE_ID(customTempPath, "AdvancedOptions/TempDirectory/CustomPath");
LAMEXP_MAKE_ID(customTempPathEnabled, "AdvancedOptions/TempDirectory/UseCustomPath");
//LUT
const int SettingsModel::mp3Bitrates[15] = {32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, -1};
@ -248,41 +249,42 @@ QString SettingsModel::defaultLanguage(void)
// Getter and Setter
////////////////////////////////////////////////////////////
MAKE_OPTION1(licenseAccepted, 0)
MAKE_OPTION1(interfaceStyle, 0)
MAKE_OPTION1(compressionEncoder, 0)
MAKE_OPTION1(compressionRCMode, 0)
MAKE_OPTION1(compressionBitrate, 7)
MAKE_OPTION2(outputDir, QString())
MAKE_OPTION3(outputToSourceDir, false)
MAKE_OPTION3(prependRelativeSourcePath, false)
MAKE_OPTION3(writeMetaTags, true)
MAKE_OPTION3(createPlaylist, true)
MAKE_OPTION2(autoUpdateLastCheck, "Never")
MAKE_OPTION3(autoUpdateEnabled, true)
MAKE_OPTION3(soundsEnabled, true)
MAKE_OPTION3(neroAacNotificationsEnabled, true)
MAKE_OPTION3(wmaDecoderNotificationsEnabled, true)
MAKE_OPTION3(dropBoxWidgetEnabled, true)
MAKE_OPTION3(shellIntegrationEnabled, !lamexp_portable_mode())
MAKE_OPTION2(currentLanguage, defaultLanguage())
MAKE_OPTION1(lameAlgoQuality, 3)
MAKE_OPTION1(lameChannelMode, 0);
MAKE_OPTION3(bitrateManagementEnabled, false)
MAKE_OPTION1(bitrateManagementMinRate, 32)
MAKE_OPTION1(bitrateManagementMaxRate, 500)
MAKE_OPTION1(samplingRate, 0)
MAKE_OPTION3(neroAACEnable2Pass, true)
MAKE_OPTION1(neroAACProfile, 0)
MAKE_OPTION3(normalizationFilterEnabled, false)
MAKE_OPTION1(normalizationFilterMaxVolume, -50)
MAKE_OPTION1(toneAdjustBass, 0)
MAKE_OPTION1(toneAdjustTreble, 0)
MAKE_OPTION2(customParametersLAME, QString());
MAKE_OPTION2(customParametersOggEnc, QString());
MAKE_OPTION2(customParametersNeroAAC, QString());
MAKE_OPTION2(customParametersFLAC, QString());
MAKE_OPTION4(metaInfoPosition, UINT_MAX);
MAKE_OPTION4(maximumInstances, 0);
MAKE_OPTION2(customTempPath, QDesktopServices::storageLocation(QDesktopServices::TempLocation));
MAKE_OPTION3(customTempPathEnabled, false);
LAMEXP_MAKE_OPTION_I(licenseAccepted, 0)
LAMEXP_MAKE_OPTION_I(interfaceStyle, 0)
LAMEXP_MAKE_OPTION_I(compressionEncoder, 0)
LAMEXP_MAKE_OPTION_I(compressionRCMode, 0)
LAMEXP_MAKE_OPTION_I(compressionBitrate, 7)
LAMEXP_MAKE_OPTION_S(outputDir, QString())
LAMEXP_MAKE_OPTION_B(outputToSourceDir, false)
LAMEXP_MAKE_OPTION_B(prependRelativeSourcePath, false)
LAMEXP_MAKE_OPTION_B(writeMetaTags, true)
LAMEXP_MAKE_OPTION_B(createPlaylist, true)
LAMEXP_MAKE_OPTION_S(autoUpdateLastCheck, "Never")
LAMEXP_MAKE_OPTION_B(autoUpdateEnabled, true)
LAMEXP_MAKE_OPTION_B(autoUpdateCheckBeta, false)
LAMEXP_MAKE_OPTION_B(soundsEnabled, true)
LAMEXP_MAKE_OPTION_B(neroAacNotificationsEnabled, true)
LAMEXP_MAKE_OPTION_B(wmaDecoderNotificationsEnabled, true)
LAMEXP_MAKE_OPTION_B(dropBoxWidgetEnabled, true)
LAMEXP_MAKE_OPTION_B(shellIntegrationEnabled, !lamexp_portable_mode())
LAMEXP_MAKE_OPTION_S(currentLanguage, defaultLanguage())
LAMEXP_MAKE_OPTION_I(lameAlgoQuality, 3)
LAMEXP_MAKE_OPTION_I(lameChannelMode, 0);
LAMEXP_MAKE_OPTION_B(bitrateManagementEnabled, false)
LAMEXP_MAKE_OPTION_I(bitrateManagementMinRate, 32)
LAMEXP_MAKE_OPTION_I(bitrateManagementMaxRate, 500)
LAMEXP_MAKE_OPTION_I(samplingRate, 0)
LAMEXP_MAKE_OPTION_B(neroAACEnable2Pass, true)
LAMEXP_MAKE_OPTION_I(neroAACProfile, 0)
LAMEXP_MAKE_OPTION_B(normalizationFilterEnabled, false)
LAMEXP_MAKE_OPTION_I(normalizationFilterMaxVolume, -50)
LAMEXP_MAKE_OPTION_I(toneAdjustBass, 0)
LAMEXP_MAKE_OPTION_I(toneAdjustTreble, 0)
LAMEXP_MAKE_OPTION_S(customParametersLAME, QString());
LAMEXP_MAKE_OPTION_S(customParametersOggEnc, QString());
LAMEXP_MAKE_OPTION_S(customParametersNeroAAC, QString());
LAMEXP_MAKE_OPTION_S(customParametersFLAC, QString());
LAMEXP_MAKE_OPTION_U(metaInfoPosition, UINT_MAX);
LAMEXP_MAKE_OPTION_U(maximumInstances, 0);
LAMEXP_MAKE_OPTION_S(customTempPath, QDesktopServices::storageLocation(QDesktopServices::TempLocation));
LAMEXP_MAKE_OPTION_B(customTempPathEnabled, false);

View File

@ -26,22 +26,22 @@ class QString;
///////////////////////////////////////////////////////////////////////////////
#define MAKE_OPTION_DEC1(OPT) \
#define LAMEXP_MAKE_OPTION_I(OPT) \
int OPT(void); \
void OPT(int value); \
int OPT##Default(void);
#define MAKE_OPTION_DEC2(OPT) \
#define LAMEXP_MAKE_OPTION_S(OPT) \
QString OPT(void); \
void OPT(const QString &value); \
QString OPT##Default(void);
#define MAKE_OPTION_DEC3(OPT) \
#define LAMEXP_MAKE_OPTION_B(OPT) \
bool OPT(void); \
void OPT(bool value); \
bool OPT##Default(void);
#define MAKE_OPTION_DEC4(OPT) \
#define LAMEXP_MAKE_OPTION_U(OPT) \
unsigned int OPT(void); \
void OPT(unsigned int value); \
unsigned int OPT##Default(void);
@ -75,44 +75,45 @@ public:
static const int samplingRates[8];
//Getters & setters
MAKE_OPTION_DEC1(licenseAccepted);
MAKE_OPTION_DEC1(interfaceStyle);
MAKE_OPTION_DEC1(compressionEncoder);
MAKE_OPTION_DEC1(compressionRCMode);
MAKE_OPTION_DEC1(compressionBitrate);
MAKE_OPTION_DEC2(outputDir);
MAKE_OPTION_DEC3(outputToSourceDir);
MAKE_OPTION_DEC3(prependRelativeSourcePath);
MAKE_OPTION_DEC3(writeMetaTags);
MAKE_OPTION_DEC3(createPlaylist);
MAKE_OPTION_DEC2(autoUpdateLastCheck);
MAKE_OPTION_DEC3(autoUpdateEnabled);
MAKE_OPTION_DEC3(soundsEnabled);
MAKE_OPTION_DEC3(neroAacNotificationsEnabled);
MAKE_OPTION_DEC3(wmaDecoderNotificationsEnabled);
MAKE_OPTION_DEC3(dropBoxWidgetEnabled);
MAKE_OPTION_DEC3(shellIntegrationEnabled);
MAKE_OPTION_DEC2(currentLanguage);
MAKE_OPTION_DEC1(lameAlgoQuality);
MAKE_OPTION_DEC1(lameChannelMode);
MAKE_OPTION_DEC3(bitrateManagementEnabled);
MAKE_OPTION_DEC1(bitrateManagementMinRate);
MAKE_OPTION_DEC1(bitrateManagementMaxRate);
MAKE_OPTION_DEC1(samplingRate);
MAKE_OPTION_DEC3(neroAACEnable2Pass);
MAKE_OPTION_DEC1(neroAACProfile);
MAKE_OPTION_DEC3(normalizationFilterEnabled);
MAKE_OPTION_DEC1(normalizationFilterMaxVolume);
MAKE_OPTION_DEC1(toneAdjustBass);
MAKE_OPTION_DEC1(toneAdjustTreble);
MAKE_OPTION_DEC2(customParametersLAME);
MAKE_OPTION_DEC2(customParametersOggEnc);
MAKE_OPTION_DEC2(customParametersNeroAAC);
MAKE_OPTION_DEC2(customParametersFLAC);
MAKE_OPTION_DEC4(metaInfoPosition);
MAKE_OPTION_DEC4(maximumInstances);
MAKE_OPTION_DEC2(customTempPath);
MAKE_OPTION_DEC3(customTempPathEnabled);
LAMEXP_MAKE_OPTION_I(licenseAccepted);
LAMEXP_MAKE_OPTION_I(interfaceStyle);
LAMEXP_MAKE_OPTION_I(compressionEncoder);
LAMEXP_MAKE_OPTION_I(compressionRCMode);
LAMEXP_MAKE_OPTION_I(compressionBitrate);
LAMEXP_MAKE_OPTION_S(outputDir);
LAMEXP_MAKE_OPTION_B(outputToSourceDir);
LAMEXP_MAKE_OPTION_B(prependRelativeSourcePath);
LAMEXP_MAKE_OPTION_B(writeMetaTags);
LAMEXP_MAKE_OPTION_B(createPlaylist);
LAMEXP_MAKE_OPTION_S(autoUpdateLastCheck);
LAMEXP_MAKE_OPTION_B(autoUpdateEnabled);
LAMEXP_MAKE_OPTION_B(autoUpdateCheckBeta);
LAMEXP_MAKE_OPTION_B(soundsEnabled);
LAMEXP_MAKE_OPTION_B(neroAacNotificationsEnabled);
LAMEXP_MAKE_OPTION_B(wmaDecoderNotificationsEnabled);
LAMEXP_MAKE_OPTION_B(dropBoxWidgetEnabled);
LAMEXP_MAKE_OPTION_B(shellIntegrationEnabled);
LAMEXP_MAKE_OPTION_S(currentLanguage);
LAMEXP_MAKE_OPTION_I(lameAlgoQuality);
LAMEXP_MAKE_OPTION_I(lameChannelMode);
LAMEXP_MAKE_OPTION_B(bitrateManagementEnabled);
LAMEXP_MAKE_OPTION_I(bitrateManagementMinRate);
LAMEXP_MAKE_OPTION_I(bitrateManagementMaxRate);
LAMEXP_MAKE_OPTION_I(samplingRate);
LAMEXP_MAKE_OPTION_B(neroAACEnable2Pass);
LAMEXP_MAKE_OPTION_I(neroAACProfile);
LAMEXP_MAKE_OPTION_B(normalizationFilterEnabled);
LAMEXP_MAKE_OPTION_I(normalizationFilterMaxVolume);
LAMEXP_MAKE_OPTION_I(toneAdjustBass);
LAMEXP_MAKE_OPTION_I(toneAdjustTreble);
LAMEXP_MAKE_OPTION_S(customParametersLAME);
LAMEXP_MAKE_OPTION_S(customParametersOggEnc);
LAMEXP_MAKE_OPTION_S(customParametersNeroAAC);
LAMEXP_MAKE_OPTION_S(customParametersFLAC);
LAMEXP_MAKE_OPTION_U(metaInfoPosition);
LAMEXP_MAKE_OPTION_U(maximumInstances);
LAMEXP_MAKE_OPTION_S(customTempPath);
LAMEXP_MAKE_OPTION_B(customTempPathEnabled);
//Misc
void validate(void);
@ -125,7 +126,7 @@ private:
///////////////////////////////////////////////////////////////////////////////
#undef MAKE_OPTION_DEC1
#undef MAKE_OPTION_DEC2
#undef MAKE_OPTION_DEC3
#undef MAKE_OPTION_DEC4
#undef LAMEXP_MAKE_OPTION_I
#undef LAMEXP_MAKE_OPTION_S
#undef LAMEXP_MAKE_OPTION_B
#undef LAMEXP_MAKE_OPTION_U