From 06fc3d811d71a44b92d45e1263e5fb0099a7304e Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 1 Dec 2016 19:33:16 +0300 Subject: toolbar icons processing code moved to mir_app --- plugins/Nudge/src/main.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'plugins/Nudge/src') diff --git a/plugins/Nudge/src/main.cpp b/plugins/Nudge/src/main.cpp index c159a76aec..ca4e0f406c 100644 --- a/plugins/Nudge/src/main.cpp +++ b/plugins/Nudge/src/main.cpp @@ -248,15 +248,14 @@ static int TabsrmmButtonPressed(WPARAM wParam, LPARAM lParam) static int TabsrmmButtonInit(WPARAM, LPARAM) { - BBButton bbd = { sizeof(bbd) }; + BBButton bbd = {}; bbd.pszModuleName = "Nudge"; bbd.pwszTooltip = LPGENW("Send Nudge"); bbd.dwDefPos = 300; bbd.bbbFlags = BBBF_ISIMBUTTON | BBBF_CANBEHIDDEN; bbd.hIcon = iconList[0].hIcolib; bbd.dwButtonID = 6000; - bbd.iButtonWidth = 0; - CallService(MS_BB_ADDBUTTON, 0, (LPARAM)&bbd); + Srmm_AddButton(&bbd); return 0; } @@ -265,11 +264,11 @@ void HideNudgeButton(MCONTACT hContact) { char *szProto = GetContactProto(hContact); if (!ProtoServiceExists(szProto, PS_SEND_NUDGE)) { - BBButton bbd = { sizeof(bbd) }; - bbd.bbbFlags = BBSF_HIDDEN | BBSF_DISABLED; + BBButton bbd = {}; bbd.pszModuleName = "Nudge"; bbd.dwButtonID = 6000; - CallService(MS_BB_SETBUTTONSTATE, hContact, (LPARAM)&bbd); + bbd.bbbFlags = BBSF_HIDDEN | BBSF_DISABLED; + Srmm_SetButtonState(hContact, &bbd); } } -- cgit v1.2.3