parent
6443701a3f
commit
39ffad760b
|
|
@ -375,7 +375,7 @@ std::string AutoCorrect::replaceWords(std::string words)
|
|||
args["REPLACEMENT"]=replacement;
|
||||
LLNotificationsUtil::add("AutoReplace",args);
|
||||
}
|
||||
ldebugs << "found a word in list " << location.c_str() << " and it will replace " << currentWord.c_str() << " => " << replacement.c_str() << llendl;
|
||||
lldebugs << "found a word in list " << location.c_str() << " and it will replace " << currentWord.c_str() << " => " << replacement.c_str() << llendl;
|
||||
int wordStart = words.find(currentWord);
|
||||
words.replace(wordStart,currentWord.length(),replacement);
|
||||
return replaceWords(words);//lol recursion!
|
||||
|
|
|
|||
|
|
@ -159,7 +159,7 @@ void AutoCorrectFloater::updateItemsList()
|
|||
void AutoCorrectFloater::updateNamesList()
|
||||
{
|
||||
namesList->deleteAllItems();
|
||||
if(!gSavedSettings, "AutoCorrect")
|
||||
if(!gSavedSettings.getBOOL("AutoCorrect"))
|
||||
{
|
||||
updateItemsList();
|
||||
return;
|
||||
|
|
@ -208,7 +208,8 @@ void AutoCorrectFloater::updateListControlsEnabled(BOOL selected)
|
|||
}
|
||||
void AutoCorrectFloater::updateEnabledStuff()
|
||||
{
|
||||
if(!gSavedSettings, "AutoCorrect")
|
||||
BOOL autocorrect = gSavedSettings.getBOOL("AutoCorrect");
|
||||
if(autocorrect)
|
||||
{
|
||||
LLCheckBoxCtrl *enBox = getChild<LLCheckBoxCtrl>("ac_enable");
|
||||
enBox->setDisabledColor(LLColor4::red);
|
||||
|
|
@ -219,9 +220,9 @@ void AutoCorrectFloater::updateEnabledStuff()
|
|||
LLUIColorTable::instance().getColor( "LabelTextColor" ));
|
||||
}
|
||||
|
||||
childSetEnabled("ac_list_name",enabledd);
|
||||
childSetEnabled("ac_list_entry",enabledd);
|
||||
updateListControlsEnabled(enabledd);
|
||||
childSetEnabled("ac_list_name", autocorrect);
|
||||
childSetEnabled("ac_list_entry", autocorrect);
|
||||
updateListControlsEnabled(autocorrect);
|
||||
updateNamesList();
|
||||
AutoCorrect::getInstance()->save();
|
||||
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ BOOL LLNearbyChatBar::postBuild()
|
|||
mChatBox = getChild<LLLineEditor>("chat_box");
|
||||
|
||||
// *TODO Establish LineEditor with autocorrect callback
|
||||
// mChatBox->setAutocorrectCallback(boost::bind(&AutoCorrect::autocorrectCallback));
|
||||
// mChatBox->setAutocorrectCallback(boost::bind(&AutoCorrect::autocorrectCallback, _1, _2));
|
||||
mChatBox->setCommitCallback(boost::bind(&LLNearbyChatBar::onChatBoxCommit, this));
|
||||
mChatBox->setKeystrokeCallback(&onChatBoxKeystroke, this);
|
||||
mChatBox->setFocusLostCallback(boost::bind(&onChatBoxFocusLost, _1, this));
|
||||
|
|
|
|||
Loading…
Reference in New Issue