diff options
author | George Hazan <george.hazan@gmail.com> | 2016-09-13 17:11:58 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-09-13 17:11:58 +0000 |
commit | f51995e13679a37851baef8e7f52f2d993cbc7c1 (patch) | |
tree | 25ccd03cf2dc4b897cc0dc6fcbe4cc78ddb122c7 /plugins/NewEventNotify/src | |
parent | fe1e8456d2488095f409a4f2d38b7251abdedccf (diff) |
mode old database junk to die
git-svn-id: http://svn.miranda-ng.org/main/trunk@17291 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/NewEventNotify/src')
-rw-r--r-- | plugins/NewEventNotify/src/main.cpp | 10 | ||||
-rw-r--r-- | plugins/NewEventNotify/src/popup.cpp | 23 |
2 files changed, 11 insertions, 22 deletions
diff --git a/plugins/NewEventNotify/src/main.cpp b/plugins/NewEventNotify/src/main.cpp index 85fa3f1e9a..275372ef71 100644 --- a/plugins/NewEventNotify/src/main.cpp +++ b/plugins/NewEventNotify/src/main.cpp @@ -70,12 +70,10 @@ int HookedNewEvent(WPARAM hContact, LPARAM hDbEvent) return 0;
//custom database event types
- 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->flags & DETF_NONOTIFY)
- return 0;
- }
+ DBEVENTTYPEDESCR *pei = DbEvent_GetType(dbe.szModule, dbe.eventType);
+ // ignore events according to flags
+ if (pei && pei->flags & DETF_NONOTIFY)
+ return 0;
//if event was allready read don't show it
if (pluginOptions.bReadCheck && (dbe.flags & DBEF_READ))
diff --git a/plugins/NewEventNotify/src/popup.cpp b/plugins/NewEventNotify/src/popup.cpp index 219a65bee2..466cbf0661 100644 --- a/plugins/NewEventNotify/src/popup.cpp +++ b/plugins/NewEventNotify/src/popup.cpp @@ -369,29 +369,20 @@ static wchar_t* GetEventPreview(DBEVENTINFO *dbei) break;
default:
- if (ServiceExists(MS_DB_EVENT_GETTYPE)) {
- DBEVENTTYPEDESCR *pei = (DBEVENTTYPEDESCR*)CallService(MS_DB_EVENT_GETTYPE, (WPARAM)dbei->szModule, (LPARAM)dbei->eventType);
- // support for custom database event types
- if (pei && dbei->pBlob) {
- DBEVENTGETTEXT svc = {dbei, DBVT_WCHAR, CP_ACP};
- wchar_t *pet = (wchar_t*)CallService(MS_DB_EVENT_GETTEXT, 0, (LPARAM)&svc);
- if (pet) {
- // we've got event text, move to our memory space
- comment1 = mir_wstrdup(pet);
- mir_free(pet);
- }
- commentFix = pei->descr;
- }
- else commentFix = POPUP_COMMENT_OTHER;
+ DBEVENTTYPEDESCR *pei = DbEvent_GetType(dbei->szModule, dbei->eventType);
+ // support for custom database event types
+ if (pei && dbei->pBlob) {
+ comment1 = DbEvent_GetTextW(dbei, CP_ACP);
+ commentFix = pei->descr;
}
else commentFix = POPUP_COMMENT_OTHER;
}
- if ( mir_wstrlen(comment1) > 0) {
+ if (mir_wstrlen(comment1) > 0) {
mir_free(comment2);
return comment1;
}
- if ( mir_wstrlen(comment2) > 0) {
+ if (mir_wstrlen(comment2) > 0) {
mir_free(comment1);
return comment2;
}
|