summaryrefslogtreecommitdiff
path: root/indra/newview/llavatarlist.cpp
diff options
context:
space:
mode:
authorAimee Linden <aimee@lindenlab.com>2010-09-07 17:55:10 +0100
committerAimee Linden <aimee@lindenlab.com>2010-09-07 17:55:10 +0100
commitbd734e31982306f601a069dcd558b7270cd46ef9 (patch)
tree0c5222e85c8d04d57448ca35f4bcc3d52407fd5e /indra/newview/llavatarlist.cpp
parentebfbaad9696ce0389ed1a9642d58dfb4a0abdc17 (diff)
parent65f0b633e0b5beeda3723708fb3f2c87e562a975 (diff)
VWR-21253 MERGE Permission icons in the friends list
Diffstat (limited to 'indra/newview/llavatarlist.cpp')
-rw-r--r--indra/newview/llavatarlist.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/indra/newview/llavatarlist.cpp b/indra/newview/llavatarlist.cpp
index 1cd705c2f9..5241f20c0e 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::onItemDoubleClicked, this, _1, _2, _3, _4));