summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorJonathan Yap <none@none>2012-02-10 17:40:58 -0500
committerJonathan Yap <none@none>2012-02-10 17:40:58 -0500
commit22f26725b902cb2e942048d059710169666e4a45 (patch)
tree0886bf3a25fb9e4198bd4fdb7823d230d6de0599 /indra/newview
parent39ffad760b7abd09c8a7af6871fcabbf2da9c1e6 (diff)
STORM-1738 Autocorrect working for nearby chat and IM input boxes
warn-on-failure:open-license
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llautocorrect.cpp2
-rw-r--r--indra/newview/llimfloater.cpp5
-rw-r--r--indra/newview/llnearbychatbar.cpp3
3 files changed, 5 insertions, 5 deletions
diff --git a/indra/newview/llautocorrect.cpp b/indra/newview/llautocorrect.cpp
index 9162b35f45..791d34df0c 100644
--- a/indra/newview/llautocorrect.cpp
+++ b/indra/newview/llautocorrect.cpp
@@ -349,7 +349,7 @@ std::string AutoCorrect::replaceWords(std::string words)
{
static LLCachedControl<bool> perform_autocorrect(gSavedSettings, "AutoCorrect");
if(!(perform_autocorrect))return words;
- //TODO update this function to use the "wordStyle" thing,
+ //*TODO update this function to use the "wordStyle" thing,
//but so far this function is never used, so later
boost_tokenizer tokens(words, boost::char_separator<char>(" "));
diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp
index 8354243bd3..e300f6f32d 100644
--- a/indra/newview/llimfloater.cpp
+++ b/indra/newview/llimfloater.cpp
@@ -56,7 +56,7 @@
#include "llrootview.h"
#include "llspeakers.h"
#include "llviewerchat.h"
-
+#include "llautocorrect.h"
LLIMFloater::LLIMFloater(const LLUUID& session_id)
: LLTransientDockableFloater(NULL, true, session_id),
@@ -251,11 +251,12 @@ BOOL LLIMFloater::postBuild()
slide_right->setVisible(!mControlPanel->getParent()->getVisible());
slide_right->setClickedCallback(boost::bind(&LLIMFloater::onSlide, this));
- // *TODO Establish LineEditor with autocorrect callback
mInputEditor = getChild<LLLineEditor>("chat_editor");
mInputEditor->setMaxTextLength(1023);
// enable line history support for instant message bar
mInputEditor->setEnableLineHistory(TRUE);
+ // *TODO Establish LineEditor with autocorrect callback
+ mInputEditor->setAutocorrectCallback(boost::bind(&AutoCorrect::autocorrectCallback, AutoCorrect::getInstance(), _1, _2));
LLFontGL* font = LLViewerChat::getChatFont();
mInputEditor->setFont(font);
diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp
index 86244cbaa6..72fb95aca5 100644
--- a/indra/newview/llnearbychatbar.cpp
+++ b/indra/newview/llnearbychatbar.cpp
@@ -88,8 +88,7 @@ BOOL LLNearbyChatBar::postBuild()
{
mChatBox = getChild<LLLineEditor>("chat_box");
- // *TODO Establish LineEditor with autocorrect callback
-// mChatBox->setAutocorrectCallback(boost::bind(&AutoCorrect::autocorrectCallback, _1, _2));
+ mChatBox->setAutocorrectCallback(boost::bind(&AutoCorrect::autocorrectCallback, AutoCorrect::getInstance(), _1, _2));
mChatBox->setCommitCallback(boost::bind(&LLNearbyChatBar::onChatBoxCommit, this));
mChatBox->setKeystrokeCallback(&onChatBoxKeystroke, this);
mChatBox->setFocusLostCallback(boost::bind(&onChatBoxFocusLost, _1, this));