summaryrefslogtreecommitdiff
path: root/indra/newview/llimconversation.cpp
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2012-11-06 18:32:45 -0800
committerMerov Linden <merov@lindenlab.com>2012-11-06 18:32:45 -0800
commit8c64fbf1b76e46fa3f5a8f8c6baba30d4583b7ec (patch)
tree6a3dd8a0c9c7655e6e9ac8abe63641fbcbbba6e0 /indra/newview/llimconversation.cpp
parent2abe0fea5c048395a75dd266bb065d8e8abd95a5 (diff)
CHUI-468 : WIP : More cleanup and fix of the participants sorting in LLIMConversation
Diffstat (limited to 'indra/newview/llimconversation.cpp')
-rw-r--r--indra/newview/llimconversation.cpp22
1 files changed, 6 insertions, 16 deletions
diff --git a/indra/newview/llimconversation.cpp b/indra/newview/llimconversation.cpp
index f91c25ef8c..fb247b4604 100644
--- a/indra/newview/llimconversation.cpp
+++ b/indra/newview/llimconversation.cpp
@@ -166,7 +166,8 @@ void LLIMConversation::addToHost(const LLUUID& session_id)
conversp->setHost(floater_container);
conversp->setHost(NULL);
}
-
+ // Added floaters share some state (like sort order) with their host
+ conversp->setSortOrder(floater_container->getSortOrder());
}
}
}
@@ -483,22 +484,11 @@ LLConversationViewParticipant* LLIMConversation::createConversationViewParticipa
return LLUICtrlFactory::create<LLConversationViewParticipant>(params);
}
-void LLIMConversation::onSortMenuItemClicked(const LLSD& userdata)
+void LLIMConversation::setSortOrder(const LLConversationSort& order)
{
- // *TODO: Check this code when sort order menu will be added. (EM)
- /*
- if (!getParticipantList())
- {
- return;
- }
-
- std::string chosen_item = userdata.asString();
-
- if (chosen_item == "sort_name")
- {
- getParticipantList()->setSortOrder(LLParticipantList::E_SORT_BY_NAME);
- }
- */
+ mConversationViewModel.setSorter(order);
+ mConversationsRoot->arrangeAll();
+ refreshConversation();
}
void LLIMConversation::onIMSessionMenuItemClicked(const LLSD& userdata)