diff options
author | George Hazan <george.hazan@gmail.com> | 2014-06-23 18:36:11 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-06-23 18:36:11 +0000 |
commit | fbf061103982319c8023e48b150295fed547c9de (patch) | |
tree | abb1689525a975aa70b5036377006be57345a0fa /src/modules | |
parent | 4cdf29bbd778f0ffa1ab73b806c4e1dfbeb59bc9 (diff) |
srmm icon to follow the received messages
git-svn-id: http://svn.miranda-ng.org/main/trunk@9559 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/metacontacts/meta_services.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/modules/metacontacts/meta_services.cpp b/src/modules/metacontacts/meta_services.cpp index 6f7befc018..dbd04d6658 100644 --- a/src/modules/metacontacts/meta_services.cpp +++ b/src/modules/metacontacts/meta_services.cpp @@ -556,6 +556,18 @@ static int Meta_MessageWindowEvent(WPARAM wParam, LPARAM lParam) return 0;
}
+static int Meta_EventAdded(WPARAM hMeta, LPARAM hDbEvent)
+{
+ MetaSrmmData tmp = { hMeta };
+ if (MetaSrmmData *p = arMetaWindows.find(&tmp)) {
+ DBEVENTINFO dbei = { sizeof(dbei) };
+ db_event_get(HANDLE(hDbEvent), &dbei);
+ if (dbei.eventType == EVENTTYPE_MESSAGE && !(dbei.flags & DBEF_SENT))
+ p->m_hSub = db_event_getContact(HANDLE(hDbEvent));
+ }
+ return 0;
+}
+
// returns manually chosen sub in the meta window
static INT_PTR Meta_SrmmCurrentSub(WPARAM hMeta, LPARAM lParam)
{
@@ -891,6 +903,7 @@ void Meta_InitServices() HookEvent(ME_PROTO_CONTACTISTYPING, Meta_ContactIsTyping);
HookEvent(ME_DB_CONTACT_DELETED, Meta_ContactDeleted);
HookEvent(ME_DB_CONTACT_SETTINGCHANGED, Meta_SettingChanged);
+ HookEvent(ME_DB_EVENT_ADDED, Meta_EventAdded);
HookEvent(ME_OPT_INITIALISE, Meta_OptInit);
HookEvent(ME_SYSTEM_MODULESLOADED, Meta_ModulesLoaded);
HookEvent(ME_SYSTEM_PRESHUTDOWN, Meta_PreShutdown);
|