summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llconversationmodel.h4
-rw-r--r--indra/newview/llimfloatercontainer.cpp21
2 files changed, 20 insertions, 5 deletions
diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h
index af3756c45d..1a2e09dfab 100644
--- a/indra/newview/llconversationmodel.h
+++ b/indra/newview/llconversationmodel.h
@@ -59,8 +59,8 @@ public:
virtual LLPointer<LLUIImage> getOpenIcon() const { return getIcon(); }
virtual LLFontGL::StyleFlags getLabelStyle() const { return LLFontGL::NORMAL; }
virtual std::string getLabelSuffix() const { return LLStringUtil::null; }
- virtual BOOL isItemRenameable() const { return FALSE; }
- virtual BOOL renameItem(const std::string& new_name) { return FALSE; }
+ virtual BOOL isItemRenameable() const { return TRUE; }
+ virtual BOOL renameItem(const std::string& new_name) { mName = new_name; return TRUE; }
virtual BOOL isItemMovable( void ) const { return FALSE; }
virtual BOOL isItemRemovable( void ) const { return FALSE; }
virtual BOOL isItemInTrash( void) const { return FALSE; }
diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp
index a3f5e357c9..55cbf0b266 100644
--- a/indra/newview/llimfloatercontainer.cpp
+++ b/indra/newview/llimfloatercontainer.cpp
@@ -456,7 +456,9 @@ void LLIMFloaterContainer::repositioningWidgets()
// CHUI-137 : Temporary implementation of conversations list
void LLIMFloaterContainer::addConversationListItem(const LLUUID& uuid)
{
- std::string display_name = uuid.isNull()? LLTrans::getString("NearbyChatTitle") : LLIMModel::instance().getName(uuid);
+ bool is_nearby_chat = uuid.isNull();
+
+ std::string display_name = is_nearby_chat ? LLTrans::getString("NearbyChatTitle") : LLIMModel::instance().getName(uuid);
// Check if the item is not already in the list, exit if it is and has the same name and uuid (nothing to do)
// Note: this happens often, when reattaching a torn off conversation for instance
@@ -470,8 +472,21 @@ void LLIMFloaterContainer::addConversationListItem(const LLUUID& uuid)
// and nothing wrong will happen removing it if it doesn't exist
removeConversationListItem(uuid,false);
- // Create a conversation item
- LLConversationItem* item = new LLConversationItemSession(display_name, uuid, getRootViewModel());
+ // Create a conversation session model
+ LLConversationItem* item = NULL;
+ LLSpeakerMgr* speaker_manager = (is_nearby_chat ? (LLSpeakerMgr*)(LLLocalSpeakerMgr::getInstance()) : LLIMModel::getInstance()->getSpeakerManager(uuid));
+ if (speaker_manager)
+ {
+ item = new LLParticipantList(speaker_manager, NULL, getRootViewModel(), true, false);
+ }
+ if (!item)
+ {
+ llinfos << "Merov debug : Couldn't create conversation session item : " << display_name << llendl;
+ return;
+ }
+ // *TODO: Should we flag LLConversationItemSession with a mIsNearbyChat?
+ item->renameItem(display_name);
+
mConversationsItems[uuid] = item;
// Create a widget from it