diff options
author | George Hazan <george.hazan@gmail.com> | 2014-01-22 11:11:55 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-01-22 11:11:55 +0000 |
commit | b5fe138f83cff589109d931689e897779feb9b70 (patch) | |
tree | 165a65802d9fc6ce2b0e0867653f3aee8865419e /src/core | |
parent | ef0abe4f9f67eeff4007f4839ba08a503472c74c (diff) |
crash in StdChat on reloading font/color settings
git-svn-id: http://svn.miranda-ng.org/main/trunk@7824 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/stdchat/src/main.cpp | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/src/core/stdchat/src/main.cpp b/src/core/stdchat/src/main.cpp index 49aa8fcc07..63a46a0cee 100644 --- a/src/core/stdchat/src/main.cpp +++ b/src/core/stdchat/src/main.cpp @@ -280,18 +280,6 @@ static void OnLoadSettings() g_Settings.TabRestore = db_get_b(NULL, CHAT_MODULE, "TabRestore", 0) != 0;
g_Settings.TabsAtBottom = db_get_b(NULL, CHAT_MODULE, "TabBottom", 0) != 0;
g_Settings.TabCloseOnDblClick = db_get_b(NULL, CHAT_MODULE, "TabCloseOnDblClick", 0) != 0;
-
- ZeroMemory(&g_TabSession, sizeof(SESSION_INFO));
- g_TabSession.iType = GCW_TABROOM;
- g_TabSession.iSplitterX = g_Settings.iSplitterX;
- g_TabSession.iSplitterY = g_Settings.iSplitterY;
- g_TabSession.iLogFilterFlags = (int)db_get_dw(NULL, CHAT_MODULE, "FilterFlags", 0x03E0);
- g_TabSession.bFilterEnabled = db_get_b(NULL, CHAT_MODULE, "FilterEnabled", 0);
- g_TabSession.bNicklistEnabled = db_get_b(NULL, CHAT_MODULE, "ShowNicklist", 1);
- g_TabSession.iFG = 4;
- g_TabSession.bFGSet = TRUE;
- g_TabSession.iBG = 2;
- g_TabSession.bBGSet = TRUE;
}
static void RegisterFonts()
@@ -326,6 +314,21 @@ static void RegisterFonts() ColourRegisterT(&colourid);
}
+static void TabsInit()
+{
+ ZeroMemory(&g_TabSession, sizeof(SESSION_INFO));
+ g_TabSession.iType = GCW_TABROOM;
+ g_TabSession.iSplitterX = g_Settings.iSplitterX;
+ g_TabSession.iSplitterY = g_Settings.iSplitterY;
+ g_TabSession.iLogFilterFlags = (int)db_get_dw(NULL, CHAT_MODULE, "FilterFlags", 0x03E0);
+ g_TabSession.bFilterEnabled = db_get_b(NULL, CHAT_MODULE, "FilterEnabled", 0);
+ g_TabSession.bNicklistEnabled = db_get_b(NULL, CHAT_MODULE, "ShowNicklist", 1);
+ g_TabSession.iFG = 4;
+ g_TabSession.bFGSet = TRUE;
+ g_TabSession.iBG = 2;
+ g_TabSession.bBGSet = TRUE;
+}
+
extern "C" __declspec(dllexport) int Load(void)
{
mir_getLP(&pluginInfo);
@@ -369,6 +372,7 @@ extern "C" __declspec(dllexport) int Load(void) g_hMenu = LoadMenu(g_hInst, MAKEINTRESOURCE(IDR_MENU));
LoadIcons();
+ TabsInit();
HookEvent(ME_OPT_INITIALISE, OptionsInitialize);
HookEvent(ME_SYSTEM_SHUTDOWN, OnShutdown);
|