diff options
author | George Hazan <ghazan@miranda.im> | 2018-06-28 12:07:29 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-06-28 12:07:29 +0300 |
commit | d22c3f5780a262df8de43838875660bf3d8128a5 (patch) | |
tree | de1cfc7768208fc5dc38c8fe9987ae87377ebf78 /src/core | |
parent | 56625de314701a93f80bfadc2b4ed6fe4ce4727a (diff) |
another fix for #1442 - the same button for StdUserInfo
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/stduserinfo/src/stdafx.h | 1 | ||||
-rw-r--r-- | src/core/stduserinfo/src/userinfo.cpp | 12 |
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);
|