From d22c3f5780a262df8de43838875660bf3d8128a5 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 28 Jun 2018 12:07:29 +0300 Subject: another fix for #1442 - the same button for StdUserInfo --- src/core/stduserinfo/src/stdafx.h | 1 + src/core/stduserinfo/src/userinfo.cpp | 12 ++++++++++++ 2 files changed, 13 insertions(+) (limited to 'src/core') diff --git a/src/core/stduserinfo/src/stdafx.h b/src/core/stduserinfo/src/stdafx.h index 6c6a24b279..ab612d0f60 100644 --- a/src/core/stduserinfo/src/stdafx.h +++ b/src/core/stduserinfo/src/stdafx.h @@ -61,6 +61,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include #include #include +#include #include "version.h" diff --git a/src/core/stduserinfo/src/userinfo.cpp b/src/core/stduserinfo/src/userinfo.cpp index 359edb0f9e..33206334ef 100644 --- a/src/core/stduserinfo/src/userinfo.cpp +++ b/src/core/stduserinfo/src/userinfo.cpp @@ -615,6 +615,17 @@ static int ShutdownUserInfo(WPARAM, LPARAM) return 0; } +static int OnTopToolBarLoaded(WPARAM, LPARAM) +{ + TTBButton ttb = {}; + ttb.dwFlags = TTBBF_VISIBLE | TTBBF_SHOWTOOLTIP; + ttb.pszService = MS_USERINFO_SHOWDIALOG; + ttb.hIconHandleUp = Skin_GetIconHandle(SKINICON_OTHER_USERDETAILS); + ttb.name = ttb.pszTooltipUp = LPGEN("User &details"); + g_plugin.addTTB(&ttb); + return 0; +} + int LoadUserInfoModule(void) { CreateServiceFunction("UserInfo/AddPage", AddDetailsPage); @@ -622,6 +633,7 @@ int LoadUserInfoModule(void) hDetailsInitEvent = CreateHookableEvent(ME_USERINFO_INITIALISE); + HookEvent(ME_TTB_MODULELOADED, OnTopToolBarLoaded); HookEvent(ME_USERINFO_INITIALISE, DetailsInit); HookEvent(ME_DB_CONTACT_DELETED, UserInfoContactDelete); HookEvent(ME_SYSTEM_PRESHUTDOWN, ShutdownUserInfo); -- cgit v1.2.3