Fixed Windows XP compatibility. RegSetKeyValue() isn't supported on system prior to Vista.
This commit is contained in:
parent
0e59d6f9a2
commit
199d132eb7
@ -25,7 +25,7 @@
|
||||
#define VER_LAMEXP_MAJOR 4
|
||||
#define VER_LAMEXP_MINOR_HI 0
|
||||
#define VER_LAMEXP_MINOR_LO 0
|
||||
#define VER_LAMEXP_BUILD 276
|
||||
#define VER_LAMEXP_BUILD 277
|
||||
#define VER_LAMEXP_SUFFIX Beta-2
|
||||
|
||||
/*
|
||||
|
@ -157,7 +157,14 @@ int AboutDialog::exec()
|
||||
{
|
||||
if(m_settings->soundsEnabled())
|
||||
{
|
||||
if(!m_firstShow || !playResoureSound("imageres.dll", 5080, true))
|
||||
if(m_firstShow)
|
||||
{
|
||||
if(!playResoureSound("imageres.dll", 5080, true))
|
||||
{
|
||||
PlaySound(TEXT("SystemStart"), NULL, SND_ALIAS | SND_ASYNC);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
PlaySound(MAKEINTRESOURCE(IDR_WAVE_ABOUT), GetModuleHandle(NULL), SND_RESOURCE | SND_ASYNC);
|
||||
}
|
||||
|
@ -295,7 +295,7 @@ MainWindow::MainWindow(FileListModel *fileListModel, AudioFileModel *metaInfo, S
|
||||
actionDisableNeroAacNotifications->setChecked(!m_settings->neroAacNotificationsEnabled());
|
||||
actionDisableWmaDecoderNotifications->setChecked(!m_settings->wmaDecoderNotificationsEnabled());
|
||||
actionDisableShellIntegration->setChecked(!m_settings->shellIntegrationEnabled());
|
||||
actionDisableShellIntegration->setVisible(!lamexp_portable_mode());
|
||||
actionDisableShellIntegration->setDisabled(lamexp_portable_mode() && actionDisableShellIntegration->isChecked());
|
||||
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)));
|
||||
@ -2164,4 +2164,9 @@ void MainWindow::disableShellIntegrationActionTriggered(bool checked)
|
||||
}
|
||||
|
||||
actionDisableShellIntegration->setChecked(!m_settings->shellIntegrationEnabled());
|
||||
|
||||
if(lamexp_portable_mode() && actionDisableShellIntegration->isChecked())
|
||||
{
|
||||
actionDisableShellIntegration->setEnabled(false);
|
||||
}
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ static const char *g_lamexpFileType = "LameXP.SupportedAudioFile";
|
||||
QMutex ShellIntegration::m_mutex;
|
||||
|
||||
//Macros
|
||||
#define REG_WRITE_STRING(KEY, STR) RegSetKeyValue(key, NULL, NULL, REG_SZ, QWCHAR(STR), (STR.size() + 1) * sizeof(wchar_t))
|
||||
#define REG_WRITE_STRING(KEY, STR) RegSetValueEx(key, NULL, NULL, REG_SZ, reinterpret_cast<const BYTE*>(STR.utf16()), (STR.size() + 1) * sizeof(wchar_t))
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
// Constructor
|
||||
@ -247,7 +247,7 @@ QStringList *ShellIntegration::detectTypes(const QString &lamexpFileType, const
|
||||
{
|
||||
if(RegCreateKeyEx(HKEY_CURRENT_USER, QWCHAR(QString("Software\\Classes\\%1").arg(currentExt)), NULL, NULL, REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, &key, NULL) == ERROR_SUCCESS)
|
||||
{
|
||||
RegSetKeyValue(key, NULL, NULL, REG_SZ, QWCHAR(lamexpFileType), (lamexpFileType.size() + 1) * sizeof(wchar_t));
|
||||
REG_WRITE_STRING(key, lamexpFileType);
|
||||
RegCloseKey(key);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user