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/FTPFileYM/src/ftpfile.cpp | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'plugins/FTPFileYM/src') diff --git a/plugins/FTPFileYM/src/ftpfile.cpp b/plugins/FTPFileYM/src/ftpfile.cpp index 143108bf41..90dc4e12eb 100644 --- a/plugins/FTPFileYM/src/ftpfile.cpp +++ b/plugins/FTPFileYM/src/ftpfile.cpp @@ -181,18 +181,15 @@ void InitHotkeys() void InitTabsrmmButton() { - if (ServiceExists(MS_BB_ADDBUTTON)) { - BBButton btn = { 0 }; - btn.cbSize = sizeof(btn); - btn.dwButtonID = 1; - btn.pszModuleName = MODULE; - btn.dwDefPos = 105; - btn.hIcon = iconList[ServerList::FTP_COUNT].hIcolib; - btn.bbbFlags = BBBF_ISARROWBUTTON | BBBF_ISIMBUTTON | BBBF_CANBEHIDDEN; - btn.pwszTooltip = TranslateT("FTP File"); - CallService(MS_BB_ADDBUTTON, 0, (LPARAM)&btn); - HookEvent(ME_MSG_BUTTONPRESSED, TabsrmmButtonPressed); - } + BBButton btn = {}; + btn.dwButtonID = 1; + btn.pszModuleName = MODULE; + btn.dwDefPos = 105; + btn.hIcon = iconList[ServerList::FTP_COUNT].hIcolib; + btn.bbbFlags = BBBF_ISARROWBUTTON | BBBF_ISIMBUTTON | BBBF_CANBEHIDDEN; + btn.pwszTooltip = TranslateT("FTP File"); + Srmm_AddButton(&btn); + HookEvent(ME_MSG_BUTTONPRESSED, TabsrmmButtonPressed); } //------------ MENU & BUTTON HANDLERS ------------// -- cgit v1.2.3