summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-06-29 20:43:47 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-06-29 20:43:47 +0000
commit2a8072247e1df7651416e06a6d0cf8754a88aa95 (patch)
tree2d55c570c2a81094a639a21263b35ef7ee678dea /plugins/TabSRMM/src
parent8e64adb6f676695df87fb3dd697dd5ce3a4a873d (diff)
return of m_wMetaStatus into tabSRMM cache
git-svn-id: http://svn.miranda-ng.org/main/trunk@9621 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TabSRMM/src')
-rw-r--r--plugins/TabSRMM/src/contactcache.cpp11
-rw-r--r--plugins/TabSRMM/src/contactcache.h4
-rw-r--r--plugins/TabSRMM/src/version.h2
3 files changed, 13 insertions, 4 deletions
diff --git a/plugins/TabSRMM/src/contactcache.cpp b/plugins/TabSRMM/src/contactcache.cpp
index fab10869f0..38ef4e3f92 100644
--- a/plugins/TabSRMM/src/contactcache.cpp
+++ b/plugins/TabSRMM/src/contactcache.cpp
@@ -92,6 +92,7 @@ void CContactCache::resetMeta()
{
m_isMeta = false;
m_szMetaProto = 0;
+ m_wMetaStatus = ID_STATUS_OFFLINE;
initPhaseTwo();
}
@@ -150,7 +151,15 @@ bool CContactCache::updateStatus()
*/
void CContactCache::updateMeta(bool fForce)
{
- m_szMetaProto = (m_Valid) ? GetContactProto(db_mc_getSrmmSub(cc->contactID)) : NULL;
+ if (m_Valid) {
+ MCONTACT hSub = db_mc_getSrmmSub(cc->contactID);
+ m_szMetaProto = GetContactProto(hSub);
+ m_wMetaStatus = (WORD)db_get_w(hSub, m_szMetaProto, "Status", ID_STATUS_OFFLINE);
+ }
+ else {
+ m_szMetaProto = NULL;
+ m_wMetaStatus = ID_STATUS_OFFLINE;
+ }
}
/**
diff --git a/plugins/TabSRMM/src/contactcache.h b/plugins/TabSRMM/src/contactcache.h
index c12879ab4a..0d8626d2bd 100644
--- a/plugins/TabSRMM/src/contactcache.h
+++ b/plugins/TabSRMM/src/contactcache.h
@@ -73,7 +73,7 @@ struct CContactCache : public MZeroedObject
const bool isValid() const { return m_Valid; }
const WORD getStatus() const { return m_wStatus; }
- const WORD getActiveStatus() const { return m_wStatus; }
+ const WORD getActiveStatus() const { return m_isMeta ? m_wMetaStatus : m_wStatus; }
const WORD getOldStatus() const { return m_wOldStatus; }
const TCHAR* getNick() const { return m_szNick; }
const MCONTACT getContact() const { return m_hContact; }
@@ -133,7 +133,7 @@ private:
void releaseAlloced();
MCONTACT m_hContact;
- WORD m_wStatus, m_wOldStatus;
+ WORD m_wStatus, m_wOldStatus, m_wMetaStatus;
char *m_szMetaProto;
TCHAR *m_szAccount;
TCHAR m_szNick[80], m_szUIN[80];
diff --git a/plugins/TabSRMM/src/version.h b/plugins/TabSRMM/src/version.h
index d728412c26..25567b323f 100644
--- a/plugins/TabSRMM/src/version.h
+++ b/plugins/TabSRMM/src/version.h
@@ -1,7 +1,7 @@
#define __MAJOR_VERSION 3
#define __MINOR_VERSION 3
#define __RELEASE_NUM 1
-#define __BUILD_NUM 2
+#define __BUILD_NUM 3
#include <stdver.h>