From 14708a3ace184b0654ca7923732be6e06962d583 Mon Sep 17 00:00:00 2001 From: AlexanderP ProductEngine Date: Wed, 22 Aug 2012 18:27:29 +0300 Subject: CHUI_310 make NearbyChat a singletone --- indra/newview/llimconversation.cpp | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) (limited to 'indra/newview/llimconversation.cpp') diff --git a/indra/newview/llimconversation.cpp b/indra/newview/llimconversation.cpp index ee7f58b01f..2212673d3a 100644 --- a/indra/newview/llimconversation.cpp +++ b/indra/newview/llimconversation.cpp @@ -81,13 +81,35 @@ LLIMConversation::~LLIMConversation() //static LLIMConversation* LLIMConversation::findConversation(const LLUUID& uuid) { - return LLFloaterReg::findTypedInstance(uuid.isNull()? "chat_bar" : "impanel", LLSD(uuid)); + LLIMConversation* conv; + + if (uuid.isNull()) + { + conv = LLFloaterReg::findTypedInstance("nearby_chat"); + } + else + { + conv = LLFloaterReg::findTypedInstance("impanel", LLSD(uuid)); + } + + return conv; }; //static LLIMConversation* LLIMConversation::getConversation(const LLUUID& uuid) { - return LLFloaterReg::getTypedInstance(uuid.isNull()? "chat_bar" : "impanel", LLSD(uuid)); + LLIMConversation* conv; + + if (uuid.isNull()) + { + conv = LLFloaterReg::getTypedInstance("nearby_chat"); + } + else + { + conv = LLFloaterReg::getTypedInstance("impanel", LLSD(uuid)); + } + + return conv; }; @@ -336,15 +358,15 @@ void LLIMConversation::processChatHistoryStyleUpdate() } } - LLNearbyChat* nearby_chat = LLNearbyChat::getInstance(); - if (nearby_chat) + if (LLNearbyChat::instanceExists()) { - nearby_chat->reloadMessages(); + LLNearbyChat::instance().reloadMessages(); } } void LLIMConversation::updateCallBtnState(bool callIsActive) { +llwarns<<(this->getName())<("voice_call_btn")->setImageOverlay( callIsActive? getString("call_btn_stop") : getString("call_btn_start")); enableDisableCallBtn(); -- cgit v1.2.3 From fd62242dd6e5fa464db07e0b8ebf3ab54a6067a2 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Fri, 24 Aug 2012 17:31:12 -0700 Subject: CHUI-280 : Make LLParticipantList derives from LLConversationItemSession --- indra/newview/llimconversation.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llimconversation.cpp') diff --git a/indra/newview/llimconversation.cpp b/indra/newview/llimconversation.cpp index ee7f58b01f..f214003947 100644 --- a/indra/newview/llimconversation.cpp +++ b/indra/newview/llimconversation.cpp @@ -165,7 +165,7 @@ void LLIMConversation::buildParticipantList() if (mIsNearbyChat) { LLLocalSpeakerMgr* speaker_manager = LLLocalSpeakerMgr::getInstance(); - mParticipantList = new LLParticipantList(speaker_manager, getChild("speakers_list"), true, false); + mParticipantList = new LLParticipantList(speaker_manager, getChild("speakers_list"), mConversationViewModel, true, false); } else { @@ -174,7 +174,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("speakers_list"), true, false); + mParticipantList = new LLParticipantList(speaker_manager, getChild("speakers_list"), mConversationViewModel, true, false); } } updateHeaderAndToolbar(); -- cgit v1.2.3 From 0804ecb3551514d3321dfd4e3b17c3dab9693444 Mon Sep 17 00:00:00 2001 From: AlexanderP ProductEngine Date: Mon, 27 Aug 2012 17:41:37 +0300 Subject: removed debug messages --- indra/newview/llimconversation.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/newview/llimconversation.cpp') diff --git a/indra/newview/llimconversation.cpp b/indra/newview/llimconversation.cpp index 2212673d3a..1f4522a96c 100644 --- a/indra/newview/llimconversation.cpp +++ b/indra/newview/llimconversation.cpp @@ -366,7 +366,6 @@ void LLIMConversation::processChatHistoryStyleUpdate() void LLIMConversation::updateCallBtnState(bool callIsActive) { -llwarns<<(this->getName())<("voice_call_btn")->setImageOverlay( callIsActive? getString("call_btn_stop") : getString("call_btn_start")); enableDisableCallBtn(); -- cgit v1.2.3