mirror of
https://github.com/Open-Shell/Open-Shell-Menu.git
synced 2026-04-13 20:28:31 +10:00
Revert "Auto-detect when setting is back to default value"
This reverts commit 998d83c15c.
This change was wrong and it shouldn't get merged in first place.
See https://github.com/Open-Shell/Open-Shell-Menu/pull/829#issuecomment-907667829 for further explanation.
Fixes #1135.
This commit is contained in:
@@ -793,10 +793,7 @@ CString CSettingsManager::LoadSettingsXml( const wchar_t *fname )
|
||||
}
|
||||
string.push_back(0);
|
||||
pSetting->value=CComVariant(&string[0]);
|
||||
if (pSetting->value==pSetting->defValue)
|
||||
pSetting->flags|=CSetting::FLAG_DEFAULT;
|
||||
else
|
||||
pSetting->flags&=~CSetting::FLAG_DEFAULT;
|
||||
pSetting->flags&=~CSetting::FLAG_DEFAULT;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -809,10 +806,7 @@ CString CSettingsManager::LoadSettingsXml( const wchar_t *fname )
|
||||
if (pSetting->type>=CSetting::TYPE_STRING)
|
||||
{
|
||||
pSetting->value=value;
|
||||
if (pSetting->value==pSetting->defValue)
|
||||
pSetting->flags|=CSetting::FLAG_DEFAULT;
|
||||
else
|
||||
pSetting->flags&=~CSetting::FLAG_DEFAULT;
|
||||
pSetting->flags&=~CSetting::FLAG_DEFAULT;
|
||||
}
|
||||
else if (pSetting->type==CSetting::TYPE_BOOL || (pSetting->type==CSetting::TYPE_INT && pSetting[1].type!=CSetting::TYPE_RADIO) || pSetting->type==CSetting::TYPE_HOTKEY || pSetting->type==CSetting::TYPE_HOTKEY_ANY || pSetting->type==CSetting::TYPE_COLOR)
|
||||
{
|
||||
@@ -821,10 +815,7 @@ CString CSettingsManager::LoadSettingsXml( const wchar_t *fname )
|
||||
pSetting->value=CComVariant(val?1:0);
|
||||
else
|
||||
pSetting->value=CComVariant(val);
|
||||
if (pSetting->value==pSetting->defValue)
|
||||
pSetting->flags|=CSetting::FLAG_DEFAULT;
|
||||
else
|
||||
pSetting->flags&=~CSetting::FLAG_DEFAULT;
|
||||
pSetting->flags&=~CSetting::FLAG_DEFAULT;
|
||||
}
|
||||
else if (pSetting->type==CSetting::TYPE_INT && pSetting[1].type==CSetting::TYPE_RADIO)
|
||||
{
|
||||
@@ -834,10 +825,7 @@ CString CSettingsManager::LoadSettingsXml( const wchar_t *fname )
|
||||
if (_wcsicmp(pRadio->name,value.bstrVal)==0)
|
||||
{
|
||||
pSetting->value=CComVariant(val);
|
||||
if (pSetting->value==pSetting->defValue)
|
||||
pSetting->flags|=CSetting::FLAG_DEFAULT;
|
||||
else
|
||||
pSetting->flags&=~CSetting::FLAG_DEFAULT;
|
||||
pSetting->flags&=~CSetting::FLAG_DEFAULT;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user