summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterimsessiontab.cpp
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2013-01-23 17:47:08 -0800
committerMerov Linden <merov@lindenlab.com>2013-01-23 17:47:08 -0800
commita0112d6d78b17c5771b7b151d2fb9340bece3137 (patch)
tree7c8f68933cc1c0b09af188b99cd391a3f540c320 /indra/newview/llfloaterimsessiontab.cpp
parent46a74c4e01e19c07b5ee966ebe9882c4209dc89c (diff)
parent0911dafd81b8360235eb6f6b85fac7153a5d4a02 (diff)
Pull merge with lindenlab/viewer-chui
Diffstat (limited to 'indra/newview/llfloaterimsessiontab.cpp')
-rw-r--r--indra/newview/llfloaterimsessiontab.cpp32
1 files changed, 7 insertions, 25 deletions
diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp
index bc5b8c334d..37404ab716 100644
--- a/indra/newview/llfloaterimsessiontab.cpp
+++ b/indra/newview/llfloaterimsessiontab.cpp
@@ -60,6 +60,7 @@ LLFloaterIMSessionTab::LLFloaterIMSessionTab(const LLSD& session_id)
, mInputEditorTopPad(0)
, mRefreshTimer(new LLTimer())
, mIsHostAttached(false)
+ , mHasVisibleBeenInitialized(false)
{
setAutoFocus(FALSE);
mSession = LLIMModel::getInstance()->findIMSession(mSessionID);
@@ -72,12 +73,6 @@ LLFloaterIMSessionTab::LLFloaterIMSessionTab(const LLSD& session_id)
boost::bind(&LLFloaterIMSessionTab::onIMShowModesMenuItemCheck, this, _2));
mEnableCallbackRegistrar.add("IMSession.Menu.ShowModes.Enable",
boost::bind(&LLFloaterIMSessionTab::onIMShowModesMenuItemEnable, this, _2));
- mEnableCallbackRegistrar.add("Translating.Enabled",
- boost::bind(&LLFloaterIMSessionTab::isTranslatingEnabled, this, _2));
- mEnableCallbackRegistrar.add("Translating.On",
- boost::bind(&LLFloaterIMSessionTab::isTranslationOn, this, _2));
- mCommitCallbackRegistrar.add("Translating.Toggle",
- boost::bind(&LLFloaterIMSessionTab::toggleTranslation, this, _2));
// Right click menu handling
mEnableCallbackRegistrar.add("Avatar.CheckItem", boost::bind(&LLFloaterIMSessionTab::checkContextMenuItem, this, _2));
@@ -126,12 +121,14 @@ LLFloaterIMSessionTab* LLFloaterIMSessionTab::getConversation(const LLUUID& uuid
void LLFloaterIMSessionTab::setVisible(BOOL visible)
{
- LLTransientDockableFloater::setVisible(visible);
-
- if(visible)
+ if(visible && !mHasVisibleBeenInitialized)
{
- LLFloaterIMSessionTab::addToHost(mSessionID);
+ mHasVisibleBeenInitialized = true;
+ LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container")->setVisible(true);
+ LLFloaterIMSessionTab::addToHost(mSessionID);
}
+
+ LLTransientDockableFloater::setVisible(visible);
}
/*virtual*/
@@ -551,11 +548,6 @@ void LLFloaterIMSessionTab::onIMSessionMenuItemClicked(const LLSD& userdata)
LLFloaterIMSessionTab::processChatHistoryStyleUpdate();
}
-void LLFloaterIMSessionTab::toggleTranslation(const LLSD& userdata)
-{
- gSavedSettings.setBOOL("TranslateChat", !gSavedSettings.getBOOL("TranslateChat"));
-}
-
bool LLFloaterIMSessionTab::onIMCompactExpandedMenuItemCheck(const LLSD& userdata)
{
std::string item = userdata.asString();
@@ -579,16 +571,6 @@ bool LLFloaterIMSessionTab::onIMShowModesMenuItemEnable(const LLSD& userdata)
return (plain_text && (is_not_names || mIsP2PChat));
}
-bool LLFloaterIMSessionTab::isTranslatingEnabled(const LLSD& userdata)
-{
- return gSavedPerAccountSettings.getBOOL("TranslatingEnabled");
-}
-
-bool LLFloaterIMSessionTab::isTranslationOn(const LLSD& userdata)
-{
- return gSavedSettings.getBOOL("TranslateChat");
-}
-
void LLFloaterIMSessionTab::hideOrShowTitle()
{
const LLFloater::Params& default_params = LLFloater::getDefaultParams();