summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelgroupgeneral.cpp
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-02-23 16:37:13 +0000
committerTofu Linden <tofu.linden@lindenlab.com>2010-02-23 16:37:13 +0000
commite06c96d7e753536981ba8175148a9b1527e0f100 (patch)
tree57a3a0fd985343c4b143ec42407313ba03a6c454 /indra/newview/llpanelgroupgeneral.cpp
parent01ad8456a2566d258124677e0c7ce5eaa5003569 (diff)
parent8bf9bc2dc7e7af3e229ba6c02bdabdf1aa82ba71 (diff)
PE merge.
Diffstat (limited to 'indra/newview/llpanelgroupgeneral.cpp')
-rw-r--r--indra/newview/llpanelgroupgeneral.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/indra/newview/llpanelgroupgeneral.cpp b/indra/newview/llpanelgroupgeneral.cpp
index 555e277ce5..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
@@ -944,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());
+}