diff options
author | George Hazan <george.hazan@gmail.com> | 2013-06-23 12:32:12 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-06-23 12:32:12 +0000 |
commit | 8788bb35e10ef5403a08388d33ed4ab2ff7d67df (patch) | |
tree | b79e5efbfb02418b1276442a59e7722252cf39c8 /protocols/JabberG | |
parent | 05ccb4dcd0b507fb000426667ed3f25c0b93db2b (diff) |
new helper applied instead of MS_DB_SETSETTINGRESIDENT
git-svn-id: http://svn.miranda-ng.org/main/trunk@5094 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG')
-rw-r--r-- | protocols/JabberG/src/jabber_proto.cpp | 21 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_xstatus.cpp | 13 |
2 files changed, 12 insertions, 22 deletions
diff --git a/protocols/JabberG/src/jabber_proto.cpp b/protocols/JabberG/src/jabber_proto.cpp index 4de089e843..e03cf896ae 100644 --- a/protocols/JabberG/src/jabber_proto.cpp +++ b/protocols/JabberG/src/jabber_proto.cpp @@ -171,20 +171,13 @@ CJabberProto::CJabberProto(const char* aProtoName, const TCHAR *aUserName) : *m_savedPassword = 0;
- char text[ MAX_PATH ];
- mir_snprintf(text, sizeof(text), "%s/Status", m_szModuleName);
- CallService(MS_DB_SETSETTINGRESIDENT, TRUE, (LPARAM)text);
- mir_snprintf(text, sizeof(text), "%s/%s", m_szModuleName, DBSETTING_DISPLAY_UID);
- CallService(MS_DB_SETSETTINGRESIDENT, TRUE, (LPARAM)text);
-
- mir_snprintf(text, sizeof(text), "%s/SubscriptionText", m_szModuleName);
- CallService(MS_DB_SETSETTINGRESIDENT, TRUE, (LPARAM)text);
- mir_snprintf(text, sizeof(text), "%s/Subscription", m_szModuleName);
- CallService(MS_DB_SETSETTINGRESIDENT, TRUE, (LPARAM)text);
- mir_snprintf(text, sizeof(text), "%s/Auth", m_szModuleName);
- CallService(MS_DB_SETSETTINGRESIDENT, TRUE, (LPARAM)text);
- mir_snprintf(text, sizeof(text), "%s/Grant", m_szModuleName);
- CallService(MS_DB_SETSETTINGRESIDENT, TRUE, (LPARAM)text);
+ db_set_resident(m_szModuleName, "Status");
+ db_set_resident(m_szModuleName, DBSETTING_DISPLAY_UID);
+
+ db_set_resident(m_szModuleName, "SubscriptionText");
+ db_set_resident(m_szModuleName, "Subscription");
+ db_set_resident(m_szModuleName, "Auth");
+ db_set_resident(m_szModuleName, "Grant");
DBVARIANT dbv;
if ( !JGetStringT(NULL, "XmlLang", &dbv)) {
diff --git a/protocols/JabberG/src/jabber_xstatus.cpp b/protocols/JabberG/src/jabber_xstatus.cpp index 0a97bba749..6cbedb9267 100644 --- a/protocols/JabberG/src/jabber_xstatus.cpp +++ b/protocols/JabberG/src/jabber_xstatus.cpp @@ -1458,14 +1458,11 @@ INT_PTR __cdecl CJabberProto::OnSetXStatusEx(WPARAM wParam, LPARAM lParam) void CJabberProto::RegisterAdvStatusSlot(const char *pszSlot)
{
char szSetting[256];
- mir_snprintf(szSetting, SIZEOF(szSetting), "AdvStatus/%s/%s/id", m_szModuleName, pszSlot);
- CallService(MS_DB_SETSETTINGRESIDENT, TRUE, (LPARAM)szSetting);
- mir_snprintf(szSetting, SIZEOF(szSetting), "AdvStatus/%s/%s/icon", m_szModuleName, pszSlot);
- CallService(MS_DB_SETSETTINGRESIDENT, TRUE, (LPARAM)szSetting);
- mir_snprintf(szSetting, SIZEOF(szSetting), "AdvStatus/%s/%s/title", m_szModuleName, pszSlot);
- CallService(MS_DB_SETSETTINGRESIDENT, TRUE, (LPARAM)szSetting);
- mir_snprintf(szSetting, SIZEOF(szSetting), "AdvStatus/%s/%s/text", m_szModuleName, pszSlot);
- CallService(MS_DB_SETSETTINGRESIDENT, TRUE, (LPARAM)szSetting);
+ mir_snprintf(szSetting, SIZEOF(szSetting), "AdvStatus/%s/%s", m_szModuleName, pszSlot);
+ db_set_resident(szSetting, "id");
+ db_set_resident(szSetting, "icon");
+ db_set_resident(szSetting, "title");
+ db_set_resident(szSetting, "text");
}
void CJabberProto::ResetAdvStatus(HANDLE hContact, const char *pszSlot)
|