From 176447bb61e16eaedad595420fffef67c595cdcc Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Sat, 12 Sep 2009 17:52:25 -0700 Subject: Applied and modified Emerald viewer feature that shows what groups are hidden in your profile --- linden/indra/newview/llpanelavatar.cpp | 39 ++++++++++++++++++++-- .../skins/default/xui/en-us/panel_avatar.xml | 3 ++ 2 files changed, 40 insertions(+), 2 deletions(-) (limited to 'linden/indra/newview') diff --git a/linden/indra/newview/llpanelavatar.cpp b/linden/indra/newview/llpanelavatar.cpp index 682a56f..fa1883d 100644 --- a/linden/indra/newview/llpanelavatar.cpp +++ b/linden/indra/newview/llpanelavatar.cpp @@ -1535,9 +1535,18 @@ void LLPanelAvatar::resetGroupList() LLSD row; row["id"] = id ; - row["columns"][0]["value"] = group_string; row["columns"][0]["font"] = "SANSSERIF_SMALL"; row["columns"][0]["width"] = 0; + if (group_data.mListInProfile) + { + row["columns"][0]["value"] = group_string; + row["columns"][0]["color"] = gColors.getColor("ScrollUnselectedColor").getValue(); + } + else + { + row["columns"][0]["value"] = group_string + " " + getString("HiddenLabel"); + row["columns"][0]["color"] = gColors.getColor("ScriptBgReadOnlyColor").getValue(); + } group_list->addElement(row); } group_list->sortByColumnIndex(0, TRUE); @@ -2014,8 +2023,34 @@ void LLPanelAvatar::processAvatarGroupsReply(LLMessageSystem *msg, void**) LLSD row; row["id"] = group_id; - row["columns"][0]["value"] = group_string; row["columns"][0]["font"] = "SANSSERIF_SMALL"; + + LLGroupData *group_data = NULL; + + if (avatar_id == agent_id) // own avatar + { + // Search for this group in the agent's groups list + LLDynamicArray::iterator i; + for (i = gAgent.mGroups.begin(); i != gAgent.mGroups.end(); i++) + { + if (i->mID == group_id) + { + group_data = &*i; + break; + } + } + } + // Set normal color if not found or if group is visible in profile + if (!group_data || group_data->mListInProfile) + { + row["columns"][0]["value"] = group_string; + row["columns"][0]["color"] = gColors.getColor("ScrollUnselectedColor").getValue(); + } + else + { + row["columns"][0]["value"] = group_string + " " + self->getString("HiddenLabel"); + row["columns"][0]["color"] = gColors.getColor("ScriptBgReadOnlyColor").getValue(); + } if (group_list) { group_list->addElement(row); diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_avatar.xml b/linden/indra/newview/skins/default/xui/en-us/panel_avatar.xml index 7a8a396..b457cfe 100644 --- a/linden/indra/newview/skins/default/xui/en-us/panel_avatar.xml +++ b/linden/indra/newview/skins/default/xui/en-us/panel_avatar.xml @@ -408,4 +408,7 @@ Loading... + + (hidden) + -- cgit v1.1