diff options
author | George Hazan <ghazan@miranda.im> | 2016-11-03 17:48:36 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2016-11-03 17:48:36 +0300 |
commit | b07508f65d23fe7b6aca8c9ed28f4e391a308df7 (patch) | |
tree | 560c22de36f31dbafdc36af7773d65d785bb4d04 /src/core/stdmsg | |
parent | 15aec1eb990af0c0f15f42d380d718e458df81d6 (diff) |
code merge
Diffstat (limited to 'src/core/stdmsg')
-rw-r--r-- | src/core/stdmsg/src/chat_manager.cpp | 15 | ||||
-rw-r--r-- | src/core/stdmsg/src/chat_options.cpp | 2 | ||||
-rw-r--r-- | src/core/stdmsg/src/globals.cpp | 6 | ||||
-rw-r--r-- | src/core/stdmsg/src/msgoptions.cpp | 4 | ||||
-rw-r--r-- | src/core/stdmsg/src/msgs.cpp | 3 | ||||
-rw-r--r-- | src/core/stdmsg/src/stdafx.h | 1 |
6 files changed, 15 insertions, 16 deletions
diff --git a/src/core/stdmsg/src/chat_manager.cpp b/src/core/stdmsg/src/chat_manager.cpp index eabc191afc..a32ffae315 100644 --- a/src/core/stdmsg/src/chat_manager.cpp +++ b/src/core/stdmsg/src/chat_manager.cpp @@ -136,16 +136,6 @@ HIMAGELIST hIconsList; GlobalLogSettings g_Settings; -static int OnShutdown(WPARAM, LPARAM) -{ - for (SESSION_INFO *si = pci->wndList; si; si = si->next) - SendMessage(si->hWnd, WM_CLOSE, 0, 0); - - TabM_RemoveAll(); - ImageList_Destroy(hIconsList); - return 0; -} - static void OnCreateModule(MODULEINFO *mi) { mi->OnlineIconIndex = ImageList_AddIcon(hIconsList, Skin_LoadProtoIcon(mi->pszModule, ID_STATUS_ONLINE)); @@ -384,7 +374,7 @@ static void RegisterFonts() Colour_RegisterW(&colourid); } -static int OnCheckPlugins(WPARAM, LPARAM) +int OnCheckPlugins(WPARAM, LPARAM) { SmileyAddInstalled = ServiceExists(MS_SMILEYADD_REPLACESMILEYS); PopupInstalled = ServiceExists(MS_POPUP_ADDPOPUPT); @@ -453,10 +443,7 @@ void Load_ChatModule() TabsInit(); - HookEvent(ME_OPT_INITIALISE, OptionsInitialize); - HookEvent(ME_SYSTEM_SHUTDOWN, OnShutdown); HookEvent(ME_SYSTEM_MODULELOAD, OnCheckPlugins); - HookEvent(ME_SYSTEM_MODULESLOADED, OnCheckPlugins); } void Unload_ChatModule() diff --git a/src/core/stdmsg/src/chat_options.cpp b/src/core/stdmsg/src/chat_options.cpp index f234bdbeed..f9b14c814f 100644 --- a/src/core/stdmsg/src/chat_options.cpp +++ b/src/core/stdmsg/src/chat_options.cpp @@ -729,7 +729,7 @@ static INT_PTR CALLBACK DlgProcOptionsPopup(HWND hwndDlg, UINT uMsg, WPARAM wPar return FALSE; } -int OptionsInitialize(WPARAM wParam, LPARAM) +int ChatOptionsInitialize(WPARAM wParam) { OPTIONSDIALOGPAGE odp = { 0 }; odp.position = 910000000; diff --git a/src/core/stdmsg/src/globals.cpp b/src/core/stdmsg/src/globals.cpp index e26c8ab45a..b4a27046b6 100644 --- a/src/core/stdmsg/src/globals.cpp +++ b/src/core/stdmsg/src/globals.cpp @@ -46,6 +46,12 @@ static int OnShutdown(WPARAM, LPARAM) {
WindowList_Destroy(g_dat.hMessageWindowList);
g_dat.hMessageWindowList = NULL;
+
+ for (SESSION_INFO *si = pci->wndList; si; si = si->next)
+ SendMessage(si->hWnd, WM_CLOSE, 0, 0);
+
+ TabM_RemoveAll();
+ ImageList_Destroy(hIconsList);
return 0;
}
diff --git a/src/core/stdmsg/src/msgoptions.cpp b/src/core/stdmsg/src/msgoptions.cpp index d82cdb6b76..9cbd7a6407 100644 --- a/src/core/stdmsg/src/msgoptions.cpp +++ b/src/core/stdmsg/src/msgoptions.cpp @@ -24,6 +24,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "m_fontservice.h"
#include "m_modernopt.h"
+int ChatOptionsInitialize(WPARAM);
+
struct FontOptionsList
{
const wchar_t* szDescr;
@@ -561,6 +563,8 @@ static int OptInitialise(WPARAM wParam, LPARAM) odp.szTab.a = LPGEN("Typing notify");
odp.pfnDlgProc = DlgProcTypeOptions;
Options_AddPage(wParam, &odp);
+
+ ChatOptionsInitialize(wParam);
return 0;
}
diff --git a/src/core/stdmsg/src/msgs.cpp b/src/core/stdmsg/src/msgs.cpp index ec7f46d28c..a5c813baa8 100644 --- a/src/core/stdmsg/src/msgs.cpp +++ b/src/core/stdmsg/src/msgs.cpp @@ -28,6 +28,8 @@ const CLSID IID_IRichEditOle = { 0x00020D00, 0x00, 0x00, { 0xC0, 0x00, 0x00, 0x0 const CLSID IID_IRichEditOleCallback = { 0x00020D03, 0x00, 0x00, { 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 } };
#endif
+int OnCheckPlugins(WPARAM, LPARAM);
+
HCURSOR hCurSplitNS, hCurSplitWE, hCurHyperlinkHand;
HANDLE hHookWinEvt, hHookWinPopup, hHookWinWrite;
HGENMENU hMsgMenuItem;
@@ -292,6 +294,7 @@ static int SplitmsgModulesLoaded(WPARAM, LPARAM) {
RegisterSRMMFonts();
LoadMsgLogIcons();
+ OnCheckPlugins(0, 0);
CMenuItem mi;
SET_UID(mi, 0x58d8dc1, 0x1c25, 0x49c0, 0xb8, 0x7c, 0xa3, 0x22, 0x2b, 0x3d, 0xf1, 0xd8);
diff --git a/src/core/stdmsg/src/stdafx.h b/src/core/stdmsg/src/stdafx.h index e7e1a765ec..8b3c9e400c 100644 --- a/src/core/stdmsg/src/stdafx.h +++ b/src/core/stdmsg/src/stdafx.h @@ -141,7 +141,6 @@ SESSION_INFO* SM_GetPrevWindow(SESSION_INFO *si); SESSION_INFO* SM_GetNextWindow(SESSION_INFO *si);
// options.c
-int OptionsInitialize(WPARAM wParam, LPARAM lParam);
void AddIcons(void);
HICON LoadIconEx(const char *pszIcoLibName, bool big);
HANDLE GetIconHandle(const char *pszIcolibName);
|