diff options
author | Vadim ProductEngine <vsavchuk@productengine.com> | 2011-12-09 17:59:29 +0200 |
---|---|---|
committer | Vadim ProductEngine <vsavchuk@productengine.com> | 2011-12-09 17:59:29 +0200 |
commit | 702410cef75e0cc10258964b86b093f2205ef462 (patch) | |
tree | 97323ef69ed74674c92be91ef509ffe95284c3be /indra/newview/llnearbychatbar.cpp | |
parent | 86847b753befbca31e4aadeff111acd398f9612d (diff) |
EXP-1671 FIXED Enable/disable the translation checkbox in the nearby chat floater whenever translation preferences change.
The checkbox is also updated when the nearby chat floater is opened.
Diffstat (limited to 'indra/newview/llnearbychatbar.cpp')
-rw-r--r-- | indra/newview/llnearbychatbar.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp index 114472ba56..4f8559718f 100644 --- a/indra/newview/llnearbychatbar.cpp +++ b/indra/newview/llnearbychatbar.cpp @@ -48,6 +48,7 @@ #include "llrootview.h" #include "llviewerchat.h" #include "llnearbychat.h" +#include "lltranslate.h" #include "llresizehandle.h" @@ -112,6 +113,12 @@ BOOL LLNearbyChatBar::postBuild() return TRUE; } +// virtual +void LLNearbyChatBar::onOpen(const LLSD& key) +{ + enableTranslationCheckbox(LLTranslate::isTranslationConfigured()); +} + bool LLNearbyChatBar::applyRectControl() { bool rect_controlled = LLFloater::applyRectControl(); @@ -156,6 +163,11 @@ void LLNearbyChatBar::showHistory() } } +void LLNearbyChatBar::enableTranslationCheckbox(BOOL enable) +{ + getChild<LLUICtrl>("translate_chat_checkbox")->setEnabled(enable); +} + void LLNearbyChatBar::draw() { displaySpeakingIndicator(); |