From f9c7760f54c279327a977b0cb5ee028c8f0c0bfb Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 1 Dec 2016 20:51:42 +0300 Subject: more fixes --- plugins/PasteIt/src/PasteIt.cpp | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) (limited to 'plugins/PasteIt/src') 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) -- cgit v1.2.3