diff options
author | George Hazan <ghazan@miranda.im> | 2018-07-11 21:32:58 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-07-11 21:33:11 +0300 |
commit | f719c8b921c7a46b76453476204224d40c682914 (patch) | |
tree | c6d92dc450893e7f5abe60c2046ec9c2d1e3db36 /plugins/TopToolBar/src | |
parent | 16ad355c8bdc438c3107ee3ba3ad0bf0b8c395fa (diff) |
int hLangpack/m_hLang removed and replaced with HPLUGIN
Diffstat (limited to 'plugins/TopToolBar/src')
-rw-r--r-- | plugins/TopToolBar/src/stdafx.h | 2 | ||||
-rw-r--r-- | plugins/TopToolBar/src/toolbar.cpp | 8 | ||||
-rw-r--r-- | plugins/TopToolBar/src/topbutton.cpp | 2 | ||||
-rw-r--r-- | plugins/TopToolBar/src/ttbopt.cpp | 3 |
4 files changed, 7 insertions, 8 deletions
diff --git a/plugins/TopToolBar/src/stdafx.h b/plugins/TopToolBar/src/stdafx.h index 44d4193d40..1b2cd4f566 100644 --- a/plugins/TopToolBar/src/stdafx.h +++ b/plugins/TopToolBar/src/stdafx.h @@ -84,7 +84,7 @@ struct TopButtonInt : public MZeroedObject LPARAM lParamDown;
WPARAM wParamDown;
- int hLangpack;
+ HPLUGIN pPlugin;
wchar_t *ptszTooltipUp, *ptszTooltipDn;
};
diff --git a/plugins/TopToolBar/src/toolbar.cpp b/plugins/TopToolBar/src/toolbar.cpp index ae798838c2..da81db4300 100644 --- a/plugins/TopToolBar/src/toolbar.cpp +++ b/plugins/TopToolBar/src/toolbar.cpp @@ -309,7 +309,7 @@ INT_PTR TTBAddButton(WPARAM wParam, LPARAM lParam) return -1;
TopButtonInt *b = CreateButton(but);
- b->hLangpack = (int)lParam;
+ b->pPlugin = (HPLUGIN)lParam;
b->LoadSettings();
b->CreateWnd();
if (b->hwnd == nullptr) {
@@ -553,13 +553,13 @@ int OnPluginLoad(WPARAM, LPARAM lParam) int OnPluginUnload(WPARAM, LPARAM lParam)
{
- int lang = GetPluginLangByInstance((HINSTANCE)lParam);
- if (lang) {
+ HPLUGIN pPlugin = &GetPluginByInstance((HINSTANCE)lParam);
+ if (pPlugin) {
bool bNeedUpdate = false;
mir_cslock lck(csButtonsHook);
for (auto &it : Buttons.rev_iter())
- if (it->hLangpack == lang) {
+ if (it->pPlugin == pPlugin) {
TTBRemoveButton(it->id, 0);
bNeedUpdate = true;
}
diff --git a/plugins/TopToolBar/src/topbutton.cpp b/plugins/TopToolBar/src/topbutton.cpp index f9bf74a0fc..7a4c357ac7 100644 --- a/plugins/TopToolBar/src/topbutton.cpp +++ b/plugins/TopToolBar/src/topbutton.cpp @@ -171,6 +171,6 @@ void TopButtonInt::SetBitmap() pTooltip = ptszTooltipUp;
}
if (pTooltip)
- SendMessage(hwnd, BUTTONADDTOOLTIP, (WPARAM)TranslateW_LP(pTooltip, hLangpack), BATF_UNICODE);
+ SendMessage(hwnd, BUTTONADDTOOLTIP, (WPARAM)TranslateW_LP(pTooltip, pPlugin), BATF_UNICODE);
}
}
diff --git a/plugins/TopToolBar/src/ttbopt.cpp b/plugins/TopToolBar/src/ttbopt.cpp index 226dc8d57a..45642f84dc 100644 --- a/plugins/TopToolBar/src/ttbopt.cpp +++ b/plugins/TopToolBar/src/ttbopt.cpp @@ -540,8 +540,7 @@ static INT_PTR CALLBACK ButOrderOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR int TTBOptInit(WPARAM wParam, LPARAM)
{
- OPTIONSDIALOGPAGE odp = { 0 };
- odp.hInstance = g_plugin.getInst();
+ OPTIONSDIALOGPAGE odp = {};
odp.szGroup.a = LPGEN("Contact list");
odp.position = -1000000000;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_BUTORDER);
|