diff options
author | George Hazan <george.hazan@gmail.com> | 2013-09-07 19:27:31 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-09-07 19:27:31 +0000 |
commit | 1a8fbb98e30b55aee908e3ad2382622a0688c635 (patch) | |
tree | 870a5861345c4f0115304655861c1d0137d8b3ef /src/modules/addcontact | |
parent | d2a2a30b0dfd94fa50bf269a17c6486a33114877 (diff) |
direct access to CListGroups restricted
git-svn-id: http://svn.miranda-ng.org/main/trunk@6009 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/addcontact')
-rw-r--r-- | src/modules/addcontact/addcontact.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/modules/addcontact/addcontact.cpp b/src/modules/addcontact/addcontact.cpp index d12b5627e8..d178ec4840 100644 --- a/src/modules/addcontact/addcontact.cpp +++ b/src/modules/addcontact/addcontact.cpp @@ -85,16 +85,10 @@ INT_PTR CALLBACK AddContactDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lp acs->szProto = GetContactProto(acs->handle);
{
- int groupId;
- for (groupId = 0; groupId < 999; groupId++) {
- DBVARIANT dbv;
- char idstr[4];
- int id;
- _itoa(groupId, idstr, 10);
- if (db_get_ts(NULL, "CListGroups", idstr, &dbv)) break;
- id = SendDlgItemMessage(hdlg, IDC_GROUP, CB_ADDSTRING, 0, (LPARAM)(dbv.ptszVal+1));
+ TCHAR *grpName;
+ for (int groupId = 1; (grpName = cli.pfnGetGroupName(groupId, NULL)) != NULL; groupId++) {
+ int id = SendDlgItemMessage(hdlg, IDC_GROUP, CB_ADDSTRING, 0, (LPARAM)grpName);
SendDlgItemMessage(hdlg, IDC_GROUP, CB_SETITEMDATA , id, groupId+1);
- db_free(&dbv);
}
}
|