summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-01-18 12:49:36 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-01-18 12:49:36 +0000
commit08ed3a95b4f42079eea4d930af81257564b85b97 (patch)
treeb0fcfff30e9de62a12256373907db3fe83195841 /src
parent00a9149e272b38b002d2a2711c54fab25bcf733f (diff)
fix for editing log path in StdChat & Scriver
git-svn-id: http://svn.miranda-ng.org/main/trunk@7717 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src')
-rw-r--r--src/core/stdchat/src/options.cpp7
-rw-r--r--src/modules/chat/manager.cpp9
2 files changed, 9 insertions, 7 deletions
diff --git a/src/core/stdchat/src/options.cpp b/src/core/stdchat/src/options.cpp
index 147978e048..987996a1b6 100644
--- a/src/core/stdchat/src/options.cpp
+++ b/src/core/stdchat/src/options.cpp
@@ -579,8 +579,7 @@ static INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPA
db_set_ts(NULL, "Chat", "LogDirectory", pszText);
}
else db_unset(NULL, "Chat", "LogDirectory");
-
- PathToAbsoluteT(pszText, g_Settings.pszLogDir);
+ pci->SM_InvalidateLogDirectories();
iLen = GetWindowTextLength(GetDlgItem(hwndDlg, IDC_LOGTIMESTAMP));
if (iLen > 0) {
@@ -619,8 +618,6 @@ static INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPA
g_Settings.LoggingEnabled = IsDlgButtonChecked(hwndDlg, IDC_LOGGING) == BST_CHECKED ? TRUE : FALSE;
db_set_b(NULL, "Chat", "LoggingEnabled", (BYTE)g_Settings.LoggingEnabled);
- if (g_Settings.LoggingEnabled)
- CreateDirectoryTreeT(g_Settings.pszLogDir);
iLen = SendDlgItemMessage(hwndDlg, IDC_SPIN2, UDM_GETPOS, 0, 0);
db_set_w(NULL, "Chat", "LogLimit", (WORD)iLen);
@@ -642,8 +639,6 @@ static INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPA
else
db_unset(NULL, "Chat", "NicklistRowDist");
- // FreeMsgLogBitmaps(); !!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- // LoadMsgLogBitmaps(); !!!!!!!!!!!!!!!!!!!!!!!!!!!!!
pci->SM_BroadcastMessage(NULL, GC_SETWNDPROPS, 0, 0, TRUE);
return TRUE;
}
diff --git a/src/modules/chat/manager.cpp b/src/modules/chat/manager.cpp
index 9edf986e23..c8ae7836eb 100644
--- a/src/modules/chat/manager.cpp
+++ b/src/modules/chat/manager.cpp
@@ -771,7 +771,7 @@ static char* SM_GetUsers(SESSION_INFO *si)
do {
int pLen = lstrlenA(p), nameLen = lstrlen(utemp->pszUID);
if (pLen + nameLen + 2 > alloced)
- p = (char *)mir_realloc(p, alloced += 4096);
+ p = (char*)mir_realloc(p, alloced += 4096);
WideCharToMultiByte(CP_ACP, 0, utemp->pszUID, -1, p + pLen, nameLen + 1, 0, 0);
lstrcpyA(p + pLen + nameLen, " ");
@@ -781,6 +781,12 @@ static char* SM_GetUsers(SESSION_INFO *si)
return p;
}
+static void SM_InvalidateLogDirectories()
+{
+ for (SESSION_INFO *si = ci.wndList; si; si = si->next)
+ si->pszLogFileName[0] = si->pszLogFileName[1] = 0;
+}
+
@@ -1367,6 +1373,7 @@ CHAT_MANAGER ci =
SM_FindSessionByIndex,
SM_GetUsers,
SM_GetUserFromIndex,
+ SM_InvalidateLogDirectories,
MM_AddModule,
MM_FindModule,