summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xindra/newview/llpanelgroupgeneral.cpp192
-rwxr-xr-xindra/newview/llpanelgroupgeneral.h13
-rwxr-xr-xindra/newview/llpanelgrouproles.cpp5
-rwxr-xr-xindra/newview/skins/default/xui/en/panel_group_general.xml28
-rwxr-xr-xindra/newview/skins/default/xui/en/panel_group_info_sidetray.xml2
-rwxr-xr-xindra/newview/skins/default/xui/en/panel_group_roles.xml8
6 files changed, 14 insertions, 234 deletions
diff --git a/indra/newview/llpanelgroupgeneral.cpp b/indra/newview/llpanelgroupgeneral.cpp
index 0cd93b330a..68835ec5b8 100755
--- a/indra/newview/llpanelgroupgeneral.cpp
+++ b/indra/newview/llpanelgroupgeneral.cpp
@@ -63,14 +63,12 @@ const S32 DECLINE_TO_STATE = 0;
LLPanelGroupGeneral::LLPanelGroupGeneral()
: LLPanelGroupTab(),
- mPendingMemberUpdate(FALSE),
mChanged(FALSE),
mFirstUse(TRUE),
mGroupNameEditor(NULL),
mFounderName(NULL),
mInsignia(NULL),
mEditCharter(NULL),
- mListVisibleMembers(NULL),
mCtrlShowInGroupList(NULL),
mComboMature(NULL),
mCtrlOpenEnrollment(NULL),
@@ -79,18 +77,13 @@ LLPanelGroupGeneral::LLPanelGroupGeneral()
mCtrlReceiveNotices(NULL),
mCtrlListGroup(NULL),
mActiveTitleLabel(NULL),
- mComboActiveTitle(NULL),
- mAvatarNameCacheConnection()
+ mComboActiveTitle(NULL)
{
}
LLPanelGroupGeneral::~LLPanelGroupGeneral()
{
- if (mAvatarNameCacheConnection.connected())
- {
- mAvatarNameCacheConnection.disconnect();
- }
}
BOOL LLPanelGroupGeneral::postBuild()
@@ -105,17 +98,6 @@ BOOL LLPanelGroupGeneral::postBuild()
mEditCharter->setFocusChangedCallback(boost::bind(onFocusEdit, _1, this));
}
-
-
- mListVisibleMembers = getChild<LLNameListCtrl>("visible_members", recurse);
- if (mListVisibleMembers)
- {
- mListVisibleMembers->setDoubleClickCallback(openProfile, this);
- mListVisibleMembers->setContextMenu(LLScrollListCtrl::MENU_AVATAR);
-
- mListVisibleMembers->setSortCallback(boost::bind(&LLPanelGroupGeneral::sortMembersList,this,_1,_2,_3));
- }
-
// Options
mCtrlShowInGroupList = getChild<LLCheckBoxCtrl>("show_in_group_list", recurse);
if (mCtrlShowInGroupList)
@@ -290,21 +272,6 @@ void LLPanelGroupGeneral::onClickInfo(void *userdata)
}
-// static
-void LLPanelGroupGeneral::openProfile(void* data)
-{
- LLPanelGroupGeneral* self = (LLPanelGroupGeneral*)data;
-
- if (self && self->mListVisibleMembers)
- {
- LLScrollListItem* selected = self->mListVisibleMembers->getFirstSelected();
- if (selected)
- {
- LLAvatarActions::showProfile(selected->getUUID());
- }
- }
-}
-
bool LLPanelGroupGeneral::needsApply(std::string& mesg)
{
updateChanged();
@@ -336,11 +303,6 @@ void LLPanelGroupGeneral::activate()
void LLPanelGroupGeneral::draw()
{
LLPanelGroupTab::draw();
-
- if (mPendingMemberUpdate)
- {
- updateMembers();
- }
}
bool LLPanelGroupGeneral::apply(std::string& mesg)
@@ -522,10 +484,6 @@ bool LLPanelGroupGeneral::createGroupCallback(const LLSD& notification, const LL
return false;
}
-static F32 sSDTime = 0.0f;
-static F32 sElementTime = 0.0f;
-static F32 sAllTime = 0.0f;
-
// virtual
void LLPanelGroupGeneral::update(LLGroupChange gc)
{
@@ -666,132 +624,10 @@ void LLPanelGroupGeneral::update(LLGroupChange gc)
{
mEditCharter->setText(gdatap->mCharter);
}
-
- if (mListVisibleMembers)
- {
- mListVisibleMembers->deleteAllItems();
-
- if (gdatap->isMemberDataComplete())
- {
- mMemberProgress = gdatap->mMembers.begin();
- mPendingMemberUpdate = TRUE;
-
- sSDTime = 0.0f;
- sElementTime = 0.0f;
- sAllTime = 0.0f;
- }
- else
- {
- std::stringstream pending;
- pending << "Retrieving member list (" << gdatap->mMembers.size() << "\\" << gdatap->mMemberCount << ")";
-
- LLSD row;
- row["columns"][0]["value"] = pending.str();
- row["columns"][0]["column"] = "name";
-
- mListVisibleMembers->setEnabled(FALSE);
- mListVisibleMembers->addElement(row);
- }
- }
resetDirty();
}
-void LLPanelGroupGeneral::updateMembers()
-{
- mPendingMemberUpdate = FALSE;
-
- LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID);
-
- if (!mListVisibleMembers
- || !gdatap
- || !gdatap->isMemberDataComplete()
- || gdatap->mMembers.empty())
- {
- return;
- }
-
- LLTimer update_time;
- update_time.setTimerExpirySec(UPDATE_MEMBERS_SECONDS_PER_FRAME);
-
- LLAvatarName av_name;
-
- for( ; mMemberProgress != gdatap->mMembers.end() && !update_time.hasExpired();
- ++mMemberProgress)
- {
- LLGroupMemberData* member = mMemberProgress->second;
- if (!member)
- {
- continue;
- }
-
- if (LLAvatarNameCache::get(mMemberProgress->first, &av_name))
- {
- addMember(mMemberProgress->second);
- }
- else
- {
- // If name is not cached, onNameCache() should be called when it is cached and add this member to list.
- // *TODO : Use a callback per member, not for the panel group.
- if (mAvatarNameCacheConnection.connected())
- {
- mAvatarNameCacheConnection.disconnect();
- }
- mAvatarNameCacheConnection = LLAvatarNameCache::get(mMemberProgress->first, boost::bind(&LLPanelGroupGeneral::onNameCache, this, gdatap->getMemberVersion(), member, _2));
- }
- }
-
- if (mMemberProgress == gdatap->mMembers.end())
- {
- lldebugs << " member list completed." << llendl;
- mListVisibleMembers->setEnabled(TRUE);
- }
- else
- {
- mPendingMemberUpdate = TRUE;
- mListVisibleMembers->setEnabled(FALSE);
- }
-}
-
-void LLPanelGroupGeneral::addMember(LLGroupMemberData* member)
-{
- LLNameListCtrl::NameItem item_params;
- item_params.value = member->getID();
-
- LLScrollListCell::Params column;
- item_params.columns.add().column("name").font.name("SANSSERIF_SMALL");
-
- item_params.columns.add().column("title").value(member->getTitle()).font.name("SANSSERIF_SMALL");
-
- item_params.columns.add().column("status").value(member->getOnlineStatus()).font.name("SANSSERIF_SMALL");
-
- LLScrollListItem* member_row = mListVisibleMembers->addNameItemRow(item_params);
-
- if ( member->isOwner() )
- {
- LLScrollListText* name_textp = dynamic_cast<LLScrollListText*>(member_row->getColumn(0));
- if (name_textp)
- name_textp->setFontStyle(LLFontGL::BOLD);
- }
-}
-
-void LLPanelGroupGeneral::onNameCache(const LLUUID& update_id, LLGroupMemberData* member, const LLAvatarName& av_name)
-{
- mAvatarNameCacheConnection.disconnect();
-
- LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID);
-
- if (!gdatap
- || !gdatap->isMemberDataComplete()
- || gdatap->getMemberVersion() != update_id)
- {
- // Stale data
- return;
- }
-
- addMember(member);
-}
-
void LLPanelGroupGeneral::updateChanged()
{
// List all the controls we want to check for changes...
@@ -867,17 +703,6 @@ void LLPanelGroupGeneral::reset()
mEditCharter->setText(empty_str);
mGroupNameEditor->setText(empty_str);
}
-
- {
- LLSD row;
- row["columns"][0]["value"] = "no members yet";
- row["columns"][0]["column"] = "name";
-
- mListVisibleMembers->deleteAllItems();
- mListVisibleMembers->setEnabled(FALSE);
- mListVisibleMembers->addElement(row);
- }
-
{
mComboMature->setEnabled(true);
@@ -964,18 +789,3 @@ void LLPanelGroupGeneral::setGroupID(const LLUUID& id)
activate();
}
-S32 LLPanelGroupGeneral::sortMembersList(S32 col_idx,const LLScrollListItem* i1,const LLScrollListItem* i2)
-{
- const LLScrollListCell *cell1 = i1->getColumn(col_idx);
- const LLScrollListCell *cell2 = i2->getColumn(col_idx);
-
- if(col_idx == 2)
- {
- if(LLStringUtil::compareDict(cell1->getValue().asString(),"Online") == 0 )
- return 1;
- if(LLStringUtil::compareDict(cell2->getValue().asString(),"Online") == 0 )
- return -1;
- }
-
- return LLStringUtil::compareDict(cell1->getValue().asString(), cell2->getValue().asString());
-}
diff --git a/indra/newview/llpanelgroupgeneral.h b/indra/newview/llpanelgroupgeneral.h
index b7f4a01139..11972bafa9 100755
--- a/indra/newview/llpanelgroupgeneral.h
+++ b/indra/newview/llpanelgroupgeneral.h
@@ -62,8 +62,6 @@ public:
virtual void setGroupID(const LLUUID& id);
virtual void setupCtrls (LLPanel* parent);
-
- void onNameCache(const LLUUID& update_id, LLGroupMemberData* member, const LLAvatarName& av_name);
private:
void reset();
@@ -75,18 +73,12 @@ private:
static void onCommitEnrollment(LLUICtrl* ctrl, void* data);
static void onClickInfo(void* userdata);
static void onReceiveNotices(LLUICtrl* ctrl, void* data);
- static void openProfile(void* data);
-
- S32 sortMembersList(S32,const LLScrollListItem*,const LLScrollListItem*);
- void addMember(LLGroupMemberData* member);
static bool joinDlgCB(const LLSD& notification, const LLSD& response);
- void updateMembers();
void updateChanged();
bool confirmMatureApply(const LLSD& notification, const LLSD& response);
- BOOL mPendingMemberUpdate;
BOOL mChanged;
BOOL mFirstUse;
std::string mIncompleteMemberDataStr;
@@ -97,8 +89,6 @@ private:
LLTextureCtrl *mInsignia;
LLTextEditor *mEditCharter;
- LLNameListCtrl *mListVisibleMembers;
-
// Options (include any updates in updateChanged)
LLCheckBoxCtrl *mCtrlShowInGroupList;
LLCheckBoxCtrl *mCtrlOpenEnrollment;
@@ -109,9 +99,6 @@ private:
LLTextBox *mActiveTitleLabel;
LLComboBox *mComboActiveTitle;
LLComboBox *mComboMature;
-
- LLGroupMgrGroupData::member_list_t::iterator mMemberProgress;
- boost::signals2::connection mAvatarNameCacheConnection;
};
#endif
diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp
index fdcd1f5ebb..b89e7b8b73 100755
--- a/indra/newview/llpanelgrouproles.cpp
+++ b/indra/newview/llpanelgrouproles.cpp
@@ -1636,6 +1636,9 @@ void LLPanelGroupMembersSubTab::addMemberToList(LLGroupMemberData* data)
item_params.columns.add().column("online").value(data->getOnlineStatus())
.font.name("SANSSERIF_SMALL").style("NORMAL");
+
+ item_params.columns.add().column("title").value(data->getTitle()).font.name("SANSSERIF_SMALL").style("NORMAL");;
+
mMembersList->addNameItemRow(item_params);
mHasMatch = TRUE;
@@ -2658,7 +2661,7 @@ void LLPanelGroupRoles::setGroupID(const LLUUID& id)
button->setEnabled(gAgent.hasPowerInGroup(mGroupID, GP_MEMBER_INVITE));
if(mSubTabContainer)
- mSubTabContainer->selectTab(0);
+ mSubTabContainer->selectTab(1);
activate();
}
diff --git a/indra/newview/skins/default/xui/en/panel_group_general.xml b/indra/newview/skins/default/xui/en/panel_group_general.xml
index 38b680ba86..26f54bacbc 100755
--- a/indra/newview/skins/default/xui/en/panel_group_general.xml
+++ b/indra/newview/skins/default/xui/en/panel_group_general.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<panel
label="General"
- height="604"
+ height="420"
width="304"
class="panel_group_general"
name="general_tab">
@@ -101,31 +101,7 @@ Hover your mouse over the options for more help.
text_readonly_color="White"
word_wrap="true">
Group Charter
- </text_editor>
- <name_list
- column_padding="0"
- draw_heading="true"
- follows="left|top|right"
- heading_height="23"
- height="160"
- layout="topleft"
- left="0"
- name="visible_members"
- short_names="false"
- top_pad="2">
- <name_list.columns
- label="Member"
- name="name"
- relative_width="0.4" />
- <name_list.columns
- label="Title"
- name="title"
- relative_width="0.4" />
- <name_list.columns
- label="Status"
- name="status"
- relative_width="0.2" />
- </name_list>
+ </text_editor>
<text
follows="left|top|right"
type="string"
diff --git a/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml b/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml
index 206496cc0e..b3326d8da6 100755
--- a/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml
+++ b/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml
@@ -131,7 +131,7 @@ background_visible="true"
expanded="false"
layout="topleft"
name="group_roles_tab"
- title="Roles"
+ title="Roles &amp; Members"
fit_panel="false">
<panel
border="false"
diff --git a/indra/newview/skins/default/xui/en/panel_group_roles.xml b/indra/newview/skins/default/xui/en/panel_group_roles.xml
index df91ad8b5e..9ac5b8800e 100755
--- a/indra/newview/skins/default/xui/en/panel_group_roles.xml
+++ b/indra/newview/skins/default/xui/en/panel_group_roles.xml
@@ -94,11 +94,15 @@ clicking on their names.
<name_list.columns
label="Donation"
name="donated"
- relative_width="0.25" />
+ relative_width="0.2" />
<name_list.columns
label="Status"
name="online"
- relative_width="0.14" />
+ relative_width="0.18" />
+ <name_list.columns
+ label="Title"
+ name="title"
+ relative_width="0.18" />
</name_list>
<button
height="23"