diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llcallfloater.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llcallfloater.h | 2 | ||||
-rw-r--r-- | indra/newview/llconversationmodel.cpp | 15 | ||||
-rw-r--r-- | indra/newview/llconversationmodel.h | 5 | ||||
-rw-r--r-- | indra/newview/llimconversation.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llimconversation.h | 2 | ||||
-rw-r--r-- | indra/newview/llparticipantlist.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llparticipantlist.h | 4 |
8 files changed, 26 insertions, 10 deletions
diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index f2375bfa4f..38b755004c 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -334,7 +334,7 @@ void LLCallFloater::refreshParticipantList() if (!non_avatar_caller) { llassert(mParticipants == NULL); // check for possible memory leak - mParticipants = new LLParticipantList(mSpeakerManager, mAvatarList, true, mVoiceType != VC_GROUP_CHAT && mVoiceType != VC_AD_HOC_CHAT, false); + mParticipants = new LLParticipantList(mSpeakerManager, mAvatarList, mConversationViewModel, true, mVoiceType != VC_GROUP_CHAT && mVoiceType != VC_AD_HOC_CHAT, false); mParticipants->setValidateSpeakerCallback(boost::bind(&LLCallFloater::validateSpeaker, this, _1)); const U32 speaker_sort_order = gSavedSettings.getU32("SpeakerParticipantDefaultOrder"); mParticipants->setSortOrder(LLParticipantList::EParticipantSortOrder(speaker_sort_order)); diff --git a/indra/newview/llcallfloater.h b/indra/newview/llcallfloater.h index 00a3f76e56..181c92276d 100644 --- a/indra/newview/llcallfloater.h +++ b/indra/newview/llcallfloater.h @@ -31,6 +31,7 @@ #include "lltransientdockablefloater.h" #include "llvoicechannel.h" #include "llvoiceclient.h" +#include "llconversationmodel.h" class LLAvatarList; class LLAvatarListItem; @@ -228,6 +229,7 @@ private: LLSpeakerMgr* mSpeakerManager; LLParticipantList* mParticipants; LLAvatarList* mAvatarList; + LLConversationViewModel mConversationViewModel; LLNonAvatarCaller* mNonAvatarCaller; EVoiceControls mVoiceType; LLPanel* mAgentPanel; diff --git a/indra/newview/llconversationmodel.cpp b/indra/newview/llconversationmodel.cpp index f54e6d2d48..a5c0244bd4 100644 --- a/indra/newview/llconversationmodel.cpp +++ b/indra/newview/llconversationmodel.cpp @@ -40,6 +40,13 @@ LLConversationItem::LLConversationItem(std::string display_name, const LLUUID& u { } +LLConversationItem::LLConversationItem(const LLUUID& uuid, LLFolderViewModelInterface& root_view_model) : + LLFolderViewModelItemCommon(root_view_model), + mName(""), + mUUID(uuid) +{ +} + LLConversationItem::LLConversationItem(LLFolderViewModelInterface& root_view_model) : LLFolderViewModelItemCommon(root_view_model), mName(""), @@ -85,8 +92,8 @@ LLConversationItemSession::LLConversationItemSession(std::string display_name, c { } -LLConversationItemSession::LLConversationItemSession(LLFolderViewModelInterface& root_view_model) : - LLConversationItem(root_view_model) +LLConversationItemSession::LLConversationItemSession(const LLUUID& uuid, LLFolderViewModelInterface& root_view_model) : + LLConversationItem(uuid,root_view_model) { } @@ -99,8 +106,8 @@ LLConversationItemParticipant::LLConversationItemParticipant(std::string display { } -LLConversationItemParticipant::LLConversationItemParticipant(LLFolderViewModelInterface& root_view_model) : - LLConversationItem(root_view_model) +LLConversationItemParticipant::LLConversationItemParticipant(const LLUUID& uuid, LLFolderViewModelInterface& root_view_model) : + LLConversationItem(uuid,root_view_model) { } diff --git a/indra/newview/llconversationmodel.h b/indra/newview/llconversationmodel.h index fc2c600364..1a63230e41 100644 --- a/indra/newview/llconversationmodel.h +++ b/indra/newview/llconversationmodel.h @@ -43,6 +43,7 @@ class LLConversationItem : public LLFolderViewModelItemCommon { public: LLConversationItem(std::string display_name, const LLUUID& uuid, LLFolderViewModelInterface& root_view_model); + LLConversationItem(const LLUUID& uuid, LLFolderViewModelInterface& root_view_model); LLConversationItem(LLFolderViewModelInterface& root_view_model); virtual ~LLConversationItem() {} @@ -108,7 +109,7 @@ class LLConversationItemSession : public LLConversationItem { public: LLConversationItemSession(std::string display_name, const LLUUID& uuid, LLFolderViewModelInterface& root_view_model); - LLConversationItemSession(LLFolderViewModelInterface& root_view_model); + LLConversationItemSession(const LLUUID& uuid, LLFolderViewModelInterface& root_view_model); virtual ~LLConversationItemSession() {} }; @@ -116,7 +117,7 @@ class LLConversationItemParticipant : public LLConversationItem { public: LLConversationItemParticipant(std::string display_name, const LLUUID& uuid, LLFolderViewModelInterface& root_view_model); - LLConversationItemParticipant(LLFolderViewModelInterface& root_view_model); + LLConversationItemParticipant(const LLUUID& uuid, LLFolderViewModelInterface& root_view_model); virtual ~LLConversationItemParticipant() {} }; diff --git a/indra/newview/llimconversation.cpp b/indra/newview/llimconversation.cpp index 1f4522a96c..7bb29be27b 100644 --- a/indra/newview/llimconversation.cpp +++ b/indra/newview/llimconversation.cpp @@ -187,7 +187,7 @@ void LLIMConversation::buildParticipantList() if (mIsNearbyChat) { LLLocalSpeakerMgr* speaker_manager = LLLocalSpeakerMgr::getInstance(); - mParticipantList = new LLParticipantList(speaker_manager, getChild<LLAvatarList>("speakers_list"), true, false); + mParticipantList = new LLParticipantList(speaker_manager, getChild<LLAvatarList>("speakers_list"), mConversationViewModel, true, false); } else { @@ -196,7 +196,7 @@ void LLIMConversation::buildParticipantList() if(!mIsP2PChat && mSessionID.notNull() && speaker_manager) { delete mParticipantList; // remove the old list and create a new one if the session id has changed - mParticipantList = new LLParticipantList(speaker_manager, getChild<LLAvatarList>("speakers_list"), true, false); + mParticipantList = new LLParticipantList(speaker_manager, getChild<LLAvatarList>("speakers_list"), mConversationViewModel, true, false); } } updateHeaderAndToolbar(); diff --git a/indra/newview/llimconversation.h b/indra/newview/llimconversation.h index f21be94ee2..26151ad1be 100644 --- a/indra/newview/llimconversation.h +++ b/indra/newview/llimconversation.h @@ -33,6 +33,7 @@ #include "lltransientdockablefloater.h" #include "llviewercontrol.h" #include "lleventtimer.h" +#include "llconversationmodel.h" class LLPanelChatControlPanel; class LLChatEntry; @@ -104,6 +105,7 @@ protected: LLLayoutPanel* mParticipantListPanel; LLParticipantList* mParticipantList; LLUUID mSessionID; + LLConversationViewModel mConversationViewModel; LLChatHistory* mChatHistory; LLChatEntry* mInputEditor; diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp index 47518a365f..552ae196dd 100644 --- a/indra/newview/llparticipantlist.cpp +++ b/indra/newview/llparticipantlist.cpp @@ -200,9 +200,11 @@ private: LLParticipantList::LLParticipantList(LLSpeakerMgr* data_source, LLAvatarList* avatar_list, + LLFolderViewModelInterface& root_view_model, bool use_context_menu/* = true*/, bool exclude_agent /*= true*/, bool can_toggle_icons /*= true*/) : + LLConversationItemSession(data_source->getSessionID(), root_view_model), mSpeakerMgr(data_source), mAvatarList(avatar_list), mParticipantListMenu(NULL), diff --git a/indra/newview/llparticipantlist.h b/indra/newview/llparticipantlist.h index 53966c15fe..f8165aa292 100644 --- a/indra/newview/llparticipantlist.h +++ b/indra/newview/llparticipantlist.h @@ -31,13 +31,14 @@ #include "llevent.h" #include "llavatarlist.h" // for LLAvatarItemRecentSpeakerComparator #include "lllistcontextmenu.h" +#include "llconversationmodel.h" class LLSpeakerMgr; class LLAvatarList; class LLUICtrl; class LLAvalineUpdater; -class LLParticipantList +class LLParticipantList : public LLConversationItemSession { LOG_CLASS(LLParticipantList); public: @@ -46,6 +47,7 @@ public: LLParticipantList(LLSpeakerMgr* data_source, LLAvatarList* avatar_list, + LLFolderViewModelInterface& root_view_model, bool use_context_menu = true, bool exclude_agent = true, bool can_toggle_icons = true); |