From 7e2a20308ec3a1d3306a5260461b4c1b5a5314a5 Mon Sep 17 00:00:00 2001 From: Gilbert Gonzales Date: Fri, 31 May 2013 14:55:38 -0700 Subject: ACME-435 Only show the 'People you may want to friend' tab when it is populated. --- indra/newview/llpanelpeople.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index 785de6e9c9..22fbbf0c0e 100755 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -830,7 +830,7 @@ void LLPanelPeople::updateFriendListHelpText() // Seems sometimes all_friends can be empty because of issue with Inventory loading (clear cache, slow connection...) // So, lets check all lists to avoid overlapping the text with online list. See EXT-6448. - bool any_friend_exists = mAllFriendList->filterHasMatches() || mOnlineFriendList->filterHasMatches(); + bool any_friend_exists = mAllFriendList->filterHasMatches() || mOnlineFriendList->filterHasMatches() || mSuggestedFriends->filterHasMatches(); no_friends_text->setVisible(!any_friend_exists); if (no_friends_text->getVisible()) { @@ -897,9 +897,8 @@ void LLPanelPeople::updateFriendList() mAllFriendList->setDirty(true, !mAllFriendList->filterHasMatches()); //update trash and other buttons according to a selected item updateButtons(); - showFriendsAccordionsIfNeeded(); - updateSuggestedFriendList(); + showFriendsAccordionsIfNeeded(); } void LLPanelPeople::updateSuggestedFriendList() @@ -926,7 +925,9 @@ void LLPanelPeople::updateSuggestedFriendList() } } - mSuggestedFriends->setDirty(true, true); + //Force a refresh when there aren't any filter matches (prevent displaying content that shouldn't display) + mSuggestedFriends->setDirty(true, !mSuggestedFriends->filterHasMatches()); + showFriendsAccordionsIfNeeded(); } void LLPanelPeople::updateNearbyList() @@ -1007,6 +1008,7 @@ void LLPanelPeople::updateFacebookList() } updateSuggestedFriendList(); + showFriendsAccordionsIfNeeded(); } } @@ -1230,9 +1232,11 @@ void LLPanelPeople::onFilterEdit(const std::string& search_string) mOnlineFriendList->setNameFilter(filter); mAllFriendList->setNameFilter(filter); + mSuggestedFriends->setNameFilter(filter); setAccordionCollapsedByUser("tab_online", false); setAccordionCollapsedByUser("tab_all", false); + setAccordionCollapsedByUser("tab_suggested_friends", false); showFriendsAccordionsIfNeeded(); // restore accordion tabs state _after_ all manipulations @@ -1623,6 +1627,7 @@ void LLPanelPeople::showFriendsAccordionsIfNeeded() // Expand and show accordions if needed, else - hide them showAccordion("tab_online", mOnlineFriendList->filterHasMatches()); showAccordion("tab_all", mAllFriendList->filterHasMatches()); + showAccordion("tab_suggested_friends", mSuggestedFriends->filterHasMatches()); // Rearrange accordions LLAccordionCtrl* accordion = getChild("friends_accordion"); -- cgit v1.2.3 From 9497a70eb2b3d47d1bfd83ff34bb60d8f490644d Mon Sep 17 00:00:00 2001 From: Gilbert Gonzales Date: Fri, 31 May 2013 17:53:36 -0700 Subject: ACME-436 Update the list of Suggested Friends when new data arrives --- indra/newview/skins/default/xui/en/panel_people.xml | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/panel_people.xml b/indra/newview/skins/default/xui/en/panel_people.xml index bc6b82e328..c21d2abdd7 100755 --- a/indra/newview/skins/default/xui/en/panel_people.xml +++ b/indra/newview/skins/default/xui/en/panel_people.xml @@ -371,6 +371,7 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M name="tab_suggested_friends" title="People you may want to friend"> Date: Sat, 1 Jun 2013 01:55:40 +0100 Subject: added LLFacebookConnect::sharePhoto() for ACME-467 --- indra/newview/llfacebookconnect.cpp | 11 ++++++++++- indra/newview/llfacebookconnect.h | 1 + 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llfacebookconnect.cpp b/indra/newview/llfacebookconnect.cpp index 86da748f0f..5013a5cb40 100644 --- a/indra/newview/llfacebookconnect.cpp +++ b/indra/newview/llfacebookconnect.cpp @@ -211,7 +211,6 @@ public: } }; - /////////////////////////////////////////////////////////////////////////////// // LLFacebookConnect::LLFacebookConnect() @@ -296,6 +295,16 @@ void LLFacebookConnect::postCheckinMessage(const std::string& message, const std LLHTTPClient::post(getFacebookConnectURL("/share/wall"), body, new LLFacebookPostResponder()); } +void LLFacebookConnect::sharePhoto(const std::string& image_url, const std::string& caption) +{ + LLSD body; + body["image"] = image_url; + body["caption"] = caption; + + // Note: we can use that route for different publish action. We should be able to use the same responder. + LLHTTPClient::post(getFacebookConnectURL("/share/photo"), body, new LLFacebookPostResponder()); +} + void LLFacebookConnect::storeContent(const LLSD& content) { mGeneration++; diff --git a/indra/newview/llfacebookconnect.h b/indra/newview/llfacebookconnect.h index 8886630222..faa60b0f34 100644 --- a/indra/newview/llfacebookconnect.h +++ b/indra/newview/llfacebookconnect.h @@ -47,6 +47,7 @@ public: void loadFacebookFriends(); void postCheckinMessage(const std::string& message, const std::string& link, const std::string& name, const std::string& caption, const std::string& description, const std::string& picture); + void sharePhoto(const std::string& image_url, const std::string& caption); void clearContent(); void storeContent(const LLSD& content); -- cgit v1.2.3 From 0c0f4edb0026b1695655512ebed3a5508919a9b7 Mon Sep 17 00:00:00 2001 From: Gilbert Gonzales Date: Fri, 31 May 2013 18:13:01 -0700 Subject: ACME-484 Add a right click menu to the 'Suggested Friends' tab --- indra/newview/llpanelpeople.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview') diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index 22fbbf0c0e..2a14978a95 100755 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -689,6 +689,7 @@ BOOL LLPanelPeople::postBuild() mRecentList->setContextMenu(&LLPanelPeopleMenus::gPeopleContextMenu); mAllFriendList->setContextMenu(&LLPanelPeopleMenus::gPeopleContextMenu); mOnlineFriendList->setContextMenu(&LLPanelPeopleMenus::gPeopleContextMenu); + mSuggestedFriends->setContextMenu(&LLPanelPeopleMenus::gPeopleContextMenu); //===Temporary ======================================================================== -- cgit v1.2.3