summaryrefslogtreecommitdiff
path: root/src/mir_core
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-05-22 16:10:40 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-05-22 16:10:40 +0300
commit6ccfdcb25f2bb3c7a4e39a055bb392c0d4bfa905 (patch)
treeb53333d819f9afe5fd44dd874cfc0f51189122f8 /src/mir_core
parent295ca5e99da922699f1bae398f0411f0c99df5f6 (diff)
m_langpack.h unbound from hLangpack
Diffstat (limited to 'src/mir_core')
-rw-r--r--src/mir_core/src/CCtrlPages.cpp4
-rw-r--r--src/mir_core/src/CCtrlTreeView.cpp2
-rw-r--r--src/mir_core/src/bitmaps.cpp2
-rw-r--r--src/mir_core/src/langpack.cpp2
-rw-r--r--src/mir_core/src/miranda.cpp3
-rw-r--r--src/mir_core/src/timezones.cpp2
6 files changed, 6 insertions, 9 deletions
diff --git a/src/mir_core/src/CCtrlPages.cpp b/src/mir_core/src/CCtrlPages.cpp
index d51b7af35a..f14d43f786 100644
--- a/src/mir_core/src/CCtrlPages.cpp
+++ b/src/mir_core/src/CCtrlPages.cpp
@@ -214,7 +214,7 @@ void CCtrlPages::InsertPage(TPageInfo *pPage)
TCITEM tci = { 0 };
tci.mask = TCIF_PARAM | TCIF_TEXT;
tci.lParam = (LPARAM)pPage;
- tci.pszText = TranslateW(pPage->m_ptszHeader);
+ tci.pszText = TranslateW_LP(pPage->m_ptszHeader);
if (pPage->m_hIcon) {
if (!m_hIml) {
m_hIml = ImageList_Create(16, 16, ILC_COLOR32 | ILC_MASK, 0, 1);
@@ -272,7 +272,7 @@ void CCtrlPages::SwapPages(int idx1, int idx2)
TCITEM tci = { 0 };
tci.mask = TCIF_PARAM | TCIF_TEXT;
tci.lParam = (LPARAM)p1;
- tci.pszText = TranslateW(p1->m_ptszHeader);
+ tci.pszText = TranslateW_LP(p1->m_ptszHeader);
TabCtrl_InsertItem(m_hwnd, idx2, &tci);
}
diff --git a/src/mir_core/src/CCtrlTreeView.cpp b/src/mir_core/src/CCtrlTreeView.cpp
index dca6c1b726..4c7daa0cfd 100644
--- a/src/mir_core/src/CCtrlTreeView.cpp
+++ b/src/mir_core/src/CCtrlTreeView.cpp
@@ -335,7 +335,7 @@ void CCtrlTreeView::TranslateItem(HTREEITEM hItem)
TVITEMEX tvi;
wchar_t buf[128];
GetItem(hItem, &tvi, buf, _countof(buf));
- tvi.pszText = TranslateW(tvi.pszText);
+ tvi.pszText = TranslateW_LP(tvi.pszText);
SetItem(&tvi);
}
diff --git a/src/mir_core/src/bitmaps.cpp b/src/mir_core/src/bitmaps.cpp
index 93d5946582..7c7024ba57 100644
--- a/src/mir_core/src/bitmaps.cpp
+++ b/src/mir_core/src/bitmaps.cpp
@@ -45,5 +45,5 @@ MIR_CORE_DLL(void) Bitmap_GetFilter(wchar_t *dest, size_t destLen)
L"%s (*.jpg;*.jpeg)%c*.JPG;*.JPEG%c"
L"%s (*.gif)%c*.GIF%c"
L"%s (*.png)%c*.PNG%c%c",
- TranslateT("All Files"), 0, 0, TranslateT("Windows bitmaps"), 0, 0, TranslateT("JPEG bitmaps"), 0, 0, TranslateT("GIF bitmaps"), 0, 0, TranslateT("PNG bitmaps"), 0, 0, 0);
+ TranslateW_LP(L"All Files"), 0, 0, TranslateW_LP(L"Windows bitmaps"), 0, 0, TranslateW_LP(L"JPEG bitmaps"), 0, 0, TranslateW_LP(L"GIF bitmaps"), 0, 0, TranslateW_LP(L"PNG bitmaps"), 0, 0, 0);
}
diff --git a/src/mir_core/src/langpack.cpp b/src/mir_core/src/langpack.cpp
index ffe7fd40f7..bb4ff63b9d 100644
--- a/src/mir_core/src/langpack.cpp
+++ b/src/mir_core/src/langpack.cpp
@@ -503,7 +503,7 @@ MIR_CORE_DLL(wchar_t*) Langpack_PcharToTchar(const char *pszStr)
wchar_t *result = (wchar_t*)alloca((len + 1)*sizeof(wchar_t));
MultiByteToWideChar(Langpack_GetDefaultCodePage(), 0, pszStr, -1, result, len);
result[len] = 0;
- return mir_wstrdup(TranslateW(result));
+ return mir_wstrdup(TranslateW_LP(result));
}
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/mir_core/src/miranda.cpp b/src/mir_core/src/miranda.cpp
index 80d28cf277..e4f0b50fe8 100644
--- a/src/mir_core/src/miranda.cpp
+++ b/src/mir_core/src/miranda.cpp
@@ -40,9 +40,6 @@ void InitMetaContacts();
void InitTimeZones();
void InitWinver();
-static int _hLang = 0;
-int &hLangpack(_hLang);
-
HINSTANCE g_hInst = nullptr;
HCURSOR g_hCursorNS, g_hCursorWE;
diff --git a/src/mir_core/src/timezones.cpp b/src/mir_core/src/timezones.cpp
index db0d4f5a1b..b47cc144b8 100644
--- a/src/mir_core/src/timezones.cpp
+++ b/src/mir_core/src/timezones.cpp
@@ -437,7 +437,7 @@ MIR_CORE_DLL(int) TimeZone_PrepareList(MCONTACT hContact, LPCSTR szModule, HWND
if (lstMsg == nullptr)
return 0;
- SendMessage(hWnd, lstMsg->addStr, 0, (LPARAM)TranslateT("<unspecified>"));
+ SendMessage(hWnd, lstMsg->addStr, 0, (LPARAM)TranslateW_LP(L"<unspecified>"));
for (auto &it : g_timezonesBias) {
SendMessage(hWnd, lstMsg->addStr, 0, (LPARAM)it->szDisplay);