summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterimsession.cpp
diff options
context:
space:
mode:
authorGilbert Gonzales <gilbert@lindenlab.com>2013-01-29 11:15:23 -0800
committerGilbert Gonzales <gilbert@lindenlab.com>2013-01-29 11:15:23 -0800
commitf70504c0ef6102b4985292cf87a7f3f6e3a41cbb (patch)
treecb616902181fb1913979340e766beb93e1cd4828 /indra/newview/llfloaterimsession.cpp
parente179add865fef30f6ad86ffd074f267fd01cb41d (diff)
parentacd28e28bc6ff48789ba321a470f05f7162ddd46 (diff)
merge
Diffstat (limited to 'indra/newview/llfloaterimsession.cpp')
-rw-r--r--indra/newview/llfloaterimsession.cpp22
1 files changed, 13 insertions, 9 deletions
diff --git a/indra/newview/llfloaterimsession.cpp b/indra/newview/llfloaterimsession.cpp
index a09dc1914f..f754853b82 100644
--- a/indra/newview/llfloaterimsession.cpp
+++ b/indra/newview/llfloaterimsession.cpp
@@ -162,7 +162,7 @@ void LLFloaterIMSession::newIMCallback(const LLSD& data)
LLFloaterIMSession* floater = LLFloaterReg::findTypedInstance<LLFloaterIMSession>("impanel", session_id);
// update if visible, otherwise will be updated when opened
- if (floater && (floater->getHost()? floater->hasFocus() : floater->getVisible()))
+ if (floater && floater->isInVisibleChain())
{
floater->updateMessages();
}
@@ -332,13 +332,7 @@ BOOL LLFloaterIMSession::postBuild()
BOOL result = LLFloaterIMSessionTab::postBuild();
mInputEditor->setMaxTextLength(1023);
- // enable line history support for instant message bar
- // XXX stinson TODO : resolve merge by adding autoreplace to text editors
-#if 0
- // *TODO Establish LineEditor with autoreplace callback
- mInputEditor->setAutoreplaceCallback(boost::bind(&LLAutoReplace::autoreplaceCallback, LLAutoReplace::getInstance(), _1, _2));
-#endif
-
+ mInputEditor->setAutoreplaceCallback(boost::bind(&LLAutoReplace::autoreplaceCallback, LLAutoReplace::getInstance(), _1, _2, _3, _4, _5));
mInputEditor->setFocusReceivedCallback( boost::bind(onInputEditorFocusReceived, _1, this) );
mInputEditor->setFocusLostCallback( boost::bind(onInputEditorFocusLost, _1, this) );
mInputEditor->setKeystrokeCallback( boost::bind(onInputEditorKeystroke, _1, this) );
@@ -853,8 +847,18 @@ void LLFloaterIMSession::updateMessages()
}
}
-void LLFloaterIMSession::reloadMessages()
+void LLFloaterIMSession::reloadMessages(bool clean_messages/* = false*/)
{
+ if (clean_messages)
+ {
+ LLIMModel::LLIMSession * sessionp = LLIMModel::instance().findIMSession(mSessionID);
+
+ if (NULL != sessionp)
+ {
+ sessionp->loadHistory();
+ }
+ }
+
mChatHistory->clear();
mLastMessageIndex = -1;
updateMessages();