From 239519030ec3cd6cf571ab79348596be0cb8eeeb Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 27 Oct 2015 20:26:47 +0000 Subject: missing initialization code in StdChat git-svn-id: http://svn.miranda-ng.org/main/trunk@15626 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/core/stdchat/src/main.cpp | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) (limited to 'src/core/stdchat') diff --git a/src/core/stdchat/src/main.cpp b/src/core/stdchat/src/main.cpp index 943ddd594b..28e27f8b5d 100644 --- a/src/core/stdchat/src/main.cpp +++ b/src/core/stdchat/src/main.cpp @@ -315,6 +315,13 @@ static void RegisterFonts() ColourRegisterT(&colourid); } +static int OnCheckPlugins(WPARAM, LPARAM) +{ + SmileyAddInstalled = ServiceExists(MS_SMILEYADD_REPLACESMILEYS); + PopupInstalled = ServiceExists(MS_POPUP_ADDPOPUPT); + return 0; +} + static void TabsInit() { memset(&g_TabSession, 0, sizeof(SESSION_INFO)); @@ -372,11 +379,18 @@ extern "C" __declspec(dllexport) int Load(void) pci->ReloadSettings(); g_hMenu = LoadMenu(g_hInst, MAKEINTRESOURCE(IDR_MENU)); - LoadIcons(); + + hIconsList = ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), ILC_COLOR32 | ILC_MASK, 0, 100); + ImageList_AddIcon(hIconsList, Skin_LoadIcon(SKINICON_EVENT_MESSAGE)); + ImageList_AddIcon(hIconsList, LoadIconEx("overlay", FALSE)); + ImageList_SetOverlayImage(hIconsList, 1, 1); + TabsInit(); HookEvent(ME_OPT_INITIALISE, OptionsInitialize); HookEvent(ME_SYSTEM_SHUTDOWN, OnShutdown); + HookEvent(ME_SYSTEM_MODULELOAD, OnCheckPlugins); + HookEvent(ME_SYSTEM_MODULESLOADED, OnCheckPlugins); return 0; } @@ -395,14 +409,6 @@ extern "C" __declspec(dllexport) int Unload(void) return 0; } -void LoadIcons(void) -{ - hIconsList = ImageList_Create(GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), ILC_COLOR32 | ILC_MASK, 0, 100); - ImageList_AddIcon(hIconsList, Skin_LoadIcon(SKINICON_EVENT_MESSAGE)); - ImageList_AddIcon(hIconsList, LoadIconEx("overlay", FALSE)); - ImageList_SetOverlayImage(hIconsList, 1, 1); -} - ///////////////////////////////////////////////////////////////////////////////////////// CREOleCallback reOleCallback; -- cgit v1.2.3