diff options
author | George Hazan <ghazan@miranda.im> | 2022-08-12 14:21:02 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2022-08-12 14:21:02 +0300 |
commit | fddf088c0c3c922d61edd84d6316ca8b2b872f2b (patch) | |
tree | 2628c437bfb2920232696c14e119ebd6fdfeb4d6 /src/mir_app | |
parent | a0973b8460f258b634d4236313f9dbd488bf38bb (diff) |
fix for the previous commit (we still need a space)
Diffstat (limited to 'src/mir_app')
-rw-r--r-- | src/mir_app/src/chat_log.cpp | 6 | ||||
-rw-r--r-- | src/mir_app/src/chat_tools.cpp | 10 |
2 files changed, 12 insertions, 4 deletions
diff --git a/src/mir_app/src/chat_log.cpp b/src/mir_app/src/chat_log.cpp index b4a140c570..582c7b4851 100644 --- a/src/mir_app/src/chat_log.cpp +++ b/src/mir_app/src/chat_log.cpp @@ -258,9 +258,11 @@ static void AddEventToBuffer(CMStringA &buf, LOGSTREAMDATA *streamData) bool bTextUsed = Chat_GetDefaultEventDescr(streamData->si, streamData->lin, wszCaption);
if (!wszCaption.IsEmpty())
Log_AppendRTF(streamData, !bTextUsed, buf, wszCaption);
-
- if (!bTextUsed && streamData->lin->ptszText)
+ if (!bTextUsed && streamData->lin->ptszText) {
+ if (!wszCaption.IsEmpty())
+ Log_AppendRTF(streamData, false, buf, L" ");
Log_AppendRTF(streamData, false, buf, streamData->lin->ptszText);
+ }
}
wchar_t* MakeTimeStamp(wchar_t *pszStamp, time_t time)
diff --git a/src/mir_app/src/chat_tools.cpp b/src/mir_app/src/chat_tools.cpp index c8da42c41d..4c2bcc7698 100644 --- a/src/mir_app/src/chat_tools.cpp +++ b/src/mir_app/src/chat_tools.cpp @@ -348,8 +348,11 @@ BOOL DoPopup(SESSION_INFO *si, GCEVENT *gce) break;
}
- if (!bTextUsed && lin.ptszText)
+ if (!bTextUsed && lin.ptszText) {
+ if (!wszText.IsEmpty())
+ wszText.AppendChar(' ');
wszText.Append(RemoveFormatting(gce->pszText.w));
+ }
g_chatApi.ShowPopup(si->hContact, si, g_chatApi.getIcon(gce->iType), si->pszModule, si->ptszName, dwColor, L"%s", wszText.c_str());
return TRUE;
@@ -545,8 +548,11 @@ BOOL LogToFile(SESSION_INFO *si, GCEVENT *gce) break;
}
- if (!bTextUsed && lin.ptszText)
+ if (!bTextUsed && lin.ptszText) {
+ if (!buf.IsEmpty())
+ buf.AppendChar(' ');
buf.Append(RemoveFormatting(gce->pszText.w));
+ }
// formatting strings don't need to be translatable - changing them via language pack would
// only screw up the log format.
|