summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterimsessiontab.cpp
diff options
context:
space:
mode:
authorGilbert Gonzales <gilbert@lindenlab.com>2013-01-15 10:42:09 -0800
committerGilbert Gonzales <gilbert@lindenlab.com>2013-01-15 10:42:09 -0800
commit028ceaef1441cbd2d87b294c6cfe7193a6b8bbd7 (patch)
tree7b35e8b814e41d1aef77a291249298a60c25a11e /indra/newview/llfloaterimsessiontab.cpp
parent0e90e94a4d5cbac2d186f0056821a51078e8d1bd (diff)
parenta49d3b14254fa5cfac3900e86b2287a016eaf9cc (diff)
merging in latest changes
Diffstat (limited to 'indra/newview/llfloaterimsessiontab.cpp')
-rw-r--r--indra/newview/llfloaterimsessiontab.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp
index d4eb03f95d..06a79836db 100644
--- a/indra/newview/llfloaterimsessiontab.cpp
+++ b/indra/newview/llfloaterimsessiontab.cpp
@@ -72,6 +72,12 @@ 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));
@@ -552,6 +558,10 @@ 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)
{
@@ -576,6 +586,16 @@ 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();