diff options
author | George Hazan <ghazan@miranda.im> | 2022-02-09 19:57:44 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2022-02-09 19:57:44 +0300 |
commit | 819d4cd22fc5e6f8c3e8497c64346c13d76f04ad (patch) | |
tree | 37dbad1767e7f21d84234d92e2251c62cf015304 /plugins/NewEventNotify/src | |
parent | a43d5bcb1e0bdafb0193662168976aac989ed922 (diff) |
fixes #1950 (Remove notification engine from TabSRMM)
Diffstat (limited to 'plugins/NewEventNotify/src')
-rw-r--r-- | plugins/NewEventNotify/src/main.cpp | 6 | ||||
-rw-r--r-- | plugins/NewEventNotify/src/options.cpp | 42 | ||||
-rw-r--r-- | plugins/NewEventNotify/src/popup.cpp | 154 | ||||
-rw-r--r-- | plugins/NewEventNotify/src/stdafx.h | 52 |
4 files changed, 148 insertions, 106 deletions
diff --git a/plugins/NewEventNotify/src/main.cpp b/plugins/NewEventNotify/src/main.cpp index 2897ceca63..0d164e9d7f 100644 --- a/plugins/NewEventNotify/src/main.cpp +++ b/plugins/NewEventNotify/src/main.cpp @@ -24,8 +24,6 @@ #include "stdafx.h"
-extern PLUGIN_DATA* PopupList[20];
-
//---------------------------
//---Some global variables for the plugin
@@ -86,8 +84,8 @@ int HookedNewEvent(WPARAM hContact, LPARAM hDbEvent) if (dbe.flags & DBEF_SENT) {
// JK, only message event, do not influence others
if (g_plugin.bHideSend && NumberPopupData(hContact, EVENTTYPE_MESSAGE) != -1) {
- PLUGIN_DATA *pdata = PopupList[NumberPopupData(hContact, EVENTTYPE_MESSAGE)];
- PopupAct(pdata->hWnd, MASK_DISMISS, pdata); // JK, only dismiss, i.e. do not kill event (e.g. file transfer)
+ if (auto *pdata = PU_GetByContact(hContact, EVENTTYPE_MESSAGE))
+ PopupAct(pdata->hWnd, MASK_DISMISS, pdata); // JK, only dismiss, i.e. do not kill event (e.g. file transfer)
}
return 0;
}
diff --git a/plugins/NewEventNotify/src/options.cpp b/plugins/NewEventNotify/src/options.cpp index 9bb9d51fdb..d004a1cfb7 100644 --- a/plugins/NewEventNotify/src/options.cpp +++ b/plugins/NewEventNotify/src/options.cpp @@ -28,42 +28,49 @@ BOOL bWmNotify; void CMPlugin::OptionsRead(void)
{
- bDisable = getByte(OPT_DISABLE, FALSE);
- bPreview = getByte(OPT_PREVIEW, TRUE);
- bMenuitem = getByte(OPT_MENUITEM, FALSE);
- bDefaultColorMsg = getByte(OPT_COLDEFAULT_MESSAGE, FALSE);
- bDefaultColorFile = getByte(OPT_COLDEFAULT_FILE, FALSE);
- bDefaultColorOthers = getByte(OPT_COLDEFAULT_OTHERS, FALSE);
+ bDisable = getBool(OPT_DISABLE, false);
+ bMUCDisable = getBool(OPT_MUCDISABLE, false);
+
+ bPreview = getBool(OPT_PREVIEW, true);
+ bMenuitem = getBool(OPT_MENUITEM, false);
+ bMergePopup = getBool(OPT_MERGEPOPUP, true);
+ bMsgWindowCheck = getBool(OPT_MSGWINDOWCHECK, true);
+ bMsgReplyWindow = getBool(OPT_MSGREPLYWINDOW, false);
+ bDefaultColorMsg = getBool(OPT_COLDEFAULT_MESSAGE, false);
+ bDefaultColorFile = getBool(OPT_COLDEFAULT_FILE, false);
+ bDefaultColorOthers = getBool(OPT_COLDEFAULT_OTHERS, false);
+
colBackMsg = getDword(OPT_COLBACK_MESSAGE, DEFAULT_COLBACK);
colTextMsg = getDword(OPT_COLTEXT_MESSAGE, DEFAULT_COLTEXT);
colBackFile = getDword(OPT_COLBACK_FILE, DEFAULT_COLBACK);
colTextFile = getDword(OPT_COLTEXT_FILE, DEFAULT_COLTEXT);
colBackOthers = getDword(OPT_COLBACK_OTHERS, DEFAULT_COLBACK);
colTextOthers = getDword(OPT_COLTEXT_OTHERS, DEFAULT_COLTEXT);
+
maskNotify = getByte(OPT_MASKNOTIFY, DEFAULT_MASKNOTIFY);
maskActL = getByte(OPT_MASKACTL, DEFAULT_MASKACTL);
maskActR = getByte(OPT_MASKACTR, DEFAULT_MASKACTR);
maskActTE = getByte(OPT_MASKACTTE, DEFAULT_MASKACTE);
- bMsgWindowCheck = getByte(OPT_MSGWINDOWCHECK, TRUE);
- bMsgReplyWindow = getByte(OPT_MSGREPLYWINDOW, FALSE);
- bMergePopup = getByte(OPT_MERGEPOPUP, TRUE);
+
iDelayMsg = getDword(OPT_DELAY_MESSAGE, DEFAULT_DELAY);
iDelayFile = getDword(OPT_DELAY_FILE, DEFAULT_DELAY);
iDelayOthers = getDword(OPT_DELAY_OTHERS, DEFAULT_DELAY);
iDelayDefault = DBGetContactSettingRangedWord(NULL, "Popup", "Seconds", SETTING_LIFETIME_DEFAULT, SETTING_LIFETIME_MIN, SETTING_LIFETIME_MAX);
- bShowDate = getByte(OPT_SHOW_DATE, TRUE);
- bShowTime = getByte(OPT_SHOW_TIME, TRUE);
- bShowHeaders = getByte(OPT_SHOW_HEADERS, TRUE);
- iNumberMsg = getByte(OPT_NUMBER_MSG, TRUE);
- bShowON = getByte(OPT_SHOW_ON, TRUE);
- bHideSend = getByte(OPT_HIDESEND, TRUE);
- bNoRSS = getByte(OPT_NORSS, FALSE);
- bReadCheck = getByte(OPT_READCHECK, FALSE);
+
+ bShowDate = getBool(OPT_SHOW_DATE, true);
+ bShowTime = getBool(OPT_SHOW_TIME, true);
+ bShowHeaders = getBool(OPT_SHOW_HEADERS, false);
+ iNumberMsg = getByte(OPT_NUMBER_MSG, 1);
+ bShowON = getBool(OPT_SHOW_ON, true);
+ bHideSend = getBool(OPT_HIDESEND, true);
+ bNoRSS = getBool(OPT_NORSS, false);
+ bReadCheck = getBool(OPT_READCHECK, false);
}
void CMPlugin::OptionsWrite(void)
{
setByte(OPT_DISABLE, bDisable);
+ setByte(OPT_MUCDISABLE, bMUCDisable);
setByte(OPT_PREVIEW, bPreview);
setByte(OPT_MENUITEM, bMenuitem);
setByte(OPT_COLDEFAULT_MESSAGE, bDefaultColorMsg);
@@ -75,6 +82,7 @@ void CMPlugin::OptionsWrite(void) setDword(OPT_COLTEXT_FILE, colTextFile);
setDword(OPT_COLBACK_OTHERS, colBackOthers);
setDword(OPT_COLTEXT_OTHERS, colTextOthers);
+ setDword(OPT_LIMITPREVIEW, iLimitPreview);
setByte(OPT_MASKNOTIFY, (uint8_t)maskNotify);
setByte(OPT_MASKACTL, (uint8_t)maskActL);
setByte(OPT_MASKACTR, (uint8_t)maskActR);
diff --git a/plugins/NewEventNotify/src/popup.cpp b/plugins/NewEventNotify/src/popup.cpp index 6fdb090a42..71bb4a55f5 100644 --- a/plugins/NewEventNotify/src/popup.cpp +++ b/plugins/NewEventNotify/src/popup.cpp @@ -26,35 +26,29 @@ extern int g_IsServiceAvail;
-static int PopupCount = 0;
+static LIST<PLUGIN_DATA> arPopupList(10, NumericKeySortT);
-PLUGIN_DATA* PopupList[MAX_POPUPS];
-
-int NumberPopupData(MCONTACT hContact, int eventType)
+PLUGIN_DATA* PU_GetByContact(MCONTACT hContact, UINT eventType)
{
- for (int n = 0; n < MAX_POPUPS; n++) {
- if (!PopupList[n] && !hContact && eventType == -1)
- return n;
+ for (auto &it : arPopupList)
+ if (it->hContact == hContact && (eventType == -1 || it->eventType == (UINT)eventType))
+ return it;
- if (PopupList[n] && (PopupList[n]->hContact == hContact) && (PopupList[n]->iLock == 0) && (eventType == -1 || PopupList[n]->eventType == (UINT)eventType))
- return n;
- }
- return -1;
+ return nullptr;
}
-static int FindPopupData(PLUGIN_DATA* pdata)
+int NumberPopupData(MCONTACT hContact, UINT eventType)
{
- for (int n = 0; n < MAX_POPUPS; n++)
- if (PopupList[n] == pdata)
- return n;
+ for (auto &it : arPopupList)
+ if (it->hContact == hContact && (eventType == -1 || it->eventType == (UINT)eventType))
+ return arPopupList.indexOf(&it);
return -1;
}
-static void FreePopupEventData(PLUGIN_DATA* pdata)
+static void FreePopupEventData(PLUGIN_DATA *pdata)
{
- pdata->iLock = 1;
- EVENT_DATA_EX* eventData = pdata->firstEventData;
+ EVENT_DATA_EX *eventData = pdata->firstEventData;
while (eventData) {
if (eventData->next) {
eventData = eventData->next;
@@ -66,19 +60,26 @@ static void FreePopupEventData(PLUGIN_DATA* pdata) eventData = nullptr;
}
}
- pdata->lastEventData = pdata->firstEventData = pdata->firstShowEventData = nullptr;
- // remove from popup list if present
- if (FindPopupData(pdata) != -1)
- PopupList[FindPopupData(pdata)] = nullptr;
}
-int PopupAct(HWND hWnd, UINT mask, PLUGIN_DATA* pdata)
+static void DoDefaultHandling(PLUGIN_DATA *pdata)
+{
+ if (pdata->hContact == 0)
+ return;
+
+ auto *pDlg = Srmm_FindDialog(pdata->hContact);
+ if (pDlg && IsWindow(pDlg->GetHwnd()))
+ CallService(MS_MSG_SENDMESSAGE, pdata->hContact, 0);
+ else
+ Clist_ContactDoubleClicked(pdata->hContact);
+}
+
+int PopupAct(HWND hWnd, UINT mask, PLUGIN_DATA *pdata)
{
if (mask & MASK_OPEN) {
if (pdata) {
- // do MS_MSG_SENDMESSAGE instead if wanted to reply and not read!
if (g_plugin.bMsgReplyWindow && pdata->eventType == EVENTTYPE_MESSAGE)
- CallServiceSync(MS_MSG_SENDMESSAGE, (WPARAM)pdata->hContact, 0); // JK, use core (since 0.3.3+)
+ DoDefaultHandling(pdata);
else {
EVENT_DATA_EX *eventData = pdata->firstEventData;
if (eventData == nullptr)
@@ -86,8 +87,10 @@ int PopupAct(HWND hWnd, UINT mask, PLUGIN_DATA* pdata) for (int idx = 0;; idx++) {
CLISTEVENT *cle = g_clistApi.pfnGetEvent(pdata->hContact, idx);
- if (cle == nullptr)
+ if (cle == nullptr) {
+ DoDefaultHandling(pdata);
break;
+ }
if (cle->hDbEvent == eventData->hEvent) {
if (ServiceExists(cle->pszService))
@@ -102,7 +105,6 @@ int PopupAct(HWND hWnd, UINT mask, PLUGIN_DATA* pdata) if (mask & MASK_REMOVE) {
if (pdata) {
EVENT_DATA_EX *eventData = pdata->firstEventData;
- pdata->iLock = 1;
while (eventData) {
g_clistApi.pfnRemoveEvent(pdata->hContact, eventData->hEvent);
db_event_markRead(pdata->hContact, eventData->hEvent);
@@ -123,10 +125,12 @@ int PopupAct(HWND hWnd, UINT mask, PLUGIN_DATA* pdata) static LRESULT CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
- PLUGIN_DATA *pdata = (PLUGIN_DATA*)PUGetPluginData(hWnd);
+ auto *pdata = (PLUGIN_DATA*)PUGetPluginData(hWnd);
if (pdata == nullptr)
return FALSE;
+ RECT rc;
+ POINT pt;
switch (message) {
case WM_COMMAND:
PopupAct(hWnd, g_plugin.maskActL, pdata);
@@ -135,12 +139,12 @@ static LRESULT CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPA PopupAct(hWnd, g_plugin.maskActR, pdata);
break;
case UM_FREEPLUGINDATA:
- PopupCount--;
mir_free(pdata);
return TRUE;
case UM_INITPOPUP:
pdata->hWnd = hWnd;
- SetTimer(hWnd, TIMER_TO_ACTION, pdata->iSeconds * 1000, nullptr);
+ if (pdata->iSeconds > 0)
+ SetTimer(hWnd, TIMER_TO_ACTION, pdata->iSeconds * 1000, nullptr);
break;
case WM_MOUSEWHEEL:
if ((short)HIWORD(wParam) > 0 && pdata->firstShowEventData->prev &&
@@ -160,43 +164,70 @@ static LRESULT CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPA case WM_TIMER:
if (wParam != TIMER_TO_ACTION)
break;
+
+ GetCursorPos(&pt);
+ GetWindowRect(hWnd, &rc);
+ if (PtInRect(&rc, pt))
+ break;
+
+ if (pdata->iSeconds > 0)
+ KillTimer(hWnd, TIMER_TO_ACTION);
PopupAct(hWnd, g_plugin.maskActTE, pdata);
break;
}
return DefWindowProc(hWnd, message, wParam, lParam);
}
+/////////////////////////////////////////////////////////////////////////////////////////
+
+static wchar_t *ShortenPreview(DBEVENTINFO *dbe)
+{
+ bool fAddEllipsis = false;
+ size_t iPreviewLimit = g_plugin.iLimitPreview;
+ if (iPreviewLimit > 500 || iPreviewLimit == 0)
+ iPreviewLimit = 500;
+
+ wchar_t *buf = DbEvent_GetTextW(dbe, CP_ACP);
+ if (mir_wstrlen(buf) > iPreviewLimit) {
+ fAddEllipsis = true;
+ size_t iIndex = iPreviewLimit;
+ size_t iWordThreshold = 20;
+ while (iIndex && buf[iIndex] != ' ' && iWordThreshold--)
+ buf[iIndex--] = 0;
+
+ buf[iIndex] = 0;
+ }
+ if (fAddEllipsis) {
+ buf = (wchar_t *)mir_realloc(buf, (mir_wstrlen(buf) + 5) * sizeof(wchar_t));
+ mir_wstrcat(buf, L"...");
+ }
+ return buf;
+}
+
static wchar_t* GetEventPreview(DBEVENTINFO *dbei)
{
wchar_t *comment1 = nullptr;
wchar_t *comment2 = nullptr;
char *commentFix = nullptr;
+ char *pBlob = (char *)dbei->pBlob;
// now get text
switch (dbei->eventType) {
case EVENTTYPE_MESSAGE:
- if (dbei->pBlob) {
- if (dbei->flags & DBEF_UTF) {
- // utf-8 in blob
- comment1 = mir_utf8decodeW((char*)dbei->pBlob);
- }
- else if (dbei->cbBlob == (mir_wstrlen((wchar_t *)dbei->pBlob) + 1)*(sizeof(wchar_t) + 1)) {
- // wchar in blob (the old hack)
- comment1 = mir_wstrdup((wchar_t*)dbei->pBlob);
- }
- else comment1 = mir_a2u((char *)dbei->pBlob);
- }
+ if (pBlob)
+ comment1 = ShortenPreview(dbei);
commentFix = POPUP_COMMENT_MESSAGE;
break;
case EVENTTYPE_FILE:
- if (dbei->pBlob) {
- char *p = (char*)dbei->pBlob + sizeof(uint32_t);
+ if (pBlob) {
+ char *p = pBlob + sizeof(uint32_t);
// filenames
- comment2 = (dbei->flags & DBEF_UTF) ? mir_utf8decodeW(p) : mir_a2u(p);
- p += mir_strlen(p) + 1;
+ comment2 = DbEvent_GetString(dbei, p);
// description
- comment1 = (dbei->flags & DBEF_UTF) ? mir_utf8decodeW(p) : mir_a2u(p);
+ p += mir_strlen(p) + 1;
+ if (*p)
+ comment1 = DbEvent_GetString(dbei, p);
}
commentFix = POPUP_COMMENT_FILE;
break;
@@ -205,10 +236,10 @@ static wchar_t* GetEventPreview(DBEVENTINFO *dbei) // blob format is:
// ASCIIZ nick
// ASCIIZ UID
- if (dbei->pBlob) {
+ if (pBlob) {
// count contacts in event
- char* pcBlob = (char *)dbei->pBlob;
- char* pcEnd = (char *)(dbei->pBlob + dbei->cbBlob);
+ char* pcBlob = pBlob;
+ char* pcEnd = pBlob + dbei->cbBlob;
int nContacts;
wchar_t szBuf[512];
@@ -235,16 +266,16 @@ static wchar_t* GetEventPreview(DBEVENTINFO *dbei) // ASCIIZ first name
// ASCIIZ last name
// ASCIIZ email (or YID)
- if (dbei->pBlob) {
+ if (pBlob) {
char szUin[16];
wchar_t szBuf[2048];
wchar_t* szNick = nullptr;
- char *pszNick = (char *)dbei->pBlob + 8;
+ char *pszNick = pBlob + 8;
char *pszFirst = pszNick + mir_strlen(pszNick) + 1;
char *pszLast = pszFirst + mir_strlen(pszFirst) + 1;
char *pszEmail = pszLast + mir_strlen(pszLast) + 1;
- mir_snprintf(szUin, "%d", *((uint32_t*)dbei->pBlob));
+ mir_snprintf(szUin, "%d", *((uint32_t*)pBlob));
if (mir_strlen(pszNick) > 0) {
if (dbei->flags & DBEF_UTF)
szNick = mir_utf8decodeW(pszNick);
@@ -257,7 +288,7 @@ static wchar_t* GetEventPreview(DBEVENTINFO *dbei) else
szNick = mir_a2u(pszEmail);
}
- else if (*((uint32_t*)dbei->pBlob) > 0)
+ else if (*((uint32_t*)pBlob) > 0)
szNick = mir_a2u(szUin);
if (szNick) {
@@ -271,7 +302,7 @@ static wchar_t* GetEventPreview(DBEVENTINFO *dbei) break;
case EVENTTYPE_AUTHREQUEST:
- if (dbei->pBlob) {
+ if (pBlob) {
DB::AUTH_BLOB blob(dbei->pBlob);
wchar_t *szNick = nullptr;
@@ -293,7 +324,7 @@ static wchar_t* GetEventPreview(DBEVENTINFO *dbei) default:
DBEVENTTYPEDESCR *pei = DbEvent_GetType(dbei->szModule, dbei->eventType);
// support for custom database event types
- if (pei && dbei->pBlob) {
+ if (pBlob) {
comment1 = DbEvent_GetTextW(dbei, CP_ACP);
commentFix = pei->descr;
}
@@ -318,10 +349,6 @@ int PopupShow(MCONTACT hContact, MEVENT hEvent, UINT eventType) wchar_t *sampleEvent;
long iSeconds;
- // there has to be a maximum number of popups shown at the same time
- if (PopupCount >= MAX_POPUPS)
- return 2;
-
// check if we should report this kind of event
// get the prefered icon as well
// CHANGE: iSeconds is -1 because I use my timer to hide popup
@@ -380,7 +407,6 @@ int PopupShow(MCONTACT hContact, MEVENT hEvent, UINT eventType) pdata->eventType = eventType;
pdata->hContact = hContact;
pdata->countEvent = 1;
- pdata->iLock = 0;
pdata->iSeconds = (iSeconds > 0) ? iSeconds : g_plugin.iDelayDefault;
pdata->firstEventData = pdata->firstShowEventData = pdata->lastEventData = eventData;
@@ -399,13 +425,11 @@ int PopupShow(MCONTACT hContact, MEVENT hEvent, UINT eventType) wcsncpy(pudw.lpwzText, ptrW(GetEventPreview(&dbe)), MAX_SECONDLINE);
}
- PopupCount++;
+ arPopupList.insert(pdata);
- PopupList[NumberPopupData(NULL, -1)] = pdata;
// send data to popup plugin
-
- // popup creation failed, release popupdata
if (PUAddPopupW(&pudw) < 0) {
+ // popup creation failed, release popupdata
FreePopupEventData(pdata);
mir_free(pdata);
}
@@ -417,7 +441,7 @@ int PopupShow(MCONTACT hContact, MEVENT hEvent, UINT eventType) int PopupUpdate(MCONTACT hContact, MEVENT hEvent)
{
// merge only message popups
- PLUGIN_DATA *pdata = (PLUGIN_DATA*)PopupList[NumberPopupData(hContact, EVENTTYPE_MESSAGE)];
+ PLUGIN_DATA *pdata = arPopupList[NumberPopupData(hContact, EVENTTYPE_MESSAGE)];
if (hEvent) {
pdata->countEvent++;
diff --git a/plugins/NewEventNotify/src/stdafx.h b/plugins/NewEventNotify/src/stdafx.h index 1938092f4c..9ef71031b2 100644 --- a/plugins/NewEventNotify/src/stdafx.h +++ b/plugins/NewEventNotify/src/stdafx.h @@ -37,6 +37,7 @@ #include <m_langpack.h>
#include <m_popup.h>
#include <m_skin.h>
+#include <m_srmm_int.h>
#include <m_clistint.h>
#include <m_protosvc.h>
#include <m_message.h>
@@ -55,7 +56,6 @@ //---Definitions
#define MODULENAME "NewEventNotify"
-#define MAX_POPUPS 20
#define DEFAULT_COLBACK RGB(255,255,128)
#define DEFAULT_COLTEXT RGB(0,0,0)
@@ -86,8 +86,10 @@ //Entries in the database, don't translate
#define OPT_DISABLE "Disabled"
+#define OPT_MUCDISABLE "MUCDisabled"
#define OPT_PREVIEW "Preview"
#define OPT_MENUITEM "MenuItem"
+#define OPT_LIMITPREVIEW "LimitPreview"
#define OPT_COLDEFAULT_MESSAGE "DefaultColorMsg"
#define OPT_COLBACK_MESSAGE "ColorBackMsg"
#define OPT_COLTEXT_MESSAGE "ColorTextMsg"
@@ -143,36 +145,45 @@ struct CMPlugin : public PLUGIN<CMPlugin> void OptionsRead(void);
void OptionsWrite(void);
- BOOL bDisable;
- BOOL bPreview;
- BOOL bMenuitem;
- BOOL bDefaultColorMsg;
- BOOL bDefaultColorFile;
- BOOL bDefaultColorOthers;
+ bool bDisable;
+ bool bMUCDisable;
+ bool bPreview;
+ bool bMenuitem;
+ bool bDefaultColorMsg;
+ bool bDefaultColorFile;
+ bool bDefaultColorOthers;
+ bool bDisableNonMessage;
+ bool bMsgWindowCheck;
+ bool bMsgReplyWindow;
+ bool bMergePopup;
+ bool bShowDate;
+ bool bShowTime;
+ bool bShowHeaders;
+ bool bShowON;
+ bool bHideSend;
+ bool bNoRSS;
+ bool iNoSounds;
+ bool bReadCheck;
+ bool bWindowCheck;
+
COLORREF colBackMsg;
COLORREF colTextMsg;
COLORREF colBackFile;
COLORREF colTextFile;
COLORREF colBackOthers;
COLORREF colTextOthers;
+
UINT maskNotify;
UINT maskActL;
UINT maskActR;
UINT maskActTE;
- BOOL bMsgWindowCheck;
- BOOL bMsgReplyWindow;
+
int iDelayMsg;
int iDelayFile;
int iDelayOthers;
int iDelayDefault;
- BOOL bMergePopup;
- BOOL bShowDate;
- BOOL bShowTime;
- BOOL bShowHeaders;
- BOOL bShowON;
- BOOL bHideSend;
- BOOL bNoRSS;
- BOOL bReadCheck;
+ int iLimitPreview;
+
uint8_t iNumberMsg;
};
@@ -186,15 +197,14 @@ struct EVENT_DATA_EX struct PLUGIN_DATA
{
- UINT eventType;
MCONTACT hContact;
+ UINT eventType;
HWND hWnd;
struct EVENT_DATA_EX* firstEventData;
struct EVENT_DATA_EX* firstShowEventData;
struct EVENT_DATA_EX* lastEventData;
long countEvent;
long iSeconds;
- int iLock;
};
//---------------------------
@@ -208,5 +218,7 @@ int OptionsAdd(WPARAM addInfo, LPARAM); int Opt_DisableNEN(BOOL Status);
int MenuitemInit(BOOL bStatus);
int MenuitemUpdate(BOOL bStatus);
-int NumberPopupData(MCONTACT hContact, int eventType);
+int NumberPopupData(MCONTACT hContact, UINT eventType);
int CheckMsgWnd(MCONTACT hContact);
+
+PLUGIN_DATA* PU_GetByContact(MCONTACT hContact, UINT eventType);
|