diff options
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> |