Enumerates language dlls strictly.

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

View File

@ -1152,8 +1152,11 @@ INT_PTR CDialogManage::CTabSkins::OnCommand(WPARAM wParam, LPARAM lParam)
else if (wParam == ID_CONTEXT_SKINMENU_MONITOR_AUTOSELECT || else if (wParam == ID_CONTEXT_SKINMENU_MONITOR_AUTOSELECT ||
wParam == ID_CONTEXT_SKINMENU_MONITOR_PRIMARY || wParam == ID_CONTEXT_SKINMENU_MONITOR_PRIMARY ||
wParam >= ID_MONITOR_FIRST && wParam <= ID_MONITOR_LAST) wParam >= ID_MONITOR_FIRST && wParam <= ID_MONITOR_LAST)
{
if (m_SkinWindow)
{ {
SendMessage(m_SkinWindow->GetWindow(), WM_COMMAND, wParam, 0); SendMessage(m_SkinWindow->GetWindow(), WM_COMMAND, wParam, 0);
}
break; break;
} }
@ -1645,7 +1648,9 @@ void CDialogManage::CTabSettings::Initialize()
if (pos) if (pos)
{ {
LCID lcid = (LCID)wcstoul(fd.cFileName, &pos, 10); 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 // Strip brackets in language name
std::wstring text = fd.cFileName; std::wstring text = fd.cFileName;