From 80ae45238b3312fd4fdf6730116341f8c1d5d6e4 Mon Sep 17 00:00:00 2001 From: LanceCorrimal Date: Thu, 13 Sep 2012 23:01:14 +0200 Subject: STORM-1910: Adds the count of groups and the remaining free group slots to the group list --- indra/newview/llpanelpeople.cpp | 4 ++++ indra/newview/skins/default/xui/en/panel_people.xml | 12 +++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index f1380e7a36..f158a7ea43 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -75,6 +75,8 @@ static const std::string RECENT_TAB_NAME = "recent_panel"; static const std::string COLLAPSED_BY_USER = "collapsed_by_user"; +extern S32 gMaxAgentGroups; + /** Comparator for comparing avatar items by last interaction date */ class LLAvatarItemRecentComparator : public LLAvatarItemComparator { @@ -878,6 +880,8 @@ void LLPanelPeople::updateButtons() LLPanel* groups_panel = mTabContainer->getCurrentPanel(); groups_panel->getChildView("activate_btn")->setEnabled(item_selected && !cur_group_active); // "none" or a non-active group selected groups_panel->getChildView("minus_btn")->setEnabled(item_selected && selected_id.notNull()); + groups_panel->getChild("groupcount")->setTextArg("[COUNT]", llformat("%d",gAgent.mGroups.count())); + groups_panel->getChild("groupcount")->setTextArg("[REMAINING]", llformat("%d",(gMaxAgentGroups-gAgent.mGroups.count()))); } else { diff --git a/indra/newview/skins/default/xui/en/panel_people.xml b/indra/newview/skins/default/xui/en/panel_people.xml index 98c7c49ff4..4383c83a5c 100644 --- a/indra/newview/skins/default/xui/en/panel_people.xml +++ b/indra/newview/skins/default/xui/en/panel_people.xml @@ -434,12 +434,22 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M + +You belong to [COUNT] groups, and can join [REMAINING] more. +