summaryrefslogtreecommitdiff
path: root/src/core/stduserinfo
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/stduserinfo')
-rw-r--r--src/core/stduserinfo/src/stdafx.h1
-rw-r--r--src/core/stduserinfo/src/userinfo.cpp12
2 files changed, 13 insertions, 0 deletions
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 <m_findadd.h>
#include <m_icolib.h>
#include <m_timezones.h>
+#include <m_toptoolbar.h>
#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);