Enumerates language dlls strictly.

This commit is contained in:
spx 2011-10-03 22:39:24 +00:00
parent 98511e9be9
commit 0de3d9532d

View File

@ -1153,7 +1153,10 @@ INT_PTR CDialogManage::CTabSkins::OnCommand(WPARAM wParam, LPARAM lParam)
wParam == ID_CONTEXT_SKINMENU_MONITOR_PRIMARY ||
wParam >= ID_MONITOR_FIRST && wParam <= ID_MONITOR_LAST)
{
SendMessage(m_SkinWindow->GetWindow(), WM_COMMAND, wParam, 0);
if (m_SkinWindow)
{
SendMessage(m_SkinWindow->GetWindow(), WM_COMMAND, wParam, 0);
}
break;
}
@ -1645,7 +1648,9 @@ void CDialogManage::CTabSettings::Initialize()
if (pos)
{
LCID lcid = (LCID)wcstoul(fd.cFileName, &pos, 10);
if (GetLocaleInfo(lcid, LOCALE_SENGLISHLANGUAGENAME, fd.cFileName, MAX_PATH) > 0)
if (pos != fd.cFileName &&
_wcsicmp(pos, L".dll") == 0 &&
GetLocaleInfo(lcid, LOCALE_SENGLISHLANGUAGENAME, fd.cFileName, MAX_PATH) > 0)
{
// Strip brackets in language name
std::wstring text = fd.cFileName;