summaryrefslogtreecommitdiff
path: root/protocols/FacebookRM/src/dialogs.cpp
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2013-09-27 11:44:58 +0000
committerRobert Pösel <robyer@seznam.cz>2013-09-27 11:44:58 +0000
commit0c7b52a9973306c6896f3dd8e46eb9bcc4cffffb (patch)
tree2f345aa6bd587e5593cc262ad4a9bcbbf2231230 /protocols/FacebookRM/src/dialogs.cpp
parentdae67fa8059f77a0bd2cbf7e69e0a2d6a3e59a3f (diff)
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
Diffstat (limited to 'protocols/FacebookRM/src/dialogs.cpp')
-rw-r--r--protocols/FacebookRM/src/dialogs.cpp13
1 files changed, 4 insertions, 9 deletions
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);
}
}