diff options
author | Steve Bennetts <steve@lindenlab.com> | 2009-11-11 14:56:51 -0800 |
---|---|---|
committer | Steve Bennetts <steve@lindenlab.com> | 2009-11-11 14:56:51 -0800 |
commit | 064c91ae520fb157ed8ed314e43ce87e0a3bab99 (patch) | |
tree | 5fb550989d1f458aa52f408fb2d7c67da4f5c8aa /indra/newview/llimfloater.cpp | |
parent | 310ce5527526d36cb2e66aafb00c177e352c80c7 (diff) | |
parent | b4e3d34791497188537680a4556ccacaa004db09 (diff) |
Merge from product-engine
Diffstat (limited to 'indra/newview/llimfloater.cpp')
-rw-r--r-- | indra/newview/llimfloater.cpp | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index 5a2331aa06..54fc6f02fb 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -479,11 +479,29 @@ void LLIMFloater::updateMessages() LLStyle::Params style_params; style_params.color(chat_color); - LLChat chat(message); + LLChat chat; chat.mFromID = from_id; chat.mFromName = from; - mChatHistory->appendWidgetMessage(chat, style_params); + //Handle IRC styled /me messages. + std::string prefix = message.substr(0, 4); + if (prefix == "/me " || prefix == "/me'") + { + if (from.size() > 0) + { + style_params.font.style = "ITALIC"; + chat.mText = from + " "; + mChatHistory->appendWidgetMessage(chat, style_params); + } + message = message.substr(3); + style_params.font.style = "UNDERLINE"; + mChatHistory->appendText(message, FALSE, style_params); + } + else + { + chat.mText = message; + mChatHistory->appendWidgetMessage(chat, style_params); + } mLastMessageIndex = msg["index"].asInteger(); } @@ -499,7 +517,7 @@ void LLIMFloater::onInputEditorFocusReceived( LLFocusableElement* caller, void* LLIMModel::LLIMSession* im_session = LLIMModel::instance().findIMSession(self->mSessionID); //TODO: While disabled lllineeditor can receive focus we need to check if it is enabled (EK) - if( im_session && im_session->mTextIMPossible && !self->mInputEditor->getEnabled()) + if( im_session && im_session->mTextIMPossible && self->mInputEditor->getEnabled()) { //in disconnected state IM input editor should be disabled self->mInputEditor->setEnabled(!gDisconnected); |