diff options
author | George Hazan <ghazan@miranda.im> | 2018-05-20 15:51:02 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-05-20 15:51:02 +0300 |
commit | 495c51c74e7d1595c882ae31becb7ab5b4093a08 (patch) | |
tree | 31afae70890e524bd14d0a8f38849a9d18128db3 /src | |
parent | 852b327946b004dc233a6fff4ac523c5ed8b3b45 (diff) |
let's avoid identifier 'hLangpack' wherever possible
Diffstat (limited to 'src')
-rw-r--r-- | src/core/stduserinfo/src/userinfo.cpp | 8 | ||||
-rw-r--r-- | src/mir_app/src/menu_clist.cpp | 2 | ||||
-rw-r--r-- | src/mir_app/src/menu_options.cpp | 2 | ||||
-rw-r--r-- | src/mir_app/src/menu_utils.cpp | 10 | ||||
-rw-r--r-- | src/mir_app/src/options.cpp | 18 |
5 files changed, 20 insertions, 20 deletions
diff --git a/src/core/stduserinfo/src/userinfo.cpp b/src/core/stduserinfo/src/userinfo.cpp index ab80204d29..5d65eac93c 100644 --- a/src/core/stduserinfo/src/userinfo.cpp +++ b/src/core/stduserinfo/src/userinfo.cpp @@ -66,12 +66,12 @@ struct DetailsData wchar_t* getTitle(OPTIONSDIALOGPAGE *p)
{
- return (p->flags & ODPF_DONTTRANSLATE) ? p->szTitle.w : TranslateW_LP(p->szTitle.w, p->hLangpack);
+ return (p->flags & ODPF_DONTTRANSLATE) ? p->szTitle.w : TranslateW_LP(p->szTitle.w, p->langId);
}
wchar_t* getTab(OPTIONSDIALOGPAGE *p)
{
- return (p->flags & ODPF_DONTTRANSLATE) ? p->szTab.w : TranslateW_LP(p->szTab.w, p->hLangpack);
+ return (p->flags & ODPF_DONTTRANSLATE) ? p->szTab.w : TranslateW_LP(p->szTab.w, p->langId);
}
static int PageSortProc(OPTIONSDIALOGPAGE *item1, OPTIONSDIALOGPAGE *item2)
@@ -155,7 +155,7 @@ static INT_PTR AddDetailsPage(WPARAM wParam, LPARAM lParam) dst->szTab.w = (odp->flags & ODPF_USERINFOTAB) ? mir_a2u(odp->szTab.a) : nullptr;
}
- dst->hLangpack = odp->hLangpack;
+ dst->langId = odp->langId;
dst->flags = odp->flags;
dst->dwInitParam = odp->dwInitParam;
opi->pageCount++;
@@ -288,7 +288,7 @@ static INT_PTR CALLBACK DlgProcDetails(HWND hwndDlg, UINT msg, WPARAM wParam, LP p.ptszTitle = odp[i].szTitle.w;
p.ptszTab = odp[i].szTab.w;
- p.hLangpack = odp[i].hLangpack;
+ p.hLangpack = odp[i].langId;
if (i && p.ptszTab && !mir_wstrcmp(dat->opd[i - 1].ptszTitle, p.ptszTitle)) {
p.hItem = dat->opd[i - 1].hItem;
diff --git a/src/mir_app/src/menu_clist.cpp b/src/mir_app/src/menu_clist.cpp index b7c1e66ea5..d2cbbfeac8 100644 --- a/src/mir_app/src/menu_clist.cpp +++ b/src/mir_app/src/menu_clist.cpp @@ -425,7 +425,7 @@ static INT_PTR StatusMenuCheckService(WPARAM wParam, LPARAM) if (reset || check) {
TMO_IntMenuItem *timiParent = MO_GetIntMenuItem(pimi->mi.root);
if (timiParent) {
- LPTSTR ptszName = TranslateW_LP(pimi->mi.hIcolibItem ? pimi->mi.name.w : LPGENW("Custom status"), pimi->mi.hLangpack);
+ LPTSTR ptszName = TranslateW_LP(pimi->mi.hIcolibItem ? pimi->mi.name.w : LPGENW("Custom status"), pimi->mi.langId);
timiParent = MO_GetIntMenuItem(pimi->mi.root);
diff --git a/src/mir_app/src/menu_options.cpp b/src/mir_app/src/menu_options.cpp index 2845b0f3fa..223d8b6e4a 100644 --- a/src/mir_app/src/menu_options.cpp +++ b/src/mir_app/src/menu_options.cpp @@ -506,7 +506,7 @@ public: m_service.SetTextA(szText); } - m_module.SetTextA(GetPluginNameByLangpack(iod->pimi->mi.hLangpack)); + m_module.SetTextA(GetPluginNameByLangpack(iod->pimi->mi.langId)); m_btnInsMenu.Enable(iod->pimi->mi.root == nullptr); m_btnDefault.Enable(mir_wstrcmp(iod->name, iod->defname) != 0); diff --git a/src/mir_app/src/menu_utils.cpp b/src/mir_app/src/menu_utils.cpp index c19e5eb90e..2aeaf57922 100644 --- a/src/mir_app/src/menu_utils.cpp +++ b/src/mir_app/src/menu_utils.cpp @@ -78,7 +78,7 @@ LPTSTR GetMenuItemText(TMO_IntMenuItem *pimi) if (pimi->mi.flags & CMIF_KEEPUNTRANSLATED)
return pimi->mi.name.w;
- return TranslateW_LP(pimi->mi.name.w, pimi->mi.hLangpack);
+ return TranslateW_LP(pimi->mi.name.w, pimi->mi.langId);
}
///////////////////////////////////////////////////////////////////////////////
@@ -610,18 +610,18 @@ MIR_APP_DLL(int) Menu_RemoveItem(HGENMENU hMenuItem) struct KillMenuItemsParam
{
KillMenuItemsParam(int _hLangpack) :
- hLangpack(_hLangpack),
+ langId(_hLangpack),
arItems(10)
{
}
- int hLangpack;
+ int langId;
LIST<TMO_IntMenuItem> arItems;
};
int KillMenuItems(TMO_IntMenuItem *pimi, KillMenuItemsParam* param)
{
- if (pimi->mi.hLangpack == param->hLangpack)
+ if (pimi->mi.langId == param->langId)
param->arItems.insert(pimi);
return FALSE;
}
@@ -689,7 +689,7 @@ MIR_APP_DLL(HGENMENU) Menu_CreateRoot(int hMenuObject, LPCTSTR ptszName, int pos CMenuItem mi;
mi.flags = CMIF_UNICODE;
mi.hIcolibItem = hIcoLib;
- mi.hLangpack = _hLang;
+ mi.langId = _hLang;
mi.name.w = (wchar_t*)ptszName;
mi.position = position;
return Menu_AddItem(hMenuObject, &mi, nullptr);
diff --git a/src/mir_app/src/options.cpp b/src/mir_app/src/options.cpp index 92002dca6e..7347b2e23f 100644 --- a/src/mir_app/src/options.cpp +++ b/src/mir_app/src/options.cpp @@ -206,7 +206,7 @@ struct OptionsPageData : public MZeroedObject assert(pDialog != nullptr);
flags = src.flags;
- hLangpack = src.hLangpack;
+ langId = src.langId;
if (src.flags & ODPF_UNICODE)
ptszTitle = mir_wstrdup(src.szTitle.w);
@@ -231,7 +231,7 @@ struct OptionsPageData : public MZeroedObject }
CDlgBase *pDialog;
- int hLangpack;
+ int langId;
ptrW ptszTitle, ptszGroup, ptszTab;
HTREEITEM hTreeItem;
bool bChanged, bInsideTab;
@@ -246,7 +246,7 @@ struct OptionsPageData : public MZeroedObject {
if (flags & ODPF_DONTTRANSLATE)
return ptszStr;
- return TranslateW_LP(ptszStr, hLangpack);
+ return TranslateW_LP(ptszStr, langId);
}
HWND CreateOptionWindow(HWND hWndParent) const
@@ -565,9 +565,9 @@ class COptionsDlg : public CDlgBase continue;
opd = m_arOpd[i];
- wchar_t *ptszGroup = TranslateW_LP(opd->ptszGroup, opd->hLangpack);
+ wchar_t *ptszGroup = TranslateW_LP(opd->ptszGroup, opd->langId);
wchar_t *ptszTitle = opd->getString(opd->ptszTitle), *useTitle;
- wchar_t *ptszTab = TranslateW_LP(opd->ptszTab, opd->hLangpack);
+ wchar_t *ptszTab = TranslateW_LP(opd->ptszTab, opd->langId);
tvis.hParent = nullptr;
useTitle = ptszTitle;
@@ -985,7 +985,7 @@ public: if (mir_wstrcmp(opd->ptszTitle, p->ptszTitle) || mir_wstrcmp(opd->ptszGroup, p->ptszGroup))
continue;
- tie.pszText = TranslateW_LP(p->ptszTab, p->hLangpack);
+ tie.pszText = TranslateW_LP(p->ptszTab, p->langId);
tie.lParam = i;
TabCtrl_InsertItem(hwndTab, pages, &tie);
if (!mir_wstrcmp(opd->ptszTab, p->ptszTab))
@@ -1139,7 +1139,7 @@ public: void KillModule(int _hLang)
{
for (auto &opd : m_arOpd) {
- if (opd->hLangpack != _hLang)
+ if (opd->langId != _hLang)
continue;
if (opd->pDialog != nullptr) {
@@ -1199,7 +1199,7 @@ MIR_APP_DLL(HWND) Options_OpenPage(const wchar_t *pszGroup, const wchar_t *pszPa /////////////////////////////////////////////////////////////////////////////////////////
-MIR_APP_DLL(int) Options_AddPage(WPARAM wParam, OPTIONSDIALOGPAGE *odp, int _hLangpack)
+MIR_APP_DLL(int) Options_AddPage(WPARAM wParam, OPTIONSDIALOGPAGE *odp, int langId)
{
OptionsPageList *pList = (OptionsPageList*)wParam;
if (odp == nullptr)
@@ -1207,7 +1207,7 @@ MIR_APP_DLL(int) Options_AddPage(WPARAM wParam, OPTIONSDIALOGPAGE *odp, int _hLa OptionsPage *dst = new OptionsPage();
memcpy(dst, odp, sizeof(OPTIONSDIALOGPAGE));
- dst->hLangpack = _hLangpack;
+ dst->langId = langId;
if (odp->szTitle.w != nullptr) {
if (odp->flags & ODPF_UNICODE)
|