diff options
author | George Hazan <george.hazan@gmail.com> | 2016-04-15 13:40:58 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-04-15 13:40:58 +0000 |
commit | 18f7e9261c885e953f220ba6836e8bca43a6fc88 (patch) | |
tree | 67cb94186914b97f1c0e8e815afffea7666b2510 /protocols/Sametime/src | |
parent | d2dd1c6dddd3e690ad13d2b355de60d3724e8ec6 (diff) |
contact list groups:
- finally database is not used anymore (only as a settings' storage);
- MGROUP type introduced to replace HANDLE for group ids;
- MS_CLIST_GROUP* services became Clist_Group* functions;
- CLIST_INTERFACE members pfnGetGroupName & pfnRenameGroup also transformed into static Clist_Group* functions
git-svn-id: http://svn.miranda-ng.org/main/trunk@16659 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Sametime/src')
-rw-r--r-- | protocols/Sametime/src/userlist.cpp | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/protocols/Sametime/src/userlist.cpp b/protocols/Sametime/src/userlist.cpp index 2b85a75c0e..d9ea2ea318 100644 --- a/protocols/Sametime/src/userlist.cpp +++ b/protocols/Sametime/src/userlist.cpp @@ -48,15 +48,9 @@ void CSametimeProto::AddGroup(const char* name, bool expanded) if (name && mir_strcmp(name, Translate("None")) == 0)
return;
- ptrT ptszGroup(mir_utf8decodeT(name));
- HANDLE hGroup = Clist_GroupExists(ptszGroup);
- if (hGroup == NULL) {
- hGroup = Clist_CreateGroup(NULL, ptszGroup);
- if (hGroup) {
- CallService(MS_CLUI_GROUPADDED, (WPARAM)hGroup, 0);
- CallService(MS_CLIST_GROUPSETEXPANDED, (WPARAM)hGroup, expanded ? 1 : 0);
- }
- }
+ MGROUP hGroup = Clist_GroupCreate(NULL, ptrT(mir_utf8decodeT(name)));
+ CallService(MS_CLUI_GROUPADDED, hGroup, 0);
+ Clist_GroupSetExpanded(hGroup, expanded);
}
MCONTACT CSametimeProto::AddContact(mwSametimeUser* user, bool temporary)
@@ -245,10 +239,10 @@ void CSametimeProto::ExportContactsToList(mwSametimeList* user_list) //group_open = (db_get_b(0, szProtoGroups, buff, 0) == 1);
ptrT ptszGroup(mir_utf8decodeT(group_alias));
- HANDLE hGroup = Clist_GroupExists(ptszGroup);
+ MGROUP hGroup = Clist_GroupExists(ptszGroup);
if (hGroup) {
- int expanded;
- CallService(MS_CLIST_GROUPGETNAME, (WPARAM)hGroup, (LPARAM)&expanded);
+ DWORD expanded;
+ Clist_GroupGetName(hGroup, &expanded);
group_open = (expanded != 0);
}
else {
|