diff options
Diffstat (limited to 'plugins/TabSRMM/src/msgdlgutils.cpp')
-rw-r--r-- | plugins/TabSRMM/src/msgdlgutils.cpp | 71 |
1 files changed, 0 insertions, 71 deletions
diff --git a/plugins/TabSRMM/src/msgdlgutils.cpp b/plugins/TabSRMM/src/msgdlgutils.cpp index e5c2cd2186..756ac3209d 100644 --- a/plugins/TabSRMM/src/msgdlgutils.cpp +++ b/plugins/TabSRMM/src/msgdlgutils.cpp @@ -1237,77 +1237,6 @@ void CTabBaseDlg::GetSendFormat() m_SendFormat = PluginConfig.m_SendFormat ? 1 : 0;
}
-/////////////////////////////////////////////////////////////////////////////////////////
-// get user - readable locale information for the currently selected
-// keyboard layout.
-//
-// GetLocaleInfo() should no longer be used on Vista and later
-
-void CTabBaseDlg::GetLocaleID(const wchar_t *szKLName)
-{
- wchar_t szLI[256], *stopped = nullptr;
- WORD wCtype2[3];
- BOOL fLocaleNotSet;
- BYTE szTest[4] = { 0xe4, 0xf6, 0xfc, 0 };
-
- szLI[0] = szLI[1] = 0;
-
- PARAFORMAT2 pf2;
- memset(&pf2, 0, sizeof(PARAFORMAT2));
- USHORT langID = (USHORT)wcstol(szKLName, &stopped, 16);
- m_lcid = MAKELCID(langID, 0);
- /*
- * Vista+: read ISO locale names from the registry
- */
- if (PluginConfig.m_bIsVista) {
- HKEY hKey = nullptr;
- wchar_t szKey[20];
- DWORD dwLID = wcstoul(szKLName, &stopped, 16);
-
- mir_snwprintf(szKey, L"%04.04x", LOWORD(dwLID));
- if (ERROR_SUCCESS == RegOpenKeyEx(HKEY_CLASSES_ROOT, L"MIME\\Database\\Rfc1766", 0, KEY_READ, &hKey)) {
- DWORD dwLength = 255;
- if (ERROR_SUCCESS == RegQueryValueEx(hKey, szKey, nullptr, nullptr, (unsigned char *)szLI, &dwLength)) {
- wchar_t* p;
-
- szLI[255] = 0;
- if ((p = wcschr(szLI, ';')) != nullptr)
- *p = 0;
- }
- RegCloseKey(hKey);
- }
- szLI[0] = towupper(szLI[0]);
- szLI[1] = towupper(szLI[1]);
- }
- else {
- GetLocaleInfo(m_lcid, LOCALE_SISO639LANGNAME, szLI, 10);
- wcsupr(szLI);
- }
- fLocaleNotSet = (m_lcID[0] == 0 && m_lcID[1] == 0);
- mir_snwprintf(m_lcID, szLI);
- GetStringTypeA(m_lcid, CT_CTYPE2, (char*)szTest, 3, wCtype2);
- pf2.cbSize = sizeof(pf2);
- pf2.dwMask = PFM_RTLPARA;
- m_message.SendMsg(EM_GETPARAFORMAT, 0, (LPARAM)&pf2);
- if (FindRTLLocale() && fLocaleNotSet) {
- if (wCtype2[0] == C2_RIGHTTOLEFT || wCtype2[1] == C2_RIGHTTOLEFT || wCtype2[2] == C2_RIGHTTOLEFT) {
- memset(&pf2, 0, sizeof(pf2));
- pf2.dwMask = PFM_RTLPARA;
- pf2.cbSize = sizeof(pf2);
- pf2.wEffects = PFE_RTLPARA;
- m_message.SendMsg(EM_SETPARAFORMAT, 0, (LPARAM)&pf2);
- }
- else {
- memset(&pf2, 0, sizeof(pf2));
- pf2.dwMask = PFM_RTLPARA;
- pf2.cbSize = sizeof(pf2);
- pf2.wEffects = 0;
- m_message.SendMsg(EM_SETPARAFORMAT, 0, (LPARAM)&pf2);
- }
- m_message.SendMsg(EM_SETLANGOPTIONS, 0, m_message.SendMsg(EM_GETLANGOPTIONS, 0, 0) & ~IMF_AUTOKEYBOARD);
- }
-}
-
void CSrmmWindow::LoadContactAvatar()
{
m_ace = Utils::loadAvatarFromAVS(m_bIsMeta ? db_mc_getSrmmSub(m_hContact) : m_hContact);
|