summaryrefslogtreecommitdiff
path: root/src/modules/history/history.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-06-06 13:58:20 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-06-06 13:58:20 +0000
commit46a53191c1ad11a41c948594e972568e62d155b4 (patch)
tree7e57e6f7093fb0de766fe13a933d2f9231433e4d /src/modules/history/history.cpp
parent1fe5acae909ea64a1de9ac9f58cae5a3c2d3ad1f (diff)
minor code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@332 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/history/history.cpp')
-rw-r--r--src/modules/history/history.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/modules/history/history.cpp b/src/modules/history/history.cpp
index adc29f469c..dda1617443 100644
--- a/src/modules/history/history.cpp
+++ b/src/modules/history/history.cpp
@@ -212,14 +212,14 @@ static void FillHistoryThread(void* param)
if ( !IsWindow( hInfo->hwnd ))
break;
newBlobSize=CallService(MS_DB_EVENT_GETBLOBSIZE,(WPARAM)hDbEvent,0);
- if(newBlobSize>oldBlobSize) {
+ if (newBlobSize>oldBlobSize) {
dbei.pBlob=(PBYTE)mir_realloc(dbei.pBlob,newBlobSize);
oldBlobSize=newBlobSize;
}
dbei.cbBlob = oldBlobSize;
CallService( MS_DB_EVENT_GET, (WPARAM)hDbEvent, (LPARAM)&dbei );
GetObjectSummary(&dbei,str,SIZEOF(str));
- if(str[0]) {
+ if (str[0]) {
tmi.printTimeStamp(NULL, dbei.timestamp, _T("d t"), strdatetime, SIZEOF(strdatetime), 0);
mir_sntprintf( eventText, SIZEOF(eventText), _T("%s: %s"), strdatetime, str );
i = SendMessage(hwndList, LB_ADDSTRING, 0, (LPARAM)eventText );
@@ -337,7 +337,7 @@ static INT_PTR CALLBACK DlgProcHistory(HWND hwndDlg, UINT msg, WPARAM wParam, LP
DBEVENTINFO dbei;
int sel;
sel=SendDlgItemMessage(hwndDlg,IDC_LIST,LB_GETCURSEL,0,0);
- if(sel==LB_ERR) { EnableWindow(GetDlgItem(hwndDlg,IDC_DELETEHISTORY),FALSE); break; }
+ if (sel==LB_ERR) { EnableWindow(GetDlgItem(hwndDlg,IDC_DELETEHISTORY),FALSE); break; }
EnableWindow(GetDlgItem(hwndDlg,IDC_DELETEHISTORY),TRUE);
contactName = cli.pfnGetContactDisplayName( hContact, 0 );
hDbEvent=(HANDLE)SendDlgItemMessage(hwndDlg,IDC_LIST,LB_GETITEMDATA,sel,0);
@@ -375,24 +375,24 @@ static INT_PTR CALLBACK DlgProcHistory(HWND hwndDlg, UINT msg, WPARAM wParam, LP
dbei.cbSize=sizeof(dbei);
dbei.pBlob=NULL;
oldBlobSize=0;
- for(;;) {
+ for (;;) {
hDbEvent = (HANDLE)SendDlgItemMessage(hwndDlg,IDC_LIST,LB_GETITEMDATA,++index,0);
- if(hDbEvent == ( HANDLE )LB_ERR) {
+ if (hDbEvent == ( HANDLE )LB_ERR) {
index = -1;
continue;
}
- if(hDbEvent==hDbEventStart) break;
+ if (hDbEvent==hDbEventStart) break;
newBlobSize=CallService(MS_DB_EVENT_GETBLOBSIZE,(WPARAM)hDbEvent,0);
- if(newBlobSize>oldBlobSize) {
+ if (newBlobSize>oldBlobSize) {
dbei.pBlob=(PBYTE)mir_realloc(dbei.pBlob,newBlobSize);
oldBlobSize=newBlobSize;
}
dbei.cbBlob=oldBlobSize;
CallService(MS_DB_EVENT_GET,(WPARAM)hDbEvent,(LPARAM)&dbei);
GetObjectDescription(&dbei,str,SIZEOF(str));
- if(str[0]) {
+ if (str[0]) {
CharUpperBuff(str,lstrlen(str));
- if( _tcsstr(str,(const TCHAR*)lParam)!=NULL) {
+ if ( _tcsstr(str,(const TCHAR*)lParam)!=NULL) {
SendDlgItemMessage(hwndDlg,IDC_LIST,LB_SETCURSEL,index,0);
SendMessage(hwndDlg,WM_COMMAND,MAKEWPARAM(IDC_LIST,LBN_SELCHANGE),0);
break;