From fb27eae15502cbd2a13cde018ae67f961320d0ba Mon Sep 17 00:00:00 2001
From: Gilbert Gonzales <gilbert@lindenlab.com>
Date: Thu, 9 May 2013 17:36:04 -0700
Subject: [PATCH] ACME-342 Format the PersonView so that it shows the avatar
 icon, SL name, FB icon, and FB name: Found a couple bugs that were causing
 the positioning of text to be incorrect in the 'Peope you may want to friend'
 tab.

---
 indra/llui/llfolderview.cpp       |  2 +-
 indra/newview/llpanelpeople.cpp   |  4 ++--
 indra/newview/llpersontabview.cpp | 10 ++++++++--
 3 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp
index 9cf822892e8..20eade892d8 100644
--- a/indra/llui/llfolderview.cpp
+++ b/indra/llui/llfolderview.cpp
@@ -185,7 +185,7 @@ LLFolderView::LLFolderView(const Params& p)
 	mAutoOpenCandidate = NULL;
 	mAutoOpenTimer.stop();
 	mKeyboardSelection = FALSE;
-	mIndentation = p.folder_indentation;
+	mIndentation = 	getParentFolder() ? getParentFolder()->getIndentation() + mLocalIndentation : 0;  
 
 	//clear label
 	// go ahead and render root folder as usual
diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp
index 420225f260b..2bdfdf6687a 100644
--- a/indra/newview/llpanelpeople.cpp
+++ b/indra/newview/llpanelpeople.cpp
@@ -1677,7 +1677,7 @@ void LLPanelPeople::showFacebookFriends(const LLSD& friends)
 void LLPanelPeople::addTestParticipant()
 {
     std::string suffix("Aa");
-    std::string prefix("Facebook User Name");
+    std::string prefix("FB Name");
 	LLPersonTabModel * person_tab_model;
 	LLUUID agentID;
 	std::string name;
@@ -1718,7 +1718,7 @@ void LLPanelPeople::addParticipantToModel(LLPersonTabModel * person_folder_model
 	LLPersonModel* person_model = NULL;
 
 	LLAvatarName avatar_name;
-	bool has_name = LLAvatarNameCache::get(agent_id, &avatar_name);
+	bool has_name = agent_id.notNull() ? LLAvatarNameCache::get(agent_id, &avatar_name) : false;
 	std::string avatar_name_string;
 	
 	if(has_name)
diff --git a/indra/newview/llpersontabview.cpp b/indra/newview/llpersontabview.cpp
index d4c73cd53f1..34ffc6ffce7 100644
--- a/indra/newview/llpersontabview.cpp
+++ b/indra/newview/llpersontabview.cpp
@@ -300,8 +300,14 @@ void LLPersonView::draw()
 	F32 right_x  = 0;
 
 	drawHighlight();
-	drawLabel(mLabel, font, text_left, y, color, right_x);
-	drawLabel(mLabelSuffix, font, mFacebookIcon->getRect().mRight + 7, y, color, right_x);
+	if(mLabel.length())
+	{
+		drawLabel(mLabel, font, text_left, y, color, right_x);
+	}
+	if(mLabelSuffix.length())
+	{
+		drawLabel(mLabelSuffix, font, mFacebookIcon->getRect().mRight + 7, y, color, right_x);
+	}
 
 	LLView::draw();
 }
-- 
GitLab