summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llimconversation.cpp22
-rw-r--r--indra/newview/llimconversation.h5
-rw-r--r--indra/newview/llimfloatercontainer.cpp13
-rw-r--r--indra/newview/llimfloatercontainer.h1
-rw-r--r--indra/newview/llparticipantlist.cpp9
-rw-r--r--indra/newview/llparticipantlist.h1
6 files changed, 22 insertions, 29 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)
diff --git a/indra/newview/llimconversation.h b/indra/newview/llimconversation.h
index ff248d97ff..edcae5e45d 100644
--- a/indra/newview/llimconversation.h
+++ b/indra/newview/llimconversation.h
@@ -89,7 +89,8 @@ public:
void refreshConversation();
void buildConversationViewParticipant();
-
+ void setSortOrder(const LLConversationSort& order);
+
protected:
// callback for click on any items of the visual states menu
@@ -107,8 +108,6 @@ protected:
// refresh a visual state of the Call button
void updateCallBtnState(bool callIsActive);
- void onSortMenuItemClicked(const LLSD& userdata);
-
void hideOrShowTitle(); // toggle the floater's drag handle
void hideAllStandardButtons();
diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp
index e6657260e6..4b992a2e0f 100644
--- a/indra/newview/llimfloatercontainer.cpp
+++ b/indra/newview/llimfloatercontainer.cpp
@@ -764,6 +764,19 @@ void LLIMFloaterContainer::setSortOrder(const LLConversationSort& order)
mConversationsRoot->arrangeAll();
// try to keep selection onscreen, even if it wasn't to start with
mConversationsRoot->scrollToShowSelection();
+
+ // Notify all conversation (torn off or not) of the change to the sort order
+ // Note: For the moment, the sort order is *unique* across all conversations. That might change in the future.
+ for (conversations_items_map::iterator it_session = mConversationsItems.begin(); it_session != mConversationsItems.end(); it_session++)
+ {
+ LLUUID session_id = it_session->first;
+ LLIMConversation *conversation_floater = (session_id.isNull() ? (LLIMConversation*)(LLFloaterReg::findTypedInstance<LLNearbyChat>("nearby_chat")) : (LLIMConversation*)(LLIMFloater::findInstance(session_id)));
+ if (conversation_floater)
+ {
+ conversation_floater->setSortOrder(order);
+ }
+ }
+
gSavedSettings.setU32("ConversationSortOrder", (U32)order);
}
diff --git a/indra/newview/llimfloatercontainer.h b/indra/newview/llimfloatercontainer.h
index a6f8677e46..5ae3f9f1d4 100644
--- a/indra/newview/llimfloatercontainer.h
+++ b/indra/newview/llimfloatercontainer.h
@@ -92,6 +92,7 @@ public:
LLUUID getSelectedSession() { return mSelectedSession; }
void setSelectedSession(LLUUID sessionID) { mSelectedSession = sessionID; }
LLConversationItem* getSessionModel(const LLUUID& session_id) { return get_ptr_in_map(mConversationsItems,session_id); }
+ LLConversationSort& getSortOrder() { return mConversationViewModel.getSorter(); }
private:
typedef std::map<LLUUID,LLFloater*> avatarID_panel_map_t;
diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp
index 6afcf21348..e6eef56628 100644
--- a/indra/newview/llparticipantlist.cpp
+++ b/indra/newview/llparticipantlist.cpp
@@ -303,15 +303,6 @@ LLParticipantList::~LLParticipantList()
}
/*
-void LLParticipantList::setSpeakingIndicatorsVisible(BOOL visible)
-{
- if (mAvatarList)
- {
- mAvatarList->setSpeakingIndicatorsVisible(visible);
- }
-}
-*/
-/*
void LLParticipantList::onAvatarListDoubleClicked(LLUICtrl* ctrl)
{
LLAvatarListItem* item = dynamic_cast<LLAvatarListItem*>(ctrl);
diff --git a/indra/newview/llparticipantlist.h b/indra/newview/llparticipantlist.h
index 97e06dcfea..f4469b03f4 100644
--- a/indra/newview/llparticipantlist.h
+++ b/indra/newview/llparticipantlist.h
@@ -49,7 +49,6 @@ public:
bool exclude_agent = true,
bool can_toggle_icons = true);
~LLParticipantList();
-// void setSpeakingIndicatorsVisible(BOOL visible);
enum EParticipantSortOrder
{