summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src/msglog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/TabSRMM/src/msglog.cpp')
-rw-r--r--plugins/TabSRMM/src/msglog.cpp23
1 files changed, 11 insertions, 12 deletions
diff --git a/plugins/TabSRMM/src/msglog.cpp b/plugins/TabSRMM/src/msglog.cpp
index 4f6ea16c47..0b3db15ff0 100644
--- a/plugins/TabSRMM/src/msglog.cpp
+++ b/plugins/TabSRMM/src/msglog.cpp
@@ -658,9 +658,8 @@ static char *Template_CreateRTFFromDbEvent(struct TWindowData *dat, HANDLE hCont
}
if (dwEffectiveFlags & MWF_LOG_GROUPMODE && ((dbei.flags & (DBEF_SENT | DBEF_READ | DBEF_RTL)) == LOWORD(dat->iLastEventType)) && dbei.eventType == EVENTTYPE_MESSAGE && HIWORD(dat->iLastEventType) == EVENTTYPE_MESSAGE && (dbei.timestamp - dat->lastEventTime) < 86400) {
g_groupBreak = FALSE;
- if ((time_t)dbei.timestamp > today && dat->lastEventTime < today) {
+ if ((time_t)dbei.timestamp > today && dat->lastEventTime < today)
g_groupBreak = TRUE;
- }
}
if (!streamData->isEmpty && g_groupBreak && (dwEffectiveFlags & MWF_LOG_GRID))
AppendToBuffer(&buffer, &bufferEnd, &bufferAlloced, "\\sl-1\\slmult0\\highlight%d\\cf%d\\-\\par\\sl0", MSGDLGFONTCOUNT + 4, MSGDLGFONTCOUNT + 4);
@@ -1245,7 +1244,7 @@ void TSAPI StreamInEvents(HWND hwndDlg, HANDLE hDbEventFirst, int count, int fAp
if (IsWindow(hwndrtf)) {
si.fMask = SIF_PAGE | SIF_RANGE | SIF_POS;;
GetScrollInfo(hwndrtf, SB_VERT, &si);
- SendMessage(hwndrtf, EM_GETSCROLLPOS, 0, (LPARAM) &pt);
+ SendMessage(hwndrtf, EM_GETSCROLLPOS, 0, (LPARAM)&pt);
if (GetWindowLongPtr(hwndrtf, GWL_STYLE) & WS_VSCROLL)
psi = &si;
@@ -1331,7 +1330,7 @@ void TSAPI StreamInEvents(HWND hwndDlg, HANDLE hDbEventFirst, int count, int fAp
szMyName = dat->szMyNickname;
SendDlgItemMessage(hwndDlg, IDC_LOG, EM_HIDESELECTION, TRUE, 0);
- SendDlgItemMessage(hwndDlg, IDC_LOG, EM_EXGETSEL, 0, (LPARAM) & oldSel);
+ SendDlgItemMessage(hwndDlg, IDC_LOG, EM_EXGETSEL, 0, (LPARAM)& oldSel);
streamData.hContact = dat->hContact;
streamData.hDbEvent = hDbEventFirst;
streamData.dlgDat = dat;
@@ -1346,14 +1345,14 @@ void TSAPI StreamInEvents(HWND hwndDlg, HANDLE hDbEventFirst, int count, int fAp
GETTEXTLENGTHEX gtxl = {0};
gtxl.codepage = 1200;
gtxl.flags = GTL_DEFAULT | GTL_PRECISE | GTL_NUMCHARS;
- fi.chrg.cpMin = SendDlgItemMessage(hwndDlg, IDC_LOG, EM_GETTEXTLENGTHEX, (WPARAM) & gtxl, 0);
+ fi.chrg.cpMin = SendDlgItemMessage(hwndDlg, IDC_LOG, EM_GETTEXTLENGTHEX, (WPARAM)& gtxl, 0);
sel.cpMin = sel.cpMax = GetWindowTextLength(GetDlgItem(hwndDlg, IDC_LOG));
- SendDlgItemMessage(hwndDlg, IDC_LOG, EM_EXSETSEL, 0, (LPARAM) & sel);
+ SendDlgItemMessage(hwndDlg, IDC_LOG, EM_EXSETSEL, 0, (LPARAM)& sel);
} else {
SetDlgItemText(hwndDlg, IDC_LOG, _T(""));
sel.cpMin = 0;
sel.cpMax = GetWindowTextLength(hwndrtf);
- SendDlgItemMessage(hwndDlg, IDC_LOG, EM_EXSETSEL, 0, (LPARAM) &sel);
+ SendDlgItemMessage(hwndDlg, IDC_LOG, EM_EXSETSEL, 0, (LPARAM)&sel);
fi.chrg.cpMin = 0;
dat->isAutoRTL = 0;
}
@@ -1361,9 +1360,9 @@ void TSAPI StreamInEvents(HWND hwndDlg, HANDLE hDbEventFirst, int count, int fAp
SendMessage(hwndrtf, WM_SETREDRAW, FALSE, 0);
- SendDlgItemMessage(hwndDlg, IDC_LOG, EM_STREAMIN, fAppend ? SFF_SELECTION | SF_RTF : SFF_SELECTION | SF_RTF, (LPARAM) & stream);
- //SendDlgItemMessage(hwndDlg, IDC_LOG, EM_STREAMIN, fAppend ? SFF_SELECTION | SF_RTF : SF_RTF, (LPARAM) & stream);
- SendDlgItemMessage(hwndDlg, IDC_LOG, EM_EXSETSEL, 0, (LPARAM) & oldSel);
+ SendDlgItemMessage(hwndDlg, IDC_LOG, EM_STREAMIN, fAppend ? SFF_SELECTION | SF_RTF : SFF_SELECTION | SF_RTF, (LPARAM)& stream);
+ //SendDlgItemMessage(hwndDlg, IDC_LOG, EM_STREAMIN, fAppend ? SFF_SELECTION | SF_RTF : SF_RTF, (LPARAM)& stream);
+ SendDlgItemMessage(hwndDlg, IDC_LOG, EM_EXSETSEL, 0, (LPARAM)& oldSel);
SendDlgItemMessage(hwndDlg, IDC_LOG, EM_HIDESELECTION, FALSE, 0);
dat->hDbEventLast = streamData.hDbEventLast;
@@ -1379,9 +1378,9 @@ void TSAPI StreamInEvents(HWND hwndDlg, HANDLE hDbEventFirst, int count, int fAp
gtxl.codepage = 1200;
gtxl.flags = GTL_DEFAULT | GTL_PRECISE | GTL_NUMCHARS;
ZeroMemory(&pf2, sizeof(PARAFORMAT2));
- sel.cpMax = SendDlgItemMessage(hwndDlg, IDC_LOG, EM_GETTEXTLENGTHEX, (WPARAM) & gtxl, 0);
+ sel.cpMax = SendDlgItemMessage(hwndDlg, IDC_LOG, EM_GETTEXTLENGTHEX, (WPARAM)& gtxl, 0);
sel.cpMin = sel.cpMax - 1;
- SendDlgItemMessage(hwndDlg, IDC_LOG, EM_EXSETSEL, 0, (LPARAM) & sel);
+ SendDlgItemMessage(hwndDlg, IDC_LOG, EM_EXSETSEL, 0, (LPARAM)& sel);
SendDlgItemMessage(hwndDlg, IDC_LOG, EM_REPLACESEL, FALSE, (LPARAM)_T(""));
dat->isAutoRTL |= 2;
}