summaryrefslogtreecommitdiff
path: root/plugins/AddContactPlus/src/addcontact.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-09-07 19:27:31 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-09-07 19:27:31 +0000
commit1a8fbb98e30b55aee908e3ad2382622a0688c635 (patch)
tree870a5861345c4f0115304655861c1d0137d8b3ef /plugins/AddContactPlus/src/addcontact.cpp
parentd2a2a30b0dfd94fa50bf269a17c6486a33114877 (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 'plugins/AddContactPlus/src/addcontact.cpp')
-rw-r--r--plugins/AddContactPlus/src/addcontact.cpp385
1 files changed, 180 insertions, 205 deletions
diff --git a/plugins/AddContactPlus/src/addcontact.cpp b/plugins/AddContactPlus/src/addcontact.cpp
index 15de673f7d..e895bffb09 100644
--- a/plugins/AddContactPlus/src/addcontact.cpp
+++ b/plugins/AddContactPlus/src/addcontact.cpp
@@ -183,256 +183,231 @@ bool AddContactDlgAccounts(HWND hdlg, ADDCONTACTSTRUCT* acs)
INT_PTR CALLBACK AddContactDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lparam)
{
ADDCONTACTSTRUCT* acs;
- switch (msg)
- {
- case WM_INITDIALOG:
- acs = (ADDCONTACTSTRUCT*)mir_calloc(sizeof(ADDCONTACTSTRUCT));
- acs->handleType = HANDLE_SEARCHRESULT;
- SetWindowLongPtr(hdlg, GWLP_USERDATA, (LONG_PTR)acs);
-
- Utils_RestoreWindowPositionNoSize(hdlg, NULL, "AddContact", "");
- TranslateDialogDefault(hdlg);
- SendMessage(hdlg, WM_SETICON, ICON_BIG, (LPARAM)Skin_GetIcon(ICON_ADD,1));
- SendMessage(hdlg, WM_SETICON, ICON_SMALL, (LPARAM)Skin_GetIcon(ICON_ADD));
- HookEventMessage(ME_SKIN2_ICONSCHANGED, hdlg, DM_ADDCONTACT_CHANGEICONS);
- HookEventMessage(ME_PROTO_ACCLISTCHANGED, hdlg, DM_ADDCONTACT_CHANGEACCLIST);
+ switch (msg) {
+ case WM_INITDIALOG:
+ acs = (ADDCONTACTSTRUCT*)mir_calloc(sizeof(ADDCONTACTSTRUCT));
+ acs->handleType = HANDLE_SEARCHRESULT;
+ SetWindowLongPtr(hdlg, GWLP_USERDATA, (LONG_PTR)acs);
+
+ Utils_RestoreWindowPositionNoSize(hdlg, NULL, "AddContact", "");
+ TranslateDialogDefault(hdlg);
+ SendMessage(hdlg, WM_SETICON, ICON_BIG, (LPARAM)Skin_GetIcon(ICON_ADD,1));
+ SendMessage(hdlg, WM_SETICON, ICON_SMALL, (LPARAM)Skin_GetIcon(ICON_ADD));
+ HookEventMessage(ME_SKIN2_ICONSCHANGED, hdlg, DM_ADDCONTACT_CHANGEICONS);
+ HookEventMessage(ME_PROTO_ACCLISTCHANGED, hdlg, DM_ADDCONTACT_CHANGEACCLIST);
- {
- for (int groupId = 0; groupId < 999; groupId++)
- {
- DBVARIANT dbv;
- char idstr[4];
- _itoa(groupId, idstr, 10);
- if (db_get_ts(NULL, "CListGroups", idstr, &dbv)) break;
- int id = SendDlgItemMessage(hdlg, IDC_GROUP, CB_ADDSTRING, 0, (LPARAM)(dbv.ptszVal + 1));
- SendDlgItemMessage(hdlg, IDC_GROUP, CB_SETITEMDATA, (WPARAM)id, (LPARAM)groupId + 1);
- db_free(&dbv);
- }
+ {
+ TCHAR *szGroup;
+ for (int i=1; (szGroup = pcli->pfnGetGroupName(i, NULL)) != NULL; i++) {
+ int id = SendDlgItemMessage(hdlg, IDC_GROUP, CB_ADDSTRING, 0, (LPARAM)szGroup);
+ SendDlgItemMessage(hdlg, IDC_GROUP, CB_SETITEMDATA, (WPARAM)id, (LPARAM)i+1);
}
- SendDlgItemMessage(hdlg, IDC_GROUP, CB_INSERTSTRING, 0, (LPARAM)TranslateT("None"));
- SendDlgItemMessage(hdlg, IDC_GROUP, CB_SETCURSEL, 0, 0);
+ }
+ SendDlgItemMessage(hdlg, IDC_GROUP, CB_INSERTSTRING, 0, (LPARAM)TranslateT("None"));
+ SendDlgItemMessage(hdlg, IDC_GROUP, CB_SETCURSEL, 0, 0);
- {
- DBVARIANT dbv = {0};
- if(!db_get_s(NULL,"AddContact","LastProto",&dbv))
- {
- acs->szProto = dbv.pszVal;
- db_free(&dbv);
+ {
+ DBVARIANT dbv = {0};
+ if(!db_get_s(NULL,"AddContact","LastProto",&dbv)) {
+ acs->szProto = dbv.pszVal;
+ db_free(&dbv);
+ }
+ }
+ if(AddContactDlgAccounts(hdlg, acs)) {
+ // By default check these checkboxes
+ CheckDlgButton(hdlg, IDC_ADDED, BST_CHECKED);
+ CheckDlgButton(hdlg, IDC_AUTH, BST_CHECKED);
+ AddContactDlgOpts(hdlg, acs->szProto);
+ EnableWindow(GetDlgItem(hdlg, IDOK), FALSE);
+ }
+ break;
+
+ case WM_COMMAND:
+ acs = (ADDCONTACTSTRUCT*)GetWindowLongPtr(hdlg, GWLP_USERDATA);
+ switch (LOWORD(wparam)) {
+ case IDC_USERID:
+ if (HIWORD(wparam) == EN_CHANGE) {
+ TCHAR szUserId[256];
+ if (GetDlgItemText(hdlg, IDC_USERID, szUserId, SIZEOF(szUserId))) {
+ if (!IsWindowEnabled(GetDlgItem(hdlg, IDOK)))
+ EnableWindow(GetDlgItem(hdlg, IDOK), TRUE);
}
+ else if (IsWindowEnabled(GetDlgItem(hdlg, IDOK)))
+ EnableWindow(GetDlgItem(hdlg, IDOK), FALSE);
}
- if(AddContactDlgAccounts(hdlg, acs))
- {
- // By default check these checkboxes
- CheckDlgButton(hdlg, IDC_ADDED, BST_CHECKED);
- CheckDlgButton(hdlg, IDC_AUTH, BST_CHECKED);
+ break;
+
+ case IDC_PROTO:
+ if (HIWORD(wparam) == CBN_SELCHANGE || HIWORD(wparam) == CBN_SELENDOK) {
+ acs->szProto = (char*)SendDlgItemMessage(hdlg, IDC_PROTO, CB_GETITEMDATA, (WPARAM)SendDlgItemMessage(hdlg, IDC_PROTO, CB_GETCURSEL, 0, 0), 0);
+ // TODO remember last setting for each proto?
AddContactDlgOpts(hdlg, acs->szProto);
- EnableWindow(GetDlgItem(hdlg, IDOK), FALSE);
}
break;
- case WM_COMMAND:
- acs = (ADDCONTACTSTRUCT*)GetWindowLongPtr(hdlg, GWLP_USERDATA);
- switch (LOWORD(wparam))
+ case IDC_ADDTEMP:
+ AddContactDlgOpts(hdlg, acs->szProto, TRUE);
+ break;
+
+ case IDC_AUTH:
{
- case IDC_USERID:
- if (HIWORD(wparam) == EN_CHANGE)
- {
- TCHAR szUserId[256];
- if (GetDlgItemText(hdlg, IDC_USERID, szUserId, SIZEOF(szUserId)))
- {
- if (!IsWindowEnabled(GetDlgItem(hdlg, IDOK)))
- EnableWindow(GetDlgItem(hdlg, IDOK), TRUE);
- }
- else if (IsWindowEnabled(GetDlgItem(hdlg, IDOK)))
- EnableWindow(GetDlgItem(hdlg, IDOK), FALSE);
- }
- break;
+ DWORD flags = CallProtoService(acs->szProto, PS_GETCAPS, PFLAGNUM_4,0);
+ if (flags & PF4_NOCUSTOMAUTH) {
+ EnableWindow(GetDlgItem(hdlg, IDC_AUTHREQ), FALSE);
+ EnableWindow(GetDlgItem(hdlg, IDC_AUTHGB), FALSE);
+ }
+ else {
+ EnableWindow(GetDlgItem(hdlg, IDC_AUTHREQ), IsDlgButtonChecked(hdlg, IDC_AUTH));
+ EnableWindow(GetDlgItem(hdlg, IDC_AUTHGB), IsDlgButtonChecked(hdlg, IDC_AUTH));
+ }
+ }
+ break;
- case IDC_PROTO:
- if (HIWORD(wparam) == CBN_SELCHANGE || HIWORD(wparam) == CBN_SELENDOK)
- {
- acs->szProto = (char*)SendDlgItemMessage(hdlg, IDC_PROTO, CB_GETITEMDATA, (WPARAM)SendDlgItemMessage(hdlg, IDC_PROTO, CB_GETCURSEL, 0, 0), 0);
- // TODO remember last setting for each proto?
- AddContactDlgOpts(hdlg, acs->szProto);
- }
- break;
+ case IDOK:
+ {
+ HANDLE hContact = INVALID_HANDLE_VALUE;
+ PROTOSEARCHRESULT* psr;
- case IDC_ADDTEMP:
- AddContactDlgOpts(hdlg, acs->szProto, TRUE);
- break;
+ TCHAR szUserId[256];
+ GetDlgItemText(hdlg, IDC_USERID, szUserId, SIZEOF(szUserId));
- case IDC_AUTH:
+ if (*rtrim(szUserId) == 0 ||
+ (strstr(acs->szProto, "GG") && _tcstoul(szUserId, NULL, 10) > INT_MAX) || // Gadu-Gadu protocol
+ ((CallProtoService(acs->szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_NUMERICUSERID) && !_tcstoul(szUserId, NULL, 10)))
{
- DWORD flags = CallProtoService(acs->szProto, PS_GETCAPS, PFLAGNUM_4,0);
- if (flags & PF4_NOCUSTOMAUTH)
- {
- EnableWindow(GetDlgItem(hdlg, IDC_AUTHREQ), FALSE);
- EnableWindow(GetDlgItem(hdlg, IDC_AUTHGB), FALSE);
- }
- else
- {
- EnableWindow(GetDlgItem(hdlg, IDC_AUTHREQ), IsDlgButtonChecked(hdlg, IDC_AUTH));
- EnableWindow(GetDlgItem(hdlg, IDC_AUTHGB), IsDlgButtonChecked(hdlg, IDC_AUTH));
- }
+ MessageBox(NULL,
+ TranslateT("The contact cannot be added to your contact list. Please make sure the contact ID is entered correctly."),
+ TranslateT("Add contact"), MB_OK | MB_ICONWARNING | MB_SETFOREGROUND | MB_TOPMOST);
break;
}
- case IDOK:
- {
- HANDLE hContact = INVALID_HANDLE_VALUE;
- PROTOSEARCHRESULT* psr;
-
- TCHAR szUserId[256];
- GetDlgItemText(hdlg, IDC_USERID, szUserId, SIZEOF(szUserId));
-
- if (*rtrim(szUserId) == 0 ||
- (strstr(acs->szProto, "GG") && _tcstoul(szUserId, NULL, 10) > INT_MAX) || // Gadu-Gadu protocol
- ((CallProtoService(acs->szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_NUMERICUSERID) && !_tcstoul(szUserId, NULL, 10)))
- {
+ if (strstr(acs->szProto, "MNETSEND")) { // mNetSend protocol
+ psr = (PROTOSEARCHRESULT*)mir_calloc(sizeof(NETSENDSEARCHRESULT));
+ psr->cbSize = sizeof(NETSENDSEARCHRESULT);
+ }
+ else if (strstr(acs->szProto, "MYSPACE")) { // Myspace protocol
+ if (_tcstoul(szUserId, NULL, 10) > INT_MAX) {
MessageBox(NULL,
TranslateT("The contact cannot be added to your contact list. Please make sure the contact ID is entered correctly."),
TranslateT("Add contact"), MB_OK | MB_ICONWARNING | MB_SETFOREGROUND | MB_TOPMOST);
break;
}
-
- if (strstr(acs->szProto, "MNETSEND")) // mNetSend protocol
- {
- psr = (PROTOSEARCHRESULT*)mir_calloc(sizeof(NETSENDSEARCHRESULT));
- psr->cbSize = sizeof(NETSENDSEARCHRESULT);
- }
- else if (strstr(acs->szProto, "MYSPACE")) // Myspace protocol
- {
- if (_tcstoul(szUserId, NULL, 10) > INT_MAX)
- {
- MessageBox(NULL,
- TranslateT("The contact cannot be added to your contact list. Please make sure the contact ID is entered correctly."),
- TranslateT("Add contact"), MB_OK | MB_ICONWARNING | MB_SETFOREGROUND | MB_TOPMOST);
- break;
- }
- psr = (PROTOSEARCHRESULT*)mir_calloc(sizeof(MYPROTOSEARCHRESULT));
- psr->cbSize = sizeof(MYPROTOSEARCHRESULT);
- ((MYPROTOSEARCHRESULT*)psr)->uid = _tcstoul(szUserId, NULL, 10);
- }
- else if (strstr(acs->szProto, "TLEN")) // Tlen protocol
- {
- if (_tcschr(szUserId, '@') == NULL)
- {
- MessageBox(NULL,
- TranslateT("The contact cannot be added to your contact list. Please make sure the contact ID is entered correctly."),
- TranslateT("Add contact"), MB_OK | MB_ICONWARNING | MB_SETFOREGROUND | MB_TOPMOST);
- break;
- }
- psr = (PROTOSEARCHRESULT*)mir_calloc(sizeof(TLEN_SEARCH_RESULT));
- psr->cbSize = sizeof(TLEN_SEARCH_RESULT);
- mir_snprintf(((TLEN_SEARCH_RESULT*)psr)->jid, SIZEOF(((TLEN_SEARCH_RESULT*)psr)->jid), "%S", szUserId);
- }
- else
- {
- psr = (PROTOSEARCHRESULT*)mir_calloc(sizeof(PROTOSEARCHRESULT));
- psr->cbSize = sizeof(PROTOSEARCHRESULT);
- }
-
- psr->flags = PSR_TCHAR;
- psr->id = mir_tstrdup(szUserId);
- acs->psr = psr;
-
- hContact = (HANDLE)CallProtoService(acs->szProto, PS_ADDTOLIST, IsDlgButtonChecked(hdlg, IDC_ADDTEMP) ? PALF_TEMPORARY : 0, (LPARAM)acs->psr);
-
- if (hContact == NULL)
- {
+ psr = (PROTOSEARCHRESULT*)mir_calloc(sizeof(MYPROTOSEARCHRESULT));
+ psr->cbSize = sizeof(MYPROTOSEARCHRESULT);
+ ((MYPROTOSEARCHRESULT*)psr)->uid = _tcstoul(szUserId, NULL, 10);
+ }
+ else if (strstr(acs->szProto, "TLEN")) { // Tlen protocol
+ if (_tcschr(szUserId, '@') == NULL) {
MessageBox(NULL,
- TranslateT("The contact cannot be added to your contact list. If you are not logged into the selected account, please try to do so. Also, make sure the contact ID is entered correctly."),
+ TranslateT("The contact cannot be added to your contact list. Please make sure the contact ID is entered correctly."),
TranslateT("Add contact"), MB_OK | MB_ICONWARNING | MB_SETFOREGROUND | MB_TOPMOST);
break;
}
+ psr = (PROTOSEARCHRESULT*)mir_calloc(sizeof(TLEN_SEARCH_RESULT));
+ psr->cbSize = sizeof(TLEN_SEARCH_RESULT);
+ mir_snprintf(((TLEN_SEARCH_RESULT*)psr)->jid, SIZEOF(((TLEN_SEARCH_RESULT*)psr)->jid), "%S", szUserId);
+ }
+ else {
+ psr = (PROTOSEARCHRESULT*)mir_calloc(sizeof(PROTOSEARCHRESULT));
+ psr->cbSize = sizeof(PROTOSEARCHRESULT);
+ }
- TCHAR szHandle[256];
- if (GetDlgItemText(hdlg, IDC_MYHANDLE, szHandle, SIZEOF(szHandle)))
- db_set_ts(hContact, "CList", "MyHandle", szHandle);
+ psr->flags = PSR_TCHAR;
+ psr->id = mir_tstrdup(szUserId);
+ acs->psr = psr;
- int item = SendDlgItemMessage(hdlg, IDC_GROUP, CB_GETCURSEL, 0, 0);
- if (item > 0)
- {
- item = SendDlgItemMessage(hdlg, IDC_GROUP, CB_GETITEMDATA, item, 0);
- CallService(MS_CLIST_CONTACTCHANGEGROUP, (WPARAM)hContact, item);
- }
+ hContact = (HANDLE)CallProtoService(acs->szProto, PS_ADDTOLIST, IsDlgButtonChecked(hdlg, IDC_ADDTEMP) ? PALF_TEMPORARY : 0, (LPARAM)acs->psr);
- if (!IsDlgButtonChecked(hdlg, IDC_ADDTEMP))
- {
- db_unset(hContact, "CList", "NotOnList");
+ if (hContact == NULL) {
+ MessageBox(NULL,
+ TranslateT("The contact cannot be added to your contact list. If you are not logged into the selected account, please try to do so. Also, make sure the contact ID is entered correctly."),
+ TranslateT("Add contact"), MB_OK | MB_ICONWARNING | MB_SETFOREGROUND | MB_TOPMOST);
+ break;
+ }
- if (IsDlgButtonChecked(hdlg, IDC_ADDED))
- CallContactService(hContact, PSS_ADDED, 0, 0);
+ TCHAR szHandle[256];
+ if (GetDlgItemText(hdlg, IDC_MYHANDLE, szHandle, SIZEOF(szHandle)))
+ db_set_ts(hContact, "CList", "MyHandle", szHandle);
- if (IsDlgButtonChecked(hdlg, IDC_AUTH))
+ int item = SendDlgItemMessage(hdlg, IDC_GROUP, CB_GETCURSEL, 0, 0);
+ if (item > 0) {
+ item = SendDlgItemMessage(hdlg, IDC_GROUP, CB_GETITEMDATA, item, 0);
+ CallService(MS_CLIST_CONTACTCHANGEGROUP, (WPARAM)hContact, item);
+ }
+
+ if (!IsDlgButtonChecked(hdlg, IDC_ADDTEMP)) {
+ db_unset(hContact, "CList", "NotOnList");
+
+ if (IsDlgButtonChecked(hdlg, IDC_ADDED))
+ CallContactService(hContact, PSS_ADDED, 0, 0);
+
+ if (IsDlgButtonChecked(hdlg, IDC_AUTH))
+ {
+ DWORD flags = CallProtoService(acs->szProto, PS_GETCAPS, PFLAGNUM_4, 0);
+ if (flags & PF4_NOCUSTOMAUTH)
+ CallContactService(hContact, PSS_AUTHREQUESTT, 0, 0);
+ else
{
- DWORD flags = CallProtoService(acs->szProto, PS_GETCAPS, PFLAGNUM_4, 0);
- if (flags & PF4_NOCUSTOMAUTH)
- CallContactService(hContact, PSS_AUTHREQUESTT, 0, 0);
- else
- {
- TCHAR szReason[512];
- GetDlgItemText(hdlg, IDC_AUTHREQ, szReason, SIZEOF(szReason));
- CallContactService(hContact, PSS_AUTHREQUESTT, 0, (LPARAM)szReason);
- }
+ TCHAR szReason[512];
+ GetDlgItemText(hdlg, IDC_AUTHREQ, szReason, SIZEOF(szReason));
+ CallContactService(hContact, PSS_AUTHREQUESTT, 0, (LPARAM)szReason);
}
}
-
- if (GetAsyncKeyState(VK_CONTROL))
- CallService(MS_MSG_SENDMESSAGE, (WPARAM)hContact, (LPARAM)(const char*)NULL);
}
- // fall through
- case IDCANCEL:
- if (GetParent(hdlg) == NULL)
- DestroyWindow(hdlg);
- else
- EndDialog(hdlg, 0);
- break;
- }
- break;
- case WM_CLOSE:
- /* if there is no parent for the dialog, its a modeless dialog and can't be killed using EndDialog() */
+ if (GetAsyncKeyState(VK_CONTROL))
+ CallService(MS_MSG_SENDMESSAGE, (WPARAM)hContact, (LPARAM)(const char*)NULL);
+ }
+ // fall through
+ case IDCANCEL:
if (GetParent(hdlg) == NULL)
DestroyWindow(hdlg);
else
EndDialog(hdlg, 0);
break;
-
- case DM_ADDCONTACT_CHANGEICONS:
- Skin_ReleaseIcon((HICON)SendMessage(hdlg, WM_SETICON, ICON_BIG, (LPARAM)Skin_GetIcon(ICON_ADD, 1)));
- Skin_ReleaseIcon((HICON)SendMessage(hdlg, WM_SETICON, ICON_SMALL, (LPARAM)Skin_GetIcon(ICON_ADD)));
- break;
-
- case DM_ADDCONTACT_CHANGEACCLIST:
- {
- acs = (ADDCONTACTSTRUCT*)GetWindowLongPtr(hdlg, GWLP_USERDATA);
- AddContactDlgAccounts(hdlg, acs);
- break;
}
+ break;
- case WM_DESTROY:
- hAddDlg = NULL;
- Skin_ReleaseIcon((HICON)SendMessage(hdlg, WM_SETICON, ICON_BIG, 0));
- Skin_ReleaseIcon((HICON)SendMessage(hdlg, WM_SETICON, ICON_SMALL, 0));
- ImageList_Destroy((HIMAGELIST)SendDlgItemMessage(hdlg, IDC_PROTO, CBEM_GETIMAGELIST, 0, 0));
- acs = (ADDCONTACTSTRUCT*)GetWindowLongPtr(hdlg, GWLP_USERDATA);
- if (acs)
+ case WM_CLOSE:
+ /* if there is no parent for the dialog, its a modeless dialog and can't be killed using EndDialog() */
+ if (GetParent(hdlg) == NULL)
+ DestroyWindow(hdlg);
+ else
+ EndDialog(hdlg, 0);
+ break;
+
+ case DM_ADDCONTACT_CHANGEICONS:
+ Skin_ReleaseIcon((HICON)SendMessage(hdlg, WM_SETICON, ICON_BIG, (LPARAM)Skin_GetIcon(ICON_ADD, 1)));
+ Skin_ReleaseIcon((HICON)SendMessage(hdlg, WM_SETICON, ICON_SMALL, (LPARAM)Skin_GetIcon(ICON_ADD)));
+ break;
+
+ case DM_ADDCONTACT_CHANGEACCLIST:
+ acs = (ADDCONTACTSTRUCT*)GetWindowLongPtr(hdlg, GWLP_USERDATA);
+ AddContactDlgAccounts(hdlg, acs);
+ break;
+
+ case WM_DESTROY:
+ hAddDlg = NULL;
+ Skin_ReleaseIcon((HICON)SendMessage(hdlg, WM_SETICON, ICON_BIG, 0));
+ Skin_ReleaseIcon((HICON)SendMessage(hdlg, WM_SETICON, ICON_SMALL, 0));
+ ImageList_Destroy((HIMAGELIST)SendDlgItemMessage(hdlg, IDC_PROTO, CBEM_GETIMAGELIST, 0, 0));
+ acs = (ADDCONTACTSTRUCT*)GetWindowLongPtr(hdlg, GWLP_USERDATA);
+ if (acs)
+ {
+ if(acs->szProto)
+ db_set_s(NULL,"AddContact","LastProto",acs->szProto);
+ if (acs->psr)
{
- if(acs->szProto)
- db_set_s(NULL,"AddContact","LastProto",acs->szProto);
- if (acs->psr)
- {
- mir_free(acs->psr->nick);
- mir_free(acs->psr->firstName);
- mir_free(acs->psr->lastName);
- mir_free(acs->psr->email);
- mir_free(acs->psr);
- }
- mir_free(acs);
+ mir_free(acs->psr->nick);
+ mir_free(acs->psr->firstName);
+ mir_free(acs->psr->lastName);
+ mir_free(acs->psr->email);
+ mir_free(acs->psr);
}
- Utils_SaveWindowPosition(hdlg, NULL, "AddContact", "");
- break;
+ mir_free(acs);
+ }
+ Utils_SaveWindowPosition(hdlg, NULL, "AddContact", "");
+ break;
}
return FALSE;