From f7f85dd0dda563a9fb49ed65b193a9ea98da9ba2 Mon Sep 17 00:00:00 2001 From: Seth ProductEngine Date: Fri, 8 Jun 2012 01:09:00 +0300 Subject: CHUI-122 FIX Add button enabled only for P2P and ad hoc IM sessions. --- indra/newview/llimfloater.cpp | 7 ++++++- indra/newview/skins/default/xui/en/floater_im_session.xml | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index 6a510c4df1..dcd19b5856 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -311,7 +311,12 @@ BOOL LLIMFloater::postBuild() mTypingStart = LLTrans::getString("IM_typing_start_string"); - childSetAction("add_btn", boost::bind(&LLIMFloater::onAddButtonClicked, this)); + LLButton* add_btn = getChild("add_btn"); + + // Allow to add chat participants depending on the session type + add_btn->setEnabled(isInviteAllowed()); + add_btn->setClickedCallback(boost::bind(&LLIMFloater::onAddButtonClicked, this)); + childSetAction("voice_call_btn", boost::bind(&LLIMFloater::onCallButtonClicked, this)); LLVoiceClient::getInstance()->addObserver(this); diff --git a/indra/newview/skins/default/xui/en/floater_im_session.xml b/indra/newview/skins/default/xui/en/floater_im_session.xml index fc5b6b10af..21fc2d25d4 100644 --- a/indra/newview/skins/default/xui/en/floater_im_session.xml +++ b/indra/newview/skins/default/xui/en/floater_im_session.xml @@ -59,6 +59,7 @@ top="5" width="31" />