summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-07-11 21:32:58 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-07-11 21:33:11 +0300
commitf719c8b921c7a46b76453476204224d40c682914 (patch)
treec6d92dc450893e7f5abe60c2046ec9c2d1e3db36 /plugins/TabSRMM
parent16ad355c8bdc438c3107ee3ba3ad0bf0b8c395fa (diff)
int hLangpack/m_hLang removed and replaced with HPLUGIN
Diffstat (limited to 'plugins/TabSRMM')
-rw-r--r--plugins/TabSRMM/src/buttonsbar.cpp40
-rw-r--r--plugins/TabSRMM/src/chat_main.cpp2
-rw-r--r--plugins/TabSRMM/src/chat_options.cpp4
-rw-r--r--plugins/TabSRMM/src/generic_msghandlers.cpp6
-rw-r--r--plugins/TabSRMM/src/globals.cpp4
-rw-r--r--plugins/TabSRMM/src/modplus.cpp2
-rw-r--r--plugins/TabSRMM/src/msgoptions.cpp1
-rw-r--r--plugins/TabSRMM/src/typingnotify.cpp5
8 files changed, 31 insertions, 33 deletions
diff --git a/plugins/TabSRMM/src/buttonsbar.cpp b/plugins/TabSRMM/src/buttonsbar.cpp
index fa4ce611f2..d779f15afe 100644
--- a/plugins/TabSRMM/src/buttonsbar.cpp
+++ b/plugins/TabSRMM/src/buttonsbar.cpp
@@ -12,80 +12,80 @@ static int CB_InitDefaultButtons(WPARAM, LPARAM)
bbd.hIcon = Skin_GetIconHandle(SKINICON_OTHER_CONNECTING);
bbd.pszModuleName = "Tabsrmm";
bbd.pwszTooltip = LPGENW("Protocol button");
- Srmm_AddButton(&bbd, g_plugin.m_hLang);
+ Srmm_AddButton(&bbd, &g_plugin);
bbd.dwButtonID = IDC_NAME;
bbd.dwDefPos = 20;
bbd.hIcon = PluginConfig.g_buttonBarIconHandles[20];
bbd.pwszTooltip = LPGENW("Info button");
- Srmm_AddButton(&bbd, g_plugin.m_hLang);
+ Srmm_AddButton(&bbd, &g_plugin);
bbd.bbbFlags = BBBF_ISIMBUTTON | BBBF_ISCHATBUTTON | BBBF_ISPUSHBUTTON | BBBF_CANBEHIDDEN | BBBF_CREATEBYID;
bbd.dwButtonID = IDC_SRMM_BOLD;
bbd.dwDefPos = 40;
bbd.hIcon = PluginConfig.g_buttonBarIconHandles[10];
bbd.pwszTooltip = LPGENW("Bold text");
- Srmm_AddButton(&bbd, g_plugin.m_hLang);
+ Srmm_AddButton(&bbd, &g_plugin);
bbd.dwButtonID = IDC_SRMM_ITALICS;
bbd.dwDefPos = 50;
bbd.hIcon = PluginConfig.g_buttonBarIconHandles[11];
bbd.pwszTooltip = LPGENW("Italic text");
- Srmm_AddButton(&bbd, g_plugin.m_hLang);
+ Srmm_AddButton(&bbd, &g_plugin);
bbd.dwButtonID = IDC_SRMM_UNDERLINE;
bbd.dwDefPos = 60;
bbd.hIcon = PluginConfig.g_buttonBarIconHandles[12];
bbd.pwszTooltip = LPGENW("Underlined text");
- Srmm_AddButton(&bbd, g_plugin.m_hLang);
+ Srmm_AddButton(&bbd, &g_plugin);
bbd.bbbFlags = BBBF_ISIMBUTTON | BBBF_ISPUSHBUTTON | BBBF_CANBEHIDDEN | BBBF_CREATEBYID;
bbd.dwButtonID = IDC_FONTSTRIKEOUT;
bbd.dwDefPos = 70;
bbd.hIcon = PluginConfig.g_buttonBarIconHandles[15];
bbd.pwszTooltip = LPGENW("Strike-through text");
- Srmm_AddButton(&bbd, g_plugin.m_hLang);
+ Srmm_AddButton(&bbd, &g_plugin);
bbd.bbbFlags = BBBF_ISIMBUTTON | BBBF_ISCHATBUTTON | BBBF_ISRSIDEBUTTON | BBBF_ISARROWBUTTON | BBBF_CREATEBYID;
bbd.dwButtonID = IDOK;
bbd.dwDefPos = 10;
bbd.hIcon = PluginConfig.g_buttonBarIconHandles[6];
bbd.pwszTooltip = LPGENW("Send message\nClick dropdown arrow for sending options");
- Srmm_AddButton(&bbd, g_plugin.m_hLang);
+ Srmm_AddButton(&bbd, &g_plugin);
bbd.bbbFlags = BBBF_ISIMBUTTON | BBBF_ISCHATBUTTON | BBBF_ISRSIDEBUTTON | BBBF_CREATEBYID;
bbd.dwButtonID = IDC_CLOSE;
bbd.dwDefPos = 20;
bbd.hIcon = PluginConfig.g_buttonBarIconHandles[8];
bbd.pwszTooltip = LPGENW("Close session");
- Srmm_AddButton(&bbd, g_plugin.m_hLang);
+ Srmm_AddButton(&bbd, &g_plugin);
bbd.bbbFlags = BBBF_ISIMBUTTON | BBBF_ISRSIDEBUTTON | BBBF_CREATEBYID;
bbd.dwButtonID = IDC_QUOTE;
bbd.dwDefPos = 30;
bbd.hIcon = PluginConfig.g_buttonBarIconHandles[4];
bbd.pwszTooltip = LPGENW("Quote last message OR selected text");
- Srmm_AddButton(&bbd, g_plugin.m_hLang);
+ Srmm_AddButton(&bbd, &g_plugin);
bbd.dwButtonID = IDC_TIME;
bbd.dwDefPos = 40;
bbd.hIcon = PluginConfig.g_buttonBarIconHandles[2];
bbd.pwszTooltip = LPGENW("Message log options");
- Srmm_AddButton(&bbd, g_plugin.m_hLang);
+ Srmm_AddButton(&bbd, &g_plugin);
bbd.bbbFlags = BBBF_ISIMBUTTON | BBBF_ISCHATBUTTON | BBBF_ISRSIDEBUTTON | BBBF_CREATEBYID;
bbd.dwButtonID = IDC_SRMM_HISTORY;
bbd.dwDefPos = 50;
bbd.hIcon = PluginConfig.g_buttonBarIconHandles[0];
bbd.pwszTooltip = LPGENW("View user's history");
- Srmm_AddButton(&bbd, g_plugin.m_hLang);
+ Srmm_AddButton(&bbd, &g_plugin);
bbd.bbbFlags = BBBF_ISIMBUTTON | BBBF_ISRSIDEBUTTON | BBBF_CREATEBYID;
bbd.dwButtonID = IDC_PIC;
bbd.dwDefPos = 60;
bbd.hIcon = PluginConfig.g_buttonBarIconHandles[7];
bbd.pwszTooltip = LPGENW("Edit user notes");
- Srmm_AddButton(&bbd, g_plugin.m_hLang);
+ Srmm_AddButton(&bbd, &g_plugin);
// chat buttons
bbd.bbbFlags = BBBF_ISCHATBUTTON | BBBF_ISSEPARATOR;
@@ -94,15 +94,15 @@ static int CB_InitDefaultButtons(WPARAM, LPARAM)
bbd.dwDefPos = 35;
bbd.hIcon = nullptr;
bbd.pwszTooltip = nullptr;
- Srmm_AddButton(&bbd, g_plugin.m_hLang);
+ Srmm_AddButton(&bbd, &g_plugin);
bbd.dwButtonID = 2;
bbd.dwDefPos = 22;
- Srmm_AddButton(&bbd, g_plugin.m_hLang);
+ Srmm_AddButton(&bbd, &g_plugin);
bbd.dwButtonID = 3;
bbd.dwDefPos = 71;
- Srmm_AddButton(&bbd, g_plugin.m_hLang);
+ Srmm_AddButton(&bbd, &g_plugin);
bbd.bbbFlags = BBBF_ISCHATBUTTON | BBBF_ISPUSHBUTTON | BBBF_CREATEBYID;
bbd.dwButtonID = IDC_SRMM_COLOR;
@@ -110,32 +110,32 @@ static int CB_InitDefaultButtons(WPARAM, LPARAM)
bbd.dwDefPos = 80;
bbd.hIcon = PluginConfig.g_buttonBarIconHandles[14];
bbd.pwszTooltip = LPGENW("Select font color");
- Srmm_AddButton(&bbd, g_plugin.m_hLang);
+ Srmm_AddButton(&bbd, &g_plugin);
bbd.dwButtonID = IDC_SRMM_BKGCOLOR;
bbd.dwDefPos = 81;
bbd.hIcon = PluginConfig.g_buttonBarIconHandles[16];
bbd.pwszTooltip = LPGENW("Change background color");
- Srmm_AddButton(&bbd, g_plugin.m_hLang);
+ Srmm_AddButton(&bbd, &g_plugin);
bbd.bbbFlags = BBBF_ISCHATBUTTON | BBBF_ISRSIDEBUTTON | BBBF_CREATEBYID;
bbd.dwButtonID = IDC_SRMM_SHOWNICKLIST;
bbd.dwDefPos = 22;
bbd.hIcon = PluginConfig.g_buttonBarIconHandles[19];
bbd.pwszTooltip = LPGENW("Toggle nick list");
- Srmm_AddButton(&bbd, g_plugin.m_hLang);
+ Srmm_AddButton(&bbd, &g_plugin);
bbd.dwButtonID = IDC_SRMM_FILTER;
bbd.dwDefPos = 24;
bbd.hIcon = PluginConfig.g_buttonBarIconHandles[18];
bbd.pwszTooltip = LPGENW("Event filter - right click to setup, left click to activate/deactivate");
- Srmm_AddButton(&bbd, g_plugin.m_hLang);
+ Srmm_AddButton(&bbd, &g_plugin);
bbd.dwButtonID = IDC_SRMM_CHANMGR;
bbd.dwDefPos = 33;
bbd.hIcon = PluginConfig.g_buttonBarIconHandles[17];
bbd.pwszTooltip = LPGENW("Channel manager");
- Srmm_AddButton(&bbd, g_plugin.m_hLang);
+ Srmm_AddButton(&bbd, &g_plugin);
return 0;
}
diff --git a/plugins/TabSRMM/src/chat_main.cpp b/plugins/TabSRMM/src/chat_main.cpp
index af44648190..1dc5e20f7e 100644
--- a/plugins/TabSRMM/src/chat_main.cpp
+++ b/plugins/TabSRMM/src/chat_main.cpp
@@ -215,7 +215,7 @@ int Chat_Load()
CheckUpdate();
Utils::RTF_CTableInit();
- CHAT_MANAGER_INITDATA data = { &g_Settings, sizeof(MODULEINFO), sizeof(SESSION_INFO), LPGENW("Message sessions") L"/" LPGENW("Group chats"), FONTMODE_ALTER, g_plugin.m_hLang };
+ CHAT_MANAGER_INITDATA data = { &g_Settings, sizeof(MODULEINFO), sizeof(SESSION_INFO), LPGENW("Message sessions") L"/" LPGENW("Group chats"), FONTMODE_ALTER, &g_plugin };
Chat_CustomizeApi(&data);
g_chatApi.OnCreateModule = OnCreateModule;
diff --git a/plugins/TabSRMM/src/chat_options.cpp b/plugins/TabSRMM/src/chat_options.cpp
index 67390c9a5e..8802145baf 100644
--- a/plugins/TabSRMM/src/chat_options.cpp
+++ b/plugins/TabSRMM/src/chat_options.cpp
@@ -262,8 +262,8 @@ static IconItem _logicons[] =
// add icons to the skinning module
void Chat_AddIcons(void)
{
- Icon_Register(g_hIconDLL, LPGEN("Message Sessions") "/" LPGEN("Group chat windows"), _icons, _countof(_icons), 0, g_plugin.m_hLang);
- Icon_Register(g_hIconDLL, LPGEN("Message Sessions") "/" LPGEN("Group chat log"), _logicons, _countof(_logicons), 0, g_plugin.m_hLang);
+ Icon_Register(g_hIconDLL, LPGEN("Message Sessions") "/" LPGEN("Group chat windows"), _icons, _countof(_icons), 0, &g_plugin);
+ Icon_Register(g_hIconDLL, LPGEN("Message Sessions") "/" LPGEN("Group chat log"), _logicons, _countof(_logicons), 0, &g_plugin);
g_chatApi.MM_IconsChanged();
}
diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp
index fb456ab4f4..3eb99ed124 100644
--- a/plugins/TabSRMM/src/generic_msghandlers.cpp
+++ b/plugins/TabSRMM/src/generic_msghandlers.cpp
@@ -1466,13 +1466,13 @@ int SI_InitStatusIcons()
StatusIconData sid = {};
sid.szModule = MSG_ICON_MODULE;
sid.dwId = MSG_ICON_SOUND; // Sounds
- Srmm_AddIcon(&sid, g_plugin.m_hLang);
+ Srmm_AddIcon(&sid, &g_plugin);
sid.dwId = MSG_ICON_UTN;
- Srmm_AddIcon(&sid, g_plugin.m_hLang);
+ Srmm_AddIcon(&sid, &g_plugin);
sid.dwId = MSG_ICON_SESSION;
- Srmm_AddIcon(&sid, g_plugin.m_hLang);
+ Srmm_AddIcon(&sid, &g_plugin);
HookEvent(ME_MSG_ICONSCHANGED, OnSrmmIconChanged);
return 0;
diff --git a/plugins/TabSRMM/src/globals.cpp b/plugins/TabSRMM/src/globals.cpp
index 271d689adb..6edea54ef5 100644
--- a/plugins/TabSRMM/src/globals.cpp
+++ b/plugins/TabSRMM/src/globals.cpp
@@ -115,7 +115,7 @@ void CGlobals::reloadSystemModulesChanged()
g_bPopupAvail = ServiceExists(MS_POPUP_ADDPOPUPT) != 0;
- CMenuItem mi(g_plugin);
+ CMenuItem mi(&g_plugin);
SET_UID(mi, 0x58d8dc1, 0x1c25, 0x49c0, 0xb8, 0x7c, 0xa3, 0x22, 0x2b, 0x3d, 0xf1, 0xd8);
mi.position = -2000090000;
mi.flags = CMIF_DEFAULT;
@@ -294,7 +294,7 @@ int CGlobals::ModulesLoaded(WPARAM, LPARAM)
if (nen_options.bTraySupport)
::CreateSystrayIcon(TRUE);
- CMenuItem mi(g_plugin);
+ CMenuItem mi(&g_plugin);
SET_UID(mi, 0x9f68b822, 0xff97, 0x477d, 0xb7, 0x6d, 0xa5, 0x59, 0x33, 0x1c, 0x54, 0x40);
mi.position = -500050005;
mi.hIcolibItem = PluginConfig.g_iconContainer;
diff --git a/plugins/TabSRMM/src/modplus.cpp b/plugins/TabSRMM/src/modplus.cpp
index d2a1c1640b..6052e090d6 100644
--- a/plugins/TabSRMM/src/modplus.cpp
+++ b/plugins/TabSRMM/src/modplus.cpp
@@ -56,7 +56,7 @@ static int RegisterCustomButton(WPARAM, LPARAM)
bbd.hIcon = PluginConfig.g_buttonBarIconHandles[3];
bbd.pszModuleName = "Tabmodplus";
bbd.pwszTooltip = LPGENW("Insert [img] tag / surround selected text with [img][/img]");
- Srmm_AddButton(&bbd, g_plugin.m_hLang);
+ Srmm_AddButton(&bbd, &g_plugin);
return 0;
}
diff --git a/plugins/TabSRMM/src/msgoptions.cpp b/plugins/TabSRMM/src/msgoptions.cpp
index 1d9615ebd8..e8cb510573 100644
--- a/plugins/TabSRMM/src/msgoptions.cpp
+++ b/plugins/TabSRMM/src/msgoptions.cpp
@@ -1329,7 +1329,6 @@ static int OptInitialise(WPARAM wParam, LPARAM lParam)
g_plugin.addOptions(wParam, &odpnew);
OPTIONSDIALOGPAGE odp = {};
- odp.hInstance = g_plugin.getInst();
odp.flags = ODPF_BOLDGROUPS;
odp.position = 910000000;
diff --git a/plugins/TabSRMM/src/typingnotify.cpp b/plugins/TabSRMM/src/typingnotify.cpp
index 766c4121fa..6d4cb8bc9f 100644
--- a/plugins/TabSRMM/src/typingnotify.cpp
+++ b/plugins/TabSRMM/src/typingnotify.cpp
@@ -490,9 +490,8 @@ static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
int TN_OptionsInitialize(WPARAM wParam, LPARAM)
{
if (ServiceExists(MS_POPUP_ADDPOPUPT)) {
- OPTIONSDIALOGPAGE odp = { 0 };
+ OPTIONSDIALOGPAGE odp = {};
odp.position = 100000000;
- odp.hInstance = g_plugin.getInst();
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_TYPINGNOTIFYPOPUP);
odp.szTitle.a = LPGEN("Typing notify");
odp.szGroup.a = LPGEN("Popups");
@@ -531,7 +530,7 @@ int TN_ModuleInit()
if (PluginConfig.g_bPopupAvail && ShowMenu) {
CreateServiceFunction("TypingNotify/EnableDisableMenuCommand", EnableDisableMenuCommand);
- CMenuItem mi(g_plugin);
+ CMenuItem mi(&g_plugin);
SET_UID(mi, 0xe18fd2cf, 0xcf90, 0x459e, 0xb6, 0xe6, 0x70, 0xec, 0xad, 0xc6, 0x73, 0xef);
if (!Disabled) {
mi.name.a = LPGEN("Disable &typing notification");