summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-01-16 17:49:54 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-01-16 17:49:54 +0000
commit85c0b6a96f366bdf0ca334ee7cb1877fb3f2288c (patch)
treefe07935255b7432938f282419c3ab1378524c02f /plugins/TabSRMM/src
parent8a09c895c4cd0e9cc87c38181ae2913dba77c30b (diff)
MEVENT - the strict type for events, they are not HANDLE anymore
git-svn-id: http://svn.miranda-ng.org/main/trunk@11866 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TabSRMM/src')
-rw-r--r--plugins/TabSRMM/src/chat/services.cpp2
-rw-r--r--plugins/TabSRMM/src/chat/window.cpp3
-rw-r--r--plugins/TabSRMM/src/eventpopups.cpp6
-rw-r--r--plugins/TabSRMM/src/functions.h6
-rw-r--r--plugins/TabSRMM/src/generic_msghandlers.cpp6
-rw-r--r--plugins/TabSRMM/src/globals.cpp2
-rw-r--r--plugins/TabSRMM/src/hotkeyhandler.cpp2
-rw-r--r--plugins/TabSRMM/src/mim.cpp17
-rw-r--r--plugins/TabSRMM/src/msgdialog.cpp16
-rw-r--r--plugins/TabSRMM/src/msgdlgutils.cpp6
-rw-r--r--plugins/TabSRMM/src/msgdlgutils.h2
-rw-r--r--plugins/TabSRMM/src/msglog.cpp6
-rw-r--r--plugins/TabSRMM/src/msgs.cpp2
-rw-r--r--plugins/TabSRMM/src/msgs.h13
-rw-r--r--plugins/TabSRMM/src/nen.h4
-rw-r--r--plugins/TabSRMM/src/sendqueue.cpp2
16 files changed, 48 insertions, 47 deletions
diff --git a/plugins/TabSRMM/src/chat/services.cpp b/plugins/TabSRMM/src/chat/services.cpp
index 6599c2859e..9c5e1e72f8 100644
--- a/plugins/TabSRMM/src/chat/services.cpp
+++ b/plugins/TabSRMM/src/chat/services.cpp
@@ -100,7 +100,7 @@ HWND CreateNewRoom(TContainerData *pContainer, SESSION_INFO *si, BOOL bActivateT
newData.iActivate = bActivateTab;
pContainer->iChilds++;
newData.bWantPopup = bWantPopup;
- newData.hdbEvent = (HANDLE)si;
+ newData.si = si;
HWND hwndNew = CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_CHANNEL), GetDlgItem(pContainer->hwnd, 1159), RoomWndProc, (LPARAM)&newData);
if (pContainer->dwFlags & CNT_SIDEBAR) {
TWindowData *dat = (TWindowData*)GetWindowLongPtr(hwndNew, GWLP_USERDATA);
diff --git a/plugins/TabSRMM/src/chat/window.cpp b/plugins/TabSRMM/src/chat/window.cpp
index a67f364f99..f3550e2061 100644
--- a/plugins/TabSRMM/src/chat/window.cpp
+++ b/plugins/TabSRMM/src/chat/window.cpp
@@ -1774,10 +1774,9 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
case WM_INITDIALOG:
{
TNewWindowData *newData = (TNewWindowData*)lParam;
- si = (SESSION_INFO*)newData->hdbEvent;
TWindowData *dat = (TWindowData*)mir_calloc( sizeof(TWindowData));
- dat->si = si;
+ dat->si = si = newData->si;
dat->hContact = si->hContact;
dat->szProto = GetContactProto(si->hContact);
dat->bType = SESSIONTYPE_CHAT;
diff --git a/plugins/TabSRMM/src/eventpopups.cpp b/plugins/TabSRMM/src/eventpopups.cpp
index af53cbdda6..3faa91cc84 100644
--- a/plugins/TabSRMM/src/eventpopups.cpp
+++ b/plugins/TabSRMM/src/eventpopups.cpp
@@ -556,7 +556,7 @@ static TCHAR* GetPreviewT(WORD eventType, DBEVENTINFO* dbe)
}
}
-static int PopupUpdateT(MCONTACT hContact, HANDLE hEvent)
+static int PopupUpdateT(MCONTACT hContact, MEVENT hEvent)
{
PLUGIN_DATAT *pdata = const_cast<PLUGIN_DATAT *>(PU_GetByContact(hContact));
if (!pdata)
@@ -627,7 +627,7 @@ static int PopupUpdateT(MCONTACT hContact, HANDLE hEvent)
return 0;
}
-static int PopupShowT(NEN_OPTIONS *pluginOptions, MCONTACT hContact, HANDLE hEvent, UINT eventType, HWND hContainer)
+static int PopupShowT(NEN_OPTIONS *pluginOptions, MCONTACT hContact, MEVENT hEvent, UINT eventType, HWND hContainer)
{
//there has to be a maximum number of popups shown at the same time
if (arPopupList.getCount() >= MAX_POPUPS)
@@ -820,7 +820,7 @@ int TSAPI UpdateTrayMenu(const TWindowData *dat, WORD wStatus, const char *szPro
return 0;
}
-int tabSRMM_ShowPopup(MCONTACT hContact, HANDLE hDbEvent, WORD eventType, int windowOpen, TContainerData *pContainer, HWND hwndChild, const char *szProto)
+int tabSRMM_ShowPopup(MCONTACT hContact, MEVENT hDbEvent, WORD eventType, int windowOpen, TContainerData *pContainer, HWND hwndChild, const char *szProto)
{
if (nen_options.iDisable) // no popups at all. Period
return 0;
diff --git a/plugins/TabSRMM/src/functions.h b/plugins/TabSRMM/src/functions.h
index c09dd21f2e..fa5ae612fc 100644
--- a/plugins/TabSRMM/src/functions.h
+++ b/plugins/TabSRMM/src/functions.h
@@ -70,7 +70,7 @@ void TSAPI HandleMenuEntryFromhContact(MCONTACT iSelection);
BOOL TSAPI IsUtfSendAvailable(MCONTACT hContact);
HWND TSAPI CreateNewTabForContact(TContainerData *pContainer, MCONTACT hContact, int isSend,
- const char *pszInitialText, BOOL bActivateTAb, BOOL bPopupContainer, BOOL bWantPopup, HANDLE hdbEvent);
+ const char *pszInitialText, BOOL bActivateTAb, BOOL bPopupContainer, BOOL bWantPopup, MEVENT hdbEvent);
int TSAPI ActivateTabFromHWND(HWND hwndTab, HWND hwnd);
void TSAPI FlashContainer(TContainerData *pContainer, int iMode, int iNum);
void TSAPI CreateImageList(BOOL bInitial);
@@ -123,8 +123,8 @@ int DbEventIsForMsgWindow(DBEVENTINFO *dbei);
int TSAPI InitOptions(void);
int TSAPI DbEventIsShown(DBEVENTINFO *dbei);
-void TSAPI StreamInEvents(HWND hwndDlg,HANDLE hDbEventFirst,int count,int fAppend, DBEVENTINFO *dbei_s);
-void TSAPI LoadLogfont(int i,LOGFONTA *lf,COLORREF *colour, char *szModule);
+void TSAPI StreamInEvents(HWND hwndDlg, MEVENT hDbEventFirst, int count, int fAppend, DBEVENTINFO *dbei_s);
+void TSAPI LoadLogfont(int i, LOGFONTA *lf, COLORREF *colour, char *szModule);
// custom tab control
diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp
index b58e48aeee..7f5280b9b3 100644
--- a/plugins/TabSRMM/src/generic_msghandlers.cpp
+++ b/plugins/TabSRMM/src/generic_msghandlers.cpp
@@ -1560,7 +1560,7 @@ void TSAPI DM_EventAdded(TWindowData *dat, WPARAM hContact, LPARAM lParam)
{
TContainerData *m_pContainer = dat->pContainer;
HWND hwndDlg = dat->hwnd, hwndContainer = m_pContainer->hwnd, hwndTab = GetParent(dat->hwnd);
- HANDLE hDbEvent = (HANDLE)lParam;
+ MEVENT hDbEvent = (MEVENT)lParam;
DBEVENTINFO dbei = { sizeof(dbei) };
db_event_get(hDbEvent, &dbei);
@@ -1610,10 +1610,10 @@ void TSAPI DM_EventAdded(TWindowData *dat, WPARAM hContact, LPARAM lParam)
if (hDbEvent != dat->hDbEventFirst) {
if (!(dat->dwFlagsEx & MWF_SHOW_SCROLLINGDISABLED))
- SendMessage(hwndDlg, DM_APPENDTOLOG, lParam, 0);
+ SendMessage(hwndDlg, DM_APPENDTOLOG, hDbEvent, 0);
else {
if (dat->iNextQueuedEvent >= dat->iEventQueueSize) {
- dat->hQueuedEvents = (HANDLE*)mir_realloc(dat->hQueuedEvents, (dat->iEventQueueSize + 10) * sizeof(HANDLE));
+ dat->hQueuedEvents = (MEVENT*)mir_realloc(dat->hQueuedEvents, (dat->iEventQueueSize + 10) * sizeof(MEVENT));
dat->iEventQueueSize += 10;
}
dat->hQueuedEvents[dat->iNextQueuedEvent++] = hDbEvent;
diff --git a/plugins/TabSRMM/src/globals.cpp b/plugins/TabSRMM/src/globals.cpp
index ccc83a7940..0db994d7bb 100644
--- a/plugins/TabSRMM/src/globals.cpp
+++ b/plugins/TabSRMM/src/globals.cpp
@@ -551,7 +551,7 @@ void CGlobals::RestoreUnreadMessageAlerts(void)
if (db_get_dw(hContact, "SendLater", "count", 0))
sendLater->addContact(hContact);
- for (HANDLE hDbEvent = db_event_firstUnread(hContact); hDbEvent; hDbEvent = db_event_next(hContact, hDbEvent)) {
+ for (MEVENT hDbEvent = db_event_firstUnread(hContact); hDbEvent; hDbEvent = db_event_next(hContact, hDbEvent)) {
DBEVENTINFO dbei = { sizeof(dbei) };
db_event_get(hDbEvent, &dbei);
if (!dbei.markedRead() && dbei.eventType == EVENTTYPE_MESSAGE) {
diff --git a/plugins/TabSRMM/src/hotkeyhandler.cpp b/plugins/TabSRMM/src/hotkeyhandler.cpp
index 4b21acf3da..d87c22c912 100644
--- a/plugins/TabSRMM/src/hotkeyhandler.cpp
+++ b/plugins/TabSRMM/src/hotkeyhandler.cpp
@@ -428,7 +428,7 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP
// sent from the popup to "dismiss" the event. we should do this in the main thread
case DM_REMOVECLISTEVENT:
CallService(MS_CLIST_REMOVEEVENT, wParam, lParam);
- db_event_markRead(wParam, (HANDLE)lParam);
+ db_event_markRead(wParam, lParam);
return 0;
case DM_SETLOCALE:
diff --git a/plugins/TabSRMM/src/mim.cpp b/plugins/TabSRMM/src/mim.cpp
index f67a9021c4..bc905e8c68 100644
--- a/plugins/TabSRMM/src/mim.cpp
+++ b/plugins/TabSRMM/src/mim.cpp
@@ -186,8 +186,8 @@ bool CMimAPI::getAeroState()
void CMimAPI::InitAPI()
{
- DWORD dwVer = LOWORD(GetVersion());
- m_winVer = MAKEWORD(HIBYTE(dwVer), LOBYTE(dwVer));
+ DWORD dwVer = LOWORD(GetVersion());
+ m_winVer = MAKEWORD(HIBYTE(dwVer), LOBYTE(dwVer));
m_hUxTheme = 0;
@@ -313,7 +313,7 @@ int CMimAPI::TypingMessage(WPARAM hContact, LPARAM mode)
if (fShowOnClist) {
CLISTEVENT cle = { sizeof(cle) };
cle.hContact = hContact;
- cle.hDbEvent = (HANDLE)1;
+ cle.hDbEvent = 1;
cle.flags = CLEF_ONLYAFEW | CLEF_TCHAR;
cle.hIcon = PluginConfig.g_buttonBarIcons[ICON_DEFAULT_TYPING];
cle.pszService = "SRMsg/TypingMessage";
@@ -393,15 +393,15 @@ int CMimAPI::PrebuildContactMenu(WPARAM hContact, LPARAM)
// this handler POSTs the event to the message window procedure - so it is fast and can exit quickly which will
// improve the overall responsiveness when receiving messages.
-int CMimAPI::DispatchNewEvent(WPARAM hContact, LPARAM lParam)
+int CMimAPI::DispatchNewEvent(WPARAM hContact, LPARAM hDbEvent)
{
if (hContact) {
- Utils::sendContactMessage(hContact, HM_DBEVENTADDED, hContact, lParam);
+ Utils::sendContactMessage(hContact, HM_DBEVENTADDED, hContact, hDbEvent);
// we're in meta and an event belongs to a sub
- MCONTACT hReal = db_event_getContact(HANDLE(lParam));
+ MCONTACT hReal = db_event_getContact(hDbEvent);
if (hReal != hContact)
- Utils::sendContactMessage(hReal, HM_DBEVENTADDED, hContact, lParam);
+ Utils::sendContactMessage(hReal, HM_DBEVENTADDED, hContact, hDbEvent);
}
return 0;
}
@@ -413,11 +413,10 @@ int CMimAPI::DispatchNewEvent(WPARAM hContact, LPARAM lParam)
//
// if a session is already created, it just does nothing and DispatchNewEvent() will take care.
-int CMimAPI::MessageEventAdded(WPARAM hContact, LPARAM lParam)
+int CMimAPI::MessageEventAdded(WPARAM hContact, LPARAM hDbEvent)
{
TCHAR szName[CONTAINER_NAMELEN + 1];
- HANDLE hDbEvent = (HANDLE)lParam;
DBEVENTINFO dbei = { sizeof(dbei) };
db_event_get(hDbEvent, &dbei);
diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp
index 36cce39ada..dc187812fd 100644
--- a/plugins/TabSRMM/src/msgdialog.cpp
+++ b/plugins/TabSRMM/src/msgdialog.cpp
@@ -1243,7 +1243,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
dat->sendMode |= dat->hContact == 0 ? SMODE_MULTIPLE : 0;
dat->sendMode |= M.GetByte(dat->hContact, "no_ack", 0) ? SMODE_NOACK : 0;
- dat->hQueuedEvents = (HANDLE*)mir_calloc(sizeof(HANDLE)* EVENT_QUEUE_SIZE);
+ dat->hQueuedEvents = (MEVENT*)mir_calloc(sizeof(MEVENT)* EVENT_QUEUE_SIZE);
dat->iEventQueueSize = EVENT_QUEUE_SIZE;
dat->iCurrentQueueError = -1;
@@ -1252,7 +1252,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
dat->maxHistory = M.GetDword(dat->hContact, "maxhist", M.GetDword("maxhist", 0));
dat->curHistory = 0;
if (dat->maxHistory)
- dat->hHistoryEvents = (HANDLE*)mir_alloc(dat->maxHistory * sizeof(HANDLE));
+ dat->hHistoryEvents = (MEVENT*)mir_alloc(dat->maxHistory * sizeof(MEVENT));
else
dat->hHistoryEvents = NULL;
@@ -1403,7 +1403,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
EnableSendButton(dat, TRUE);
}
- for (HANDLE hdbEvent = db_event_last(dat->hContact); hdbEvent; hdbEvent = db_event_prev(dat->hContact, hdbEvent)) {
+ for (MEVENT hdbEvent = db_event_last(dat->hContact); hdbEvent; hdbEvent = db_event_prev(dat->hContact, hdbEvent)) {
DBEVENTINFO dbei = { sizeof(dbei) };
db_event_get(hdbEvent, &dbei);
if (dbei.eventType == EVENTTYPE_MESSAGE && !(dbei.flags & DBEF_SENT)) {
@@ -2321,15 +2321,15 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
case DM_APPENDMCEVENT:
if (dat->hContact == db_mc_getMeta(wParam) && dat->hDbEventFirst == NULL) {
- dat->hDbEventFirst = (HANDLE)lParam;
+ dat->hDbEventFirst = lParam;
SendMessage(dat->hwnd, DM_REMAKELOG, 0, 0);
}
- else if (dat->hContact == wParam && db_mc_isSub(wParam) && db_event_getContact(HANDLE(lParam)) != wParam)
- StreamInEvents(hwndDlg, (HANDLE)lParam, 1, 1, NULL);
+ else if (dat->hContact == wParam && db_mc_isSub(wParam) && db_event_getContact(lParam) != wParam)
+ StreamInEvents(hwndDlg, lParam, 1, 1, NULL);
return 0;
case DM_APPENDTOLOG:
- StreamInEvents(hwndDlg, (HANDLE)wParam, 1, 1, NULL);
+ StreamInEvents(hwndDlg, wParam, 1, 1, NULL);
return 0;
// replays queued events after the message log has been frozen for a while
@@ -2782,7 +2782,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
CHARRANGE sel;
SETTEXTEX stx = {ST_SELECTION, 1200};
- HANDLE hDBEvent = 0;
+ MEVENT hDBEvent = 0;
if (dat->hwndIEView || dat->hwndHPP) { // IEView quoting support..
TCHAR *selected = 0, *szQuoted = 0;
diff --git a/plugins/TabSRMM/src/msgdlgutils.cpp b/plugins/TabSRMM/src/msgdlgutils.cpp
index 748e1eda13..5da388058e 100644
--- a/plugins/TabSRMM/src/msgdlgutils.cpp
+++ b/plugins/TabSRMM/src/msgdlgutils.cpp
@@ -757,7 +757,7 @@ void TSAPI ShowPicture(TWindowData *dat, BOOL showNewPic)
SendMessage(hwndDlg, WM_SIZE, 0, 0);
}
-void TSAPI FlashOnClist(HWND hwndDlg, TWindowData *dat, HANDLE hEvent, DBEVENTINFO *dbei)
+void TSAPI FlashOnClist(HWND hwndDlg, TWindowData *dat, MEVENT hEvent, DBEVENTINFO *dbei)
{
dat->dwTickLastEvent = GetTickCount();
@@ -1179,7 +1179,7 @@ void TSAPI FindFirstEvent(TWindowData *dat)
switch (historyMode) {
case LOADHISTORY_COUNT:
int i;
- HANDLE hPrevEvent;
+ MEVENT hPrevEvent;
{
DBEVENTINFO dbei = { sizeof(dbei) };
// ability to load only current session's history
@@ -1213,7 +1213,7 @@ void TSAPI FindFirstEvent(TWindowData *dat)
DWORD firstTime = dbei.timestamp - 60 * db_get_w(NULL, SRMSGMOD, SRMSGSET_LOADTIME, SRMSGDEFSET_LOADTIME);
for (;;) {
- HANDLE hPrevEvent;
+ MEVENT hPrevEvent;
if (dat->hDbEventFirst == NULL)
hPrevEvent = db_event_last(dat->hContact);
else
diff --git a/plugins/TabSRMM/src/msgdlgutils.h b/plugins/TabSRMM/src/msgdlgutils.h
index ff0bdfd815..4eb5d25a82 100644
--- a/plugins/TabSRMM/src/msgdlgutils.h
+++ b/plugins/TabSRMM/src/msgdlgutils.h
@@ -43,7 +43,7 @@ void TSAPI UpdateReadChars(const TWindowData *dat);
void TSAPI ShowPicture(TWindowData *dat, BOOL showNewPic);
void TSAPI AdjustBottomAvatarDisplay(TWindowData *dat);
void TSAPI SetDialogToType(HWND hwndDlg);
-void TSAPI FlashOnClist(HWND hwndDlg, TWindowData *dat, HANDLE hEvent, DBEVENTINFO *dbei);
+void TSAPI FlashOnClist(HWND hwndDlg, TWindowData *dat, MEVENT hEvent, DBEVENTINFO *dbei);
char* TSAPI Message_GetFromStream(HWND hwndDlg, const TWindowData *dat, DWORD dwPassedFlags);
BOOL TSAPI DoRtfToTags(TCHAR * pszText, const TWindowData *dat);
void TSAPI GetMYUIN(TWindowData *dat);
diff --git a/plugins/TabSRMM/src/msglog.cpp b/plugins/TabSRMM/src/msglog.cpp
index c8ef054993..098ea3c312 100644
--- a/plugins/TabSRMM/src/msglog.cpp
+++ b/plugins/TabSRMM/src/msglog.cpp
@@ -87,7 +87,7 @@ static HICON Logicons[NR_LOGICONS];
struct LogStreamData {
int stage;
MCONTACT hContact;
- HANDLE hDbEvent, hDbEventLast;
+ MEVENT hDbEvent, hDbEventLast;
char *buffer;
int bufferOffset, bufferLen;
int eventsToInsert;
@@ -443,7 +443,7 @@ int DbEventIsForMsgWindow(DBEVENTINFO *dbei)
return et && (et->flags & DETF_MSGWINDOW);
}
-static char* Template_CreateRTFFromDbEvent(TWindowData *dat, MCONTACT hContact, HANDLE hDbEvent, LogStreamData *streamData)
+static char* Template_CreateRTFFromDbEvent(TWindowData *dat, MCONTACT hContact, MEVENT hDbEvent, LogStreamData *streamData)
{
HANDLE hTimeZone = NULL;
BOOL skipToNext = FALSE, skipFont = FALSE;
@@ -1201,7 +1201,7 @@ static void ReplaceIcons(HWND hwndDlg, TWindowData *dat, LONG startAt, int fAppe
}
}
-void TSAPI StreamInEvents(HWND hwndDlg, HANDLE hDbEventFirst, int count, int fAppend, DBEVENTINFO *dbei_s)
+void TSAPI StreamInEvents(HWND hwndDlg, MEVENT hDbEventFirst, int count, int fAppend, DBEVENTINFO *dbei_s)
{
TWindowData *dat = (TWindowData*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
CHARRANGE oldSel, sel;
diff --git a/plugins/TabSRMM/src/msgs.cpp b/plugins/TabSRMM/src/msgs.cpp
index 56522f86fe..68a99e98e3 100644
--- a/plugins/TabSRMM/src/msgs.cpp
+++ b/plugins/TabSRMM/src/msgs.cpp
@@ -447,7 +447,7 @@ int TSAPI ActivateExistingTab(TContainerData *pContainer, HWND hwndChild)
// bActivateTab: make the new tab the active one
// bPopupContainer: restore container if it was minimized, otherwise flash it...
-HWND TSAPI CreateNewTabForContact(TContainerData *pContainer, MCONTACT hContact, int isSend, const char *pszInitialText, BOOL bActivateTab, BOOL bPopupContainer, BOOL bWantPopup, HANDLE hdbEvent)
+HWND TSAPI CreateNewTabForContact(TContainerData *pContainer, MCONTACT hContact, int isSend, const char *pszInitialText, BOOL bActivateTab, BOOL bPopupContainer, BOOL bWantPopup, MEVENT hdbEvent)
{
if (M.FindWindow(hContact) != 0) {
_DebugPopup(hContact, _T("Warning: trying to create duplicate window"));
diff --git a/plugins/TabSRMM/src/msgs.h b/plugins/TabSRMM/src/msgs.h
index a4db3ef8b4..116198c758 100644
--- a/plugins/TabSRMM/src/msgs.h
+++ b/plugins/TabSRMM/src/msgs.h
@@ -260,7 +260,7 @@ struct TWindowData
SESSION_INFO *si;
RECT rcNick, rcUIN, rcStatus, rcPic;
- HANDLE hDbEventFirst, hDbEventLast;
+ MEVENT hDbEventFirst, hDbEventLast;
int sendMode;
int splitterY, originalSplitterY, dynaSplitter, savedSplitter, savedSplitY, savedDynaSplit;
int multiSplitterX;
@@ -287,10 +287,10 @@ struct TWindowData
DWORD dwLastActivity;
int iOpenJobs;
int iCurrentQueueError;
- HANDLE hFlashingEvent;
+ MEVENT hFlashingEvent;
TCHAR myUin[80];
int SendFormat;
- HANDLE *hQueuedEvents;
+ MEVENT *hQueuedEvents;
int iNextQueuedEvent;
#define EVENT_QUEUE_SIZE 10
int iEventQueueSize;
@@ -304,7 +304,7 @@ struct TWindowData
DWORD panelStatusCX;
COLORREF inputbg;
avatarCacheEntry *ace, *ownAce;
- HANDLE *hHistoryEvents;
+ MEVENT *hHistoryEvents;
int maxHistory, curHistory;
HANDLE hTheme, hThemeIP, hThemeToolbar;
char szMicroLf[128];
@@ -417,9 +417,12 @@ struct TNewWindowData
int iActivate;
TCITEM item;
BOOL bWantPopup;
- HANDLE hdbEvent;
HKL hkl;
+ union {
+ MEVENT hdbEvent;
+ SESSION_INFO *si;
+ };
TContainerData *pContainer;
};
diff --git a/plugins/TabSRMM/src/nen.h b/plugins/TabSRMM/src/nen.h
index e86c57a610..72ab2ef763 100644
--- a/plugins/TabSRMM/src/nen.h
+++ b/plugins/TabSRMM/src/nen.h
@@ -39,7 +39,7 @@
#define MODULE "tabSRMM_NEN"
-int tabSRMM_ShowPopup(MCONTACT hContact, HANDLE hDbEvent, WORD eventType, int windowOpen, TContainerData *pContainer, HWND hwndChild, const char *szProto);
+int tabSRMM_ShowPopup(MCONTACT hContact, MEVENT hDbEvent, WORD eventType, int windowOpen, TContainerData *pContainer, HWND hwndChild, const char *szProto);
#define DEFAULT_COLBACK RGB(255,255,128)
#define DEFAULT_COLTEXT RGB(0,0,0)
@@ -132,7 +132,7 @@ struct NEN_OPTIONS
struct EVENT_DATAT
{
- HANDLE hEvent;
+ MEVENT hEvent;
TCHAR tszText[MAX_SECONDLINE + 2];
DWORD timestamp;
};
diff --git a/plugins/TabSRMM/src/sendqueue.cpp b/plugins/TabSRMM/src/sendqueue.cpp
index c3b3b6480d..c4a6da240b 100644
--- a/plugins/TabSRMM/src/sendqueue.cpp
+++ b/plugins/TabSRMM/src/sendqueue.cpp
@@ -712,7 +712,7 @@ inform_and_discard:
NotifyEventHooks(PluginConfig.m_event_WriteEvent, 0, (LPARAM)&evt);
job.szSendBuffer = (char*)dbei.pBlob;
- HANDLE hNewEvent = db_event_add(job.hContact, &dbei);
+ MEVENT hNewEvent = db_event_add(job.hContact, &dbei);
if (m_pContainer)
if (!nen_options.iNoSounds && !(m_pContainer->dwFlags & CNT_NOSOUND))