summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorCho <cho@lindenlab.com>2014-02-28 01:49:58 +0000
committerCho <cho@lindenlab.com>2014-02-28 01:49:58 +0000
commitdf26597c0d2ddfcc259dd1b8e838164cbd9ff02a (patch)
treec9eb4e93b15b37fe84b5d5623fcaf5b93b49221d /indra
parent0bd5fffcac83787b42faf4dc1aa9d45ff0585312 (diff)
Added FB+SL friends list to Friends tab in Facebook floater for ACME-1334
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llfacebookconnect.cpp2
-rw-r--r--indra/newview/llfloaterfacebook.cpp20
-rw-r--r--indra/newview/llfloaterfacebook.h1
-rw-r--r--indra/newview/skins/default/xui/en/panel_facebook_friends.xml19
4 files changed, 35 insertions, 7 deletions
diff --git a/indra/newview/llfacebookconnect.cpp b/indra/newview/llfacebookconnect.cpp
index ec7d0f7c50..d90b649ecd 100644
--- a/indra/newview/llfacebookconnect.cpp
+++ b/indra/newview/llfacebookconnect.cpp
@@ -388,7 +388,7 @@ std::string LLFacebookConnect::getFacebookConnectURL(const std::string& route, b
if (regionp)
{
//url = "http://pdp15.lindenlab.com/fbc/agent/" + gAgentID.asString(); // TEMPORARY FOR TESTING - CHO
- url = regionp->getCapability("FacebookConnect");
+ url = regionp->getCapability("FacebookConnect");
url += route;
if (include_read_from_master && mReadFromMaster)
diff --git a/indra/newview/llfloaterfacebook.cpp b/indra/newview/llfloaterfacebook.cpp
index 5589d4897d..6c2c2428c5 100644
--- a/indra/newview/llfloaterfacebook.cpp
+++ b/indra/newview/llfloaterfacebook.cpp
@@ -750,12 +750,16 @@ void LLFacebookCheckinPanel::clearAndClose()
///////////////////////////
LLFacebookFriendsPanel::LLFacebookFriendsPanel() :
+mSecondLifeFriends(NULL),
mSuggestedFriends(NULL)
{
}
BOOL LLFacebookFriendsPanel::postBuild()
{
+ mSecondLifeFriends = getChild<LLAvatarList>("second_life_friends");
+ mSecondLifeFriends->setContextMenu(&LLPanelPeopleMenus::gPeopleContextMenu);
+
mSuggestedFriends = getChild<LLAvatarList>("suggested_friends");
mSuggestedFriends->setContextMenu(&LLPanelPeopleMenus::gSuggestedFriendsContextMenu);
@@ -767,6 +771,8 @@ BOOL LLFacebookFriendsPanel::postBuild()
bool LLFacebookFriendsPanel::updateSuggestedFriendList()
{
const LLAvatarTracker& av_tracker = LLAvatarTracker::instance();
+ uuid_vec_t& second_life_friends = mSecondLifeFriends->getIDs();
+ second_life_friends.clear();
uuid_vec_t& suggested_friends = mSuggestedFriends->getIDs();
suggested_friends.clear();
@@ -775,19 +781,23 @@ bool LLFacebookFriendsPanel::updateSuggestedFriendList()
for (LLSD::array_const_iterator i = friends.beginArray(); i != friends.endArray(); ++i)
{
LLUUID agent_id = (*i).asUUID();
- bool second_life_buddy = agent_id.notNull() ? av_tracker.isBuddy(agent_id) : false;
-
- if(!second_life_buddy)
+ if (agent_id.notNull())
{
- //FB+SL but not SL friend
- if (agent_id.notNull())
+ bool second_life_buddy = av_tracker.isBuddy(agent_id);
+ if (second_life_buddy)
+ {
+ second_life_friends.push_back(agent_id);
+ }
+ else
{
+ //FB+SL but not SL friend
suggested_friends.push_back(agent_id);
}
}
}
//Force a refresh when there aren't any filter matches (prevent displaying content that shouldn't display)
+ mSecondLifeFriends->setDirty(true, !mSecondLifeFriends->filterHasMatches());
mSuggestedFriends->setDirty(true, !mSuggestedFriends->filterHasMatches());
//showFriendsAccordionsIfNeeded();
diff --git a/indra/newview/llfloaterfacebook.h b/indra/newview/llfloaterfacebook.h
index 08c5f24e4d..c13d64a86a 100644
--- a/indra/newview/llfloaterfacebook.h
+++ b/indra/newview/llfloaterfacebook.h
@@ -139,6 +139,7 @@ private:
void updateFacebookList(bool visible);
bool onConnectedToFacebook(const LLSD& data);
+ LLAvatarList* mSecondLifeFriends;
LLAvatarList* mSuggestedFriends;
};
diff --git a/indra/newview/skins/default/xui/en/panel_facebook_friends.xml b/indra/newview/skins/default/xui/en/panel_facebook_friends.xml
index 07cbd06afa..9d5c86c79d 100644
--- a/indra/newview/skins/default/xui/en/panel_facebook_friends.xml
+++ b/indra/newview/skins/default/xui/en/panel_facebook_friends.xml
@@ -18,8 +18,25 @@
<accordion_tab
layout="topleft"
height="173"
+ name="tab_second_life_friends"
+ title="SL friends">
+ <avatar_list
+ ignore_online_status="true"
+ allow_select="true"
+ follows="all"
+ height="173"
+ layout="topleft"
+ left="0"
+ name="second_life_friends"
+ show_permissions_granted="true"
+ top="0"
+ width="307" />
+ </accordion_tab>
+ <accordion_tab
+ layout="topleft"
+ height="173"
name="tab_suggested_friends"
- title="People you may want to friend">
+ title="Add these people as SL friends">
<avatar_list
ignore_online_status="true"
allow_select="true"