diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 08a1a237f5fdfdf133a87c3949163eff7d8da2ad..6b15e4b21a273e798b93917263c69ceb66082701 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -42,6 +42,7 @@ #include "llagentcamera.h" #include "llagentlanguage.h" #include "llagentwearables.h" +#include "llimfloatercontainer.h" #include "llwindow.h" #include "llviewerstats.h" #include "llviewerstatsrecorder.h" @@ -1204,7 +1205,7 @@ bool LLAppViewer::mainLoop() LLVoiceChannel::initClass(); LLVoiceClient::getInstance()->init(gServicePump); - LLVoiceChannel::setCurrentVoiceChannelChangedCallback(boost::bind(&LLCallFloater::sOnCurrentChannelChanged, _1), true); + LLVoiceChannel::setCurrentVoiceChannelChangedCallback(boost::bind(&LLIMFloaterContainer::onCurrentChannelChanged, _1), true); LLTimer frameTimer,idleTimer; LLTimer debugTime; LLViewerJoystick* joystick(LLViewerJoystick::getInstance()); diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index 38b755004cab0aabc5e797293bc89e76b11ce6ff..e767609d74bbb58f8341b8d6c9f48963bae20176 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -364,7 +364,8 @@ void LLCallFloater::onAvatarListRefreshed() } // static -void LLCallFloater::sOnCurrentChannelChanged(const LLUUID& /*session_id*/) +// This entry point now disable, but left for later use. +void LLCallFloater::onCurrentChannelChanged(const LLUUID& /*session_id*/) { LLVoiceChannel* channel = LLVoiceChannel::getCurrentVoiceChannel(); diff --git a/indra/newview/llcallfloater.h b/indra/newview/llcallfloater.h index 181c92276d0f05f504fe0feb8276ba04ab3f00c4..e1c7b3f43adc341078b2ded546c4371242bb9cbe 100644 --- a/indra/newview/llcallfloater.h +++ b/indra/newview/llcallfloater.h @@ -74,7 +74,7 @@ class LLCallFloater : public LLTransientDockableFloater, LLVoiceClientParticipan */ /*virtual*/ void onParticipantsChanged(); - static void sOnCurrentChannelChanged(const LLUUID& session_id); + static void onCurrentChannelChanged(const LLUUID& session_id); private: typedef enum e_voice_controls_type @@ -260,7 +260,7 @@ class LLCallFloater : public LLTransientDockableFloater, LLVoiceClientParticipan * * Is used to ignore voice channel changed callback for the same channel. * - * @see sOnCurrentChannelChanged() + * @see onCurrentChannelChanged() */ static LLVoiceChannel* sCurrentVoiceChannel; diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp index 237748179cb8f14854b57a1219312ae356ad14f2..5a323583b895f8e43898de3a13ecf15f9f7cb496 100644 --- a/indra/newview/llimfloatercontainer.cpp +++ b/indra/newview/llimfloatercontainer.cpp @@ -114,6 +114,16 @@ void LLIMFloaterContainer::sessionRemoved(const LLUUID& session_id) removeConversationListItem(session_id); } +// static +void LLIMFloaterContainer::onCurrentChannelChanged(const LLUUID& session_id) +{ + if (session_id != LLUUID::null) + { + LLIMFloater::show(session_id); + } +} + + BOOL LLIMFloaterContainer::postBuild() { mNewMessageConnection = LLIMModel::instance().mNewMsgSignal.connect(boost::bind(&LLIMFloaterContainer::onNewMessageReceived, this, _1)); diff --git a/indra/newview/llimfloatercontainer.h b/indra/newview/llimfloatercontainer.h index a622ddfc8c7f7435760a0d1fe280b758aad83259..081c733884738a6b08b07e9b5798b8ab472d40d8 100644 --- a/indra/newview/llimfloatercontainer.h +++ b/indra/newview/llimfloatercontainer.h @@ -66,11 +66,11 @@ class LLIMFloaterContainer /*virtual*/ void tabClose(); static LLFloater* getCurrentVoiceFloater(); - static LLIMFloaterContainer* findInstance(); - static LLIMFloaterContainer* getInstance(); + static void onCurrentChannelChanged(const LLUUID& session_id); + virtual void setMinimized(BOOL b); void collapseMessagesPane(bool collapse);