From 6ac63284a8f93f977db66673727d4995a86764c4 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 10 Mar 2013 12:45:32 +0000 Subject: various TTB initialization issues git-svn-id: http://svn.miranda-ng.org/main/trunk@3957 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/BasicHistory/src/BasicHistory.cpp | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'plugins/BasicHistory/src/BasicHistory.cpp') diff --git a/plugins/BasicHistory/src/BasicHistory.cpp b/plugins/BasicHistory/src/BasicHistory.cpp index c9b6920d67..7083ac7e4a 100644 --- a/plugins/BasicHistory/src/BasicHistory.cpp +++ b/plugins/BasicHistory/src/BasicHistory.cpp @@ -96,15 +96,12 @@ int PrebuildContactMenu(WPARAM wParam, LPARAM lParam) int ToolbarModuleLoaded(WPARAM wParam,LPARAM lParam) { - if(ServiceExists(MS_TTB_REMOVEBUTTON)) { - TTBButton tbb = {0}; - tbb.cbSize = sizeof(tbb); - tbb.pszService = MS_HISTORY_SHOWCONTACTHISTORY; - tbb.name = tbb.pszTooltipUp = LPGEN("Open History"); - tbb.dwFlags = TTBBF_SHOWTOOLTIP; - tbb.hIconHandleUp = LoadSkinnedIconHandle(SKINICON_OTHER_HISTORY); - hToolbarButton = TopToolbar_AddButton(&tbb); - } + TTBButton ttb = { sizeof(ttb) }; + ttb.pszService = MS_HISTORY_SHOWCONTACTHISTORY; + ttb.name = ttb.pszTooltipUp = LPGEN("Open History"); + ttb.dwFlags = TTBBF_SHOWTOOLTIP; + ttb.hIconHandleUp = LoadSkinnedIconHandle(SKINICON_OTHER_HISTORY); + hToolbarButton = TopToolbar_AddButton(&ttb); return 0; } @@ -269,9 +266,9 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam) Options::instance->Load(); InitTaskMenuItems(); - HookEvent(ME_TTB_MODULELOADED,ToolbarModuleLoaded); - HookEvent(ME_SYSTEM_PRESHUTDOWN,PreShutdownHistoryModule); - HookEvent(ME_DB_CONTACT_DELETED,HistoryContactDelete); + HookEvent(ME_TTB_MODULELOADED, ToolbarModuleLoaded); + HookEvent(ME_SYSTEM_PRESHUTDOWN, PreShutdownHistoryModule); + HookEvent(ME_DB_CONTACT_DELETED, HistoryContactDelete); HookEvent(ME_FONT_RELOAD, HistoryWindow::FontsChanged); HookEvent(ME_SYSTEM_OKTOEXIT, DoLastTask); -- cgit v1.2.3