diff options
author | George Hazan <george.hazan@gmail.com> | 2014-04-02 20:48:49 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-04-02 20:48:49 +0000 |
commit | fe7d9276ebedd60308159925eb3f37d9a3b113a0 (patch) | |
tree | f428f64f810259da735f9b0b5e6c1f192c85385a /src/modules/metacontacts/meta_services.cpp | |
parent | 830d54f9e030a7cf06e5ec7b51a52aa21ab5e457 (diff) |
fix for hiding metas' SRMM windows on disabling metacontacts
git-svn-id: http://svn.miranda-ng.org/main/trunk@8830 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/metacontacts/meta_services.cpp')
-rw-r--r-- | src/modules/metacontacts/meta_services.cpp | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/src/modules/metacontacts/meta_services.cpp b/src/modules/metacontacts/meta_services.cpp index 4a283466e9..b0567ebbfd 100644 --- a/src/modules/metacontacts/meta_services.cpp +++ b/src/modules/metacontacts/meta_services.cpp @@ -40,6 +40,8 @@ HANDLE UINT_PTR setStatusTimerId = 0;
BOOL firstSetOnline = TRUE; // see Meta_SetStatus function
+LIST<void> arMetaWindows(1, HandleKeySortT);
+
/** Get the capabilities of the "MetaContacts" protocol.
*
* @param wParam : equals to one of the following values :\n
@@ -540,17 +542,21 @@ int Meta_UserInfo(WPARAM wParam, LPARAM hMeta) return 1;
}
-// handle message window api ver 0.0.0.1+ events - record window open/close status for subcontacts, so we know whether to
-// let received messages through and add db history to metacontact, or vice versa
+// record window open/close status for subs & metas
int Meta_MessageWindowEvent(WPARAM wParam, LPARAM lParam)
{
MessageWindowEventData *mwed = (MessageWindowEventData *)lParam;
- if (mwed->uType != MSG_WINDOW_EVT_OPEN)
- return 0;
-
- DBCachedContact *cc = currDb->m_cache->GetCachedContact(mwed->hContact);
- if (cc != NULL)
- Meta_UpdateSrmmIcon(cc, db_get_w(cc->contactID, META_PROTO, "Status", ID_STATUS_OFFLINE));
+ if (mwed->uType == MSG_WINDOW_EVT_OPEN) {
+ DBCachedContact *cc = currDb->m_cache->GetCachedContact(mwed->hContact);
+ if (cc != NULL) {
+ Meta_UpdateSrmmIcon(cc, db_get_w(cc->contactID, META_PROTO, "Status", ID_STATUS_OFFLINE));
+ if (cc->IsMeta())
+ arMetaWindows.insert(mwed->hwndWindow);
+ }
+ }
+ else if (mwed->uType == MSG_WINDOW_EVT_CLOSING) {
+ arMetaWindows.remove(mwed->hwndWindow);
+ }
return 0;
}
|