summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-03-31 20:14:20 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-03-31 20:14:20 +0000
commit80fd782ef78a302f77f5f58e08e32c7a29e2105a (patch)
tree470718282d0c773f9b9991acab43d3d114a2e4b5 /plugins/TabSRMM
parent53cec16b92d36308314adc22dc5fa992fd832571 (diff)
HistoryEvents & HistoryKeeper support removed
git-svn-id: http://svn.miranda-ng.org/main/trunk@4269 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TabSRMM')
-rw-r--r--plugins/TabSRMM/src/commonheaders.h1
-rw-r--r--plugins/TabSRMM/src/eventpopups.cpp8
-rw-r--r--plugins/TabSRMM/src/generic_msghandlers.cpp6
-rw-r--r--plugins/TabSRMM/src/msglog.cpp36
4 files changed, 9 insertions, 42 deletions
diff --git a/plugins/TabSRMM/src/commonheaders.h b/plugins/TabSRMM/src/commonheaders.h
index ab646524f8..be9094e797 100644
--- a/plugins/TabSRMM/src/commonheaders.h
+++ b/plugins/TabSRMM/src/commonheaders.h
@@ -96,7 +96,6 @@
#include <m_msg_buttonsbar.h>
#include <m_flash.h>
#include <m_mathmodule.h>
-#include <m_historyevents.h>
#include <m_smileyadd.h>
#define TSAPI __stdcall
diff --git a/plugins/TabSRMM/src/eventpopups.cpp b/plugins/TabSRMM/src/eventpopups.cpp
index 1e243e18f8..dddc88f579 100644
--- a/plugins/TabSRMM/src/eventpopups.cpp
+++ b/plugins/TabSRMM/src/eventpopups.cpp
@@ -856,17 +856,11 @@ int TSAPI UpdateTrayMenu(const TWindowData *dat, WORD wStatus, const char *szPro
int tabSRMM_ShowPopup(WPARAM wParam, LPARAM lParam, WORD eventType, int windowOpen, struct TContainerData *pContainer, HWND hwndChild, const char *szProto, struct TWindowData *dat)
{
- int heFlags;
-
- if (nen_options.iDisable) // no popups at all. Period
+ if (nen_options.iDisable) // no popups at all. Period
return 0;
PU_CleanUp();
- heFlags = HistoryEvents_GetFlags(eventType);
- if (heFlags != -1 && !(heFlags & HISTORYEVENTS_FLAG_DEFAULT)) // Filter history events popups
- return 0;
-
if (nen_options.bDisableNonMessage && eventType != EVENTTYPE_MESSAGE)
return 0;
diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp
index 172e758b0a..62fecfa428 100644
--- a/plugins/TabSRMM/src/generic_msghandlers.cpp
+++ b/plugins/TabSRMM/src/generic_msghandlers.cpp
@@ -1713,12 +1713,6 @@ void TSAPI DM_EventAdded(TWindowData *dat, WPARAM wParam, LPARAM lParam)
BOOL fIsStatusChangeEvent = IsStatusEvent(dbei.eventType);
BOOL fIsNotifyEvent = (dbei.eventType == EVENTTYPE_MESSAGE || dbei.eventType == EVENTTYPE_FILE);
- if (!fIsStatusChangeEvent) {
- int heFlags = HistoryEvents_GetFlags(dbei.eventType);
- if (heFlags != -1 && !(heFlags & HISTORYEVENTS_FLAG_DEFAULT) && !(heFlags & HISTORYEVENTS_FLAG_FLASH_MSG_WINDOW))
- fIsStatusChangeEvent = TRUE;
- }
-
if (dbei.eventType == EVENTTYPE_MESSAGE && (dbei.flags & DBEF_READ))
return;
diff --git a/plugins/TabSRMM/src/msglog.cpp b/plugins/TabSRMM/src/msglog.cpp
index fabeb63f2a..4f6ea16c47 100644
--- a/plugins/TabSRMM/src/msglog.cpp
+++ b/plugins/TabSRMM/src/msglog.cpp
@@ -548,18 +548,12 @@ int TSAPI DbEventIsShown(struct TWindowData *dat, DBEVENTINFO * dbei)
switch (dbei->eventType) {
case EVENTTYPE_MESSAGE:
return 1;
+
case EVENTTYPE_FILE:
return(dat->dwFlagsEx & MWF_SHOW_FILEEVENTS);
}
- if (IsStatusEvent(dbei->eventType))
- return 1;
-
- int heFlags = HistoryEvents_GetFlags(dbei->eventType);
- if (heFlags != -1)
- return (heFlags & HISTORYEVENTS_FLAG_SHOW_IM_SRMM) == HISTORYEVENTS_FLAG_SHOW_IM_SRMM;
-
- return 0;
+ return IsStatusEvent(dbei->eventType);
}
static int DbEventIsForMsgWindow(DBEVENTINFO *dbei)
@@ -572,9 +566,9 @@ static char *Template_CreateRTFFromDbEvent(struct TWindowData *dat, HANDLE hCont
{
char *buffer, c;
TCHAR ci, cc;
- TCHAR *szFinalTimestamp;
- int bufferAlloced, bufferEnd;
- size_t iTemplateLen, i = 0;
+ TCHAR *szFinalTimestamp;
+ int bufferAlloced, bufferEnd;
+ size_t iTemplateLen, i = 0;
DBEVENTINFO dbei = { 0 };
int isSent = 0;
int iFontIDOffset = 0;
@@ -588,7 +582,6 @@ static char *Template_CreateRTFFromDbEvent(struct TWindowData *dat, HANDLE hCont
DWORD dwFormattingParams = MAKELONG(PluginConfig.m_FormatWholeWordsOnly, 0);
BOOL fIsStatusChangeEvent = FALSE;
TCHAR *msg, *formatted = NULL;
- int heFlags = -1;
char *rtfMessage = NULL;
bufferEnd = 0;
@@ -617,13 +610,6 @@ static char *Template_CreateRTFFromDbEvent(struct TWindowData *dat, HANDLE hCont
if (dbei.eventType == EVENTTYPE_MESSAGE && !(dbei.flags & (DBEF_SENT | DBEF_READ)))
dat->cache->updateStats(TSessionStats::SET_LAST_RCV, lstrlenA((char *) dbei.pBlob));
- if (dbei.eventType != EVENTTYPE_MESSAGE && dbei.eventType != EVENTTYPE_FILE && !IsStatusEvent(dbei.eventType))
- heFlags = HistoryEvents_GetFlags(dbei.eventType);
- if (heFlags & HISTORYEVENTS_FLAG_DEFAULT)
- heFlags = -1;
-
- if (heFlags != -1)
- rtfMessage = HistoryEvents_GetRichText(hDbEvent, &dbei);
if (rtfMessage == NULL) {
msg = DbGetEventTextT(&dbei, dat->codePage);
if (!msg) {
@@ -636,7 +622,7 @@ static char *Template_CreateRTFFromDbEvent(struct TWindowData *dat, HANDLE hCont
mir_free(msg);
}
- fIsStatusChangeEvent = (heFlags != -1 || IsStatusEvent(dbei.eventType));
+ fIsStatusChangeEvent = IsStatusEvent(dbei.eventType);
if (dat->isAutoRTL & 2) { // means: last \\par was deleted to avoid new line at end of log
AppendToBuffer(&buffer, &bufferEnd, &bufferAlloced, "\\par");
@@ -973,10 +959,7 @@ static char *Template_CreateRTFFromDbEvent(struct TWindowData *dat, HANDLE hCont
case 'l': // soft line break
AppendToBuffer(&buffer, &bufferEnd, &bufferAlloced, "\\line");
break;
- case 'N': { // nickname
- if (heFlags != -1 && !(heFlags & HISTORYEVENTS_FLAG_EXPECT_CONTACT_NAME_BEFORE))
- break;
-
+ case 'N': // nickname
if (!skipFont)
AppendToBuffer(&buffer, &bufferEnd, &bufferAlloced, "%s ", GetRTFFont(isSent ? MSGFONTID_MYNAME + iFontIDOffset : MSGFONTID_YOURNAME + iFontIDOffset));
if (isSent)
@@ -984,7 +967,6 @@ static char *Template_CreateRTFFromDbEvent(struct TWindowData *dat, HANDLE hCont
else
AppendUnicodeToBuffer(&buffer, &bufferEnd, &bufferAlloced, szYourName, MAKELONG(isSent, dat->isHistory));
break;
- }
case 'U': // UIN
if (!skipFont)
AppendToBuffer(&buffer, &bufferEnd, &bufferAlloced, "%s ", GetRTFFont(isSent ? MSGFONTID_MYNAME + iFontIDOffset : MSGFONTID_YOURNAME + iFontIDOffset));
@@ -997,7 +979,7 @@ static char *Template_CreateRTFFromDbEvent(struct TWindowData *dat, HANDLE hCont
AppendToBuffer(&buffer, &bufferEnd, &bufferAlloced, "%s ", GetRTFFont(MSGFONTID_ERROR));
AppendUnicodeToBuffer(&buffer, &bufferEnd, &bufferAlloced, (wchar_t *)dbei.szModule, MAKELONG(isSent, dat->isHistory));
break;
- case 'M': { // message
+ case 'M': // message
if (fIsStatusChangeEvent)
dbei.eventType = EVENTTYPE_STATUSCHANGE;
switch (dbei.eventType) {
@@ -1051,7 +1033,6 @@ static char *Template_CreateRTFFromDbEvent(struct TWindowData *dat, HANDLE hCont
break;
}
break;
- }
case '*': // bold
AppendToBuffer(&buffer, &bufferEnd, &bufferAlloced, isBold ? "\\b0 " : "\\b ");
isBold = !isBold;
@@ -1169,7 +1150,6 @@ static char *Template_CreateRTFFromDbEvent(struct TWindowData *dat, HANDLE hCont
if (streamData->dbei == 0)
free(dbei.pBlob);
- HistoryEvents_ReleaseText(rtfMessage);
dat->iLastEventType = MAKELONG((dbei.flags & (DBEF_SENT | DBEF_READ | DBEF_RTL)), dbei.eventType);
dat->lastEventTime = dbei.timestamp;