diff options
author | Robert Pösel <robyer@seznam.cz> | 2013-07-28 15:28:28 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2013-07-28 15:28:28 +0000 |
commit | b279ec16b7668408a9cd6e883e1031b26972024f (patch) | |
tree | 5eff60e2d23097a609e846d5793e32766d3d7cf8 /protocols/FacebookRM/src/proto.cpp | |
parent | f18684245d19f4aaecaa25727b0a4121f9aab7cd (diff) |
Facebook: Post status improvements (final part) - ability to post statuses to own pages (you need to enable it in options first)
git-svn-id: http://svn.miranda-ng.org/main/trunk@5513 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM/src/proto.cpp')
-rw-r--r-- | protocols/FacebookRM/src/proto.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/protocols/FacebookRM/src/proto.cpp b/protocols/FacebookRM/src/proto.cpp index 6ab1526553..42e675e9c1 100644 --- a/protocols/FacebookRM/src/proto.cpp +++ b/protocols/FacebookRM/src/proto.cpp @@ -465,15 +465,21 @@ INT_PTR FacebookProto::OnMind(WPARAM wParam, LPARAM lParam) // TODO: why isn't wParam == 0 when is status menu moved to main menu?
if (wParam != 0 && !IsMyContact(hContact))
return 1;
-
+
wall_data *wall = new wall_data();
wall->user_id = ptrA(getStringA(hContact, FACEBOOK_KEY_ID));
- if (wall->user_id == facy.self_.user_id)
- wall->title = Translate("Own wall");
- else
- wall->title = ptrA(getStringA(hContact, FACEBOOK_KEY_NAME));
+ if (wall->user_id == facy.self_.user_id) {
+ wall->title = _tcsdup(TranslateT("Own wall"));
+ } else
+ wall->title = getTStringA(hContact, FACEBOOK_KEY_NAME);
post_status_data *data = new post_status_data(this, wall);
+
+ if (wall->user_id == facy.self_.user_id) {
+ for (std::map<std::string, std::string>::iterator iter = facy.pages.begin(); iter != facy.pages.end(); ++iter) {
+ data->walls.push_back(new wall_data(iter->first, mir_utf8decodeT(iter->second.c_str()), true));
+ }
+ }
HWND hDlg = CreateDialogParam(g_hInstance, MAKEINTRESOURCE(IDD_MIND), (HWND)0, FBMindProc, reinterpret_cast<LPARAM>(data));
ShowWindow(hDlg, SW_SHOW);
|