summaryrefslogtreecommitdiff
path: root/plugins/PasteIt
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2016-12-01 20:51:42 +0300
committerGeorge Hazan <ghazan@miranda.im>2016-12-01 21:49:54 +0300
commitf9c7760f54c279327a977b0cb5ee028c8f0c0bfb (patch)
tree0a1cf4602a5eac89dc38606cc91981c2166a83e0 /plugins/PasteIt
parent40203d30ad1a569cfea61442782393b200e9fbe3 (diff)
more fixes
Diffstat (limited to 'plugins/PasteIt')
-rw-r--r--plugins/PasteIt/src/PasteIt.cpp30
1 files changed, 13 insertions, 17 deletions
diff --git a/plugins/PasteIt/src/PasteIt.cpp b/plugins/PasteIt/src/PasteIt.cpp
index eb34cf7634..c36034cd26 100644
--- a/plugins/PasteIt/src/PasteIt.cpp
+++ b/plugins/PasteIt/src/PasteIt.cpp
@@ -336,23 +336,19 @@ void DefWebPageChanged()
void InitTabsrmmButton()
{
- if (ServiceExists(MS_BB_ADDBUTTON))
- {
- BBButton btn = { 0 };
- btn.cbSize = sizeof(btn);
- btn.dwButtonID = 1;
- btn.pszModuleName = MODULE;
- btn.dwDefPos = 110;
- btn.hIcon = icon.hIcolib;
- btn.bbbFlags = BBBF_ISARROWBUTTON | BBBF_ISIMBUTTON | BBBF_CANBEHIDDEN | BBBF_ISCHATBUTTON;
- btn.pwszTooltip = TranslateT("Paste It");
- CallService(MS_BB_ADDBUTTON, 0, (LPARAM)&btn);
-
- if (hTabsrmmButtonPressed != NULL)
- UnhookEvent(hTabsrmmButtonPressed);
-
- hTabsrmmButtonPressed = HookEvent(ME_MSG_BUTTONPRESSED, TabsrmmButtonPressed);
- }
+ BBButton btn = {};
+ btn.dwButtonID = 1;
+ btn.pszModuleName = MODULE;
+ btn.dwDefPos = 110;
+ btn.hIcon = icon.hIcolib;
+ btn.bbbFlags = BBBF_ISARROWBUTTON | BBBF_ISIMBUTTON | BBBF_CANBEHIDDEN | BBBF_ISCHATBUTTON;
+ btn.pwszTooltip = TranslateT("Paste It");
+ Srmm_AddButton(&btn);
+
+ if (hTabsrmmButtonPressed != NULL)
+ UnhookEvent(hTabsrmmButtonPressed);
+
+ hTabsrmmButtonPressed = HookEvent(ME_MSG_BUTTONPRESSED, TabsrmmButtonPressed);
}
int WindowEvent(WPARAM, MessageWindowEventData* lParam)