summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src/msglog.cpp
diff options
context:
space:
mode:
authorTobias Weimer <wishmaster51@googlemail.com>2014-03-09 17:45:14 +0000
committerTobias Weimer <wishmaster51@googlemail.com>2014-03-09 17:45:14 +0000
commit535b7733c38c9e4c75a8ff73f231c8b807194124 (patch)
tree95fe152f1c608768d7ae3d800f2c9f7ee21a2269 /plugins/TabSRMM/src/msglog.cpp
parent79ef51422c7fa9cc9867355b1518ec6ce7be52c2 (diff)
minor cleanup
git-svn-id: http://svn.miranda-ng.org/main/trunk@8514 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TabSRMM/src/msglog.cpp')
-rw-r--r--plugins/TabSRMM/src/msglog.cpp20
1 files changed, 5 insertions, 15 deletions
diff --git a/plugins/TabSRMM/src/msglog.cpp b/plugins/TabSRMM/src/msglog.cpp
index 29605d0d7c..a0960614c7 100644
--- a/plugins/TabSRMM/src/msglog.cpp
+++ b/plugins/TabSRMM/src/msglog.cpp
@@ -502,12 +502,9 @@ static void Build_RTF_Header(char **buffer, int *bufferEnd, int *bufferAlloced,
//mir_free() the return value
static char *CreateRTFHeader(TWindowData *dat)
{
- char *buffer;
- int bufferAlloced, bufferEnd;
-
- bufferEnd = 0;
- bufferAlloced = 1024;
- buffer = (char *) mir_alloc(bufferAlloced);
+ int bufferEnd = 0;
+ int bufferAlloced = 1024;
+ char *buffer = (char *) mir_alloc(bufferAlloced);
buffer[0] = '\0';
Build_RTF_Header(&buffer, &bufferEnd, &bufferAlloced, dat);
@@ -541,10 +538,7 @@ static char *CreateRTFTail(TWindowData *dat)
int TSAPI DbEventIsShown(TWindowData *dat, DBEVENTINFO *dbei)
{
- if (!IsCustomEvent(dbei->eventType))
- return 1;
-
- if (DbEventIsForMsgWindow(dbei))
+ if (!IsCustomEvent(dbei->eventType) || DbEventIsForMsgWindow(dbei))
return 1;
return IsStatusEvent(dbei->eventType);
@@ -552,7 +546,7 @@ int TSAPI DbEventIsShown(TWindowData *dat, DBEVENTINFO *dbei)
int DbEventIsForMsgWindow(DBEVENTINFO *dbei)
{
- DBEVENTTYPEDESCR* et = (DBEVENTTYPEDESCR*)CallService(MS_DB_EVENT_GETTYPE, (WPARAM)dbei->szModule, (LPARAM)dbei->eventType);
+ DBEVENTTYPEDESCR *et = (DBEVENTTYPEDESCR*)CallService(MS_DB_EVENT_GETTYPE, (WPARAM)dbei->szModule, (LPARAM)dbei->eventType);
return et && (et->flags & DETF_MSGWINDOW);
}
@@ -973,13 +967,9 @@ static char *Template_CreateRTFFromDbEvent(TWindowData *dat, MCONTACT hContact,
AppendUnicodeToBuffer(&buffer, &bufferEnd, &bufferAlloced, (wchar_t *)dbei.szModule, MAKELONG(isSent, dat->isHistory));
break;
case 'M': // message
- if (bIsStatusChangeEvent)
- dbei.eventType = EVENTTYPE_STATUSCHANGE;
-
switch (dbei.eventType) {
case EVENTTYPE_MESSAGE:
case EVENTTYPE_ERRMSG:
- case EVENTTYPE_STATUSCHANGE:
if (bIsStatusChangeEvent || dbei.eventType == EVENTTYPE_ERRMSG) {
if (dbei.eventType == EVENTTYPE_ERRMSG && dbei.cbBlob == 0)
break;