summaryrefslogtreecommitdiff
path: root/plugins/MirandaG15/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-06-27 21:23:35 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-06-27 21:23:35 +0300
commit44525f461757fc859616fda16820351b07238842 (patch)
tree117ad05514eed381fc13dcf8befcf0ff06023e57 /plugins/MirandaG15/src
parent810ed4dea67b54a18f6ec3f5273d2f8efe08708c (diff)
manual access to CList/Group restricted
Diffstat (limited to 'plugins/MirandaG15/src')
-rw-r--r--plugins/MirandaG15/src/CAppletManager.cpp20
1 files changed, 6 insertions, 14 deletions
diff --git a/plugins/MirandaG15/src/CAppletManager.cpp b/plugins/MirandaG15/src/CAppletManager.cpp
index 3534f2ea7f..8c88700675 100644
--- a/plugins/MirandaG15/src/CAppletManager.cpp
+++ b/plugins/MirandaG15/src/CAppletManager.cpp
@@ -441,15 +441,8 @@ tstring CAppletManager::GetContactDisplayname(MCONTACT hContact, bool bShortened
//************************************************************************
tstring CAppletManager::GetContactGroup(MCONTACT hContact)
{
- DBVARIANT dbv;
- int res = db_get_ws(hContact, "CList", "Group", &dbv);
-
- tstring strGroup = L"";
- if (!res)
- strGroup = dbv.pwszVal;
-
- db_free(&dbv);
- return strGroup;
+ ptrW wszGroup(Clist_GetGroup(hContact));
+ return (wszGroup) ? wszGroup : L"";
}
//************************************************************************
@@ -1654,11 +1647,10 @@ int CAppletManager::HookSettingChanged(WPARAM hContact, LPARAM lParam)
}
else if (!strcmp(dbcws->szSetting, "Group")) {
Event.eType = EVENT_CONTACT_GROUP;
- DBVARIANT dbv;
- int res = db_get_ws(hContact, "CList", "Group", &dbv);
- if (!res)
- Event.strValue = dbv.pwszVal;
- db_free(&dbv);
+
+ ptrW wszGroup(Clist_GetGroup(hContact));
+ if (wszGroup)
+ Event.strValue = wszGroup;
}
else return 0;
}