diff options
Diffstat (limited to 'indra/newview/llfloaterimsessiontab.cpp')
-rw-r--r-- | indra/newview/llfloaterimsessiontab.cpp | 32 |
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(); |