summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelgroupgeneral.cpp
diff options
context:
space:
mode:
authorPalmer Truelson <palmer@lindenlab.com>2010-02-23 17:19:58 -0800
committerPalmer Truelson <palmer@lindenlab.com>2010-02-23 17:19:58 -0800
commit54a95f706fe42cbef272c53e3fadfc2cf7ecfd0f (patch)
treed9b1f05ce695fa3ef5ee41949d3799d4e9a3e050 /indra/newview/llpanelgroupgeneral.cpp
parent7885748497d8b95f51c65f7f84a40d1405429616 (diff)
parent0980df1e0ce99bdafdd4e806cbacad96c71729cc (diff)
merge
Diffstat (limited to 'indra/newview/llpanelgroupgeneral.cpp')
-rw-r--r--indra/newview/llpanelgroupgeneral.cpp26
1 files changed, 23 insertions, 3 deletions
diff --git a/indra/newview/llpanelgroupgeneral.cpp b/indra/newview/llpanelgroupgeneral.cpp
index 51fc670d87..517204b232 100644
--- a/indra/newview/llpanelgroupgeneral.cpp
+++ b/indra/newview/llpanelgroupgeneral.cpp
@@ -111,6 +111,8 @@ BOOL LLPanelGroupGeneral::postBuild()
{
mListVisibleMembers->setDoubleClickCallback(openProfile, this);
mListVisibleMembers->setContextMenu(LLScrollListCtrl::MENU_AVATAR);
+
+ mListVisibleMembers->setSortCallback(boost::bind(&LLPanelGroupGeneral::sortMembersList,this,_1,_2,_3));
}
// Options
@@ -206,15 +208,19 @@ BOOL LLPanelGroupGeneral::postBuild()
void LLPanelGroupGeneral::setupCtrls(LLPanel* panel_group)
{
- mInsignia = panel_group->getChild<LLTextureCtrl>("insignia");
+ mInsignia = getChild<LLTextureCtrl>("insignia");
if (mInsignia)
{
mInsignia->setCommitCallback(onCommitAny, this);
mDefaultIconID = mInsignia->getImageAssetID();
}
- mFounderName = panel_group->getChild<LLNameBox>("founder_name");
+ mFounderName = getChild<LLNameBox>("founder_name");
+
+
mGroupNameEditor = panel_group->getChild<LLLineEditor>("group_name_editor");
- mGroupNameEditor->setPrevalidate( LLLineEditor::prevalidateASCII );
+ mGroupNameEditor->setPrevalidate( LLTextValidate::validateASCII );
+
+
}
// static
@@ -940,4 +946,18 @@ 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());
+}