diff options
author | George Hazan <george.hazan@gmail.com> | 2013-06-27 15:34:33 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-06-27 15:34:33 +0000 |
commit | b48741c8d0ed916d2cdd41956667ec4082ab245a (patch) | |
tree | 1d0e149514343e602495e85861649e173324fd01 /plugins/TabSRMM/src/contactcache.cpp | |
parent | b1d29a5793fc80dd1c0d26e4ba900853fad41809 (diff) |
obsolete helpers removed
git-svn-id: http://svn.miranda-ng.org/main/trunk@5152 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TabSRMM/src/contactcache.cpp')
-rw-r--r-- | plugins/TabSRMM/src/contactcache.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/plugins/TabSRMM/src/contactcache.cpp b/plugins/TabSRMM/src/contactcache.cpp index d93afc5fbd..3dc6d73fe4 100644 --- a/plugins/TabSRMM/src/contactcache.cpp +++ b/plugins/TabSRMM/src/contactcache.cpp @@ -80,8 +80,8 @@ void CContactCache::initPhaseTwo() m_Valid = (m_szProto != 0 && m_szAccount != 0) ? true : false;
if (m_Valid) {
- m_isMeta = (PluginConfig.bMetaEnabled && !strcmp(m_szProto, PluginConfig.szMetaName)) ? true : false;
- m_isSubcontact = (M->GetByte(m_hContact, PluginConfig.szMetaName, "IsSubcontact", 0) ? true : false);
+ m_isMeta = PluginConfig.bMetaEnabled && !strcmp(m_szProto, PluginConfig.szMetaName);
+ m_isSubcontact = db_get_b(m_hContact, PluginConfig.szMetaName, "IsSubcontact", 0) != 0;
if (m_isMeta)
updateMeta(true);
updateState();
@@ -397,7 +397,7 @@ void CContactCache::inputHistoryEvent(WPARAM wParam) */
void CContactCache::allocHistory()
{
- m_iHistorySize = M->GetByte("historysize", 15);
+ m_iHistorySize = M.GetByte("historysize", 15);
if (m_iHistorySize < 10)
m_iHistorySize = 10;
m_history = (TInputHistory *)malloc(sizeof(TInputHistory) * (m_iHistorySize + 1));
@@ -458,8 +458,8 @@ void CContactCache::deletedHandler() */
void CContactCache::updateFavorite()
{
- m_isFavorite = M->GetByte(m_hContact, SRMSGMOD_T, "isFavorite", 0) ? true : false;
- m_isRecent = M->GetDword(m_hContact, "isRecent", 0) ? true : false;
+ m_isFavorite = db_get_b(m_hContact, SRMSGMOD_T, "isFavorite", 0) != 0;
+ m_isRecent = M.GetDword(m_hContact, "isRecent", 0) ? true : false;
}
/**
@@ -480,7 +480,7 @@ void CContactCache::updateStatusMsg(const char *szKey) if (m_szStatusMsg)
mir_free(m_szStatusMsg);
m_szStatusMsg = 0;
- res = M->GetTString(m_hContact, "CList", "StatusMsg", &dbv);
+ res = db_get_ts(m_hContact, "CList", "StatusMsg", &dbv);
if (res == 0) {
m_szStatusMsg = (lstrlen(dbv.ptszVal) > 0 ? getNormalizedStatusMsg(dbv.ptszVal) : 0);
db_free(&dbv);
@@ -490,7 +490,7 @@ void CContactCache::updateStatusMsg(const char *szKey) if (m_ListeningInfo)
mir_free(m_ListeningInfo);
m_ListeningInfo = 0;
- res = M->GetTString(m_hContact, m_szProto, "ListeningTo", &dbv);
+ res = db_get_ts(m_hContact, m_szProto, "ListeningTo", &dbv);
if (res == 0) {
m_ListeningInfo = (lstrlen(dbv.ptszVal) > 0 ? mir_tstrdup(dbv.ptszVal) : 0);
db_free(&dbv);
@@ -500,13 +500,13 @@ void CContactCache::updateStatusMsg(const char *szKey) if (m_xStatusMsg)
mir_free(m_xStatusMsg);
m_xStatusMsg = 0;
- res = M->GetTString(m_hContact, m_szProto, "XStatusMsg", &dbv);
+ res = db_get_ts(m_hContact, m_szProto, "XStatusMsg", &dbv);
if (res == 0) {
m_xStatusMsg = (lstrlen(dbv.ptszVal) > 0 ? mir_tstrdup(dbv.ptszVal) : 0);
db_free(&dbv);
}
}
- m_xStatus = M->GetByte(m_hContact, m_szProto, "XStatusId", 0);
+ m_xStatus = db_get_b(m_hContact, m_szProto, "XStatusId", 0);
}
/**
@@ -621,7 +621,7 @@ int CContactCache::getMaxMessageLength() m_nMax = CallProtoService(szProto, PS_GETCAPS, PFLAG_MAXLENOFMESSAGE, reinterpret_cast<LPARAM>(hContact));
if (m_nMax) {
- if (M->GetByte("autosplit", 0)) {
+ if (M.GetByte("autosplit", 0)) {
if (m_hwnd)
::SendDlgItemMessage(m_hwnd, IDC_MESSAGE, EM_EXLIMITTEXT, 0, 20000);
}
|