summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src/contactcache.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-07-23 18:57:33 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-07-23 18:57:33 +0000
commit4535f8706bbb0844fdddd73e7911606d58b7502d (patch)
tree1fc87230e575fe90294a7f8170f9197b2416ff41 /plugins/TabSRMM/src/contactcache.cpp
parent3c0dcc2b03f6713b9c1906b3960801bcdf05666a (diff)
direct access to META_PROTO removed from tabSRMM
git-svn-id: http://svn.miranda-ng.org/main/trunk@9927 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TabSRMM/src/contactcache.cpp')
-rw-r--r--plugins/TabSRMM/src/contactcache.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/plugins/TabSRMM/src/contactcache.cpp b/plugins/TabSRMM/src/contactcache.cpp
index 1687a8fa82..6d07423bb4 100644
--- a/plugins/TabSRMM/src/contactcache.cpp
+++ b/plugins/TabSRMM/src/contactcache.cpp
@@ -71,7 +71,7 @@ void CContactCache::initPhaseTwo()
m_Valid = (cc->szProto != 0 && m_szAccount != 0) ? true : false;
if (m_Valid) {
- m_isMeta = PluginConfig.bMetaEnabled && !strcmp(cc->szProto, META_PROTO);
+ m_isMeta = db_mc_isMeta(cc->contactID) != 0; // don't use cc->IsMeta() here
if (m_isMeta)
updateMeta(true);
updateState();
@@ -503,25 +503,24 @@ CContactCache* CContactCache::getContactCache(MCONTACT hContact)
* it is ONLY called from the DBSettingChanged() event handler when the relevant
* database value is touched.
*/
-void CContactCache::cacheUpdateMetaChanged()
+int CContactCache::cacheUpdateMetaChanged(WPARAM bMetaEnabled, LPARAM)
{
- bool fMetaActive = (PluginConfig.bMetaEnabled) ? true : false;
-
for (int i=0; i < arContacts.getCount(); i++) {
CContactCache &c = arContacts[i];
- if (c.isMeta() && PluginConfig.bMetaEnabled == false) {
+ if (c.isMeta() && !bMetaEnabled) {
c.closeWindow();
c.resetMeta();
}
// meta contacts are enabled, but current contact is a subcontact - > close window
- if (fMetaActive && c.isSubContact())
+ if (bMetaEnabled && c.isSubContact())
c.closeWindow();
// reset meta contact information, if metacontacts protocol became avail
- if (fMetaActive && !strcmp(c.getProto(), META_PROTO))
+ if (bMetaEnabled && !c.cc->IsMeta())
c.resetMeta();
}
+ return 0;
}
/**