From d8bbe6b4459415b6005b3609f444893fa3146e77 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 13 Jul 2012 16:33:32 +0000 Subject: Clist Nicer: valid service creation order git-svn-id: http://svn.miranda-ng.org/main/trunk@949 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Clist_nicer/SRC/clui.cpp | 16 ++++++++++------ plugins/Clist_nicer/SRC/init.cpp | 2 ++ 2 files changed, 12 insertions(+), 6 deletions(-) (limited to 'plugins/Clist_nicer') diff --git a/plugins/Clist_nicer/SRC/clui.cpp b/plugins/Clist_nicer/SRC/clui.cpp index a000114e6c..97d0625400 100644 --- a/plugins/Clist_nicer/SRC/clui.cpp +++ b/plugins/Clist_nicer/SRC/clui.cpp @@ -2082,11 +2082,6 @@ void LoadCLUIModule(void) WNDCLASS wndclass; HookEvent(ME_SYSTEM_MODULESLOADED, CluiModulesLoaded); - HookEvent(ME_MC_DEFAULTTCHANGED, MetaChanged); - HookEvent(ME_MC_SUBCONTACTSCHANGED, MetaChanged); - - InitGroupMenus(); - LoadExtBkSettingsFromDB(); wndclass.style = 0; wndclass.lpfnWndProc = EventAreaWndProc; @@ -2109,13 +2104,22 @@ void LoadCLUIModule(void) LoadExtraIconModule(); SFL_RegisterWindowClass(); - PreCreateCLC(pcli->hwndContactList); LoadCLUIFramesModule(); CreateServiceFunction("CLN/About", CLN_ShowAbout); CreateServiceFunction(MS_CLUI_SHOWMAINMENU, CLN_ShowMainMenu); CreateServiceFunction(MS_CLUI_SHOWSTATUSMENU, CLN_ShowStatusMenu); } +void OnCreateClc() +{ + HookEvent(ME_MC_DEFAULTTCHANGED, MetaChanged); + HookEvent(ME_MC_SUBCONTACTSCHANGED, MetaChanged); + + InitGroupMenus(); + LoadExtBkSettingsFromDB(); + PreCreateCLC(pcli->hwndContactList); +} + static struct { UINT id; char *name; diff --git a/plugins/Clist_nicer/SRC/init.cpp b/plugins/Clist_nicer/SRC/init.cpp index 68f7127809..18f9a65158 100644 --- a/plugins/Clist_nicer/SRC/init.cpp +++ b/plugins/Clist_nicer/SRC/init.cpp @@ -183,6 +183,7 @@ extern "C" __declspec(dllexport) const MUUID * MirandaPluginInterfaces(void) int LoadContactListModule(void); int LoadCLCModule(void); void LoadCLUIModule( void ); +void OnCreateClc( void ); static int systemModulesLoaded(WPARAM wParam, LPARAM lParam) { @@ -339,6 +340,7 @@ LBL_Error: pcli->pfnGetWindowVisibleState = GetWindowVisibleState; pcli->pfnHitTest = HitTest; pcli->pfnLoadContactTree = LoadContactTree; + pcli->pfnOnCreateClc = OnCreateClc; pcli->pfnPaintClc = PaintClc; pcli->pfnRebuildEntireList = RebuildEntireList; pcli->pfnRowHitTest = RowHeight::hitTest; -- cgit v1.2.3