diff options
author | Mark Palange (Mani) <palange@lindenlab.com> | 2009-10-02 10:35:42 -0700 |
---|---|---|
committer | Mark Palange (Mani) <palange@lindenlab.com> | 2009-10-02 10:35:42 -0700 |
commit | 4d53e235c2445b820bb0ae7303b269648dd86037 (patch) | |
tree | c1ab3643cf257099822e7a0e1e832d76813555f6 /indra/newview/llpanelprofileview.cpp | |
parent | 80f27013b2d2a7ca6509db033c8f0c31562e04c7 (diff) | |
parent | dde2153014cd7d7b8fa704f7067a41344bfbb1c2 (diff) |
merge of latest viewer/viewer-20
Diffstat (limited to 'indra/newview/llpanelprofileview.cpp')
-rw-r--r-- | indra/newview/llpanelprofileview.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/indra/newview/llpanelprofileview.cpp b/indra/newview/llpanelprofileview.cpp index 0762bbeb87..f1db2416e4 100644 --- a/indra/newview/llpanelprofileview.cpp +++ b/indra/newview/llpanelprofileview.cpp @@ -70,6 +70,10 @@ void LLPanelProfileView::onOpen(const LLSD& key) setAvatarId(id); } + // Update the avatar name. + gCacheName->get(getAvatarId(), FALSE, + boost::bind(&LLPanelProfileView::onAvatarNameCached, this, _1, _2, _3, _4)); + // status should only show if viewer has permission to view online/offline. EXT-453 mStatusText->setVisible(isGrantedToSeeOnlineStatus()); updateOnlineStatus(); @@ -133,4 +137,21 @@ void LLPanelProfileView::updateOnlineStatus() mStatusText->setValue(status); } +void LLPanelProfileView::onAvatarNameCached(const LLUUID& id, const std::string& first_name, const std::string& last_name, BOOL is_group) +{ + llassert(getAvatarId() == id); + getChild<LLTextBox>("user_name", FALSE)->setValue(first_name + " " + last_name); +} + +void LLPanelProfileView::togglePanel(LLPanel* panel) +{ + LLPanelProfile::togglePanel(panel); + if(FALSE == panel->getVisible()) + { + // LLPanelProfile::togglePanel shows/hides all children, + // we don't want to display online status for non friends, so re-hide it here + mStatusText->setVisible(isGrantedToSeeOnlineStatus()); + } +} + // EOF |