diff options
author | George Hazan <ghazan@miranda.im> | 2016-12-01 19:33:16 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2016-12-01 19:33:35 +0300 |
commit | 06fc3d811d71a44b92d45e1263e5fb0099a7304e (patch) | |
tree | cbcdafbcddacab601a6d47321ec09aac5d5e5c0c /plugins/Nudge/src | |
parent | bd408d296ccfa16dba379f3820a2007ff6963a6a (diff) |
toolbar icons processing code moved to mir_app
Diffstat (limited to 'plugins/Nudge/src')
-rw-r--r-- | plugins/Nudge/src/main.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
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);
}
}
|