summaryrefslogtreecommitdiff
path: root/indra/newview/llimconversation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llimconversation.cpp')
-rw-r--r--indra/newview/llimconversation.cpp42
1 files changed, 42 insertions, 0 deletions
diff --git a/indra/newview/llimconversation.cpp b/indra/newview/llimconversation.cpp
index 5a5196fb7e..d8c81a7849 100644
--- a/indra/newview/llimconversation.cpp
+++ b/indra/newview/llimconversation.cpp
@@ -31,6 +31,8 @@
#include "llchatentry.h"
#include "llchathistory.h"
+#include "llchiclet.h"
+#include "llchicletbar.h"
#include "lldraghandle.h"
#include "llfloaterreg.h"
#include "llimfloater.h"
@@ -53,6 +55,8 @@ LLIMConversation::LLIMConversation(const LLUUID& session_id)
, mInputEditorTopPad(0)
, mRefreshTimer(new LLTimer())
{
+ mSession = LLIMModel::getInstance()->findIMSession(mSessionID);
+
mCommitCallbackRegistrar.add("IMSession.Menu.Action",
boost::bind(&LLIMConversation::onIMSessionMenuItemClicked, this, _2));
mEnableCallbackRegistrar.add("IMSession.Menu.CompactExpandedModes.CheckItem",
@@ -182,6 +186,44 @@ void LLIMConversation::draw()
}
}
+void LLIMConversation::enableDisableCallBtn()
+{
+ getChildView("voice_call_btn")->setEnabled(
+ mSessionID.notNull()
+ && mSession
+ && mSession->mSessionInitialized
+ && LLVoiceClient::getInstance()->voiceEnabled()
+ && LLVoiceClient::getInstance()->isVoiceWorking()
+ && mSession->mCallBackEnabled);
+}
+
+
+void LLIMConversation::onFocusReceived()
+{
+ setBackgroundOpaque(true);
+
+ if (mSessionID.notNull())
+ {
+ LLChicletBar::getInstance()->getChicletPanel()->setChicletToggleState(mSessionID, true);
+
+ if (getVisible())
+ {
+ // suppress corresponding toast only if this floater is visible and have focus
+ LLIMModel::getInstance()->setActiveSessionID(mSessionID);
+ LLIMModel::instance().sendNoUnreadMessages(mSessionID);
+ }
+ }
+
+ LLTransientDockableFloater::onFocusReceived();
+}
+
+void LLIMConversation::onFocusLost()
+{
+ setBackgroundOpaque(false);
+ LLTransientDockableFloater::onFocusLost();
+}
+
+
void LLIMConversation::buildParticipantList()
{
if (mIsNearbyChat)