From f719c8b921c7a46b76453476204224d40c682914 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 11 Jul 2018 21:32:58 +0300 Subject: int hLangpack/m_hLang removed and replaced with HPLUGIN --- protocols/JabberG/src/jabber_chat.cpp | 4 ++-- protocols/JabberG/src/jabber_icolib.cpp | 2 +- protocols/JabberG/src/jabber_menu.cpp | 12 ++++++------ protocols/JabberG/src/jabber_opt.cpp | 2 +- protocols/JabberG/src/jabber_privacy.cpp | 4 ++-- protocols/JabberG/src/jabber_proto.cpp | 2 +- protocols/JabberG/src/jabber_userinfo.cpp | 3 +-- protocols/JabberG/src/jabber_vcard.cpp | 3 +-- protocols/JabberG/src/jabber_xstatus.cpp | 2 +- 9 files changed, 16 insertions(+), 18 deletions(-) (limited to 'protocols/JabberG') diff --git a/protocols/JabberG/src/jabber_chat.cpp b/protocols/JabberG/src/jabber_chat.cpp index 7220bab19c..d587c3a03b 100644 --- a/protocols/JabberG/src/jabber_chat.cpp +++ b/protocols/JabberG/src/jabber_chat.cpp @@ -540,7 +540,7 @@ int CJabberProto::JabberGcMenuHook(WPARAM, LPARAM lParam) if (m_ThreadInfo->jabberServerCaps & JABBER_CAPS_PRIVATE_STORAGE) sttSetupGcMenuItem(_countof(sttLogListItems), sttLogListItems, IDM_BOOKMARKS, FALSE); } - Chat_AddMenuItems(gcmi->hMenu, _countof(sttLogListItems), sttLogListItems, g_plugin.m_hLang); + Chat_AddMenuItems(gcmi->hMenu, _countof(sttLogListItems), sttLogListItems, &g_plugin); } else if (gcmi->Type == MENU_ON_NICKLIST) { static DWORD sttRJidItems[] = { IDM_RJID_VCARD, IDM_RJID_ADD, IDM_RJID_COPY, 0 }; @@ -615,7 +615,7 @@ int CJabberProto::JabberGcMenuHook(WPARAM, LPARAM lParam) sttListItems[2].uType = 0; sttShowGcMenuItems(_countof(sttListItems), sttListItems, sttRJidItems, 0); } - Chat_AddMenuItems(gcmi->hMenu, _countof(sttListItems), sttListItems, g_plugin.m_hLang); + Chat_AddMenuItems(gcmi->hMenu, _countof(sttListItems), sttListItems, &g_plugin); } return 0; diff --git a/protocols/JabberG/src/jabber_icolib.cpp b/protocols/JabberG/src/jabber_icolib.cpp index b4b07af1d3..e012929c0e 100644 --- a/protocols/JabberG/src/jabber_icolib.cpp +++ b/protocols/JabberG/src/jabber_icolib.cpp @@ -126,7 +126,7 @@ void CIconPool::RegisterIcon(const char *name, wchar_t *filename, int iconid, wc sid.description.w = szDescription; sid.flags = SIDF_ALL_UNICODE; sid.iDefaultIndex = iconid; - item->m_hIcolibItem = IcoLib_AddIcon(&sid, g_plugin.m_hLang); + item->m_hIcolibItem = IcoLib_AddIcon(&sid, &g_plugin); m_items.insert(item); } diff --git a/protocols/JabberG/src/jabber_menu.cpp b/protocols/JabberG/src/jabber_menu.cpp index 7f5360de00..c75b40b146 100644 --- a/protocols/JabberG/src/jabber_menu.cpp +++ b/protocols/JabberG/src/jabber_menu.cpp @@ -152,7 +152,7 @@ void g_MenuInit(void) hChooserMenu = Menu_AddObject("JabberAccountChooser", LPGEN("Jabber account chooser"), nullptr, "Jabber/MenuChoose"); { - CMenuItem mi(g_plugin); + CMenuItem mi(&g_plugin); mi.name.a = "Cancel"; mi.position = 9999999; mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_DELETE); @@ -162,7 +162,7 @@ void g_MenuInit(void) ////////////////////////////////////////////////////////////////////////////////////// // Contact menu initialization - CMenuItem mi(g_plugin); + CMenuItem mi(&g_plugin); mi.flags = CMIF_UNMOVABLE; // "Convert Chat/Contact" @@ -370,7 +370,7 @@ int CJabberProto::OnPrebuildContactMenu(WPARAM hContact, LPARAM) } char text[256]; - CMenuItem mi(g_plugin); + CMenuItem mi(&g_plugin); mi.flags = CMIF_SYSTEM; mi.pszService = text; @@ -530,7 +530,7 @@ INT_PTR __cdecl CJabberProto::OnMenuBookmarkAdd(WPARAM hContact, LPARAM) void CJabberProto::OnBuildProtoMenu() { - CMenuItem mi(g_plugin); + CMenuItem mi(&g_plugin); mi.root = m_hMenuRoot = Menu_GetProtocolRoot(this); mi.flags = CMIF_UNMOVABLE; @@ -659,7 +659,7 @@ void CJabberProto::BuildPriorityMenu() if (m_hMenuPriorityRoot) Menu_RemoveItem(m_hMenuPriorityRoot); - CMenuItem mi(g_plugin); + CMenuItem mi(&g_plugin); mi.pszService = nullptr; mi.position = 200006; mi.root = m_hMenuRoot; @@ -729,7 +729,7 @@ void CJabberProto::GlobalMenuInit() ////////////////////////////////////////////////////////////////////////////////////// // Account chooser menu - CMenuItem mi(g_plugin); + CMenuItem mi(&g_plugin); mi.flags = CMIF_UNMOVABLE | CMIF_UNICODE | CMIF_KEEPUNTRANSLATED; mi.position = iChooserMenuPos++; mi.name.w = m_tszUserName; diff --git a/protocols/JabberG/src/jabber_opt.cpp b/protocols/JabberG/src/jabber_opt.cpp index 47f6f7f8f8..9709694180 100755 --- a/protocols/JabberG/src/jabber_opt.cpp +++ b/protocols/JabberG/src/jabber_opt.cpp @@ -1498,7 +1498,7 @@ INT_PTR __cdecl CJabberProto::OnMenuHandleRosterControl(WPARAM, LPARAM) int CJabberProto::OnOptionsInit(WPARAM wParam, LPARAM) { - OPTIONSDIALOGPAGE odp = { 0 }; + OPTIONSDIALOGPAGE odp = {}; odp.szGroup.w = LPGENW("Network"); odp.szTitle.w = m_tszUserName; odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE | ODPF_DONTTRANSLATE; diff --git a/protocols/JabberG/src/jabber_privacy.cpp b/protocols/JabberG/src/jabber_privacy.cpp index c7a7325a95..9a174b65fd 100644 --- a/protocols/JabberG/src/jabber_privacy.cpp +++ b/protocols/JabberG/src/jabber_privacy.cpp @@ -2092,7 +2092,7 @@ INT_PTR __cdecl CJabberProto::menuSetPrivacyList(WPARAM, LPARAM, LPARAM iList) void CJabberProto::BuildPrivacyMenu() { - CMenuItem mi(g_plugin); + CMenuItem mi(&g_plugin); mi.position = 200005; mi.hIcolibItem = GetIconHandle(IDI_AGENTS); mi.flags = CMIF_UNMOVABLE | CMIF_HIDDEN; @@ -2122,7 +2122,7 @@ void CJabberProto::BuildPrivacyListsMenu(bool bDeleteOld) char srvFce[MAX_PATH + 64]; - CMenuItem mi(g_plugin); + CMenuItem mi(&g_plugin); mi.position = 2000040000; mi.flags = CMIF_UNMOVABLE | CMIF_UNICODE; mi.root = m_hPrivacyMenuRoot; diff --git a/protocols/JabberG/src/jabber_proto.cpp b/protocols/JabberG/src/jabber_proto.cpp index 3f56ab5e9e..424800517d 100755 --- a/protocols/JabberG/src/jabber_proto.cpp +++ b/protocols/JabberG/src/jabber_proto.cpp @@ -287,7 +287,7 @@ void CJabberProto::OnModulesLoaded() sid.hIcon = LoadIconEx("main"); sid.flags = MBF_HIDDEN; sid.szTooltip = LPGEN("Jabber Resource"); - Srmm_AddIcon(&sid, g_plugin.m_hLang); + Srmm_AddIcon(&sid, &g_plugin); HookProtoEvent(ME_MSG_ICONPRESSED, &CJabberProto::OnProcessSrmmIconClick); HookProtoEvent(ME_MSG_WINDOWEVENT, &CJabberProto::OnProcessSrmmEvent); diff --git a/protocols/JabberG/src/jabber_userinfo.cpp b/protocols/JabberG/src/jabber_userinfo.cpp index 7aa1c6adba..354ef9d9c4 100755 --- a/protocols/JabberG/src/jabber_userinfo.cpp +++ b/protocols/JabberG/src/jabber_userinfo.cpp @@ -821,8 +821,7 @@ int CJabberProto::OnUserInfoInit(WPARAM wParam, LPARAM lParam) char *szProto = GetContactProto(hContact); if (szProto != nullptr && !mir_strcmp(szProto, m_szModuleName)) { - OPTIONSDIALOGPAGE odp = { 0 }; - odp.hInstance = g_plugin.getInst(); + OPTIONSDIALOGPAGE odp = {}; odp.dwInitParam = (LPARAM)this; odp.pfnDlgProc = JabberUserInfoDlgProc; diff --git a/protocols/JabberG/src/jabber_vcard.cpp b/protocols/JabberG/src/jabber_vcard.cpp index 09fb8bcd3d..b1c2244b2c 100644 --- a/protocols/JabberG/src/jabber_vcard.cpp +++ b/protocols/JabberG/src/jabber_vcard.cpp @@ -1178,8 +1178,7 @@ void CJabberProto::OnUserInfoInit_VCard(WPARAM wParam, LPARAM) m_bPhotoChanged = FALSE; m_szPhotoFileName[0] = 0; - OPTIONSDIALOGPAGE odp = { 0 }; - odp.hInstance = g_plugin.getInst(); + OPTIONSDIALOGPAGE odp = {}; odp.dwInitParam = (LPARAM)this; odp.flags = ODPF_UNICODE | ODPF_USERINFOTAB | ODPF_DONTTRANSLATE; odp.szTitle.w = m_tszUserName; diff --git a/protocols/JabberG/src/jabber_xstatus.cpp b/protocols/JabberG/src/jabber_xstatus.cpp index 5ff0f13e07..8530452f9a 100644 --- a/protocols/JabberG/src/jabber_xstatus.cpp +++ b/protocols/JabberG/src/jabber_xstatus.cpp @@ -470,7 +470,7 @@ void CPepGuiService::RebuildMenu() char szService[128]; mir_snprintf(szService, "/AdvStatusSet/%s", m_name); - CMenuItem mi(g_plugin); + CMenuItem mi(&g_plugin); mi.root = hJabberRoot; mi.pszService = szService; mi.position = 200010; -- cgit v1.2.3