diff options
author | George Hazan <george.hazan@gmail.com> | 2023-09-06 18:02:58 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2023-09-06 18:02:58 +0300 |
commit | c24c2276155a67fa10f1e82495d2f83a856ebf24 (patch) | |
tree | 573b0b64872bf7dee00a94fa74f7406014e7dfb3 /plugins | |
parent | 5a6d2b4e7fa4f69e3b65718495386ac6c6efc3fe (diff) |
NewStory: TopToolbar button
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/NewStory/src/main.cpp | 16 | ||||
-rw-r--r-- | plugins/NewStory/src/stdafx.h | 1 |
2 files changed, 15 insertions, 2 deletions
diff --git a/plugins/NewStory/src/main.cpp b/plugins/NewStory/src/main.cpp index b97d6e300c..d877250f28 100644 --- a/plugins/NewStory/src/main.cpp +++ b/plugins/NewStory/src/main.cpp @@ -107,12 +107,24 @@ static int evtEventEdited(WPARAM hContact, LPARAM lParam) return SmartSendEvent(UM_EDITEVENT, hContact, lParam); } +static int evtTopToolbar(WPARAM, LPARAM) +{ + // TopToolbar button + TTBButton ttb = {}; + ttb.dwFlags = TTBBF_VISIBLE; + ttb.pszService = "NewStory/GlobalSearch"; + ttb.name = LPGEN("Global search"); + ttb.hIconHandleUp = g_plugin.getIconHandle(IDI_NEWSTORY); + g_plugin.addTTB(&ttb); + return 0; +} + static int evtModulesLoaded(WPARAM, LPARAM) { + HookEvent(ME_TTB_MODULELOADED, evtTopToolbar); + InitFonts(); InitNewstoryControl(); - - LoadTemplates(); return 0; } diff --git a/plugins/NewStory/src/stdafx.h b/plugins/NewStory/src/stdafx.h index d9d8afab8d..60d64e7637 100644 --- a/plugins/NewStory/src/stdafx.h +++ b/plugins/NewStory/src/stdafx.h @@ -53,6 +53,7 @@ Boston, MA 02111-1307, USA. #include <m_srmm_int.h> #include <m_text.h> #include <m_timezones.h> +#include <m_toptoolbar.h> #include <m_userinfo.h> #include <m_utils.h> |