diff options
-rw-r--r-- | include/m_chat_int.h | 1 | ||||
-rw-r--r-- | plugins/Scriver/src/chat/options.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/chat/chat.h | 1 | ||||
-rw-r--r-- | plugins/TabSRMM/src/chat/manager.cpp | 8 | ||||
-rw-r--r-- | plugins/TabSRMM/src/chat/options.cpp | 2 | ||||
-rw-r--r-- | src/core/stdchat/src/options.cpp | 7 | ||||
-rw-r--r-- | src/modules/chat/manager.cpp | 9 |
7 files changed, 12 insertions, 18 deletions
diff --git a/include/m_chat_int.h b/include/m_chat_int.h index 899c9f41b5..f0a21adeed 100644 --- a/include/m_chat_int.h +++ b/include/m_chat_int.h @@ -331,6 +331,7 @@ struct CHAT_MANAGER SESSION_INFO* (*SM_FindSessionByIndex)(const char *pszModule, int iItem);
char* (*SM_GetUsers)(SESSION_INFO *si);
USERINFO* (*SM_GetUserFromIndex)(const TCHAR *pszID, const char *pszModule, int index);
+ void (*SM_InvalidateLogDirectories)(void);
MODULEINFO* (*MM_AddModule)(const char *pszModule);
MODULEINFO* (*MM_FindModule)(const char *pszModule);
diff --git a/plugins/Scriver/src/chat/options.cpp b/plugins/Scriver/src/chat/options.cpp index 00b1593e80..0ba390c71b 100644 --- a/plugins/Scriver/src/chat/options.cpp +++ b/plugins/Scriver/src/chat/options.cpp @@ -539,13 +539,13 @@ INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lPa TCHAR *pszText1 = (TCHAR *)malloc(iLen*sizeof(TCHAR)+2);
GetDlgItemText(hwndDlg, IDC_CHAT_LOGDIRECTORY, pszText1, iLen + 1);
db_set_ts(NULL, "Chat", "LogDirectory", pszText1);
- PathToAbsoluteT(pszText1, g_Settings.pszLogDir);
free(pszText1);
}
else {
lstrcpyn(g_Settings.pszLogDir, DEFLOGFILENAME, MAX_PATH);
db_unset(NULL, "Chat", "LogDirectory");
}
+ pci->SM_InvalidateLogDirectories();
iLen = GetWindowTextLength(GetDlgItem(hwndDlg, IDC_CHAT_LOGTIMESTAMP));
if (iLen > 0) {
diff --git a/plugins/TabSRMM/src/chat/chat.h b/plugins/TabSRMM/src/chat/chat.h index e5d82d1272..211a11e60c 100644 --- a/plugins/TabSRMM/src/chat/chat.h +++ b/plugins/TabSRMM/src/chat/chat.h @@ -155,7 +155,6 @@ SESSION_INFO* SM_FindSessionAutoComplete(const char* pszModule, SESSION_INFO* cu void SM_RemoveContainer(TContainerData *pContainer);
BOOL SM_ReconfigureFilters();
-BOOL SM_InvalidateLogDirectories();
//clist.c
diff --git a/plugins/TabSRMM/src/chat/manager.cpp b/plugins/TabSRMM/src/chat/manager.cpp index b14d53dbbf..d58f487c7d 100644 --- a/plugins/TabSRMM/src/chat/manager.cpp +++ b/plugins/TabSRMM/src/chat/manager.cpp @@ -44,14 +44,6 @@ BOOL SM_ReconfigureFilters() return TRUE;
}
-BOOL SM_InvalidateLogDirectories()
-{
- for (SESSION_INFO *si = pci->wndList; si; si = si->next)
- si->pszLogFileName[0] = si->pszLogFileName[1] = 0;
-
- return TRUE;
-}
-
SESSION_INFO* SM_FindSessionByHWND(HWND hWnd)
{
for (SESSION_INFO *si = pci->wndList; si; si = si->next)
diff --git a/plugins/TabSRMM/src/chat/options.cpp b/plugins/TabSRMM/src/chat/options.cpp index 5b9a0dda05..6d5e71af6b 100644 --- a/plugins/TabSRMM/src/chat/options.cpp +++ b/plugins/TabSRMM/src/chat/options.cpp @@ -932,7 +932,7 @@ INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM db_unset(NULL, "Chat", "LogDirectory");
db_set_b(0, "Chat", "LoggingEnabled", 0);
}
- SM_InvalidateLogDirectories();
+ pci->SM_InvalidateLogDirectories();
iLen = SendDlgItemMessage(hwndDlg, IDC_CHAT_SPIN4, UDM_GETPOS, 0, 0);
db_set_w(NULL, "Chat", "LoggingLimit", (WORD)iLen);
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,
|