summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
Diffstat (limited to 'protocols')
-rw-r--r--protocols/Discord/src/groupchat.cpp2
-rw-r--r--protocols/Discord/src/menus.cpp4
-rw-r--r--protocols/Discord/src/options.cpp2
-rw-r--r--protocols/EmLanProto/src/amdproto.cpp3
-rw-r--r--protocols/FacebookRM/src/chat.cpp4
-rw-r--r--protocols/FacebookRM/src/proto.cpp3
-rw-r--r--protocols/FacebookRM/src/theme.cpp4
-rw-r--r--protocols/Gadu-Gadu/src/dialogs.cpp6
-rw-r--r--protocols/Gadu-Gadu/src/gg.cpp4
-rw-r--r--protocols/Gadu-Gadu/src/groupchat.cpp2
-rw-r--r--protocols/Gadu-Gadu/src/image.cpp2
-rw-r--r--protocols/Gadu-Gadu/src/import.cpp2
-rw-r--r--protocols/Gadu-Gadu/src/links.cpp4
-rw-r--r--protocols/Gadu-Gadu/src/sessions.cpp2
-rw-r--r--protocols/ICQCorp/src/options.cpp1
-rw-r--r--protocols/ICQCorp/src/user.cpp3
-rw-r--r--protocols/IRCG/src/options.cpp2
-rw-r--r--protocols/IRCG/src/services.cpp8
-rw-r--r--protocols/IRCG/src/userinfo.cpp3
-rw-r--r--protocols/IcqOscarJ/src/icq_menu.cpp2
-rw-r--r--protocols/IcqOscarJ/src/icq_opts.cpp3
-rw-r--r--protocols/IcqOscarJ/src/icq_xstatus.cpp4
-rw-r--r--protocols/IcqOscarJ/src/userinfotab.cpp3
-rw-r--r--protocols/JabberG/src/jabber_chat.cpp4
-rw-r--r--protocols/JabberG/src/jabber_icolib.cpp2
-rw-r--r--protocols/JabberG/src/jabber_menu.cpp12
-rwxr-xr-xprotocols/JabberG/src/jabber_opt.cpp2
-rw-r--r--protocols/JabberG/src/jabber_privacy.cpp4
-rwxr-xr-xprotocols/JabberG/src/jabber_proto.cpp2
-rwxr-xr-xprotocols/JabberG/src/jabber_userinfo.cpp3
-rw-r--r--protocols/JabberG/src/jabber_vcard.cpp3
-rw-r--r--protocols/JabberG/src/jabber_xstatus.cpp2
-rw-r--r--protocols/MRA/src/MraPopUp.cpp3
-rw-r--r--protocols/MRA/src/Mra_menus.cpp6
-rw-r--r--protocols/MRA/src/Mra_options.cpp3
-rw-r--r--protocols/MSN/src/msn_chat.cpp6
-rw-r--r--protocols/MSN/src/msn_menu.cpp4
-rw-r--r--protocols/MSN/src/msn_opts.cpp3
-rw-r--r--protocols/Omegle/src/proto.cpp3
-rw-r--r--protocols/Sametime/src/conference.cpp2
-rw-r--r--protocols/Sametime/src/options.cpp3
-rw-r--r--protocols/Sametime/src/sametime_session.cpp2
-rw-r--r--protocols/SkypeWeb/src/skype_chatrooms.cpp4
-rw-r--r--protocols/SkypeWeb/src/skype_menus.cpp4
-rw-r--r--protocols/SkypeWeb/src/skype_options.cpp1
-rw-r--r--protocols/Steam/src/steam_menus.cpp4
-rw-r--r--protocols/Steam/src/steam_options.cpp3
-rw-r--r--protocols/Tox/src/tox_contacts.cpp1
-rw-r--r--protocols/Tox/src/tox_menus.cpp2
-rw-r--r--protocols/Tox/src/tox_options.cpp2
-rw-r--r--protocols/Twitter/src/proto.cpp5
-rw-r--r--protocols/Twitter/src/theme.cpp2
-rw-r--r--protocols/VKontakte/src/vk_chats.cpp4
-rw-r--r--protocols/VKontakte/src/vk_options.cpp2
-rw-r--r--protocols/VKontakte/src/vk_proto.cpp2
55 files changed, 79 insertions, 99 deletions
diff --git a/protocols/Discord/src/groupchat.cpp b/protocols/Discord/src/groupchat.cpp
index 2c4b177313..942100d58a 100644
--- a/protocols/Discord/src/groupchat.cpp
+++ b/protocols/Discord/src/groupchat.cpp
@@ -61,7 +61,7 @@ int CDiscordProto::GroupchatMenuHook(WPARAM, LPARAM lParam)
return 0;
if (gcmi->Type == MENU_ON_LOG)
- Chat_AddMenuItems(gcmi->hMenu, _countof(sttLogListItems), sttLogListItems, g_plugin.m_hLang);
+ Chat_AddMenuItems(gcmi->hMenu, _countof(sttLogListItems), sttLogListItems, &g_plugin);
return 0;
}
diff --git a/protocols/Discord/src/menus.cpp b/protocols/Discord/src/menus.cpp
index 6fb53b5aa4..2cd87eef15 100644
--- a/protocols/Discord/src/menus.cpp
+++ b/protocols/Discord/src/menus.cpp
@@ -89,7 +89,7 @@ int CDiscordProto::OnMenuPrebuild(WPARAM hContact, LPARAM)
void CDiscordProto::InitMenus()
{
- CMenuItem mi(g_plugin);
+ CMenuItem mi(&g_plugin);
mi.root = Menu_GetProtocolRoot(this);
mi.flags = CMIF_UNMOVABLE;
@@ -109,7 +109,7 @@ void CDiscordProto::InitMenus()
Menu_AddProtoMenuItem(&mi, m_szModuleName);
// Contact menu items
- CMenuItem mi2(g_plugin);
+ CMenuItem mi2(&g_plugin);
mi2.pszService = "/LeaveGuild";
CreateProtoService(mi2.pszService, &CDiscordProto::OnMenuLeaveGuild);
mi2.name.a = LPGEN("Leave guild");
diff --git a/protocols/Discord/src/options.cpp b/protocols/Discord/src/options.cpp
index 04947f76e2..165535591c 100644
--- a/protocols/Discord/src/options.cpp
+++ b/protocols/Discord/src/options.cpp
@@ -70,7 +70,7 @@ INT_PTR CDiscordProto::SvcCreateAccMgrUI(WPARAM, LPARAM hwndParent)
int CDiscordProto::OnOptionsInit(WPARAM wParam, LPARAM)
{
- OPTIONSDIALOGPAGE odp = { 0 };
+ OPTIONSDIALOGPAGE odp = {};
odp.szTitle.w = m_tszUserName;
odp.flags = ODPF_UNICODE;
odp.szGroup.w = LPGENW("Network");
diff --git a/protocols/EmLanProto/src/amdproto.cpp b/protocols/EmLanProto/src/amdproto.cpp
index 61e215590c..b642120741 100644
--- a/protocols/EmLanProto/src/amdproto.cpp
+++ b/protocols/EmLanProto/src/amdproto.cpp
@@ -273,9 +273,8 @@ INT_PTR CALLBACK EMPDlgProcMainOpts(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPAR
int __cdecl EMPCreateOptionsDlg(WPARAM wParam, LPARAM)
{
- OPTIONSDIALOGPAGE odp = { 0 };
+ OPTIONSDIALOGPAGE odp = {};
odp.position = 100000000;
- odp.hInstance = g_plugin.getInst();
odp.pszTemplate = MAKEINTRESOURCEA(IDD_EMP_FORM_OPT);
odp.szTitle.a = LPGEN("E-mage LAN protocol");
odp.szGroup.a = LPGEN("Network");
diff --git a/protocols/FacebookRM/src/chat.cpp b/protocols/FacebookRM/src/chat.cpp
index 077a6b4113..54d6309dfe 100644
--- a/protocols/FacebookRM/src/chat.cpp
+++ b/protocols/FacebookRM/src/chat.cpp
@@ -339,9 +339,9 @@ int FacebookProto::OnGCMenuHook(WPARAM, LPARAM lParam)
return 0;
if (gcmi->Type == MENU_ON_LOG)
- Chat_AddMenuItems(gcmi->hMenu, _countof(LogMenuItems), LogMenuItems, g_plugin.m_hLang);
+ Chat_AddMenuItems(gcmi->hMenu, _countof(LogMenuItems), LogMenuItems, &g_plugin);
else if (gcmi->Type == MENU_ON_NICKLIST)
- Chat_AddMenuItems(gcmi->hMenu, _countof(NickMenuItems), NickMenuItems, g_plugin.m_hLang);
+ Chat_AddMenuItems(gcmi->hMenu, _countof(NickMenuItems), NickMenuItems, &g_plugin);
return 0;
}
diff --git a/protocols/FacebookRM/src/proto.cpp b/protocols/FacebookRM/src/proto.cpp
index 87e5980b7d..0f975b148a 100644
--- a/protocols/FacebookRM/src/proto.cpp
+++ b/protocols/FacebookRM/src/proto.cpp
@@ -414,8 +414,7 @@ void FacebookProto::OnShutdown()
int FacebookProto::OnOptionsInit(WPARAM wParam, LPARAM)
{
- OPTIONSDIALOGPAGE odp = { 0 };
- odp.hInstance = g_plugin.getInst();
+ OPTIONSDIALOGPAGE odp = {};
odp.szTitle.w = m_tszUserName;
odp.dwInitParam = LPARAM(this);
odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE | ODPF_DONTTRANSLATE;
diff --git a/protocols/FacebookRM/src/theme.cpp b/protocols/FacebookRM/src/theme.cpp
index ec95b927b0..20f70136b9 100644
--- a/protocols/FacebookRM/src/theme.cpp
+++ b/protocols/FacebookRM/src/theme.cpp
@@ -95,7 +95,7 @@ void InitContactMenus()
{
HookEvent(ME_CLIST_PREBUILDCONTACTMENU, PrebuildContactMenu);
- CMenuItem mi(g_plugin);
+ CMenuItem mi(&g_plugin);
SET_UID(mi, 0x4f006492, 0x9fe5, 0x4d10, 0x88, 0xce, 0x47, 0x53, 0xba, 0x27, 0xe9, 0xc9);
mi.position = -2000006000;
@@ -193,7 +193,7 @@ int FacebookProto::OnPrebuildContactMenu(WPARAM wParam, LPARAM)
void FacebookProto::OnBuildProtoMenu()
{
- CMenuItem mi(g_plugin);
+ CMenuItem mi(&g_plugin);
mi.position = 201001;
mi.root = Menu_GetProtocolRoot(this);
diff --git a/protocols/Gadu-Gadu/src/dialogs.cpp b/protocols/Gadu-Gadu/src/dialogs.cpp
index 2f214dc9ce..64cbbea445 100644
--- a/protocols/Gadu-Gadu/src/dialogs.cpp
+++ b/protocols/Gadu-Gadu/src/dialogs.cpp
@@ -693,10 +693,9 @@ static INT_PTR CALLBACK gg_detailsdlgproc(HWND hwndDlg, UINT msg, WPARAM wParam,
//
int GaduProto::options_init(WPARAM wParam, LPARAM)
{
- OPTIONSDIALOGPAGE odp = { 0 };
+ OPTIONSDIALOGPAGE odp = {};
odp.flags = ODPF_UNICODE;
odp.position = 1003000;
- odp.hInstance = g_plugin.getInst();
odp.szGroup.w = LPGENW("Network");
odp.szTitle.w = m_tszUserName;
odp.dwInitParam = (LPARAM)this;
@@ -745,9 +744,8 @@ int GaduProto::details_init(WPARAM wParam, LPARAM lParam)
pszTemplate = MAKEINTRESOURCEA(IDD_INFO_GG);
}
- OPTIONSDIALOGPAGE odp = { 0 };
+ OPTIONSDIALOGPAGE odp = {};
odp.flags = ODPF_DONTTRANSLATE | ODPF_UNICODE;
- odp.hInstance = g_plugin.getInst();
odp.pfnDlgProc = gg_detailsdlgproc;
odp.position = -1900000000;
odp.pszTemplate = pszTemplate;
diff --git a/protocols/Gadu-Gadu/src/gg.cpp b/protocols/Gadu-Gadu/src/gg.cpp
index 848f5ba2f0..1910f7b305 100644
--- a/protocols/Gadu-Gadu/src/gg.cpp
+++ b/protocols/Gadu-Gadu/src/gg.cpp
@@ -247,7 +247,7 @@ INT_PTR GaduProto::blockuser(WPARAM hContact, LPARAM)
//
void GaduProto::block_init()
{
- CMenuItem mi(g_plugin);
+ CMenuItem mi(&g_plugin);
SET_UID(mi, 0xc6169b8f, 0x53ab, 0x4242, 0xbe, 0x90, 0xe2, 0x4a, 0xa5, 0x73, 0x88, 0x32);
mi.position = -500050000;
mi.hIcolibItem = iconList[8].hIcolib;
@@ -273,7 +273,7 @@ void GaduProto::OnBuildProtoMenu()
{
HGENMENU hRoot = Menu_GetProtocolRoot(this);
- CMenuItem mi(g_plugin);
+ CMenuItem mi(&g_plugin);
mi.root = hRoot;
mi.flags = CMIF_UNICODE;
diff --git a/protocols/Gadu-Gadu/src/groupchat.cpp b/protocols/Gadu-Gadu/src/groupchat.cpp
index b3124c832c..44e061dc72 100644
--- a/protocols/Gadu-Gadu/src/groupchat.cpp
+++ b/protocols/Gadu-Gadu/src/groupchat.cpp
@@ -54,7 +54,7 @@ int GaduProto::gc_init()
void GaduProto::gc_menus_init(HGENMENU hRoot)
{
if (gc_enabled) {
- CMenuItem mi(g_plugin);
+ CMenuItem mi(&g_plugin);
mi.flags = CMIF_UNICODE;
mi.root = hRoot;
diff --git a/protocols/Gadu-Gadu/src/image.cpp b/protocols/Gadu-Gadu/src/image.cpp
index ad8e4ed499..af471b45f3 100644
--- a/protocols/Gadu-Gadu/src/image.cpp
+++ b/protocols/Gadu-Gadu/src/image.cpp
@@ -69,7 +69,7 @@ int gg_img_remove(GGIMAGEDLGDATA *dat);
int GaduProto::img_init()
{
// Send image contact menu item
- CMenuItem mi(g_plugin);
+ CMenuItem mi(&g_plugin);
SET_UID(mi, 0xab238938, 0xed85, 0x4cfe, 0x93, 0xb5, 0xb8, 0x83, 0xf4, 0x32, 0xa0, 0xec);
mi.position = -2000010000;
mi.hIcolibItem = iconList[11].hIcolib;
diff --git a/protocols/Gadu-Gadu/src/import.cpp b/protocols/Gadu-Gadu/src/import.cpp
index 86cb6d6678..e461b82906 100644
--- a/protocols/Gadu-Gadu/src/import.cpp
+++ b/protocols/Gadu-Gadu/src/import.cpp
@@ -535,7 +535,7 @@ INT_PTR GaduProto::export_server(WPARAM, LPARAM)
//
void GaduProto::import_init(HGENMENU hRoot)
{
- CMenuItem mi(g_plugin);
+ CMenuItem mi(&g_plugin);
mi.flags = CMIF_UNICODE;
mi.root = hRoot;
diff --git a/protocols/Gadu-Gadu/src/links.cpp b/protocols/Gadu-Gadu/src/links.cpp
index c8fb37df03..7c84a58e56 100644
--- a/protocols/Gadu-Gadu/src/links.cpp
+++ b/protocols/Gadu-Gadu/src/links.cpp
@@ -97,7 +97,7 @@ void gg_links_instancemenu_init()
CreateServiceFunction(GGS_MENUCHOOSE, gg_menuchoose);
hInstanceMenu = Menu_AddObject("GGAccountChooser", LPGEN("Gadu-Gadu account chooser"), nullptr, GGS_MENUCHOOSE);
- CMenuItem mi(g_plugin);
+ CMenuItem mi(&g_plugin);
mi.name.a = "Cancel";
mi.position = 9999999;
mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_DELETE);
@@ -115,7 +115,7 @@ void gg_links_init()
void GaduProto::links_instance_init()
{
if (ServiceExists(MS_ASSOCMGR_ADDNEWURLTYPE)) {
- CMenuItem mi(g_plugin);
+ CMenuItem mi(&g_plugin);
mi.flags = CMIF_UNICODE;
mi.position = CMPlugin::g_arInstances.getCount();
mi.name.w = m_tszUserName;
diff --git a/protocols/Gadu-Gadu/src/sessions.cpp b/protocols/Gadu-Gadu/src/sessions.cpp
index 88718c94a1..6d7ae4893e 100644
--- a/protocols/Gadu-Gadu/src/sessions.cpp
+++ b/protocols/Gadu-Gadu/src/sessions.cpp
@@ -418,7 +418,7 @@ BOOL GaduProto::sessions_closedlg()
void GaduProto::sessions_menus_init(HGENMENU hRoot)
{
- CMenuItem mi(g_plugin);
+ CMenuItem mi(&g_plugin);
mi.flags = CMIF_UNICODE;
mi.root = hRoot;
diff --git a/protocols/ICQCorp/src/options.cpp b/protocols/ICQCorp/src/options.cpp
index 976ceb6567..380daf9b49 100644
--- a/protocols/ICQCorp/src/options.cpp
+++ b/protocols/ICQCorp/src/options.cpp
@@ -72,7 +72,6 @@ int icqOptionsInitialise(WPARAM wParam, LPARAM)
odp.szTitle.a = protoName;
odp.pfnDlgProc = icqOptionsDlgProc;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_ICQCORP);
- odp.hInstance = g_plugin.getInst();
odp.szGroup.a = LPGEN("Network");
odp.flags = ODPF_BOLDGROUPS;
g_plugin.addOptions(wParam, &odp);
diff --git a/protocols/ICQCorp/src/user.cpp b/protocols/ICQCorp/src/user.cpp
index 48ad3b84b1..1b83e518cf 100644
--- a/protocols/ICQCorp/src/user.cpp
+++ b/protocols/ICQCorp/src/user.cpp
@@ -150,12 +150,11 @@ int icqUserInfoInitialise(WPARAM wParam, LPARAM lParam)
if ((proto == nullptr || mir_strcmp(proto, protoName)) && lParam)
return 0;
- OPTIONSDIALOGPAGE odp = { 0 };
+ OPTIONSDIALOGPAGE odp = {};
odp.position = -1900000000;
odp.szTitle.a = protoName;
odp.pfnDlgProc = icqUserInfoDlgProc;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_INFO_ICQCORP);
- odp.hInstance = g_plugin.getInst();
g_plugin.addUserInfo(wParam, &odp);
return 0;
}
diff --git a/protocols/IRCG/src/options.cpp b/protocols/IRCG/src/options.cpp
index e84d0d00e2..a1ae6248a0 100644
--- a/protocols/IRCG/src/options.cpp
+++ b/protocols/IRCG/src/options.cpp
@@ -1639,7 +1639,7 @@ void CIgnorePrefsDlg::UpdateList()
int CIrcProto::OnInitOptionsPages(WPARAM wParam, LPARAM)
{
- OPTIONSDIALOGPAGE odp = { 0 };
+ OPTIONSDIALOGPAGE odp = {};
odp.szTitle.w = m_tszUserName;
odp.szGroup.w = LPGENW("Network");
odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE | ODPF_DONTTRANSLATE;
diff --git a/protocols/IRCG/src/services.cpp b/protocols/IRCG/src/services.cpp
index d3d2caedbf..01824a8e25 100644
--- a/protocols/IRCG/src/services.cpp
+++ b/protocols/IRCG/src/services.cpp
@@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
void CIrcProto::OnBuildProtoMenu()
{
- CMenuItem mi(g_plugin);
+ CMenuItem mi(&g_plugin);
mi.root = Menu_GetProtocolRoot(this);
mi.name.a = LPGEN("&Quick connect");
@@ -104,7 +104,7 @@ void InitContactMenus(void)
char temp[MAXMODULELABELLENGTH];
char *d = temp + mir_snprintf(temp, "IRC");
- CMenuItem mi(g_plugin);
+ CMenuItem mi(&g_plugin);
mi.pszService = temp;
SET_UID(mi, 0x5f01196f, 0xfbcd, 0x4034, 0xbd, 0x90, 0x12, 0xa0, 0x20, 0x68, 0x15, 0xc0);
@@ -796,7 +796,7 @@ int __cdecl CIrcProto::GCMenuHook(WPARAM, LPARAM lParam)
if (!mir_strcmpi(gcmi->pszModule, m_szModuleName)) {
if (gcmi->Type == MENU_ON_LOG) {
if (mir_wstrcmpi(gcmi->pszID, SERVERWINDOW))
- Chat_AddMenuItems(gcmi->hMenu, _countof(logItems), logItems, g_plugin.m_hLang);
+ Chat_AddMenuItems(gcmi->hMenu, _countof(logItems), logItems, &g_plugin);
}
if (gcmi->Type == MENU_ON_NICKLIST) {
@@ -829,7 +829,7 @@ int __cdecl CIrcProto::GCMenuHook(WPARAM, LPARAM lParam)
nickItems[7].bDisabled = nickItems[8].bDisabled = nickItems[9].bDisabled = nickItems[10].bDisabled = !(bForceEnable || bOwner);
nickItems[11].bDisabled = nickItems[12].bDisabled = nickItems[13].bDisabled = nickItems[14].bDisabled = !(bForceEnable || bOp || bAdmin || bOwner);
- Chat_AddMenuItems(gcmi->hMenu, _countof(nickItems), nickItems, g_plugin.m_hLang);
+ Chat_AddMenuItems(gcmi->hMenu, _countof(nickItems), nickItems, &g_plugin);
}
}
}
diff --git a/protocols/IRCG/src/userinfo.cpp b/protocols/IRCG/src/userinfo.cpp
index 2e36ef5f22..fc50e5ae56 100644
--- a/protocols/IRCG/src/userinfo.cpp
+++ b/protocols/IRCG/src/userinfo.cpp
@@ -208,11 +208,10 @@ int __cdecl CIrcProto::OnInitUserInfo(WPARAM wParam, LPARAM lParam)
db_free(&dbv);
}
- OPTIONSDIALOGPAGE odp = { 0 };
+ OPTIONSDIALOGPAGE odp = {};
odp.flags = ODPF_DONTTRANSLATE;
odp.szTitle.a = m_szModuleName;
odp.dwInitParam = (LPARAM)this;
- odp.hInstance = g_plugin.getInst();
odp.position = -1900000000;
odp.pfnDlgProc = UserDetailsDlgProc;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_USERINFO);
diff --git a/protocols/IcqOscarJ/src/icq_menu.cpp b/protocols/IcqOscarJ/src/icq_menu.cpp
index 1a017715ca..b523706b61 100644
--- a/protocols/IcqOscarJ/src/icq_menu.cpp
+++ b/protocols/IcqOscarJ/src/icq_menu.cpp
@@ -70,7 +70,7 @@ void g_MenuInit(void)
char str[MAXMODULELABELLENGTH], *pszDest = str + 3;
mir_strcpy(str, "ICQ");
- CMenuItem mi(g_plugin);
+ CMenuItem mi(&g_plugin);
mi.pszService = str;
// "Add to server list"
diff --git a/protocols/IcqOscarJ/src/icq_opts.cpp b/protocols/IcqOscarJ/src/icq_opts.cpp
index 19505a40ad..8296a7e415 100644
--- a/protocols/IcqOscarJ/src/icq_opts.cpp
+++ b/protocols/IcqOscarJ/src/icq_opts.cpp
@@ -505,9 +505,8 @@ INT_PTR CALLBACK DlgProcIcqPopupOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
int CIcqProto::OnOptionsInit(WPARAM wParam, LPARAM)
{
- OPTIONSDIALOGPAGE odp = { 0 };
+ OPTIONSDIALOGPAGE odp = {};
odp.position = -800000000;
- odp.hInstance = g_plugin.getInst();
odp.szGroup.w = LPGENW("Network");
odp.dwInitParam = LPARAM(this);
odp.szTitle.w = m_tszUserName;
diff --git a/protocols/IcqOscarJ/src/icq_xstatus.cpp b/protocols/IcqOscarJ/src/icq_xstatus.cpp
index bfbcc971d2..365d39b586 100644
--- a/protocols/IcqOscarJ/src/icq_xstatus.cpp
+++ b/protocols/IcqOscarJ/src/icq_xstatus.cpp
@@ -854,14 +854,14 @@ void CIcqProto::InitXStatusItems(BOOL bAllowStatus)
wchar_t szItem[MAX_PATH + 64];
mir_snwprintf(szItem, TranslateT("%s Custom Status"), m_tszUserName);
- CMenuItem mi(g_plugin);
+ CMenuItem mi(&g_plugin);
mi.root = Menu_GetProtocolMenu(m_szModuleName);
mi.name.w = szItem;
mi.position = 10001;
hRoot = Menu_AddStatusMenuItem(&mi, m_szModuleName);
}
- CMenuItem mi(g_plugin);
+ CMenuItem mi(&g_plugin);
mi.position = 2000040000;
mi.root = hRoot;
diff --git a/protocols/IcqOscarJ/src/userinfotab.cpp b/protocols/IcqOscarJ/src/userinfotab.cpp
index 61622da7a0..ccdca580fe 100644
--- a/protocols/IcqOscarJ/src/userinfotab.cpp
+++ b/protocols/IcqOscarJ/src/userinfotab.cpp
@@ -268,9 +268,8 @@ int CIcqProto::OnUserInfoInit(WPARAM wParam, LPARAM lParam)
if ((!IsICQContact(lParam)) && lParam)
return 0;
- OPTIONSDIALOGPAGE odp = { 0 };
+ OPTIONSDIALOGPAGE odp = {};
odp.flags = ODPF_UNICODE | ODPF_DONTTRANSLATE;
- odp.hInstance = g_plugin.getInst();
odp.dwInitParam = LPARAM(this);
odp.pfnDlgProc = IcqDlgProc;
odp.position = -1900000000;
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;
diff --git a/protocols/MRA/src/MraPopUp.cpp b/protocols/MRA/src/MraPopUp.cpp
index b54fa0cc79..e6d20a55a0 100644
--- a/protocols/MRA/src/MraPopUp.cpp
+++ b/protocols/MRA/src/MraPopUp.cpp
@@ -127,10 +127,9 @@ INT_PTR CALLBACK MraPopupDlgProcOpts(HWND hWndDlg, UINT msg, WPARAM wParam, LPAR
int CMraProto::OnPopupOptInit(WPARAM wParam, LPARAM)
{
if (ServiceExists(MS_POPUP_ADDPOPUPT)) {
- OPTIONSDIALOGPAGE odp = { 0 };
+ OPTIONSDIALOGPAGE odp = {};
odp.dwInitParam = (LPARAM)this;
odp.position = 100000000;
- odp.hInstance = g_plugin.getInst();
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_POPUPS);
odp.szTitle.w = m_tszUserName;
odp.szGroup.w = LPGENW("Popups");
diff --git a/protocols/MRA/src/Mra_menus.cpp b/protocols/MRA/src/Mra_menus.cpp
index f06dab8f5d..4b72f0f850 100644
--- a/protocols/MRA/src/Mra_menus.cpp
+++ b/protocols/MRA/src/Mra_menus.cpp
@@ -283,14 +283,14 @@ int CMraProto::MraRebuildStatusMenu(WPARAM, LPARAM)
wchar_t szItem[MAX_PATH + 64];
mir_snwprintf(szItem, L"%s Custom Status", m_tszUserName);
- CMenuItem mi(g_plugin);
+ CMenuItem mi(&g_plugin);
mi.root = Menu_GetProtocolMenu(m_szModuleName);
mi.name.w = szItem;
mi.position = 10001;
hRoot = Menu_AddStatusMenuItem(&mi, m_szModuleName);
}
- CMenuItem mi(g_plugin);
+ CMenuItem mi(&g_plugin);
mi.position = 2000060000;
mi.root = hRoot;
mi.flags = CMIF_UNICODE;
@@ -331,7 +331,7 @@ HGENMENU CMraProto::CListCreateMenu(LONG lPosition, LONG lPopupPosition, BOOL bI
char szServiceFunction[MAX_PATH];
- CMenuItem mi(g_plugin);
+ CMenuItem mi(&g_plugin);
HGENMENU hRootMenu, (__stdcall *fnAddFunc)(TMO_MenuItem*, const char*);
if (bIsMain) {
diff --git a/protocols/MRA/src/Mra_options.cpp b/protocols/MRA/src/Mra_options.cpp
index 2010c0846a..d1d36a3fef 100644
--- a/protocols/MRA/src/Mra_options.cpp
+++ b/protocols/MRA/src/Mra_options.cpp
@@ -213,9 +213,8 @@ INT_PTR CALLBACK DlgProcOptsConnections(HWND hWndDlg, UINT msg, WPARAM wParam, L
int CMraProto::OnOptionsInit(WPARAM wParam, LPARAM lParam)
{
- OPTIONSDIALOGPAGE odp = { 0 };
+ OPTIONSDIALOGPAGE odp = {};
odp.dwInitParam = (LPARAM)this;
- odp.hInstance = g_plugin.getInst();
odp.szTitle.w = m_tszUserName;
odp.szGroup.w = LPGENW("Network");
odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE;
diff --git a/protocols/MSN/src/msn_chat.cpp b/protocols/MSN/src/msn_chat.cpp
index 02979b22a0..4278ebc8c0 100644
--- a/protocols/MSN/src/msn_chat.cpp
+++ b/protocols/MSN/src/msn_chat.cpp
@@ -558,7 +558,7 @@ int CMsnProto::MSN_GCMenuHook(WPARAM, LPARAM lParam)
{ LPGENW("&Invite user..."), 10, MENU_ITEM, FALSE },
{ LPGENW("&Leave chat session"), 20, MENU_ITEM, FALSE }
};
- Chat_AddMenuItems(gcmi->hMenu, _countof(Items), Items, g_plugin.m_hLang);
+ Chat_AddMenuItems(gcmi->hMenu, _countof(Items), Items, &g_plugin);
}
else if (gcmi->Type == MENU_ON_NICKLIST) {
char *email = mir_u2a(gcmi->pszUID);
@@ -570,7 +570,7 @@ int CMsnProto::MSN_GCMenuHook(WPARAM, LPARAM lParam)
{ L"", 100, MENU_SEPARATOR, FALSE },
{ LPGENW("&Leave chat session"), 110, MENU_ITEM, FALSE }
};
- Chat_AddMenuItems(gcmi->hMenu, _countof(Items), Items, g_plugin.m_hLang);
+ Chat_AddMenuItems(gcmi->hMenu, _countof(Items), Items, &g_plugin);
}
else {
static struct gc_item Items[] =
@@ -590,7 +590,7 @@ int CMsnProto::MSN_GCMenuHook(WPARAM, LPARAM lParam)
if (pszRole && !mir_wstrcmpi(pszRole, L"admin"))
Items[3].pszDesc = LPGENW("&Deop user");
}
- Chat_AddMenuItems(gcmi->hMenu, _countof(Items), Items, g_plugin.m_hLang);
+ Chat_AddMenuItems(gcmi->hMenu, _countof(Items), Items, &g_plugin);
}
mir_free(email);
}
diff --git a/protocols/MSN/src/msn_menu.cpp b/protocols/MSN/src/msn_menu.cpp
index bcafc431b8..39fdb52c77 100644
--- a/protocols/MSN/src/msn_menu.cpp
+++ b/protocols/MSN/src/msn_menu.cpp
@@ -141,7 +141,7 @@ int CMsnProto::OnContactDoubleClicked(WPARAM hContact, LPARAM)
// Menus initialization
void CMsnProto::OnBuildProtoMenu(void)
{
- CMenuItem mi(g_plugin);
+ CMenuItem mi(&g_plugin);
mi.root = Menu_GetProtocolRoot(this);
mi.pszService = MSN_INVITE;
@@ -225,7 +225,7 @@ void MSN_InitContactMenu(void)
mir_strcpy(servicefunction, "MSN");
char* tDest = servicefunction + mir_strlen(servicefunction);
- CMenuItem mi(g_plugin);
+ CMenuItem mi(&g_plugin);
mi.pszService = servicefunction;
SET_UID(mi, 0xc6169b8f, 0x53ab, 0x4242, 0xbe, 0x90, 0xe2, 0x4a, 0xa5, 0x73, 0x88, 0x32);
diff --git a/protocols/MSN/src/msn_opts.cpp b/protocols/MSN/src/msn_opts.cpp
index 0a45df570a..5f2f881d1c 100644
--- a/protocols/MSN/src/msn_opts.cpp
+++ b/protocols/MSN/src/msn_opts.cpp
@@ -591,9 +591,8 @@ INT_PTR CALLBACK DlgDeleteContactUI(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
int CMsnProto::OnOptionsInit(WPARAM wParam, LPARAM)
{
- OPTIONSDIALOGPAGE odp = { 0 };
+ OPTIONSDIALOGPAGE odp = {};
odp.position = -790000000;
- odp.hInstance = g_plugin.getInst();
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_MSN);
odp.szTitle.w = m_tszUserName;
odp.szGroup.w = LPGENW("Network");
diff --git a/protocols/Omegle/src/proto.cpp b/protocols/Omegle/src/proto.cpp
index 1b003d37c1..5ae53dab59 100644
--- a/protocols/Omegle/src/proto.cpp
+++ b/protocols/Omegle/src/proto.cpp
@@ -157,8 +157,7 @@ void OmegleProto::OnShutdown()
int OmegleProto::OnOptionsInit(WPARAM wParam, LPARAM)
{
- OPTIONSDIALOGPAGE odp = { 0 };
- odp.hInstance = g_plugin.getInst();
+ OPTIONSDIALOGPAGE odp = {};
odp.szTitle.w = m_tszUserName;
odp.dwInitParam = LPARAM(this);
odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE | ODPF_DONTTRANSLATE;
diff --git a/protocols/Sametime/src/conference.cpp b/protocols/Sametime/src/conference.cpp
index 9a5b6050a0..dee5e9e5a7 100644
--- a/protocols/Sametime/src/conference.cpp
+++ b/protocols/Sametime/src/conference.cpp
@@ -443,7 +443,7 @@ void CSametimeProto::InitConferenceMenu()
CreateProtoService(MS_SAMETIME_MENULEAVECHAT, &CSametimeProto::onMenuLeaveChat);
CreateProtoService(MS_SAMETIME_MENUCREATECHAT, &CSametimeProto::onMenuCreateChat);
- CMenuItem mi(g_plugin);
+ CMenuItem mi(&g_plugin);
mi.flags = CMIF_UNICODE | CMIF_NOTOFFLINE;
SET_UID(mi, 0x98cf8a8c, 0x75ba, 0x46f2, 0xa3, 0x35, 0x65, 0x46, 0x4a, 0x38, 0x20, 0x7d);
diff --git a/protocols/Sametime/src/options.cpp b/protocols/Sametime/src/options.cpp
index 95642e983a..aec8816c18 100644
--- a/protocols/Sametime/src/options.cpp
+++ b/protocols/Sametime/src/options.cpp
@@ -341,9 +341,8 @@ static INT_PTR CALLBACK DlgProcOptNet(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
int CSametimeProto::OptInit(WPARAM wParam, LPARAM)
{
- OPTIONSDIALOGPAGE odp = { 0 };
+ OPTIONSDIALOGPAGE odp = {};
odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE | ODPF_DONTTRANSLATE;
- odp.hInstance = g_plugin.getInst();
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTNET);
odp.szTitle.w = m_tszUserName;
odp.szGroup.w = LPGENW("Network");
diff --git a/protocols/Sametime/src/sametime_session.cpp b/protocols/Sametime/src/sametime_session.cpp
index 7e8913563f..686f5e889d 100644
--- a/protocols/Sametime/src/sametime_session.cpp
+++ b/protocols/Sametime/src/sametime_session.cpp
@@ -571,7 +571,7 @@ void CSametimeProto::InitSessionMenu()
CreateProtoService(MS_SAMETIME_MENUANNOUNCESESSION, &CSametimeProto::SessionAnnounce);
- CMenuItem mi(g_plugin);
+ CMenuItem mi(&g_plugin);
mi.flags = CMIF_UNICODE;
mi.position = 2000060000;
mi.name.w = LPGENW("Send announcement...");
diff --git a/protocols/SkypeWeb/src/skype_chatrooms.cpp b/protocols/SkypeWeb/src/skype_chatrooms.cpp
index b19d812c29..83b851aa5f 100644
--- a/protocols/SkypeWeb/src/skype_chatrooms.cpp
+++ b/protocols/SkypeWeb/src/skype_chatrooms.cpp
@@ -577,7 +577,7 @@ int CSkypeProto::OnGroupChatMenuHook(WPARAM, LPARAM lParam)
{ LPGENW("&Leave chat session"), 20, MENU_ITEM, FALSE },
{ LPGENW("&Change topic..."), 30, MENU_ITEM, FALSE }
};
- Chat_AddMenuItems(gcmi->hMenu, _countof(Items), Items, g_plugin.m_hLang);
+ Chat_AddMenuItems(gcmi->hMenu, _countof(Items), Items, &g_plugin);
}
else if (gcmi->Type == MENU_ON_NICKLIST) {
static const struct gc_item Items[] =
@@ -589,7 +589,7 @@ int CSkypeProto::OnGroupChatMenuHook(WPARAM, LPARAM lParam)
{ LPGENW("&User"), 40, MENU_POPUPITEM },
{ LPGENW("Change nick..."), 50, MENU_ITEM },
};
- Chat_AddMenuItems(gcmi->hMenu, _countof(Items), Items, g_plugin.m_hLang);
+ Chat_AddMenuItems(gcmi->hMenu, _countof(Items), Items, &g_plugin);
}
return 0;
diff --git a/protocols/SkypeWeb/src/skype_menus.cpp b/protocols/SkypeWeb/src/skype_menus.cpp
index 7b16743df0..58c036f47f 100644
--- a/protocols/SkypeWeb/src/skype_menus.cpp
+++ b/protocols/SkypeWeb/src/skype_menus.cpp
@@ -58,7 +58,7 @@ void CSkypeProto::InitMenus()
//hChooserMenu = Menu_AddObject("SkypeAccountChooser", LPGEN("Skype menu chooser"), 0, "Skype/MenuChoose");
- CMenuItem mi(g_plugin);
+ CMenuItem mi(&g_plugin);
mi.flags = CMIF_UNICODE;
mi.pszService = MODULE"/GetHistory";
@@ -88,7 +88,7 @@ void CSkypeProto::InitMenus()
void CSkypeProto::OnBuildProtoMenu()
{
- CMenuItem mi(g_plugin);
+ CMenuItem mi(&g_plugin);
mi.root = Menu_GetProtocolRoot(this);
mi.pszService = "/CreateNewChat";
diff --git a/protocols/SkypeWeb/src/skype_options.cpp b/protocols/SkypeWeb/src/skype_options.cpp
index 7e689c427f..61872dd5ca 100644
--- a/protocols/SkypeWeb/src/skype_options.cpp
+++ b/protocols/SkypeWeb/src/skype_options.cpp
@@ -72,7 +72,6 @@ bool CSkypeOptionsMain::OnApply()
int CSkypeProto::OnOptionsInit(WPARAM wParam, LPARAM)
{
OPTIONSDIALOGPAGE odp = { sizeof(odp) };
- odp.hInstance = g_plugin.getInst();
odp.szTitle.w = m_tszUserName;
odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE | ODPF_DONTTRANSLATE;
odp.szGroup.w = LPGENW("Network");
diff --git a/protocols/Steam/src/steam_menus.cpp b/protocols/Steam/src/steam_menus.cpp
index 6689ef0acc..91feead56a 100644
--- a/protocols/Steam/src/steam_menus.cpp
+++ b/protocols/Steam/src/steam_menus.cpp
@@ -116,7 +116,7 @@ int CSteamProto::PrebuildContactMenu(WPARAM hContact, LPARAM lParam)
void CSteamProto::OnInitStatusMenu()
{
- CMenuItem mi(g_plugin);
+ CMenuItem mi(&g_plugin);
mi.flags = CMIF_UNICODE;
mi.root = Menu_GetProtocolRoot(this);
@@ -134,7 +134,7 @@ void CSteamProto::InitMenus()
//////////////////////////////////////////////////////////////////////////////////////
// Contact menu initialization
- CMenuItem mi(g_plugin);
+ CMenuItem mi(&g_plugin);
mi.flags = CMIF_UNICODE;
// "Block"
diff --git a/protocols/Steam/src/steam_options.cpp b/protocols/Steam/src/steam_options.cpp
index 74c51a82c5..9f2e996286 100644
--- a/protocols/Steam/src/steam_options.cpp
+++ b/protocols/Steam/src/steam_options.cpp
@@ -78,8 +78,7 @@ void CSteamOptionsBlockList::OnBlock(CCtrlButton*)
int CSteamProto::OnOptionsInit(WPARAM wParam, LPARAM)
{
- OPTIONSDIALOGPAGE odp = { 0 };
- odp.hInstance = g_plugin.getInst();
+ OPTIONSDIALOGPAGE odp = {};
odp.szTitle.w = m_tszUserName;
odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE;
odp.szGroup.w = LPGENW("Network");
diff --git a/protocols/Tox/src/tox_contacts.cpp b/protocols/Tox/src/tox_contacts.cpp
index 4fd148e394..298f9256a7 100644
--- a/protocols/Tox/src/tox_contacts.cpp
+++ b/protocols/Tox/src/tox_contacts.cpp
@@ -351,7 +351,6 @@ int CToxProto::OnUserInfoInit(WPARAM wParam, LPARAM lParam)
if (szProto != nullptr && !mir_strcmp(szProto, m_szModuleName)) {
OPTIONSDIALOGPAGE odp = { sizeof(odp) };
odp.flags = ODPF_UNICODE | ODPF_DONTTRANSLATE;
- odp.hInstance = g_plugin.getInst();
odp.dwInitParam = (LPARAM)this;
odp.szTitle.w = m_tszUserName;
diff --git a/protocols/Tox/src/tox_menus.cpp b/protocols/Tox/src/tox_menus.cpp
index baebefe14a..7e6313aadf 100644
--- a/protocols/Tox/src/tox_menus.cpp
+++ b/protocols/Tox/src/tox_menus.cpp
@@ -46,7 +46,7 @@ int CToxProto::UpdateStatusMenu(WPARAM, LPARAM)
void CToxProto::OnBuildProtoMenu()
{
- CMenuItem mi(g_plugin);
+ CMenuItem mi(&g_plugin);
mi.flags = CMIF_UNICODE;
mi.root = Menu_GetProtocolRoot(this);
diff --git a/protocols/Tox/src/tox_options.cpp b/protocols/Tox/src/tox_options.cpp
index ef923e6fef..1d74a5fadc 100644
--- a/protocols/Tox/src/tox_options.cpp
+++ b/protocols/Tox/src/tox_options.cpp
@@ -554,7 +554,7 @@ bool CToxOptionsNodeList::OnApply()
int CToxProto::OnOptionsInit(WPARAM wParam, LPARAM)
{
- OPTIONSDIALOGPAGE odp = { 0 };
+ OPTIONSDIALOGPAGE odp = {};
odp.szTitle.w = m_tszUserName;
odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE | ODPF_DONTTRANSLATE;
odp.szGroup.w = LPGENW("Network");
diff --git a/protocols/Twitter/src/proto.cpp b/protocols/Twitter/src/proto.cpp
index 92bf8cd33a..b09db7ed71 100644
--- a/protocols/Twitter/src/proto.cpp
+++ b/protocols/Twitter/src/proto.cpp
@@ -219,7 +219,7 @@ INT_PTR TwitterProto::VisitHomepage(WPARAM wParam, LPARAM)
int TwitterProto::OnBuildStatusMenu(WPARAM, LPARAM)
{
- CMenuItem mi(g_plugin);
+ CMenuItem mi(&g_plugin);
mi.root = Menu_GetProtocolRoot(this);
mi.flags = CMIF_UNICODE;
mi.position = 1001;
@@ -238,9 +238,8 @@ int TwitterProto::OnBuildStatusMenu(WPARAM, LPARAM)
int TwitterProto::OnOptionsInit(WPARAM wParam, LPARAM)
{
- OPTIONSDIALOGPAGE odp = { 0 };
+ OPTIONSDIALOGPAGE odp = {};
odp.position = 271828;
- odp.hInstance = g_plugin.getInst();
odp.szGroup.w = LPGENW("Network");
odp.szTitle.w = m_tszUserName;
odp.dwInitParam = LPARAM(this);
diff --git a/protocols/Twitter/src/theme.cpp b/protocols/Twitter/src/theme.cpp
index a9df14c7b3..1eca8dc523 100644
--- a/protocols/Twitter/src/theme.cpp
+++ b/protocols/Twitter/src/theme.cpp
@@ -75,7 +75,7 @@ void InitContactMenus()
{
HookEvent(ME_CLIST_PREBUILDCONTACTMENU, PrebuildContactMenu);
- CMenuItem mi(g_plugin);
+ CMenuItem mi(&g_plugin);
mi.flags = CMIF_NOTOFFLINE | CMIF_UNICODE;
SET_UID(mi, 0xfc4e1245, 0xc8e0, 0x4de2, 0x92, 0x15, 0xfc, 0xcf, 0x48, 0xf9, 0x41, 0x56);
diff --git a/protocols/VKontakte/src/vk_chats.cpp b/protocols/VKontakte/src/vk_chats.cpp
index 91349b1d5d..bb6f1ce870 100644
--- a/protocols/VKontakte/src/vk_chats.cpp
+++ b/protocols/VKontakte/src/vk_chats.cpp
@@ -782,9 +782,9 @@ int CVkProto::OnGcMenuHook(WPARAM, LPARAM lParam)
return 0;
if (gcmi->Type == MENU_ON_LOG)
- 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)
- 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/VKontakte/src/vk_options.cpp b/protocols/VKontakte/src/vk_options.cpp
index 36e4d7f73a..6bab6d4eab 100644
--- a/protocols/VKontakte/src/vk_options.cpp
+++ b/protocols/VKontakte/src/vk_options.cpp
@@ -74,7 +74,7 @@ bool CVkAccMgrForm::OnApply()
int CVkProto::OnOptionsInit(WPARAM wParam, LPARAM)
{
- OPTIONSDIALOGPAGE odp = { 0 };
+ OPTIONSDIALOGPAGE odp = {};
odp.szTitle.w = m_tszUserName;
odp.dwInitParam = LPARAM(this);
odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE | ODPF_DONTTRANSLATE;
diff --git a/protocols/VKontakte/src/vk_proto.cpp b/protocols/VKontakte/src/vk_proto.cpp
index 1c0c9be6e5..acbc236066 100644
--- a/protocols/VKontakte/src/vk_proto.cpp
+++ b/protocols/VKontakte/src/vk_proto.cpp
@@ -147,7 +147,7 @@ void CVkProto::InitMenus()
for (int i = 0; i < PMI_COUNT; i++)
m_hProtoMenuItems[i] = nullptr;
- CMenuItem mi(g_plugin);
+ CMenuItem mi(&g_plugin);
mi.root = Menu_GetProtocolRoot(this);
// Proto menu