diff options
author | George Hazan <george.hazan@gmail.com> | 2013-09-07 20:43:04 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-09-07 20:43:04 +0000 |
commit | 743dcf2ce8d37fca29baec8f84d03d5578d733ff (patch) | |
tree | fda67a81961c4297b2f4c0ce923cb0164668b051 /src/modules/addcontact | |
parent | 305456c7e6e261630281bdccac09914c6079ab53 (diff) |
fix for the group index
git-svn-id: http://svn.miranda-ng.org/main/trunk@6012 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/addcontact')
-rw-r--r-- | src/modules/addcontact/addcontact.cpp | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/src/modules/addcontact/addcontact.cpp b/src/modules/addcontact/addcontact.cpp index d178ec4840..e658ca100d 100644 --- a/src/modules/addcontact/addcontact.cpp +++ b/src/modules/addcontact/addcontact.cpp @@ -88,7 +88,7 @@ INT_PTR CALLBACK AddContactDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lp 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);
+ SendDlgItemMessage(hdlg, IDC_GROUP, CB_SETITEMDATA, id, groupId);
}
}
@@ -126,8 +126,7 @@ INT_PTR CALLBACK AddContactDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lp case WM_COMMAND:
acs = (ADDCONTACTSTRUCT *)GetWindowLongPtr(hdlg, GWLP_USERDATA);
- switch (LOWORD(wparam))
- {
+ switch (LOWORD(wparam)) {
case IDC_AUTH:
{
DWORD flags = CallProtoServiceInt(NULL,acs->szProto, PS_GETCAPS, PFLAGNUM_4, 0);
@@ -148,8 +147,7 @@ INT_PTR CALLBACK AddContactDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lp case IDOK:
{
HANDLE hContact = INVALID_HANDLE_VALUE;
- switch (acs->handleType)
- {
+ switch (acs->handleType) {
case HANDLE_EVENT:
{
DBEVENTINFO dbei = { sizeof(dbei) };
@@ -175,8 +173,7 @@ INT_PTR CALLBACK AddContactDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lp db_set_ts(hContact, "CList", "MyHandle", szHandle);
int item = SendDlgItemMessage(hdlg, IDC_GROUP, CB_GETCURSEL, 0, 0);
- if (item > 0)
- {
+ if (item > 0) {
item = SendDlgItemMessage(hdlg, IDC_GROUP, CB_GETITEMDATA, item, 0);
CallService(MS_CLIST_CONTACTCHANGEGROUP, (WPARAM)hContact, item);
}
@@ -186,13 +183,11 @@ INT_PTR CALLBACK AddContactDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lp if (IsDlgButtonChecked(hdlg, IDC_ADDED))
CallContactService(hContact, PSS_ADDED, 0, 0);
- if (IsDlgButtonChecked(hdlg, IDC_AUTH))
- {
+ if (IsDlgButtonChecked(hdlg, IDC_AUTH)) {
DWORD flags = CallProtoServiceInt(NULL,acs->szProto, PS_GETCAPS, PFLAGNUM_4, 0);
if (flags & PF4_NOCUSTOMAUTH)
CallContactService(hContact, PSS_AUTHREQUESTT, 0, 0);
- else
- {
+ else {
TCHAR szReason[512];
GetDlgItemText(hdlg, IDC_AUTHREQ, szReason, SIZEOF(szReason));
CallContactService(hContact, PSS_AUTHREQUESTT, 0, (LPARAM)szReason);
|