CHUI-285 : WIP : Get the conversation floater to use the same LLParticipantList as the IM and call dialog
parent
01a154809d
commit
9ff67f4a04
|
|
@ -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; }
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue