From 0c7b52a9973306c6896f3dd8e46eb9bcc4cffffb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Fri, 27 Sep 2013 11:44:58 +0000 Subject: Facebook: Save names separately into first, second and last name fields git-svn-id: http://svn.miranda-ng.org/main/trunk@6247 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/FacebookRM/src/dialogs.cpp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'protocols/FacebookRM/src/dialogs.cpp') diff --git a/protocols/FacebookRM/src/dialogs.cpp b/protocols/FacebookRM/src/dialogs.cpp index 9f545181af..72ed6ecd75 100644 --- a/protocols/FacebookRM/src/dialogs.cpp +++ b/protocols/FacebookRM/src/dialogs.cpp @@ -159,7 +159,7 @@ void GetSelectedContacts(FacebookProto *proto, HANDLE hItem, HWND hwndList, std: if (SendMessage(hwndList, CLM_GETCHECKMARK, (WPARAM)hItem, 0)) { facebook_user *fu = new facebook_user(); fu->user_id = ptrA(proto->getStringA(hItem, FACEBOOK_KEY_ID)); - fu->real_name = _T2A(ptrT(proto->getTStringA(hItem, FACEBOOK_KEY_NAME))); + fu->real_name = _T2A(ptrT(proto->getTStringA(hItem, FACEBOOK_KEY_NICK))); contacts->push_back(fu); } } @@ -213,15 +213,10 @@ INT_PTR CALLBACK FBMindProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lpara SendDlgItemMessage(hwnd, IDC_WALL, CB_SETCURSEL, data->proto->getByte(FACEBOOK_KEY_LAST_WALL, 0), 0); RefreshPrivacy(hwnd, data); - ptrA name(data->proto->getStringA(FACEBOOK_KEY_NAME)); - if (name != NULL) { - std::string firstname = name; - std::string::size_type pos = firstname.find(" "); - if (pos != std::string::npos) - firstname = firstname.substr(0, pos); - + ptrA firstname(data->proto->getStringA(FACEBOOK_KEY_FIRST_NAME)); + if (firstname != NULL) { char title[100]; - mir_snprintf(title, SIZEOF(title), Translate("What's on your mind, %s?"), firstname.c_str()); + mir_snprintf(title, SIZEOF(title), Translate("What's on your mind, %s?"), firstname); SetWindowTextA(hwnd, title); } } -- cgit v1.2.3