diff options
author | Aimee Linden <aimee@lindenlab.com> | 2010-07-22 17:35:35 +0100 |
---|---|---|
committer | Aimee Linden <aimee@lindenlab.com> | 2010-07-22 17:35:35 +0100 |
commit | dcbdb1fee553dd3877447b659e35e158fabc0c47 (patch) | |
tree | e26019d661a5614383cd84e8cee84c6ef91dfe0e /indra/newview/llavatarlist.cpp | |
parent | 047b74c4f4727c41ae1086d18a12a9cf5aad5fce (diff) |
EXT-1579 FIXED Show icons representing permissions granted in friends list on roll-over.
Needs new icon artwork, currently reusing old 1.23 icons.
Diffstat (limited to 'indra/newview/llavatarlist.cpp')
-rw-r--r-- | indra/newview/llavatarlist.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/indra/newview/llavatarlist.cpp b/indra/newview/llavatarlist.cpp index 76ad9b4afb..f0ae5f3ba5 100644 --- a/indra/newview/llavatarlist.cpp +++ b/indra/newview/llavatarlist.cpp @@ -90,6 +90,20 @@ void LLAvatarList::setSpeakingIndicatorsVisible(bool visible) } } +void LLAvatarList::showPermissions(bool visible) +{ + // Save the value for new items to use. + mShowPermissions = visible; + + // Enable or disable showing permissions icons for all existing items. + std::vector<LLPanel*> items; + getItems(items); + for(std::vector<LLPanel*>::const_iterator it = items.begin(), end_it = items.end(); it != end_it; ++it) + { + static_cast<LLAvatarListItem*>(*it)->setShowPermissions(mShowPermissions); + } +} + static bool findInsensitive(std::string haystack, const std::string& needle_upper) { LLStringUtil::toUpper(haystack); @@ -107,6 +121,7 @@ LLAvatarList::Params::Params() , show_info_btn("show_info_btn", true) , show_profile_btn("show_profile_btn", true) , show_speaking_indicator("show_speaking_indicator", true) +, show_permissions_granted("show_permissions_granted", false) { } @@ -121,6 +136,7 @@ LLAvatarList::LLAvatarList(const Params& p) , mShowInfoBtn(p.show_info_btn) , mShowProfileBtn(p.show_profile_btn) , mShowSpeakingIndicator(p.show_speaking_indicator) +, mShowPermissions(p.show_permissions_granted) { setCommitOnSelectionChange(true); @@ -377,6 +393,7 @@ void LLAvatarList::addNewItem(const LLUUID& id, const std::string& name, BOOL is item->setShowInfoBtn(mShowInfoBtn); item->setShowProfileBtn(mShowProfileBtn); item->showSpeakingIndicator(mShowSpeakingIndicator); + item->setShowPermissions(mShowPermissions); item->setDoubleClickCallback(boost::bind(&LLAvatarList::onItemDoucleClicked, this, _1, _2, _3, _4)); |