summaryrefslogtreecommitdiff
path: root/indra/newview/llimfloatercontainer.cpp
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2012-07-05 16:42:20 -0700
committerMerov Linden <merov@lindenlab.com>2012-07-05 16:42:20 -0700
commitec15ff6350c0997421cf2884e40aa9feaa070d4d (patch)
treebe4eba38201522c7b5ba32e8c818df78abb24555 /indra/newview/llimfloatercontainer.cpp
parentd3edb1c466f42e2c46c77e43b26d700c6298b8d6 (diff)
CHUI-98 : WIP, use the refactored folder view for conversation view list
Diffstat (limited to 'indra/newview/llimfloatercontainer.cpp')
-rw-r--r--indra/newview/llimfloatercontainer.cpp23
1 files changed, 21 insertions, 2 deletions
diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp
index 2b943df48f..be38eddbaf 100644
--- a/indra/newview/llimfloatercontainer.cpp
+++ b/indra/newview/llimfloatercontainer.cpp
@@ -91,12 +91,14 @@ BOOL LLIMFloaterContainer::postBuild()
mConversationsListPanel = getChild<LLPanel>("conversations_list_panel");
+ mRoot = new LLConversationItem();
LLFolderView::Params p;
- //TODO RN: define view model for conversations
- //p.view_model = ?;
+ // CHUI-98 : View Model for conversations
+ p.view_model = &mConversationViewModel;
p.parent_panel = mConversationsListPanel;
p.rect = mConversationsListPanel->getLocalRect();
p.follows.flags = FOLLOWS_ALL;
+ p.listener = mRoot;
mFolders = LLUICtrlFactory::create<LLFolderView>(p);
mConversationsListPanel->addChild(mFolders);
@@ -544,6 +546,15 @@ LLConversationItem::LLConversationItem(std::string name, const LLUUID& uuid, LLF
mName = "Nearby Chat";
}
+LLConversationItem::LLConversationItem() :
+ mName(""),
+ mUUID(),
+ mFloater(NULL),
+ mContainer(NULL)
+{
+}
+
+
// Virtual action callbacks
void LLConversationItem::selectItem(void)
{
@@ -589,4 +600,12 @@ void LLConversationItem::showProperties(void)
{
}
+bool LLConversationSort::operator()(const LLConversationItem* const& a, const LLConversationItem* const& b) const
+{
+ // We compare only by name for the moment
+ // *TODO : Implement the sorting by date
+ S32 compare = LLStringUtil::compareDict(a->getDisplayName(), b->getDisplayName());
+ return (compare < 0);
+}
+
// EOF