diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/NewEventNotify/src/main.cpp | 2 | ||||
-rw-r--r-- | plugins/NewEventNotify/src/popup.cpp | 19 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msglog.cpp | 4 |
3 files changed, 11 insertions, 14 deletions
diff --git a/plugins/NewEventNotify/src/main.cpp b/plugins/NewEventNotify/src/main.cpp index a100978f0a..7a946b16cf 100644 --- a/plugins/NewEventNotify/src/main.cpp +++ b/plugins/NewEventNotify/src/main.cpp @@ -78,7 +78,7 @@ int HookedNewEvent(WPARAM hContact, LPARAM lParam) if (ServiceExists(MS_DB_EVENT_GETTYPE)) {
DBEVENTTYPEDESCR *pei = (DBEVENTTYPEDESCR*)CallService(MS_DB_EVENT_GETTYPE, (WPARAM)dbe.szModule, (LPARAM)dbe.eventType);
// ignore events according to flags
- if (pei && pei->cbSize >= DBEVENTTYPEDESCR_SIZE && pei->flags & DETF_NONOTIFY)
+ if (pei && pei->flags & DETF_NONOTIFY)
return 0;
}
diff --git a/plugins/NewEventNotify/src/popup.cpp b/plugins/NewEventNotify/src/popup.cpp index 3f1ce3646a..d1d196dc9e 100644 --- a/plugins/NewEventNotify/src/popup.cpp +++ b/plugins/NewEventNotify/src/popup.cpp @@ -336,18 +336,15 @@ static TCHAR* GetEventPreview(DBEVENTINFO *dbei) default:
if (ServiceExists(MS_DB_EVENT_GETTYPE)) {
- DBEVENTTYPEDESCR* pei = (DBEVENTTYPEDESCR*)CallService(MS_DB_EVENT_GETTYPE, (WPARAM)dbei->szModule, (LPARAM)dbei->eventType);
+ DBEVENTTYPEDESCR *pei = (DBEVENTTYPEDESCR*)CallService(MS_DB_EVENT_GETTYPE, (WPARAM)dbei->szModule, (LPARAM)dbei->eventType);
// support for custom database event types
- if (pei && pei->cbSize >= DBEVENTTYPEDESCR_SIZE_V1) {
- // preview requested
- if (dbei->pBlob) {
- DBEVENTGETTEXT svc = {dbei, DBVT_TCHAR, CP_ACP};
- TCHAR *pet = (TCHAR*)CallService(MS_DB_EVENT_GETTEXT, 0, (LPARAM)&svc);
- if (pet) {
- // we've got event text, move to our memory space
- comment1 = mir_tstrdup(pet);
- mir_free(pet);
- }
+ if (pei && dbei->pBlob) {
+ DBEVENTGETTEXT svc = {dbei, DBVT_TCHAR, CP_ACP};
+ TCHAR *pet = (TCHAR*)CallService(MS_DB_EVENT_GETTEXT, 0, (LPARAM)&svc);
+ if (pet) {
+ // we've got event text, move to our memory space
+ comment1 = mir_tstrdup(pet);
+ mir_free(pet);
}
commentFix = pei->descr;
}
diff --git a/plugins/TabSRMM/src/msglog.cpp b/plugins/TabSRMM/src/msglog.cpp index 13642b5f72..29605d0d7c 100644 --- a/plugins/TabSRMM/src/msglog.cpp +++ b/plugins/TabSRMM/src/msglog.cpp @@ -552,8 +552,8 @@ 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);
- return et && ( et->flags & DETF_MSGWINDOW );
+ DBEVENTTYPEDESCR* et = (DBEVENTTYPEDESCR*)CallService(MS_DB_EVENT_GETTYPE, (WPARAM)dbei->szModule, (LPARAM)dbei->eventType);
+ return et && (et->flags & DETF_MSGWINDOW);
}
static char *Template_CreateRTFFromDbEvent(TWindowData *dat, MCONTACT hContact, HANDLE hDbEvent, int prefixParaBreak, LogStreamData *streamData)
|