summaryrefslogtreecommitdiff
path: root/indra/llui
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/llui
parent39ffad760b7abd09c8a7af6871fcabbf2da9c1e6 (diff)
STORM-1738 Autocorrect working for nearby chat and IM input boxes
warn-on-failure:open-license
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/lllineeditor.cpp3
-rw-r--r--indra/llui/lllineeditor.h3
2 files changed, 2 insertions, 4 deletions
diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp
index de951d3b56..4d0b972bf1 100644
--- a/indra/llui/lllineeditor.cpp
+++ b/indra/llui/lllineeditor.cpp
@@ -866,11 +866,10 @@ void LLLineEditor::addChar(const llwchar uni_char)
LLUI::reportBadKeystroke();
}
-// *TODO implement callback routine
if (!mReadOnly && mAutocorrectCallback != NULL)
{
// call callback
- // mAutotocorrectCallback(mText&, mCursorPos&);
+ mAutocorrectCallback(mText, mCursorPos);
}
getWindow()->hideCursorUntilMouseMove();
diff --git a/indra/llui/lllineeditor.h b/indra/llui/lllineeditor.h
index 9394700e8c..53af9ac996 100644
--- a/indra/llui/lllineeditor.h
+++ b/indra/llui/lllineeditor.h
@@ -169,8 +169,7 @@ public:
virtual BOOL setTextArg( const std::string& key, const LLStringExplicit& text );
virtual BOOL setLabelArg( const std::string& key, const LLStringExplicit& text );
- // *TODO Make this work
- typedef boost::function<void()> autocorrect_callback_t;
+ typedef boost::function<void(LLUIString&, S32&)> autocorrect_callback_t;
autocorrect_callback_t mAutocorrectCallback;
void setAutocorrectCallback(autocorrect_callback_t cb) { mAutocorrectCallback = cb; }
void setLabel(const LLStringExplicit &new_label) { mLabel = new_label; }