diff options
author | George Hazan <george.hazan@gmail.com> | 2014-06-28 20:44:06 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-06-28 20:44:06 +0000 |
commit | c6e1bedfc18495b3e083069f8d03c2218f6f6b78 (patch) | |
tree | cf5583c51cd9c1d6b3faddc6a60235362fc0d624 /src/modules/metacontacts/meta_utils.cpp | |
parent | 9f4c313f4f644e5ebb29086210f492941c732956 (diff) |
fixes #630 p.2 (user must have a choice to display either Nick or DisplayName in SRMM menu)
git-svn-id: http://svn.miranda-ng.org/main/trunk@9605 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/metacontacts/meta_utils.cpp')
-rw-r--r-- | src/modules/metacontacts/meta_utils.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/modules/metacontacts/meta_utils.cpp b/src/modules/metacontacts/meta_utils.cpp index bf2546ce51..968e641784 100644 --- a/src/modules/metacontacts/meta_utils.cpp +++ b/src/modules/metacontacts/meta_utils.cpp @@ -525,6 +525,35 @@ int Meta_SwapContacts(DBCachedContact *cc, int n1, int n2) /////////////////////////////////////////////////////////////////////////////////////////
+void Meta_GetSubNick(MCONTACT hMeta, int i, CMString &tszDest)
+{
+ char idStr[50];
+ mir_snprintf(idStr, SIZEOF(idStr), "Login%d", i);
+
+ TCHAR buf[512];
+ DBVARIANT dbv;
+ db_get(hMeta, META_PROTO, idStr, &dbv);
+ switch (dbv.type) {
+ case DBVT_ASCIIZ:
+ tszDest = dbv.pszVal;
+ break;
+ case DBVT_BYTE:
+ tszDest.Format(_T("%d"), dbv.bVal);
+ break;
+ case DBVT_WORD:
+ tszDest.Format(_T("%d"), dbv.wVal);
+ break;
+ case DBVT_DWORD:
+ tszDest.Format(_T("%d"), dbv.dVal);
+ break;
+ default:
+ tszDest.Empty();
+ }
+ db_free(&dbv);
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+
void Meta_FixStatus(DBCachedContact *ccMeta)
{
WORD status = ID_STATUS_OFFLINE;
|