diff options
author | George Hazan <george.hazan@gmail.com> | 2013-04-05 16:54:27 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-04-05 16:54:27 +0000 |
commit | b665a90f50f09435aef5bc3b5b9da710e4558690 (patch) | |
tree | 3053606dcddc1b15f73e7af1fb2507afbf20f052 /plugins/TabSRMM/src/contactcache.cpp | |
parent | 6c01981a8452577f3751298c7cdbe59b3ae81d51 (diff) |
various menu items quirks, simplifications & optimization
git-svn-id: http://svn.miranda-ng.org/main/trunk@4319 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TabSRMM/src/contactcache.cpp')
-rw-r--r-- | plugins/TabSRMM/src/contactcache.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/plugins/TabSRMM/src/contactcache.cpp b/plugins/TabSRMM/src/contactcache.cpp index 28ae75bb1d..74238bb783 100644 --- a/plugins/TabSRMM/src/contactcache.cpp +++ b/plugins/TabSRMM/src/contactcache.cpp @@ -148,14 +148,12 @@ bool CContactCache::updateNick() */
bool CContactCache::updateStatus()
{
- if (m_Valid) {
- m_wOldStatus = m_wStatus;
- m_wStatus = (WORD)DBGetContactSettingWord(m_hContact, m_szProto, "Status", ID_STATUS_OFFLINE);
+ if (!m_Valid)
+ return false;
- return(m_wOldStatus != m_wStatus);
- }
- else
- return(false);
+ m_wOldStatus = m_wStatus;
+ m_wStatus = (WORD)db_get_w(m_hContact, m_szProto, "Status", ID_STATUS_OFFLINE);
+ return m_wOldStatus != m_wStatus;
}
/**
@@ -174,7 +172,7 @@ void CContactCache::updateMeta(bool fForce) PROTOACCOUNT *acc = reinterpret_cast<PROTOACCOUNT *>(::CallService(MS_PROTO_GETACCOUNT, 0, (LPARAM)m_szMetaProto));
if (acc && acc->tszAccountName)
m_szAccount = acc->tszAccountName;
- m_wMetaStatus = DBGetContactSettingWord(m_hSubContact, m_szMetaProto, "Status", ID_STATUS_OFFLINE);
+ m_wMetaStatus = db_get_w(m_hSubContact, m_szMetaProto, "Status", ID_STATUS_OFFLINE);
MultiByteToWideChar(CP_ACP, 0, m_szMetaProto, -1, m_tszMetaProto, 40);
m_tszMetaProto[39] = 0;
}
|